fea output for any points

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

fea output for any points

Iris_Haagsma
Hi!

I did the CFD tutorial on the fluid flow past a cylinder and I have exported the data from this simulation as a data struct 'fea' to the MATLAB workspace. With the 'evalexpr' function I evaluated the expressions for the x- and y-coordinates, the values for the velocity in the x and y direction (u,v), and the pressure. These are evaluated at the gridpoints using the p = fea.grid.p. However, I was wondering if it was possible to evaluate the values for these expressions using any x- and y-coordinates?

Many thanks!

Reply | Threaded
Open this post in threaded view
|

Re: fea output for any points

Precise Simulation
Administrator
This post was updated on .
Yes, the second argument to evalexpr, xp, can be an array [n_sdim, n_points] for any points (where points outside the geometry will evaluate to 'nan').

EDIT: Evaluation in mesh nodes is faster, as points in the middle of cells are evaluated with direct finite element interpolation, but "evalexpr" accepts points everywhere.