walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T > Class Template Reference

Detailed Description

template<typename LatticeModel_T, typename FlagField_T>
class walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >

Quadratic boundary handling for moving obstacles.

This boundary condition implements the MR1 scheme from Ginzburg et al. - "Two-Relaxation-Time Lattice Boltzmann Scheme: About Parametrization, Velocity, Pressure and Mixed Boundary Conditions" (2008) References to equations and tables in the code documentation are contained in this paper.

It uses two additional cells in inverse direction of the boundary handling for a quadratic interpolation. It additionally needs the pre-collision values of the PDFs for the error correction which are to be provided via the field pdfFieldPreCollision. This requires the LBM sweep to be explicitly split into stream and collide to have the following form: copy PDFs to extra field - collision - boundary handling - stream

In case not enough cells are available, two fall back solutions are available: If only one additional cell is available, the scheme is replaced by the MGYLI scheme. If no additional cell is available, the scheme is replaced by the MGYLI scheme in one-point form.

Note: The implementation could be changed if two ghost layers were used which is however omitted for efficiency reasons.

#include <CurvedQuadratic.h>

+ Inheritance diagram for walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >:

Public Member Functions

 CurvedQuadratic (const BoundaryUID &boundaryUID, const FlagUID &uid, PDFField_T *const pdfField, const FlagField_T *const flagField, BodyField_T *const bodyField, const flag_t domain, const StructuredBlockStorage &blockStorage, const IBlock &block, PDFField_T *const pdfFieldPreCollision)
 
void pushFlags (std::vector< FlagUID > &uids) const
 
void beforeBoundaryTreatment () const
 
void afterBoundaryTreatment () const
 
template<typename Buffer_T >
void packCell (Buffer_T &, const cell_idx_t, const cell_idx_t, const cell_idx_t) const
 
template<typename Buffer_T >
void registerCell (Buffer_T &, const flag_t, const cell_idx_t, const cell_idx_t, const cell_idx_t)
 
void registerCell (const flag_t, const cell_idx_t, const cell_idx_t, const cell_idx_t, const BoundaryConfiguration &)
 
void registerCells (const flag_t, const CellInterval &, const BoundaryConfiguration &)
 
template<typename CellIterator >
void registerCells (const flag_t, const CellIterator &, const CellIterator &, const BoundaryConfiguration &)
 
void unregisterCell (const flag_t, const cell_idx_t, const cell_idx_t, const cell_idx_t) const
 
void treatDirection (const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const stencil::Direction dir, const cell_idx_t nx, const cell_idx_t ny, const cell_idx_t nz, const flag_t mask)
 
- Public Member Functions inherited from walberla::boundary::Boundary< flag_t >
 Boundary (const BoundaryUID &boundaryUID)
 
void setMask (const flag_t mask)
 
flag_t getMask () const
 
const BoundaryUIDgetUID () const
 

Static Public Member Functions

static shared_ptr< BoundaryConfigurationcreateConfiguration (const Config::BlockHandle &)
 

Private Types

using PDFField_T = lbm::PdfField< LatticeModel_T >
 
using Stencil_T = typename LatticeModel_T::Stencil
 
using flag_t = typename FlagField_T::flag_t
 
using BodyField_T = Field< pe::BodyID, 1 >
 

Private Attributes

const FlagUID uid_
 
flag_t domainMask_
 
PDFField_T *const pdfField_
 
BodyField_T *const bodyField_
 
const FlagField_T *const flagField_
 
const StructuredBlockStorageblockStorage_
 
const IBlockblock_
 
PDFField_T *const pdfFieldPreCollision_
 
real_t lengthScalingFactor_
 
real_t forceScalingFactor_
 

Additional Inherited Members

- Protected Attributes inherited from walberla::boundary::Boundary< flag_t >
const BoundaryUID boundaryUID_
 
flag_t mask_
 
bool maskSet_
 

Member Typedef Documentation

◆ BodyField_T

template<typename LatticeModel_T , typename FlagField_T >
using walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::BodyField_T = Field<pe::BodyID, 1>
private

◆ flag_t

template<typename LatticeModel_T , typename FlagField_T >
using walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::flag_t = typename FlagField_T::flag_t
private

◆ PDFField_T

template<typename LatticeModel_T , typename FlagField_T >
using walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::PDFField_T = lbm::PdfField<LatticeModel_T>
private

