Compile-time options (compileoptions.h)
MultiFlow has a set of compile-time flags defined in
src/include/compileoptions.h.
Enabling or disabling these flags requires editing that file and recompiling.
Each flag is a C preprocessor #define; commenting it out deactivates the feature.
!!! warning "Recompilation required"
Changes to compileoptions.h take effect only after a full recompile:
cmake --build build -j8
Numerical constant
| Symbol |
Default value |
Description |
MF_MIN_FLUID_VOLUMEFRACTION |
0.35 |
Minimum fluid volume fraction in an Eulerian phase cell. Cells with a fluid volume fraction below this threshold are treated as fully occupied by the dispersed phase. |
Mesh
| Flag |
Default |
Description |
MF_POLY_MESHER |
off |
Activates the polyhedral mesh generator. Requires linking against the VORO++ library. |
MF_ENABLE_MANUAL_MESH_MANIPULATION |
off |
Enables user-defined manual mesh manipulations after mesh creation or import (e.g. node-position corrections via a user file). |
Interface Reconstruction Library (IRL)
| Flag |
Default |
Description |
IRL_ON |
off |
Links MultiFlow to the Interface Reconstruction Library (IRL) via the MultiFlow_IRL_C_Interface wrapper. Required for IRL-based interface reconstruction in VOF and front-tracking simulations. |
Front-tracking (MFTL)
| Flag |
Default |
Description |
MFTL_ON |
off |
Activates the MFTL (MultiFlow Triangle Library) front-tracking interface. |
FT_SCALAR_TRANSPORT |
off |
Enables scalar transport on the front-tracking surface. The FRONTTRACKING flag in mftl.h must also be enabled. See also SURFACE_SCALAR_TRANSPORT below. |
FT_SURFACE_TENSION_USER |
off |
Enables user-defined surface tension for front-tracking (requires a user-supplied function). |
SURFACE_SCALAR_TRANSPORT |
off |
Enables surface scalar transport in the front-tracking framework. Requires FRONTTRACKING to be defined in mftl.h. |
Packed-bed IBM
| Flag |
Default |
Description |
MF_PACKED_BED_IBM |
off |
Activates special packed-bed IBM routines (developed for the packed-bed studies of C. Gorges). Unlocks the TotalNumOfParticles, ParticleRe, and AMRInletRefinement options in the .mf input file. |
MF_EXTRA_FLUID_CELLS_IN_OVERLAPMESHBOXES |
off |
Adds extra fluid cells into the particle overlap-mesh boxes to improve accuracy for higher-order velocity interpolation near particle surfaces. |
DEM particle forces
| Flag |
Default |
Description |
MF_DEM_ADDED_MASS_FORCE |
off |
Includes the added-mass (virtual-mass) force on Lagrangian DEM particles. Accounts for the inertia of the fluid displaced by an accelerating particle; significant when ρ_fluid / ρ_particle is not small. Activates the semi-implicit effective-mass correction in the Verlet integrator. Enables the AddedMassForce yes/no option in the PHASE block of the .mf file. |
MF_DEM_HISTORY_FORCE |
off |
Includes the Basset history (memory) force on Lagrangian DEM particles. Captures vorticity diffusion past the particle surface via a 1/√(t−τ) integral kernel. Supported models: daitche (full history, O(N) memory) and window (fixed-memory circular buffer with exponential tail). Enables the HistoryForceModel and BassetSettings options in the .mf file. |
MF_PARTICLE_EXTERNAL_SOURCES |
off |
Enables user-defined external forces on particles. Requires implementing the force in a user file. In the .mf file, ExternalForces must also be set in the PHASE block. |
MF_PARTICLE_FLUID_VELOCITY_GRADIENT |
off |
Interpolates fluid velocity gradients (in addition to velocities) to the particle overlap-mesh boxes. Required for force models that use the local velocity-gradient tensor (e.g. certain lift or rotation-induced drag corrections). |
DEM collision models
| Flag |
Default |
Description |
MF_COHESION_DMT |
off |
Activates the DMT adhesion model (Derjaguin–Muller–Toporov) for particle–particle cohesion. Based on Castellanos (2005) and Wilson (2016). Enables the SetCohesion option in the .mf file. |
MF_ROUGH_ROLLING |
off |
Activates the rough rolling resistance model (Wilson 2017) for individual particle rolling resistance at the contact point. Enables the SetRoughness option in the .mf file. |
MF_WALL_RHOUGHNESS_STD_ANGLE |
5.2 (degrees) |
Standard angle (in degrees) used in the wall roughness model of Huber (1998). Only relevant when MF_WALL_RHOUGHNESSMODEL is defined. |
MF_WALL_RHOUGHNESSMODEL |
off |
Activates the wall roughness model of Huber (1998) for particle–wall collisions. |
MF_COLLISION_CHECK_LARGE_OVERLAPS |
on |
Emits a warning when a collision produces an unphysically large particle overlap (useful for detecting too-large time steps or ill-conditioned setups). Automatically disabled when MF_PARTICLE_FRAGMENTATION is active. |
MF_WRITE_COLLISION_STATISTICS |
off |
Writes detailed collision statistics (frequency, overlap magnitudes, etc.) to output files at each output step. |
MF_TRANSFER_DEM_COLLISION_HISTORY |
on |
Carries forward the collision history of particles when they migrate between MPI processes. Automatically enabled when MF_PARTICLE_FRAGMENTATION is active. |
DEM particle removal
| Flag |
Default |
Description |
MF_REMOVE_PARTICLE_NOFLUIDCOUPLING |
off |
Removes particles that are located inside overlap-mesh boxes that contain no fluid cells (i.e. fully solid regions). |
MF_REMOVE_PARTICLE_UNPHYSICAL |
off |
Removes particles whose state has become unphysical (e.g. velocity or overlap beyond defined thresholds). |
DEM particle statistics
| Flag |
Default |
Description |
MF_WRITE_DEM_PARTICLE_STATISTICS |
off |
Writes per-particle statistical data (positions, velocities, forces, etc.) to output files. Can generate large amounts of data in dense simulations. |
Moving walls
| Flag |
Default |
Description |
MF_SET_VELOCITY_TRIANGULAR_WALLS |
off |
Sets the velocity of triangular (STL) wall elements without physically moving them. The velocity is defined in src/lagrangian/cartesianoverlapmesh/movewallsinoverlapmeshboxes.c (DetermineTriangleVertexVelocity). Automatically enabled when MF_ROTATING_WALLS is active. |
MF_MOVE_TRIANGULAR_WALLS |
off |
Physically moves the triangular (STL) wall elements in addition to setting their velocity. The motion is defined in src/lagrangian/cartesianoverlapmesh/movewallsinoverlapmeshboxes.c. |
MF_ROTATING_WALLS |
off |
Applies a global rotational velocity to all wall elements. The rotation origin and angular velocity must be set in the .mf file via WallRotationOrigin and WallAngularVelocity in the PHASE block. Automatically enables MF_SET_VELOCITY_TRIANGULAR_WALLS. |
Particle motion in rotating frame
| Flag |
Default |
Description |
MF_PARTICLE_MOTION_IN_ROTATING_FRAME |
off |
Solves particle motion in a rotating reference frame. The frame angular velocity must be set in the .mf file via FrameRotationalVelocity and optionally FrameAccelerationTime in the PHASE block. Works only for single-phase particle simulations (no fluid). |
Chemistry
| Flag |
Default |
Description |
MF_GAS_CHEMISTRY |
off |
Enables the multispecies reactive gas-phase chemistry module. Currently restricted to the incompressible flow regime. Activates the CHEMISTRY keyword block in the .mf file. |
MF_PARTICLE_CHEMISTRY |
off |
Enables heterogeneous particle reactions (particle–gas chemistry). Requires MF_GAS_CHEMISTRY to be enabled. |
MF_PARTICLE_DISCRETISATION |
off |
Enables intra-particle spatial discretisation for particle chemistry (e.g. shrinking-core or distributed reaction models). Requires MF_PARTICLE_CHEMISTRY. |
Particle fragmentation
| Flag |
Default |
Description |
MF_PARTICLE_FRAGMENTATION |
off |
Activates the particle fragmentation model. Enabling this flag automatically enables MF_TRANSFER_DEM_COLLISION_HISTORY and disables MF_COLLISION_CHECK_LARGE_OVERLAPS. |