walberla::lbm::collision_model::TRT Class Reference

Detailed Description

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:

\[ \lambda_e = \omega \]

\[ x = ( \frac{1}{\lambda_e} - 0.5 )( \frac{1}{\lambda_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_
 

Member Typedef Documentation

◆ tag

Constructor & Destructor Documentation

◆ TRT() [1/2]

walberla::lbm::collision_model::TRT::TRT ( const real_t  _lambda_e,
const real_t  _lambda_d,
const uint_t  _level = uint_t(0) 
)
inline

◆ TRT() [2/2]

walberla::lbm::collision_model::TRT::TRT ( )
inlineprivate

Member Function Documentation

◆ configure()

void walberla::lbm::collision_model::TRT::configure ( IBlock block,
StructuredBlockStorage sbs 
)
inline

Adapts the two relaxation parameters to the "right", level-dependent parameters once "configure" is called.

◆ constructWithMagicNumber()

static TRT walberla::lbm::collision_model::TRT::constructWithMagicNumber ( const real_t  _omega,
const real_t  _magicNumber = threeSixteenth,
const uint_t  _level = uint_t(0) 
)
inlinestatic

◆ initWithMagicNumber()

void walberla::lbm::collision_model::TRT::initWithMagicNumber ( const real_t  _omega,
const real_t  _magicNumber,
const uint_t  _level 
)
inlineprivate

◆ lambda_d() [1/2]

real_t walberla::lbm::collision_model::TRT::lambda_d ( ) const
inline

◆ lambda_d() [2/2]

static real_t walberla::lbm::collision_model::TRT::lambda_d ( const real_t  _omega,
const real_t  _magicNumber = threeSixteenth 
)
inlinestatic

◆ lambda_e() [1/2]

real_t walberla::lbm::collision_model::TRT::lambda_e ( ) const
inline

◆ lambda_e() [2/2]

static real_t walberla::lbm::collision_model::TRT::lambda_e ( const real_t  _omega)
inlinestatic

◆ level()

uint_t walberla::lbm::collision_model::TRT::level ( ) const
inline

◆ magicNumber()

static real_t walberla::lbm::collision_model::TRT::magicNumber ( const real_t  _lambda_e,
const real_t  _lambda_d 
)
inlinestatic

◆ omega() [1/2]

real_t walberla::lbm::collision_model::TRT::omega ( ) const
inline

◆ omega() [2/2]

real_t walberla::lbm::collision_model::TRT::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
inline

◆ omega_bulk()

real_t walberla::lbm::collision_model::TRT::omega_bulk ( ) const
inline

◆ omega_odd()

real_t walberla::lbm::collision_model::TRT::omega_odd ( ) const
inline

◆ pack()

void walberla::lbm::collision_model::TRT::pack ( mpi::SendBuffer buffer) const
inline

◆ reset()

void walberla::lbm::collision_model::TRT::reset ( const real_t  _lambda_e,
const real_t  _lambda_d,
const uint_t  _lambda_level = uint_t(0) 
)
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".

◆ resetWithMagicNumber()

void walberla::lbm::collision_model::TRT::resetWithMagicNumber ( const real_t  _omega,
const real_t  _magicNumber = threeSixteenth,
const uint_t  omega_level = uint_t(0) 
)
inline

Only call this function if you know what you're doing (changes the viscosity!) "omega_level" is the level that corresponds to "omega".

◆ unpack()

void walberla::lbm::collision_model::TRT::unpack ( mpi::RecvBuffer buffer)
inline

◆ viscosity() [1/3]

real_t walberla::lbm::collision_model::TRT::viscosity ( ) const
inline

◆ viscosity() [2/3]

real_t walberla::lbm::collision_model::TRT::viscosity ( const  cell_idx_t,
const  cell_idx_t,
const  cell_idx_t 
) const
inline

◆ viscosity() [3/3]

real_t walberla::lbm::collision_model::TRT::viscosity ( const uint_t  _level) const
inline

Member Data Documentation

◆ lambda_d_

real_t walberla::lbm::collision_model::TRT::lambda_d_
private

◆ lambda_e_

real_t walberla::lbm::collision_model::TRT::lambda_e_
private

◆ level_

uint_t walberla::lbm::collision_model::TRT::level_
private

◆ magicNumber_

real_t walberla::lbm::collision_model::TRT::magicNumber_
private

◆ threeSixteenth

const real_t walberla::lbm::collision_model::TRT::threeSixteenth = real_t(3) / real_t(16)
static

◆ viscosity_

real_t walberla::lbm::collision_model::TRT::viscosity_
private

The documentation for this class was generated from the following files: