OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION > Struct Template Reference

#include <forcing.h>

+ Collaboration diagram for olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using EquilibriumF = combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 
using CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 

Public Member Functions

template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Detailed Description

template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >

Definition at line 595 of file forcing.h.

Member Typedef Documentation

◆ CollisionO

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 598 of file forcing.h.

◆ EquilibriumF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::EquilibriumF = combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 597 of file forcing.h.

◆ MomentaF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 596 of file forcing.h.

Member Function Documentation

◆ apply()

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::forcing::HLBM::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 601 of file forcing.h.

601 {
602 V rho{};
604 MomentaF().computeRhoU(cell, rho, u);
605
606 const V porosity = cell.template getField<descriptors::POROSITY>();
607 auto statistic = CollisionO().apply(cell, parameters);
608
609 if (porosity < 1) {
610 // This is Kuperstokh forcing
611 Vector<V,DESCRIPTOR::d> uPlus = u;
612 uPlus += (V{1} - porosity)
613 * (cell.template getField<descriptors::VELOCITY>() - u);
614
615 V fEq[DESCRIPTOR::q] { };
616 V fEq2[DESCRIPTOR::q] { };
617 EquilibriumF().compute(cell, statistic.rho, u, fEq);
618 EquilibriumF().compute(cell, statistic.rho, uPlus, fEq2);
619 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
620 cell[iPop] += fEq2[iPop] - fEq[iPop];
621 }
622 return {-1,-1};
623 } else {
624 return statistic;
625 }
626 };
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
combined_equilibrium< DESCRIPTOR, MOMENTA, EQUILIBRIUM > EquilibriumF
Definition forcing.h:597
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
Definition forcing.h:598
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:596

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