Skip to content

Tutorial: incompressible‐‐pimpleHFDIBFoam‐‐fallingParticleDistribution

OStudenik edited this page Aug 22, 2024 · 26 revisions

Case description

This tutorial represents a situation where a number of non-spherical particles of different sizes is sedimenting in a rectangular domain.

Note that in order for the tutorial to be fast to evaluate even on personal computers, it is constructed as two-dimensional. However, the DEM part of the code is suitable only for three-dimensional simulations and the particles properties were adjusted in such a way that the tutorial gives plausible results.

Geometry and boundary conditions

The test case is built with dimensions (120mm,0.1mm,6mm) defined as a single block, as the figure below depicts. The front and back in Y directions are prescribed as type empty, and the active boundaries prescribed as type wall are highlighted in green. These boundaries are prescribed with zeroGradient boundary condition for pressure and noSlip for fluid velocity. Remaining type patch boundary, highlighted in blue, is prescribed with fixedValue set to uniform 0 boundary condition for pressure and zeroGradient for fluid velocity. For details see files

"tutorialDirectory"/system/blockMeshDict

for details regarding mesh construction and

"tutorialDirectory"/0.org/U "tutorialDirectory"/0.org/p

for details regarding boundary and initial condition settings Incompresible_BlockFigure_2 please note that the dimensions depicted are in millimeters

DEM material properties

To configure the DEM solver you must open the HFDIBDEMDict found at path

"tutorialDirectory"/constant/HFDIBDEMDict

Right below the openFOAM head of the file is located bodyNames() list option. Here, you define particle names that you wish to include in your simulation; if the particle is based on STL surface mesh, please insert the file with the matching in name into the directory. In our case, we are working with a particle named "icoSphere". Therefore, we will modify the list as bodyNames("icoSphere"), which is linked to the file located here:

"tutorialDirectory"/constant/triSurface/icoSpehre.stl

next we enter global solver configurations,

  • interpolationSchemes setting for immersed boundary method
  • surfaceThreshold threshold for particle projection and interpolation schemes,
  • stepDEM integration step for DEM solver working splitting global CFD integration step the inverse value is amount of DEM steps per one CFD iteration
  • geometricD active considered active directions(1) for active (-1) for inactive
  • recordSimulation boolean option to separately record the position of particles at a given time
  • recordFirstTimeStep boolean option to record initial position of particles added to domain
  • nSolidsInDomain upper limit of particle which can be active within domain, when not entered the default value is 1000

next is the control of the outputs, while the solver runs are outupts may be required for debugging purpose otherwise they tend to slow down simulation time or even overload memory and lead to the crash of simulation. For these purposes solver enables outputSetup dict where following outputs may be enabled

  • basic simulation time info and body velocities and location per CFD step
  • iB detailed info regarding particle properties per DEM step
  • DEM detailed info regarding particle contact treatment
  • addModel detailed info regarding particle addition into the computational domain
  • parallelDEM detailed info regarding particle contact treatment from all subdomains for parallel computations

next is the DEM dictionary to set material and properties. The materials is the sub-dictionary where multiple materials might be defined using Y - Young Modulus (material stiffness), nu - Poisson ratio, mu - static friction coefficient, adhN- normal adhesion coefficient, eps - coefficient of restitution (dissipation). Next the curvature coefficient LcCoeff represents the local curvature of the considered solids. collisionPatches is sub-dictionary for a definition of collision boundaries which may or may not correspond with system boundaries each wall is defined as a dictionary consisting of material enter the above defined material, nVec normal vector of the boundary which points out from the domain and planePoint arbitrary point located at the desired patch. Which concludes present DEM options.

The virtualMesh dictionary is a setting of the contact treatment algorithm for STL mesh-based solids. It is described by level - a decomposition level similar to snappyHexMesh settings declaring how much the contact area will be refined—and by charCellSize—the size of the characteristic computational cell for initial refinement of the contact area.

These settings conclude that the general setting of the HFDIBDEMDict does not directly concern particle properties. To prescribe particle properties the dictionary must be defined with the given name of the particle, in our case, icoSphere{} Within this dictionary, you must define particle motion for freely moving enter fullyCoupledBody; if you wish to determine initial velocity you may enter fullyCoupledBody{velocit (0 1 0);}. To prescribe particle material, define material *name* and state the name of the defined material also define particle density as rho rho [1 -3 0 0 0 0 0] *value*;. To prescribe boundary condition for fluid interaction, define dictionary U{BC noSlip;}, which is the only value presently implemented. For body geometry, bodyGeom, which is in this case convex

Running the case

The case is run using ./Allrun script:

`#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions

rm -rf 0

cp -r 0.org 0


runApplication blockMesh     # mesh generation, see system/blockMeshDict

application=`getApplication` # selects application (pimpleHFDIBFoam) from system/controlDict

runApplication $application  # run the simulation itself

Results visualization