OpenLB 1.7
|
Dynamics for offLattice boundary conditions OffDynamics are basically NoLatticeDynamics with the additional functionality to store given velocities exactly at boundary links. More...
#include <dynamics.h>
Public Member Functions | |
OffDynamics (const T _location[DESCRIPTOR::d]) | |
Constructor. | |
OffDynamics (const T _location[DESCRIPTOR::d], T _distances[DESCRIPTOR::q]) | |
Constructor. | |
T | computeRho (ConstCell< T, DESCRIPTOR > &cell) const override |
Returns local stored rho which is updated if the bc is used as velocity!=0 condition. | |
void | computeU (ConstCell< T, DESCRIPTOR > &cell, T u[DESCRIPTOR::d]) const override |
Returns an average of the locally stored u. | |
void | setBoundaryIntersection (int iPop, T distance) |
Set Intersection of the link and the boundary. | |
bool | getBoundaryIntersection (int iPop, T intersection[DESCRIPTOR::d]) |
Get Intersection of the link and the boundary. | |
void | defineRho (Cell< T, DESCRIPTOR > &cell, T rho) override |
Set particle density on the cell. | |
void | defineRho (int iPop, T rho) |
Set single velocity. | |
void | defineU (Cell< T, DESCRIPTOR > &cell, const T u[DESCRIPTOR::d]) override |
Set fluid velocity on the cell. | |
void | defineU (const T u[DESCRIPTOR::d]) |
Set constant velocity. | |
void | defineU (int iPop, const T u[DESCRIPTOR::d]) |
Set single velocity. | |
T | getVelocityCoefficient (int iPop) |
Get VelocitySummand for Bouzidi-Boundary Condition. | |
std::type_index | id () override |
Expose unique type-identifier for RTTI. | |
Public Member Functions inherited from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR > | |
NoLatticeDynamics (T rho=T(1)) | |
You may fix a fictitious density value on no dynamics node via this constructor. | |
T | computeEquilibrium (int iPop, T rho, const T u[DESCRIPTOR::d]) const override any_platform |
Yields 0;. | |
CellStatistic< T > | collide (Cell< T, DESCRIPTOR > &cell) override |
Collision step. | |
void | computeJ (ConstCell< T, DESCRIPTOR > &cell, T j[DESCRIPTOR::d]) const override |
Yields 0;. | |
void | computeStress (ConstCell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], T pi[util::TensorVal< DESCRIPTOR >::n]) const override |
Yields NaN. | |
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 | defineRhoU (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d]) override |
Does nothing. | |
void | defineAllMomenta (Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d], const T pi[util::TensorVal< DESCRIPTOR >::n]) override |
Does nothing. | |
AbstractParameters< T, DESCRIPTOR > & | getParameters (BlockLattice< T, DESCRIPTOR > &block) override |
Parameters access for legacy post processors. | |
Public Member Functions inherited from olb::Dynamics< T, DESCRIPTOR > | |
virtual | ~Dynamics () any_platform |
virtual std::string | getName () const |
Return human-readable name. | |
virtual void | initialize (Cell< T, DESCRIPTOR > &cell) |
Initialize dynamics-specific data for cell. | |
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. | |
virtual void | inverseShiftRhoU (ConstCell< T, DESCRIPTOR > &cell, T &rho, T u[DESCRIPTOR::d]) const |
Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU. | |
Additional Inherited Members | |
Public Types inherited from olb::Dynamics< T, DESCRIPTOR > | |
using | value_t = T |
using | descriptor_t = DESCRIPTOR |
Dynamics for offLattice boundary conditions OffDynamics are basically NoLatticeDynamics with the additional functionality to store given velocities exactly at boundary links.
Definition at line 145 of file dynamics.h.
olb::legacy::OffDynamics< T, DESCRIPTOR >::OffDynamics | ( | const T | _location[DESCRIPTOR::d] | ) |
Constructor.
Definition at line 287 of file dynamics.h.
olb::legacy::OffDynamics< T, DESCRIPTOR >::OffDynamics | ( | const T | _location[DESCRIPTOR::d], |
T | _distances[DESCRIPTOR::q] ) |
Constructor.
Definition at line 306 of file dynamics.h.
|
overridevirtual |
Returns local stored rho which is updated if the bc is used as velocity!=0 condition.
Reimplemented from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.
Definition at line 325 of file dynamics.h.
|
overridevirtual |
Returns an average of the locally stored u.
Reimplemented from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.
Definition at line 345 of file dynamics.h.
References olb::util::nearZero().
|
overridevirtual |
Set particle density on the cell.
Reimplemented from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.
Definition at line 394 of file dynamics.h.
void olb::legacy::OffDynamics< T, DESCRIPTOR >::defineRho | ( | int | iPop, |
T | rho ) |
|
overridevirtual |
Set fluid velocity on the cell.
Reimplemented from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.
Definition at line 406 of file dynamics.h.
void olb::legacy::OffDynamics< T, DESCRIPTOR >::defineU | ( | const T | u[DESCRIPTOR::d] | ) |
Set constant velocity.
Definition at line 414 of file dynamics.h.
References olb::util::nearZero().
void olb::legacy::OffDynamics< T, DESCRIPTOR >::defineU | ( | int | iPop, |
const T | u[DESCRIPTOR::d] ) |
Set single velocity.
Bouzidi velocity boundary condition formulas for the Coefficients:
2* invCs2*weight*(c,u) for dist < 1/2 1/dist*invCs2*weight*(c,u) for dist >= 1/2
Definition at line 430 of file dynamics.h.
References OLB_PRECONDITION.
bool olb::legacy::OffDynamics< T, DESCRIPTOR >::getBoundaryIntersection | ( | int | iPop, |
T | intersection[DESCRIPTOR::d] ) |
Get Intersection of the link and the boundary.
Definition at line 381 of file dynamics.h.
References olb::util::nearZero().
T olb::legacy::OffDynamics< T, DESCRIPTOR >::getVelocityCoefficient | ( | int | iPop | ) |
Get VelocitySummand for Bouzidi-Boundary Condition.
Definition at line 449 of file dynamics.h.
|
inlineoverridevirtual |
Expose unique type-identifier for RTTI.
Reimplemented from olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.
Definition at line 172 of file dynamics.h.
void olb::legacy::OffDynamics< T, DESCRIPTOR >::setBoundaryIntersection | ( | int | iPop, |
T | distance ) |
Set Intersection of the link and the boundary.
direction points from the fluid node into the solid domain distance is the distance from the fluid node to the solid wall
Definition at line 369 of file dynamics.h.