walberla::lbm_mesapd_coupling Namespace Reference

Namespaces

 amr
 
 psm
 

Classes

class  AddAccelerationOnParticlesKernel
 
class  AddForceOnParticlesKernel
 
class  AddHydrodynamicInteractionKernel
 
class  AddVirtualForceTorqueKernel
 Kernel that sets a virtual force and torque on particles. More...
 
class  AverageHydrodynamicForceTorqueKernel
 
class  CurvedLinear
 Linear boundary handling for moving particles. More...
 
class  EquilibriumAndNonEquilibriumReconstructor
 
class  EquilibriumReconstructor
 
class  ExtrapolationReconstructor
 
struct  FixedParticlesSelector
 
class  FlagFieldNormalExtrapolationDirectionFinder
 
struct  GlobalParticlesSelector
 
class  GradsMomentApproximationReconstructor
 
class  InitializeHydrodynamicForceTorqueForAveragingKernel
 
class  InitializeVirtualMassKernel
 This kernel calculates virtual mass and inertia and sets them as attributes on a particle. More...
 
class  InspectionProbe
 
class  LubricationCorrectionKernel
 Applies a correction for the unresolved lubrication forces and torques on the the interacting particles. More...
 
class  MovingParticleMapping
 Maps the moving particles into the simulation domain and updates the mapping. More...
 
class  MovingParticleMappingKernel
 Kernel that maps all particles onto all blocks to the "moving obstacle" boundary condition, that requires the additional particleField. More...
 
class  OmegaBulkAdapter
 
class  ParticleAccessorWithShapeVirtualMassWrapper
 ! More...
 
class  ParticleMappingKernel
 
class  PdfReconstructionManager
 Class to manage the reconstruction of PDFs that is needed when cells are becoming uncovered by moving obstacles. More...
 
struct  RegularParticlesSelector
 
class  ResetHydrodynamicForceTorqueKernel
 
class  SimpleBB
 Bounce back boundary handling for moving particles. More...
 
class  SphereNormalExtrapolationDirectionFinder
 
struct  StokesNumberBasedSphereSelector
 
class  SubCyclingManager
 Handles the execution of subcycles in a timeloop to allow for finer grained time steps than the LBM ones. More...
 

Typedefs

using ParticleField_T = walberla::GhostLayerField< walberla::id_t, 1 >
 

Functions

CellInterval getCellBBFromAABB (const math::AABB &aabb, bool AABBIsInfinite, const IBlock &block, StructuredBlockStorage &blockStorage, const uint_t numberOfGhostLayersToInclude)
 
template<typename ParticleAccessor_T >
CellInterval getParticleCellBB (const size_t particleIdx, const ParticleAccessor_T &ac, const IBlock &block, StructuredBlockStorage &blockStorage, const uint_t numberOfGhostLayersToInclude)
 
template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T > makeMovingParticleMapping (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &particleFieldID, const shared_ptr< ParticleAccessor_T > &ac, const FlagUID &obstacle, const FlagUID &formerObstacle, const ParticleSelector_T &mappingParticleSelector, bool conserveMomentumWhenMapping)
 
template<typename Stencil_T >
Vector3< cell_idx_tfindCorrespondingLatticeDirection (const Vector3< real_t > &direction)
 Classes to be used with some Reconstructor variants to find an extrapolation direction. More...
 
template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename Reconstructor_T >
shared_ptr< PdfReconstructionManager< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, Reconstructor_T > > makePdfReconstructionManager (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &particleFieldID, const shared_ptr< ParticleAccessor_T > &ac, const FlagUID &formerObstacle, const FlagUID &fluid, const shared_ptr< Reconstructor_T > &reconstructor, bool conserveMomentumWhenRestoring, const bool optimizeForSmallObstacleFraction=false)
 
template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T >
shared_ptr< PdfReconstructionManager< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, EquilibriumReconstructor< BoundaryHandling_T > > > makePdfReconstructionManager (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &particleFieldID, const shared_ptr< ParticleAccessor_T > &ac, const FlagUID &formerObstacle, const FlagUID &fluid, bool conserveMomentumWhenRestoring, const bool optimizeForSmallObstacleFraction=false)
 
