A mass, energy, and helicty conserving dual-field Galerkin finite element discretization of the incompressible Navier-Stokes problem based on this paper https://arxiv.org/abs/2104.13023 implemented in MFEM, see https://mfem.org/
- download and unpack mfem and glvis into the extern folder
- install it there as described on mfem.org
- run the
build.sh
file to cmake, thecompile.sh
file to make, therun.sh
file to run - run
clean.sh
to delete the mesh and solution files afterwards
MEHCscheme
├── extern/ # MFEM and glvis
│ ├── CMakeLists.txt
│ ├── mfem
│ └── glvis
├── build/ # appears after building
├── out/ # data output
├── scripts/ # plot files
├── src/ # main FEM code
│ ├── examples-edited/ # simplified MFEM examples
│ │ └── ex1simple.cpp
│ ├── examples-mfem/ # original MFEM examples
│ │ └── ex1.cpp
│ ├── CMakeLists.txt # for build process
│ ├── curlcurl.cpp
│ ├── dirichlet-cons.cpp # main simulation
│ ├── dirichlet-conv.cpp # main simulation
│ └── utils.cpp # helper functions
├── symbolic_math/ # mathematica code
├── build.sh
├── clean.sh
├── compile.sh
├── LICENSE
└── README.md
- select the cpp file in src/CMakeLists.txt :
periodic-conv.cpp
periodic-cons.cpp
dirichlet-[placeholder].cpp
- run ./build.sh
- run ./compilerun.sh
- produce a visualization using
scripts/*.ipynb
- find the visualizsations in out/plots
- find the raw data in out/rawdata
see either of the following links