OpenLB 1.7
|
Implementation of the dual MRT collision step with external force. More...
#include <dualMrtDynamics.h>
Public Member Functions | |
DualForcedMRTdynamics (T omega_) | |
Constructor. | |
virtual CellStatistic< T > | collide (Cell< T, DESCRIPTOR > &cell, LatticeStatistics< T > &statistics_) |
Collision step. | |
virtual void | defineRho (Cell< T, DESCRIPTOR > &cell, T rho) |
Set particle density. | |
Public Member Functions inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
std::type_index | id () override |
Expose unique type-identifier for RTTI. | |
std::string | getName () const override |
Return human-readable name. | |
template<typename FIELD > | |
constexpr bool | hasParameter () const |
Return true iff FIELD is a parameter. | |
AbstractParameters< T, DESCRIPTOR > & | getParameters (BlockLattice< T, DESCRIPTOR > &block) override |
Interim workaround for accessing dynamics parameters in legacy post processors. | |
void | initialize (Cell< T, DESCRIPTOR > &cell) override |
Initialize MOMENTA-specific data for cell. | |
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t> | |
CellStatistic< V > | apply (CELL &cell, PARAMETERS ¶meters) any_platform |
Apply purely-local collision step to a generic CELL. | |
T | computeEquilibrium (int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform |
Return iPop equilibrium for given first and second momenta. | |
T | computeRho (ConstCell< T, DESCRIPTOR > &cell) const override |
Compute particle density. | |
void | computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override |
Compute fluid velocity. | |
void | computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const override |
Compute fluid momentum. | |
void | computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override |
Compute stress tensor. | |
void | computeRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override |
Compute fluid velocity and particle density. | |
void | computeAllMomenta (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override |
Compute all momenta up to second order. | |
void | defineRho (Cell< T, DESCRIPTOR > &cell, T rho) override |
Set particle density. | |
void | defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d]) override |
Set fluid velocity. | |
void | defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) override |
Define fluid velocity and particle density. | |
void | defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) override |
Define all momenta up to second order. | |
void | inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const override |
Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU. | |
Public Member Functions inherited from olb::Dynamics< T, DESCRIPTOR > | |
virtual | ~Dynamics () any_platform |
virtual CellStatistic< T > | collide (Cell< T, DESCRIPTOR > &cell) |
Perform purely-local collision step on Cell interface (legacy, to be deprecated) | |
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. | |
Additional Inherited Members | |
Public Types inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
using | MomentaF = typename COMBINATION_RULE::template combined_momenta<DESCRIPTOR,MOMENTA> |
using | EquilibriumF = typename COMBINATION_RULE::template combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM> |
using | CollisionO = typename COMBINATION_RULE::template combined_collision<DESCRIPTOR,MOMENTA,EQUILIBRIUM,COLLISION> |
using | parameters = typename COMBINATION_RULE::template combined_parameters<DESCRIPTOR,MOMENTA,EQUILIBRIUM,COLLISION> |
template<typename NEW_MOMENTA > | |
using | exchange_momenta |
template<typename NEW_RULE > | |
using | exchange_combination_rule |
template<template< typename > typename WRAPPER> | |
using | wrap_collision |
Public Types inherited from olb::Dynamics< T, DESCRIPTOR > | |
using | value_t = T |
using | descriptor_t = DESCRIPTOR |
Static Public Attributes inherited from olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE > | |
static constexpr bool | is_vectorizable = is_vectorizable_v<CollisionO> |
Implementation of the dual MRT collision step with external force.
Definition at line 56 of file dualMrtDynamics.h.
olb::opti::DualForcedMRTdynamics< T, DESCRIPTOR, MOMENTA >::DualForcedMRTdynamics | ( | T | omega_ | ) |
Constructor.
omega_ | relaxation parameter, related to the dynamic viscosity |
momenta_ | a Momenta object to know how to compute velocity momenta |
Definition at line 79 of file dualMrtDynamics.h.
References OLB_PRECONDITION.
|
virtual |
Collision step.
Definition at line 149 of file dualMrtDynamics.h.
References olb::LatticeStatistics< T >::incrementStats(), and olb::Cell< T, DESCRIPTOR >::revert().
|
virtual |
Set particle density.
Implements olb::Dynamics< T, DESCRIPTOR >.
Definition at line 138 of file dualMrtDynamics.h.