template<typename BoundaryHandling_T >
uint_t getNumberOfExtrapolationCells (IBlock *const block, const BlockDataID &boundaryHandlingID, const cell_idx_t &x, const cell_idx_t &y, const cell_idx_t &z, const Vector3< cell_idx_t > &extrapolationDirection, const uint_t maximumNumberOfNeededExtrapolationCells, bool useDataFromGhostLayers)
 Classes to be used together with the PDFReconstruction class to reconstruct PDFs. More...
 
template<typename BoundaryHandling_T >
shared_ptr< EquilibriumReconstructor< BoundaryHandling_T > > makeEquilibriumReconstructor (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &boundaryHandlingID, bool useDataFromGhostLayers=false)
 
template<typename BoundaryHandling_T , typename ExtrapolationDirectionFinder_T >
shared_ptr< EquilibriumAndNonEquilibriumReconstructor< BoundaryHandling_T, ExtrapolationDirectionFinder_T > > makeEquilibriumAndNonEquilibriumReconstructor (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &boundaryHandlingID, const shared_ptr< ExtrapolationDirectionFinder_T > &extrapolationDirectionFinder, uint_t maximumNumberOfExtrapolationCells=uint_t(3), bool useDataFromGhostLayers=false)
 
template<typename BoundaryHandling_T , typename ExtrapolationDirectionFinder_T , bool EnforceNoSlipConstraintAfterExtrapolation = false>
shared_ptr< ExtrapolationReconstructor< BoundaryHandling_T, ExtrapolationDirectionFinder_T, EnforceNoSlipConstraintAfterExtrapolation > > makeExtrapolationReconstructor (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &boundaryHandlingID, const shared_ptr< ExtrapolationDirectionFinder_T > &extrapolationDirectionFinder, uint_t maximumNumberOfExtrapolationCells=uint_t(3), bool useDataFromGhostLayers=false)
 
template<typename BoundaryHandling_T >
shared_ptr< GradsMomentApproximationReconstructor< BoundaryHandling_T > > makeGradsMomentApproximationReconstructor (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &boundaryHandlingID, real_t omegaShear, bool recomputeTargetDensity=false, bool useCentralDifferences=true, bool useDataFromGhostLayers=false)
 
void computeLubricationCorrectionSphereSphere (const Vector3< real_t > &interactionNormal12, const real_t gapSize, const real_t dynamicFluidViscosity, const real_t radius1, const real_t radius2, const Vector3< real_t > &u1, const Vector3< real_t > &u2, const Vector3< real_t > &omega1, const Vector3< real_t > &omega2, const real_t cutOffDistanceNormal, const real_t cutOffDistanceTangentialTranslational, const real_t cutOffDistanceTangentialRotational, Vector3< real_t > &lubricationForce1, Vector3< real_t > &lubricationTorque1)
 Computes lubrication corrections between two spheres 1 and 2 acting on sphere 1. More...
 
void computeLubricationCorrectionSphereHalfSpace (const Vector3< real_t > &interactionNormal12, const real_t gapSize, const real_t dynamicFluidViscosity, const real_t radius1, const Vector3< real_t > &u1, const Vector3< real_t > &u2, const Vector3< real_t > &omega1, const real_t cutOffDistanceNormal, const real_t cutOffDistanceTangentialTranslational, const real_t cutOffDistanceTangentialRotational, Vector3< real_t > &lubricationForce1, Vector3< real_t > &lubricationTorque1)
 Computes lubrication corrections between a sphere and a half space acting on the sphere. More...
 
real_t bulkViscosityFromOmegaBulk (real_t omegaBulk)
 
real_t omegaBulkFromBulkViscosity (real_t bulkViscosity)
 
real_t omegaBulkFromOmega (real_t omega, real_t LambdaBulk=real_t(1))
 
template<typename ParticleAccessor_T >
void addHydrodynamicForceAtomic (const size_t p_idx, ParticleAccessor_T &ac, const Vector3< real_t > &f)
 Force is applied at the center of mass. More...
 
