Implementation of LB collision model TRT [13].
Instead of providing two relaxation parameters, you can also provide one relaxation parameter omega and a "magic" number 'x'. The two relaxation parameters are then calculated as follows:
λe=ω
x=(1λe−0.5)(1λd−0.5)
Good choices for 'x' are 3 / 16 (exact solution for Poiseuille flow with wall distance = 0.5 [12]) and around 1 / 4 (best stability).
#include <CollisionModel.h>
Public Types | |
using | tag = TRT_tag |
Public Member Functions | |
TRT (const real_t _lambda_e, const real_t _lambda_d, const uint_t _level=uint_t(0)) | |
void | pack (mpi::SendBuffer &buffer) const |
void | unpack (mpi::RecvBuffer &buffer) |
void | configure (IBlock &block, StructuredBlockStorage &sbs) |
Adapts the two relaxation parameters to the "right", level-dependent parameters once "configure" is called. More... | |
void | reset (const real_t _lambda_e, const real_t _lambda_d, const uint_t _lambda_level=uint_t(0)) |
Only call this function if you know what you're doing (changes the viscosity!) "_lambda_level" is the level that corresponds to "_lambda_e" and "_lambda_d". More... | |
void | resetWithMagicNumber (const real_t _omega, const real_t _magicNumber=threeSixteenth, const uint_t omega_level=uint_t(0)) |
Only call this function if you know what you're doing (changes the viscosity!) "omega_level" is the level that corresponds to "omega". More... | |
real_t | lambda_e () const |
real_t | lambda_d () const |
real_t | viscosity () const |
real_t | viscosity (const cell_idx_t, const cell_idx_t, const cell_idx_t) const |
real_t | omega () const |
real_t | omega (const cell_idx_t, const cell_idx_t, const cell_idx_t, const Vector3< real_t > &=Vector3< real_t >(), const real_t=real_t(1)) const |
real_t | omega_bulk () const |
real_t | omega_odd () const |
real_t | viscosity (const uint_t _level) const |
uint_t | level () const |
Static Public Member Functions | |
static TRT | constructWithMagicNumber (const real_t _omega, const real_t _magicNumber=threeSixteenth, const uint_t _level=uint_t(0)) |
static real_t | lambda_e (const real_t _omega) |
static real_t | lambda_d (const real_t _omega, const real_t _magicNumber=threeSixteenth) |
static real_t | magicNumber (const real_t _lambda_e, const real_t _lambda_d) |
Static Public Attributes | |
static const real_t | threeSixteenth = real_t(3) / real_t(16) |
Private Member Functions | |
TRT () | |
void | initWithMagicNumber (const real_t _omega, const real_t _magicNumber, const uint_t _level) |
Private Attributes | |
real_t | lambda_e_ |
real_t | lambda_d_ |
real_t | magicNumber_ |
real_t | viscosity_ |
uint_t | level_ |
|
inline |
|
inlineprivate |
|
inline |
Adapts the two relaxation parameters to the "right", level-dependent parameters once "configure" is called.
|
inlinestatic |
|
inlineprivate |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Only call this function if you know what you're doing (changes the viscosity!) "_lambda_level" is the level that corresponds to "_lambda_e" and "_lambda_d".
|
inline |
Only call this function if you know what you're doing (changes the viscosity!) "omega_level" is the level that corresponds to "omega".
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |