FastS : IBM workflow
How to compute an IBM case.
If you don not have a body to perform this tutorial, download this one:
[Download sample body]
.
Settings
Generate your surface mesh describing immersed bodies. If more than one body, put one body per CGNSBase.
Set the state using
State::tkState
. Set the case dimension (2D or 3D), the freestream Mach number, the fluid model, ...
Set the resolution for each bodies using
Solver::tkFastSolver
. Chose a resolution as snear and a IBC type. Click on the body, then on Set data.
Save it as "case.cgns".
Preprocessing
Open the preprocessing script:
Open the preprocessing script
prep.py
.
You can modify the Cartesian mesh characteristics (minimum spacing, extent of the domain, number of points per grid and number of ghost cells required by the solver).
Save it.
Run the script using : python
prep.py
Three files are generated:
in 't.cgns' are stored the octree mesh coordinates and the initial fields.
in 'tc.cgns' are stored the data required to update interpolated and IBM cells within the CFD simulation.
in 'IBMInfo.cgns' are stored the coordinates of the IBM corrected, wall and interpolated points, such that they can be vizualised.
Computation
Edit the computation file
compute.py
.
Modify the solver settings and the number of iterations.
Then run the computation with:
python
compute.py
It will generate a 'restart.cgns' file.
Post-processing
A sample file for post-processing is provided in
post.py
. Modify it to get what you want.
Running on stelvio
NP: number of processes
NT: number of threads (generally 4)
= NP x NT cores
Run in sequential: python prep.py NP
Then run in parallel: kpython -n NP -t NT compute.py NP
using the LSF
job
.
More:
Tutorials
-
Gallery
-
Reference documentation