template<typename ParticleAccessor_T >
void addHydrodynamicForceAtWFPosAtomic (const size_t p_idx, ParticleAccessor_T &ac, const Vector3< real_t > &f, const Vector3< real_t > &wf_pt)
 

Typedef Documentation

◆ ParticleField_T

Function Documentation

◆ addHydrodynamicForceAtomic()

template<typename ParticleAccessor_T >
void walberla::lbm_mesapd_coupling::addHydrodynamicForceAtomic ( const size_t  p_idx,
ParticleAccessor_T &  ac,
const Vector3< real_t > &  f 
)
inline

Force is applied at the center of mass.

◆ addHydrodynamicForceAtWFPosAtomic()

template<typename ParticleAccessor_T >
void walberla::lbm_mesapd_coupling::addHydrodynamicForceAtWFPosAtomic ( const size_t  p_idx,
ParticleAccessor_T &  ac,
const Vector3< real_t > &  f,
const Vector3< real_t > &  wf_pt 
)
inline

◆ bulkViscosityFromOmegaBulk()

real_t walberla::lbm_mesapd_coupling::bulkViscosityFromOmegaBulk ( real_t  omegaBulk)

◆ computeLubricationCorrectionSphereHalfSpace()

void walberla::lbm_mesapd_coupling::computeLubricationCorrectionSphereHalfSpace ( const Vector3< real_t > &  interactionNormal12,
const real_t  gapSize,
const real_t  dynamicFluidViscosity,
const real_t  radius1,
const Vector3< real_t > &  u1,
const Vector3< real_t > &  u2,
const Vector3< real_t > &  omega1,
const real_t  cutOffDistanceNormal,
const real_t  cutOffDistanceTangentialTranslational,
const real_t  cutOffDistanceTangentialRotational,
Vector3< real_t > &  lubricationForce1,
Vector3< real_t > &  lubricationTorque1 
)
inline

Computes lubrication corrections between a sphere and a half space acting on the sphere.

The formulas for the lubrication corrections are taken from Simeonov, Calantoni - Modeling mechanical contact and lubrication in Direct Numerical Simulations of colliding particles, IJMF, 2012 with kappa -> infinity

  • radius1: radius of sphere u1, u2: linear/translational velocity of sphere and half space omega1: angular velocity of sphere 1, half space is assumed to have zero angular velocity

Returns force and torque via lubricationForce1 and lubricationTorque1

◆ computeLubricationCorrectionSphereSphere()

void walberla::lbm_mesapd_coupling::computeLubricationCorrectionSphereSphere ( const Vector3< real_t > &  interactionNormal12,
const real_t  gapSize,
const real_t  dynamicFluidViscosity,
const real_t  radius1,
const real_t  radius2,
const Vector3< real_t > &  u1,
const Vector3< real_t > &  u2,
const Vector3< real_t > &  omega1,
const Vector3< real_t > &  omega2,
const real_t  cutOffDistanceNormal,
const real_t  cutOffDistanceTangentialTranslational,
const real_t  cutOffDistanceTangentialRotational,
Vector3< real_t > &  lubricationForce1,
Vector3< real_t > &  lubricationTorque1 
)
inline

Computes lubrication corrections between two spheres 1 and 2 acting on sphere 1.

The formulas for the lubrication corrections for two spheres with different radii are taken from Simeonov, Calantoni - Modeling mechanical contact and lubrication in Direct Numerical Simulations of colliding particles, IJMF, 2012

interactionNormal12 is sphere2Center - sphere1Center, normalized

radius1, radius2: radius of sphere 1 and 2 u1, u2: linear/translational velocity of sphere 1 and 2 omega1, omega2: angular velocity of sphere 1 and 2

Returns force and torque via lubricationForce1 and lubricationTorque1

◆ findCorrespondingLatticeDirection()

template<typename Stencil_T >
Vector3<cell_idx_t> walberla::lbm_mesapd_coupling::findCorrespondingLatticeDirection ( const Vector3< real_t > &  direction)

Classes to be used with some Reconstructor variants to find an extrapolation direction.

