Simulations Implementation¶
This page covers the internal architecture of the simulation toolkits for developers extending or maintaining them.
Package structure¶
hera/simulations/
openFoam/
toolkit.py # OFToolkit — main OpenFOAM toolkit
eulerian/
abstractEulerianSolver.py # Base for Eulerian solvers
simpleFoam.py # simpleFoam solver interface
buoyantReactingFoam.py # buoyantReactingFoam solver
NavierStokes.old/ # Legacy Navier-Stokes (preprocess, postprocess, GUI)
lagrangian/
LSM/
toolkit.py # OFLSMToolkit — OpenFOAM + LSM coupling
preprocessOFObjects/ # Mesh and case preprocessing utilities
postProcess/
VTKPipeline.py # VTK post-processing pipeline
VTKPipelineExecutionContext.py
LSM/
toolkit.py # LSMToolkit — Lagrangian Stochastic Model
singleSimulation.py # Single LSM simulation handler
template.py # LSM template management
hermesWorkflowToolkit.py # LSM workflow integration
CLI.py # hera-LSM CLI entry points
gaussian/
toolkit.py # gaussianToolkit — Gaussian dispersion
windProfile/
toolkit.py # WindProfileToolkit — vertical wind profiles
machineLearningDeepLearning/
toolkit.py # ML/DL toolkit
torch/
modelContainer.py # PyTorch model container
hermesWorkflowToolkit.py # hermesWorkflowToolkit — workflow management
evaporation/ # Evaporation models
deposition/
models.py # Particle deposition models
hydrodynamics/
nearWallFlow.py # Near-wall flow calculations
WRF/
wrfDatalayer.py # WRF weather model data layer
utils/
interpolations.py # Spatial interpolation
coordinateHandler.py # Coordinate transformations
canopyWindProfile.py # Canopy wind profile model
inputForModelsCreation.py # Model input generation
Toolkit sub-pages¶
- OpenFOAM toolkit — Overall design, solvers, workflows, VTK pipeline, templates
- LSM toolkit — Lagrangian Stochastic Model architecture
- Gaussian dispersion toolkit — Gaussian puff/plume models
- Wind profile toolkit — Vertical wind profile modeling
- Hermes workflow toolkit — Workflow pipeline base class
- Machine Learning / Deep Learning toolkit — ML/DL model management
Adding a new simulation toolkit¶
- Create a new module under
hera/simulations/<domain>/ - Inherit from
abstractToolkit(orhermesWorkflowToolkitfor workflow support) - Set
toolkitNamein__init__ - Add
_analysisand_presentationlayers as needed - Register in
ToolkitHome._toolkitsdict inhera/toolkit.py
For the full API, see the Simulations API Reference.