I have a flow field solution that has been computed in OpenFOAM. But I would like to interpolate the solution to FreeFEM.
What is the method/process to carry out this interpolation on FreeFEM mesh?
I have a flow field solution that has been computed in OpenFOAM. But I would like to interpolate the solution to FreeFEM.
What is the method/process to carry out this interpolation on FreeFEM mesh?
For 2D, you can use the triangulate
function to create a mesh in which the vertices are the points where the data is given. Then, you can create a P1
finite element space, assign the function values at the vertex points. In 3D the procedure is the same, but you need to use tetgconvexhull
instead of triangulate
.
I used MATLAB interpolation. You create a mesh which can be read in Freefem then import it to matlab and interpolate the field on it then you can read both mesh and field in P1 seperately in freefem.