-
Notifications
You must be signed in to change notification settings - Fork 1
Docs: Meshes
eFEMpart uses meshes with quadrilateral elements of 1st (4 nodes per element) or 2nd order (9 nodes per element).
Right now only rectangular domains can be generated using eFEM. To generate a mesh, simply type
generated_mesh = squareMesh(rect,N,order)
for normal meshes (meshes to be used on scalar PDEs) or
generated_mesh = squareMeshFluid(rect,N)
for fluid-specific meshes; rect=[x1 x2 y1 y2]
is an array containing the bounding notes for the rectangle, N
is an integer detailing the number of subdivisions to apply to the domain and order
is an integer, either 1 or 2, telling whether the domain should be first order (4 nodes per element) or second order (9 nodes per element). order
is not an input option for fluid meshes because we automatically assume fluid meshes happen on Q2-Q1 for velocity-pressure, as is prescribed for stability reasons.
Assuming you have a mymesh.msh
file, loading it into julia is incredibly easy. For a general mesh, simply type
loaded_mesh = Mesh("path/to/mymesh.msh")
and now loaded_mesh
will contain the Mesh
eFEM type. For fluid-specific meshes, the above syntax changes to
loaded_mesh = FluidMesh("path/to/mymesh.msh")
where now loaded_mesh
will contain the FluidMesh
eFEM type.