◆ Stencil_T

template<typename LatticeModel_T , typename FlagField_T >
using walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::Stencil_T = typename LatticeModel_T::Stencil
private

Constructor & Destructor Documentation

◆ CurvedQuadratic()

template<typename LatticeModel_T , typename FlagField_T >
walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::CurvedQuadratic ( const BoundaryUID &  boundaryUID,
const FlagUID &  uid,
PDFField_T *const  pdfField,
const FlagField_T *const  flagField,
BodyField_T *const  bodyField,
const flag_t  domain,
const StructuredBlockStorage blockStorage,
const IBlock block,
PDFField_T *const  pdfFieldPreCollision 
)
inline

Member Function Documentation

◆ afterBoundaryTreatment()

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::afterBoundaryTreatment ( ) const
inline

◆ beforeBoundaryTreatment()

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::beforeBoundaryTreatment ( ) const
inline

◆ createConfiguration()

template<typename LatticeModel_T , typename FlagField_T >
static shared_ptr<BoundaryConfiguration> walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::createConfiguration ( const Config::BlockHandle )
inlinestatic

◆ packCell()

template<typename LatticeModel_T , typename FlagField_T >
template<typename Buffer_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::packCell ( Buffer_T &  ,
const  cell_idx_t,
const  cell_idx_t,
const  cell_idx_t 
) const
inline

◆ pushFlags()

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::pushFlags ( std::vector< FlagUID > &  uids) const
inline

◆ registerCell() [1/2]

template<typename LatticeModel_T , typename FlagField_T >
template<typename Buffer_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::registerCell ( Buffer_T &  ,
const  flag_t,
const  cell_idx_t,
const  cell_idx_t,
const  cell_idx_t 
)
inline

◆ registerCell() [2/2]

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::registerCell ( const  flag_t,
const  cell_idx_t,
const  cell_idx_t,
const  cell_idx_t,
const BoundaryConfiguration  
)
inline

◆ registerCells() [1/2]

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::registerCells ( const  flag_t,
const CellInterval ,
const BoundaryConfiguration  
)
inline

◆ registerCells() [2/2]

template<typename LatticeModel_T , typename FlagField_T >
template<typename CellIterator >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::registerCells ( const  flag_t,
const CellIterator &  ,
const CellIterator &  ,
const BoundaryConfiguration  
)
inline

◆ treatDirection()

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::treatDirection ( const cell_idx_t  x,
const cell_idx_t  y,
const cell_idx_t  z,
const stencil::Direction  dir,
const cell_idx_t  nx,
const cell_idx_t  ny,
const cell_idx_t  nz,
const flag_t  mask 
)
inline

◆ unregisterCell()

template<typename LatticeModel_T , typename FlagField_T >
void walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::unregisterCell ( const  flag_t,
const  cell_idx_t,
const  cell_idx_t,
const  cell_idx_t 
) const
inline

Member Data Documentation

◆ block_

template<typename LatticeModel_T , typename FlagField_T >
const IBlock& walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::block_
private

◆ blockStorage_

template<typename LatticeModel_T , typename FlagField_T >
const StructuredBlockStorage& walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::blockStorage_
private

◆ bodyField_

template<typename LatticeModel_T , typename FlagField_T >
BodyField_T* const walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::bodyField_
private

◆ domainMask_

template<typename LatticeModel_T , typename FlagField_T >
flag_t walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::domainMask_
private

◆ flagField_

template<typename LatticeModel_T , typename FlagField_T >
const FlagField_T* const walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::flagField_
private

◆ forceScalingFactor_

template<typename LatticeModel_T , typename FlagField_T >
real_t walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::forceScalingFactor_
private

◆ lengthScalingFactor_

template<typename LatticeModel_T , typename FlagField_T >
real_t walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::lengthScalingFactor_
private

◆ pdfField_

template<typename LatticeModel_T , typename FlagField_T >
PDFField_T* const walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::pdfField_
private

◆ pdfFieldPreCollision_

template<typename LatticeModel_T , typename FlagField_T >
PDFField_T* const walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::pdfFieldPreCollision_
private

◆ uid_

template<typename LatticeModel_T , typename FlagField_T >
const FlagUID walberla::pe_coupling::CurvedQuadratic< LatticeModel_T, FlagField_T >::uid_
private

The documentation for this class was generated from the following file: