28#ifndef POROUS_ADVECTION_DIFFUSION_DYNAMICS_HH
29#define POROUS_ADVECTION_DIFFUSION_DYNAMICS_HH
45template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
48 : legacy::BasicDynamics<T, DESCRIPTOR, MOMENTA>( ),
49 _omega(omega), _tSolid(tSolid)
51 this->
getName() =
"PorousAdvectionDiffusionBGKdynamics";
54template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
57 : legacy::BasicDynamics<T, DESCRIPTOR, MOMENTA>( ),
58 _omega(converter.getLatticeRelaxationFrequency()), _tSolid(tSolid)
60 this->
getName() =
"PorousAdvectionDiffusionBGKdynamics";
63template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
65 const T u[DESCRIPTOR::d] )
const
72template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
75 T temperature = MomentaF().computeRho( cell );
78 auto porosity = cell.template getField<descriptors::POROSITY>();
79 temperature = scaleTemp(temperature, porosity);
81 auto u = cell.template getField<descriptors::VELOCITY>();
85 return {temperature, uSqr};
88template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
94template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
100template<
typename T,
typename DESCRIPTOR,
typename MOMENTA>
103 T rho = porosity * temp + ( T(1) - porosity ) * _tSolid;
Highest-level interface to Cell data.
This approach contains a slight error in the diffusion term.
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override
Compute equilibrium distribution function.
T getOmega() const
Get local relaxation parameter of the dynamics.
PorousAdvectionDiffusionBGKdynamics(T omega, T tSolid)
Constructor.
void setOmega(T omega)
Set local relaxation parameter of the dynamics.
CellStatistic< T > collide(Cell< T, DESCRIPTOR > &cell) override
Collision step.
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.
A collection of dynamics classes (e.g.
Return value of any collision.
virtual std::string getName() const
Return human-readable name.
static V firstOrder(int iPop, const RHO &rho, const U &u) any_platform
Computation of equilibrium distribution, first order in u.
static V bgkCollision(CELL &cell, const RHO &rho, const VELOCITY &u, const OMEGA &omega) any_platform
BGK collision step.
Set of functions commonly used in LB computations – header file.