template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::forcing::Wagner::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >
Definition at line 401 of file forcing.h.
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
Definition at line 409 of file forcing.h.
409 {
410 V rho, u[DESCRIPTOR::d];
411 MomentaF().computeRhoU(cell, rho, u);
413 const V omega = cell.template getField<descriptors::OMEGA>();
414 const auto force = cell.template getField<descriptors::FORCE>();
415 const V d2_rho = cell.template getField<descriptors::SCALAR>();
417
418
419 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
420 V c_u{};
421 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
423 }
425 V forceTerm{};
426 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
427 forceTerm +=
430 ) * force[iD];
431 }
432
433 V delta_ij = 0;
434 for (int n = 0; n < DESCRIPTOR::d; ++n) {
435 for (
int m = 0;
m < DESCRIPTOR::d; ++
m) {
436 int ind = n*DESCRIPTOR::d +
m;
437
438 delta_ij = (n ==
m) ? 1 : 0;
439
440 psi_w[ind] = (V(1.)-omega/V(4.))*force[n]*force[m] + omega/V(12.)*( d2_rho )/rho*delta_ij;
441
442
445 * psi_w[ind];
446 }
447 }
448
450 forceTerm *= rho;
451 cell[iPop] += forceTerm;
452 }
453
455 };
constexpr T m(unsigned iPop, unsigned jPop, tag::MRT)
constexpr T invCs2() any_platform
constexpr T t(unsigned iPop, tag::CUM) any_platform
constexpr int c(unsigned iPop, unsigned iDim) any_platform
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
typename MOMENTA::template type< DESCRIPTOR > MomentaF
References olb::descriptors::c(), olb::descriptors::invCs2(), olb::util::normSqr(), and olb::descriptors::t().