-
Notifications
You must be signed in to change notification settings - Fork 50
NinjaFOAM Overview
This page documents the individual steps in a NinjaFOAM simulation. These steps are executed in ninjafoam::simulate_wind(). Output from each OpenFOAM call is written to a log file (e.g., log.checkMesh) in the temporary directory.
-
A temporary case directory is created and the OpenFOAM case files are written to the temporary directory. The OpenFOAM files are copied from template files located in
WINDNINJA_DATA/ninjafoam.zip. -
The DEM is converted to binary STL format and written to
constant/triSurface. -
Call
surfaceTransformPoints. This creates an STL of the output surface. This is a surface shifted to the user-specified output wind height. It is written toconstant/triSurface/<demBaseName>_out.stl. -
Call
surfaceCheck. This performs a check on the generated STL and writes a file calledlog.jsonwhich is later used in theblockMeshDictfile writing if a DEM is not available (e.g., runs initiated with an STL). -
Write
blockMeshDict. During this step,xmin,xmax,ymin,ymax,zmin,zmaxare read/calculated from the DEM unless the run was initiated with an STL file, in which case the necessary terrain information is read fromlog.json. This is the bounding box forblockMesh. -
Run
blockMesh. -
Run
moveDynamicMesh, in parallel if more than once processor is available. -
Refine the near-surface layer with
refineMesh. This refines the near-surface cells in all directions. -
Call
checkMeshto check the current cell count. Repeat 8-9 until cell count meets our threshold. -
Call
renumberMesh. -
Call
applyInit. This applies the initial conditions. -
Run
simpleFoam, in parallel if more than one processor is available. -
Call
sampleto sample the velocity field at the user-specified output height. The sampling is controlled bysampleDict. The sampling is performed on the output surface<demBaseName>_out.stlcreated at the beginning of the simulation. There are several types of interpolation schemes available:cell,cellPoint,cellPointFace, etc. -
Convert the raw xyz output to the requested WindNinja formats.
-
Remove the temporary directory and all OpenFOAM case files unless VTK output was requested.