How combustion-and-propulsion-iitgn/prf-minimal works
Project Type and Purpose
• This is a scientific simulation framework built on OpenFOAM. It provides:
• A core application (rocketMotor) for modeling rocket motor propellant regression and two-phase flows.
• A suite of domain-specific C++ libraries (multiphase models, boundary conditions, interface tracking, heat‐transfer, etc.).
• Post‐processing utilities and function objects for thrust calculation, stream functions, and data mapping.
• Use case: researchers run CFD simulations (single/multiphase) in tutorial or custom cases, compile code with OpenFOAM toolchain, then post-process results.
File‐Structure Analysis
Top level:
• applications/rocketMotor – custom CFD solver executable.
• src/ – modular libraries organized by functionality:
– PhaseSystems (gas‐particle reaction systems)
– interfaceTrackingModels, interfacialModels (momentum/heat exchange)
– fvPatchFields (custom boundary conditions)
– multiphaseCompressibleTurbulenceModels (turbulence closures)
– phaseModel, sharpInterfaceHeatTransferModels
– functionObjects (runtime post‐processors)
• utilities/ – standalone post‐processing executables.
• platforms/, Make/, bashrc, Allwmake – build/config scripts for wmake/OpenFOAM.
Architectural choices:
– Layered C++ libraries (domain modules)
– One core application linking to these libs
– Utilities linking to a subset of libraries
– Build system orchestrates compilation of all components
README Insights
• Core application: rocketMotor for propellant regression, CD nozzle flows.
• Highlights: custom boundary conditions, multiphase models, function objects, utilities.
• Build: requires sourcing bashrc, then ./Allwmake.
a. Main Components
• OpenFOAM Core (external)
• Build System
– bashrc / environment
– wmake / Allwmake scripts
• Domain Libraries (src/)
– Phase Systems
– Interfacial Models
– fvPatchFields
– Turbulence Models
– Interface Tracking
– Phase Models
– Heat Transfer Models
– Function Objects
• Applications
– rocketMotor
• Utilities
– ReynoldsNumber, mapVolFields, postProcessRocket, rocketConservation, setMultipleAlphaField, setRocketInitField, streamFunction
• Input/Output
– Case directories (tutorials/, user cases)
– Simulation results (fields, logs)
– Post‐processed data
b. Relationships & Data Flow
1. User defines a case directory (mesh, dictionaries).
2. Build system compiles domain libraries and links them into rocketMotor and utilities.
3. User runs rocketMotor → reads mesh + dictionaries + custom boundary conditions → uses PhaseSystems & InterfacialModels libraries → writes field results.
4. User optionally runs utilities or function objects embedded during simulation → read results → compute thrust, stream function, mapping, etc.
5. Outputs for analysis or validation.
c. Architectural Patterns
• Layered architecture: core physical models separated into libraries.
• Plugin‐style functionObjects loaded at runtime.
• Factory patterns in OpenFOAM for boundary conditions (fvPatchFields) and interfacial/drift models.
d. Key Technologies & Frameworks
• C++17, OpenFOAM v2112 API
• wmake / Allwmake build system
• GNU Make
• Bash environment setup