Skip to content

Solid Body

SolidBody places and manages solid obstacles inside a reactive-flow simulation. A solid body is a static or dynamic rigid region whose interaction with the fluid is handled by the InteractionSolidFluid machinery. SolidBody controls how many particles there are, how they are arranged (rows, columns, rectangular bands, or random distributions inside a bounding zone), and their size distribution.

Key Classes and Concepts

  • SolidBody : public OPObject: particle layout + shape + placement controls. Used in packed-bed, porous-media, and catalytic-particle studies.

Usage

Input

Defined in the @SolidBody block.

text
@SolidBody

$nParticles     Total number of particles                 : 0
$nRows          Rows in a regular packing                 : 0
$FirstRow       Index of the first row                    : 0
$nCols          Columns in a regular packing              : 0
$PartDiameter   Particle diameter (physical length)       : 0.01
$Porosity       Target porosity (0-1)                     : 0.5
$Clearance      Clearance between particles (grid cells)  : 5
$nDist          Distribution index                        : 1
$Random_Dist    Use random distribution                   : No

# Distribution bounding zone (-10 = unused) {#distribution-bounding-zone--10-unused}
$X0DistZone     Lower X of bounding zone                  : -10
$XNDistZone     Upper X of bounding zone                  : -10
$Y0DistZone     Lower Y                                   : -10
$YNDistZone     Upper Y                                   : -10
$Z0DistZone     Lower Z                                   : -10
$ZNDistZone     Upper Z                                   : -10

# Random-distribution radius range {#random-distribution-radius-range}
$MinRadious     Minimum radius (grid cells)               : 10
$MaxRadious     Maximum radius (grid cells)               : 20

Setting $Random_Dist = Yes activates a randomised layout bounded by $X0DistZone$ZNDistZone; otherwise the row/column geometry takes over.

Output

Particle positions are baked into the phase-field state at initialisation and visualised through PhaseField::WriteVTK.

Example

cpp
#include "ReactiveFlows/SolidBody.h"

SolidBody SB(OPSettings, InputFile);
// During startup: SB.Set(Phi) places particles into the phase-field.

Dependencies

Released under the GNU GPLv3 License.