OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::Dynamics< T, DESCRIPTOR > Struct Template Referenceabstract

Interface for per-cell dynamics. More...

#include <interface.h>

+ Inheritance diagram for olb::Dynamics< T, DESCRIPTOR >:
+ Collaboration diagram for olb::Dynamics< T, DESCRIPTOR >:

Public Types

using value_t = T
 
using descriptor_t = DESCRIPTOR
 

Public Member Functions

virtual ~Dynamics () any_platform
 
virtual std::type_index id ()=0
 Expose unique type-identifier for RTTI.
 
virtual std::string getName () const
 Return human-readable name.
 
virtual void initialize (Cell< T, DESCRIPTOR > &cell)
 Initialize dynamics-specific data for cell.
 
virtual AbstractParameters< T, DESCRIPTOR > & getParameters (BlockLattice< T, DESCRIPTOR > &block)=0
 Parameters access for legacy post processors.
 
virtual CellStatistic< T > collide (Cell< T, DESCRIPTOR > &cell)
 Perform purely-local collision step on Cell interface (legacy, to be deprecated)
 
virtual T computeRho (ConstCell< T, DESCRIPTOR > &cell) const =0
 Compute particle density.
 
virtual void computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const =0
 Compute fluid velocity.
 
virtual void computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const =0
 Compute fluid momentum.
 
virtual void computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const =0
 Compute stress tensor.
 
virtual void computeRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const =0
 Compute fluid velocity and particle density.
 
virtual void computeAllMomenta (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const =0
 Compute all momenta up to second order.
 
virtual void defineRho (Cell< T, DESCRIPTOR > &cell, T rho)=0
 Set particle density.
 
virtual void defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d])=0
 Set fluid velocity.
 
virtual void defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])=0
 Define fluid velocity and particle density.
 
virtual void defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n])=0
 Define all momenta up to second order.
 
virtual void computeEquilibrium (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T fEq[DESCRIPTOR::q]) const =0
 Return iPop equilibrium for given first and second momenta.
 
void iniEquilibrium (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])
 Initialize to equilibrium distribution.
 
void iniRegularized (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n])
 Initialize cell to equilibrium and non-equilibrum part.
 
virtual void inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const
 Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU.
 

Detailed Description

template<typename T, typename DESCRIPTOR>
struct olb::Dynamics< T, DESCRIPTOR >

Interface for per-cell dynamics.

Definition at line 56 of file interface.h.

Member Typedef Documentation

◆ descriptor_t

template<typename T , typename DESCRIPTOR >
using olb::Dynamics< T, DESCRIPTOR >::descriptor_t = DESCRIPTOR

Definition at line 58 of file interface.h.

◆ value_t

template<typename T , typename DESCRIPTOR >
using olb::Dynamics< T, DESCRIPTOR >::value_t = T

Definition at line 57 of file interface.h.

Constructor & Destructor Documentation

◆ ~Dynamics()

template<typename T , typename DESCRIPTOR >
virtual olb::Dynamics< T, DESCRIPTOR >::~Dynamics ( )
inlinevirtual

Definition at line 60 of file interface.h.

60{ }

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR >
virtual CellStatistic< T > olb::Dynamics< T, DESCRIPTOR >::collide ( Cell< T, DESCRIPTOR > & cell)
inlinevirtual

◆ computeAllMomenta()

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeEquilibrium ( ConstCell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
T fEq[DESCRIPTOR::q] ) const
pure virtual

Return iPop equilibrium for given first and second momenta.

Implemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CSE< DYNAMICS >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::ForcedPSMBGKdynamics< T, DESCRIPTOR >, olb::IncZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldConvectiveOutletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::PhaseFieldInletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::RTLBMdynamicsMcHardy< T, DESCRIPTOR, MOMENTA >, olb::RTLBMdynamicsMcHardyRK< T, DESCRIPTOR, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, and olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >.

+ Here is the caller graph for this function:

◆ computeJ()

◆ computeRho()

◆ computeRhoU()

◆ computeStress()

◆ computeU()

◆ defineAllMomenta()

◆ defineRho()

◆ defineRhoU()

◆ defineU()

◆ getName()

template<typename T , typename DESCRIPTOR >
virtual std::string olb::Dynamics< T, DESCRIPTOR >::getName ( ) const
inlinevirtual

Return human-readable name.

Reimplemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CSE< DYNAMICS >, olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >, olb::dynamics::StoreStatisticInField< DYNAMICS >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::ForcedPSMBGKdynamics< T, DESCRIPTOR >, olb::IncZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldConvectiveOutletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::PhaseFieldInletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::RTLBMdynamicsMcHardy< T, DESCRIPTOR, MOMENTA >, olb::RTLBMdynamicsMcHardyRK< T, DESCRIPTOR, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, and olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >.

Definition at line 65 of file interface.h.

65 {
66 return "Dynamics";
67 };
+ Here is the caller graph for this function:

◆ getParameters()

template<typename T , typename DESCRIPTOR >
virtual AbstractParameters< T, DESCRIPTOR > & olb::Dynamics< T, DESCRIPTOR >::getParameters ( BlockLattice< T, DESCRIPTOR > & block)
pure virtual

Parameters access for legacy post processors.

Implemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CSE< DYNAMICS >, olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >, olb::dynamics::StoreStatisticInField< DYNAMICS >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::ForcedPSMBGKdynamics< T, DESCRIPTOR >, olb::ForcedVANSBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::IncZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldConvectiveOutletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::PhaseFieldInletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::RTLBMdynamicsMcHardy< T, DESCRIPTOR, MOMENTA >, olb::RTLBMdynamicsMcHardyRK< T, DESCRIPTOR, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, and olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >.

◆ id()

template<typename T , typename DESCRIPTOR >
virtual std::type_index olb::Dynamics< T, DESCRIPTOR >::id ( )
pure virtual

Expose unique type-identifier for RTTI.

Implemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::CSE< DYNAMICS >, olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >, olb::dynamics::StoreStatisticInField< DYNAMICS >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::ForcedPSMBGKdynamics< T, DESCRIPTOR >, olb::ForcedVANSBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::IncZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, olb::legacy::OffDynamics< T, DESCRIPTOR >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldConvectiveOutletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::PhaseFieldInletDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::RTLBMdynamicsMcHardy< T, DESCRIPTOR, MOMENTA >, olb::RTLBMdynamicsMcHardyRK< T, DESCRIPTOR, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SpongeLayerDynamics< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, and olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >.

◆ iniEquilibrium()

template<typename T , typename DESCRIPTOR >
void olb::Dynamics< T, DESCRIPTOR >::iniEquilibrium ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d] )
inline

Initialize to equilibrium distribution.

Definition at line 111 of file interface.h.

111 {
112 T rhoShift { rho };
113 T uShift[DESCRIPTOR::d] { };
114 util::copyN(uShift, u, DESCRIPTOR::d);
115 inverseShiftRhoU(cell, rhoShift, uShift);
116 T fEq[DESCRIPTOR::q] { };
117 computeEquilibrium(cell, rhoShift, uShift, fEq);
118 for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
119 cell[iPop] = fEq[iPop];
120 }
121 };
void copyN(T c[], const T a[], const unsigned dim) any_platform
virtual void inverseShiftRhoU(ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const
Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU.
Definition interface.h:132
virtual void computeEquilibrium(ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T fEq[DESCRIPTOR::q]) const =0
Return iPop equilibrium for given first and second momenta.

References olb::Dynamics< T, DESCRIPTOR >::computeEquilibrium(), olb::util::copyN(), and olb::Dynamics< T, DESCRIPTOR >::inverseShiftRhoU().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iniRegularized()

template<typename T , typename DESCRIPTOR >
void olb::Dynamics< T, DESCRIPTOR >::iniRegularized ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
const T pi[util::TensorVal< DESCRIPTOR >::n] )
inline

Initialize cell to equilibrium and non-equilibrum part.

Definition at line 123 of file interface.h.

124 {
125 iniEquilibrium(cell, rho, u);
126 for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
127 cell[iPop] += equilibrium<DESCRIPTOR>::template fromPiToFneq<T>(iPop, pi);
128 }
129 };
void iniEquilibrium(Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])
Initialize to equilibrium distribution.
Definition interface.h:111

References olb::Dynamics< T, DESCRIPTOR >::iniEquilibrium().

+ Here is the call graph for this function:

◆ initialize()

◆ inverseShiftRhoU()


The documentation for this struct was generated from the following files: