template<typename COLLISION, bool isStatic = false>
template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::collision::PorousParticle< COLLISION, isStatic >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >
Definition at line 110 of file porousBGKdynamics.h.
template<typename COLLISION , bool isStatic = false>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
Definition at line 133 of file porousBGKdynamics.h.
133 {
134 V rho, u[DESCRIPTOR::d];
135 MomentaF().computeRhoU(cell, rho, u);
136
138
139 V velDenominator = cell.template getFieldComponent<descriptors::VELOCITY_DENOMINATOR>(0);
140
141
142 V uPlus[DESCRIPTOR::d]{ };
143 V diff[DESCRIPTOR::q]{ };
144 V fEqPlus[DESCRIPTOR::q]{ };
145 V fEq[DESCRIPTOR::q]{ };
146
147 if (velDenominator > std::numeric_limits<V>::epsilon()) {
148 for (int iDim=0; iDim<DESCRIPTOR::d; ++iDim) {
149 uPlus[iDim] = u[iDim];
150 }
152 if constexpr (!isStatic) {
154 }
155
158 for (int tmp_iPop=0; tmp_iPop < DESCRIPTOR::q; tmp_iPop++) {
159 diff[tmp_iPop] += fEqPlus[tmp_iPop] - fEq[tmp_iPop];
160 cell[tmp_iPop] += diff[tmp_iPop];
161 }
162 }
163
165
166 return statistic;
167 }
void resetParticleRelatedFields(CELL &cell) noexcept
void resetParticleContactRelatedFields(CELL &cell) noexcept
typename MOMENTA::template type< DESCRIPTOR > MomentaF
void calculate(CELL &cell, pVELOCITY &pVelocity)
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
typename meta::list< descriptors::OMEGA > parameters
References olb::collision::PorousParticle< COLLISION, isStatic >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::calculate(), olb::particles::resetParticleContactRelatedFields(), and olb::particles::resetParticleRelatedFields().
template<typename COLLISION , bool isStatic = false>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename pVELOCITY , typename V = typename CELL::value_t>
void olb::collision::PorousParticle< COLLISION, isStatic >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::calculate |
( |
CELL & | cell, |
|
|
pVELOCITY & | pVelocity ) |
|
inline |
Definition at line 118 of file porousBGKdynamics.h.
118 {
119 if constexpr (isStatic) {
120 for (int i=0; i<DESCRIPTOR::d; i++) {
121 pVelocity[i] -= (1.-(cell.template getField<descriptors::POROSITY>())) * pVelocity[i];
122 }
123 } else {
124 for (int i=0; i<DESCRIPTOR::d; i++) {
125 pVelocity[i] += (1.-cell.template getField<descriptors::POROSITY>())
126 * (cell.template getFieldComponent<descriptors::VELOCITY_NUMERATOR>(i)
127 / cell.template getField<descriptors::VELOCITY_DENOMINATOR>() - pVelocity[i]);
128 }
129 }
130 }