The goal is to find a suitable extrapolation direction which is a three dimensional vector with cell index offsets to the current cell. Each ExtrapolationDirectionFinder class must exactly implement the member function template< typename ParticleAccessor_T > Vector3<cell_idx_t> operator()( IBlock * const block, const cell_idx_t & x, const cell_idx_t & y, const cell_idx_t & z, const size_t particleIdx, const ParticleAccessor_T & ac) const that returns an appropriate extrapolation direction (i.e. a certain lattice direction).

Different variants are available:

  • FlagFieldNormalExtrapolationDirectionFinder: Uses information from the direct (N,S,E,W,T,B) neighbors' flags to find the extrapolation direction by checking for the domain (here: fluid) flag. This can lead to incorrect directions in close packing scenarios or in the vicinity of other boundaries.
  • SphereNormalExtrapolationDirectionFinder: Calculates the local normal of the particle which is in its current form only correct for spherical shapes. The corresponding direction with cell offsets is then determined based on this normal.

◆ getCellBBFromAABB()

CellInterval walberla::lbm_mesapd_coupling::getCellBBFromAABB ( const math::AABB aabb,
bool  AABBIsInfinite,
const IBlock block,
StructuredBlockStorage blockStorage,
const uint_t  numberOfGhostLayersToInclude 
)

◆ getNumberOfExtrapolationCells()

template<typename BoundaryHandling_T >
uint_t walberla::lbm_mesapd_coupling::getNumberOfExtrapolationCells ( IBlock *const  block,
const BlockDataID boundaryHandlingID,
const cell_idx_t x,
const cell_idx_t y,
const cell_idx_t z,
const Vector3< cell_idx_t > &  extrapolationDirection,
const uint_t  maximumNumberOfNeededExtrapolationCells,
bool  useDataFromGhostLayers 
)

Classes to be used together with the PDFReconstruction class to reconstruct PDFs.

Each reconstructor must exactly implement the member function template< typename PdfField_T, typename ParticleAccessor_T > void operator()( IBlock * const block, const cell_idx_t & x, const cell_idx_t & y, const cell_idx_t & z, PdfField_T * const pdfField, const size_t particleIdx, const ParticleAccessor_T & ac); that reconstructs all PDFs in a specific cell with cell indices x,y,z on a given block. Additionally, a pointer to the pdfField and information about the formerly present particle is provided (via idx and accessor).

Different variants are available:

  • EquilibriumReconstructor: Determines a local average density and sets the PDFs to their equilibrium values based on this density and the particle's velocity
  • EquilibriumAndNonEquilibriumReconstructor: First reconstructs the equilibrium values with the help of the EquilibriumReconstructor. Then extrapolates the non-equilibrium part from neighboring cells and adds it to the reconstructed PDFs for better accuracy. Defaults to EquilibriumReconstructor if no suitable cell for extrapolation is available.
  • ExtrapolationReconstructor: Extrapolates the PDFs of three or two neighboring cells that lie in extrapolation direction. Optionally, a special treatment after the extrapolation can be used that sets certain moments directly (only D3Q19). Defaults to EquilibriumAndNonEquilibriumReconstructor if not enough cells in this direction are available.
  • GradsMomentReconstructor: Uses Grad's moment approximation, i.e. equilibrium distribution function extended by pressure gradient information.

EquilibriumAndNonEquilibriumReconstructor and ExtrapolationReconstructor need an extrapolation direction which is provided by the ExtrapolationDirectionFinder that is to be chosen (see ExtrapolationDirectionFinder.h).

For convenient construction, use the provided makeXReconstructor functions.

◆ getParticleCellBB()

template<typename ParticleAccessor_T >
CellInterval walberla::lbm_mesapd_coupling::getParticleCellBB ( const size_t  particleIdx,
const ParticleAccessor_T &  ac,
const IBlock block,
StructuredBlockStorage blockStorage,
const uint_t  numberOfGhostLayersToInclude 
)

◆ makeEquilibriumAndNonEquilibriumReconstructor()

template<typename BoundaryHandling_T , typename ExtrapolationDirectionFinder_T >
shared_ptr<EquilibriumAndNonEquilibriumReconstructor<BoundaryHandling_T,ExtrapolationDirectionFinder_T> > walberla::lbm_mesapd_coupling::makeEquilibriumAndNonEquilibriumReconstructor ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID boundaryHandlingID,
const shared_ptr< ExtrapolationDirectionFinder_T > &  extrapolationDirectionFinder,
uint_t  maximumNumberOfExtrapolationCells = uint_t(3),
bool  useDataFromGhostLayers = false 
)

◆ makeEquilibriumReconstructor()

template<typename BoundaryHandling_T >
shared_ptr<EquilibriumReconstructor<BoundaryHandling_T> > walberla::lbm_mesapd_coupling::makeEquilibriumReconstructor ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID boundaryHandlingID,
bool  useDataFromGhostLayers = false 
)

◆ makeExtrapolationReconstructor()

template<typename BoundaryHandling_T , typename ExtrapolationDirectionFinder_T , bool EnforceNoSlipConstraintAfterExtrapolation = false>
shared_ptr<ExtrapolationReconstructor<BoundaryHandling_T,ExtrapolationDirectionFinder_T, EnforceNoSlipConstraintAfterExtrapolation> > walberla::lbm_mesapd_coupling::makeExtrapolationReconstructor ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID boundaryHandlingID,
const shared_ptr< ExtrapolationDirectionFinder_T > &  extrapolationDirectionFinder,
uint_t  maximumNumberOfExtrapolationCells = uint_t(3),
bool  useDataFromGhostLayers = false 
)

◆ makeGradsMomentApproximationReconstructor()

template<typename BoundaryHandling_T >
shared_ptr<GradsMomentApproximationReconstructor<BoundaryHandling_T> > walberla::lbm_mesapd_coupling::makeGradsMomentApproximationReconstructor ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID boundaryHandlingID,
real_t  omegaShear,
bool  recomputeTargetDensity = false,
bool  useCentralDifferences = true,
bool  useDataFromGhostLayers = false 
)

◆ makeMovingParticleMapping()

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T> walberla::lbm_mesapd_coupling::makeMovingParticleMapping ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID pdfFieldID,
const BlockDataID boundaryHandlingID,
const BlockDataID particleFieldID,
const shared_ptr< ParticleAccessor_T > &  ac,
const FlagUID &  obstacle,
const FlagUID &  formerObstacle,
const ParticleSelector_T &  mappingParticleSelector,
bool  conserveMomentumWhenMapping 
)

◆ makePdfReconstructionManager() [1/2]

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T >
shared_ptr< PdfReconstructionManager<PdfField_T,BoundaryHandling_T,ParticleAccessor_T,EquilibriumReconstructor<BoundaryHandling_T> > > walberla::lbm_mesapd_coupling::makePdfReconstructionManager ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID pdfFieldID,
const BlockDataID boundaryHandlingID,
const BlockDataID particleFieldID,
const shared_ptr< ParticleAccessor_T > &  ac,
const FlagUID &  formerObstacle,
const FlagUID &  fluid,
bool  conserveMomentumWhenRestoring,
const bool  optimizeForSmallObstacleFraction = false 
)

◆ makePdfReconstructionManager() [2/2]

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename Reconstructor_T >
shared_ptr< PdfReconstructionManager<PdfField_T,BoundaryHandling_T,ParticleAccessor_T,Reconstructor_T> > walberla::lbm_mesapd_coupling::makePdfReconstructionManager ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID pdfFieldID,
const BlockDataID boundaryHandlingID,
const BlockDataID particleFieldID,
const shared_ptr< ParticleAccessor_T > &  ac,
const FlagUID &  formerObstacle,
const FlagUID &  fluid,
const shared_ptr< Reconstructor_T > &  reconstructor,
bool  conserveMomentumWhenRestoring,
const bool  optimizeForSmallObstacleFraction = false 
)

◆ omegaBulkFromBulkViscosity()

real_t walberla::lbm_mesapd_coupling::omegaBulkFromBulkViscosity ( real_t  bulkViscosity)

◆ omegaBulkFromOmega()

real_t walberla::lbm_mesapd_coupling::omegaBulkFromOmega ( real_t  omega,
real_t  LambdaBulk = real_t(1) 
)