Details of fea.sol

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Details of fea.sol

nayakron
Hi, I was simulating the 2D flow past a cylinder with solver type as "Time-Dependent". I exported it to MATLAB as fea struct. I have following queries,

1) Under fea.sol I see only "u" and not "v". Is there any way to get "v" as well?

2) Under fea.sol, the size of "u" is Ns by Nt, where Ns seems to be the spatial dimension and Nt is the number of time-steps. I wanted some clarity on how Ns is calculated. It seems Ns is the summation of number of cells, points and boundary elements (boundary points, edges, faces?). Is "u" calculated over both points and edges ?

Reply | Threaded
Open this post in threaded view
|

Re: Details of fea.sol

Precise Simulation
Administrator
fea.sol.u refers to an array of all collected solution values (u is a common name in FEA litterature for the common solution vector). From https://www.featool.com/doc/feastruct#fea_struct

"After solving a problem the sol field will contain the solution column vector in sol.u with rows corresponding to the degrees of freedom (ordered according to the order of the dependent variables in fea.dvar and fea.eqn.dofm). For time dependent and eigenvalue problems the columns in u correspond to solutions at different times/eigenvalues, and additionally the output times will be stored as a vector in the sol.t or sol.l field, respectively."

The rows in fea.sol.u correspond the global degrees of freedom ordering per dependent variable as given in fea.dvar, in your case

fea.sol.u = [u(1..n_dof_u, 1..n_t); v(1..n_dof_v, 1..n_t); p(1..n_dof_p, 1..n_t)]

where n_t is the number of time steps. The ordering is computed by mapdofbdr and depends on your mesh and finite element shape function, in the case of 1st order linear elements it happens that the ordering is exactly the same as the mesh ordering, that is "dof n = value in mesh vertex n = fea.grid.p(n,:)". However for higher order elements it gets significantly more complex (with values on edges, faces etc). In these cases you can use the "evalexpr/evalexprp" to evaluate/interpolate the values in the points you are interested in.