SimVascular / svFSI

A multi-physics finite element solver for patient-specific blood flow simulation including fluid-structure interaction and cardiac electrophysiology
Other
31 stars 49 forks source link

Quadratic meshes in svFSI #40

Open mrp089 opened 3 years ago

mrp089 commented 3 years ago

There are some examples of quadratic meshes, e.g. https://github.com/SimVascular/svFSI-Tests/tree/master/05-struct/01-block-compression/mesh/P2/N008/mesh-surfaces

In my current workflow, I take a .vtu mesh and extract the surfaces with the vtkDataSetSurfaceFilter. Unfortunately, it can't handle quadratic meshes and automatically triangulates the mesh to yield linear elements.

@ktbolt @vvedula22 What's your workflow to generate these quadratic (surface) meshes? Thank you!

vvedula22 commented 3 years ago

I wrote a Fortran-based code to generate higher-order meshes. There are some examples in there that you may follow. The code was originally written to convert Gambit mesh in .neu (neutral file) format into SimVascular compatible vtu/vtp system. Later I extended it to higher-order meshes. The code reads a txt file that describes problem dimension and paths to mesh and faces files. Then, the code will ask for user input whether to convert into a higher-order mesh. Below is an example for the text file:

# numSpatialDim
2

# meshFilePath
../01-tri3/mesh-complete.mesh.vtu

# faceFilesPaths
../01-tri3/mesh-surfaces/disk_wall.vtp

Following mesh conversions are possible:

2D:
- 3-noded linear triangle to 6-noded quadratic triangle
- 4-noded bilinear quadrilateral to an 8-noded serendipity element
- 4-noded bilinear quad. to a 9-noded biquadratic element

3D:
- 4-noded linear tet to 10-noded quadratic tetrahedron
- 8-noded trilinear brick to 20-noded quadratic brick (serendipity)
- 8-noded trilinear brick to 27-noded triquadratic brick
vvedula22 commented 3 years ago

I plan to integrate this into svFSI later so that users can choose to convert to higher-order mesh through the input file.