![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <Cell.h>
Public Member Functions | |
Cell (size_t ID, LBMethod Method, iVec3_t Indexes, iVec3_t Ndim, double Cs, double Tau) | |
Constructor, it receives the grid type, ht einteger position and the total integer dimension of the domain and the spatial and time steps. | |
double | Density () |
Calculate density. | |
void | Velocity (Vec3_t &V) |
Calculate velocity. | |
double | VelDen (Vec3_t &V) |
Calculate both (faster) | |
double | Feq (size_t k, Vec3_t const &V, double Rho) |
Calculate the equilibrium distribution function. | |
void | Initialize (double Rho, Vec3_t const &V) |
Initialize cell with a given velocity and density. | |
void | BounceBack () |
Apply the bounceback rule to this cell. | |
Public Attributes | |
LBMethod | Method |
Is 2D, 3D and how many velocities it has. | |
bool | IsSolid |
It is a solid node. | |
double | Tau |
Relaxation Time. | |
double | Gamma |
Solid/Fluid ratio. | |
double | Gs |
Interaction constant between solid and fluid. | |
size_t | Nneigh |
Number of neighbors. | |
size_t | ID |
Tag for the particle. | |
double | Cs |
Velocity of the grid. | |
double | Rho |
Density of the Cell. | |
iVec3_t | Index |
Vector of indexes. | |
Vec3_t | Vel |
Velocity of the Cell. | |
Vec3_t | VelBC |
Velocity at boundary. | |
Vec3_t | BForce |
Applied body force. | |
Vec3_t | BForcef |
Fixed Applied body force. | |
double | RhoBC |
Density at boundary. | |
size_t const * | Op |
Pointer to opposite velocities. | |
double const * | W |
Pointer to array of weights. | |
Vec3_t const * | C |
Pointer to velocity constants. | |
Array< double > | F |
Distribution functions. | |
Array< double > | Ftemp |
Temporary distribution functions. | |
Array< double > | Omeis |
Array of collision operators. | |
Array< size_t > | Neighs |
Array of neighbors indexes. | |
Static Public Attributes | |
static const double | WEIGHTSD2Q9 [9] = { 4./9., 1./9., 1./9., 1./9., 1./9., 1./36., 1./36., 1./36., 1./36. } |
Weights for the equilibrium distribution functions (D2Q9) | |
static const double | WEIGHTSD3Q15 [15] = { 2./9., 1./9., 1./9., 1./9., 1./9., 1./9., 1./9., 1./72., 1./72. , 1./72., 1./72., 1./72., 1./72., 1./72., 1./72.} |
Weights for the equilibrium distribution functions (D3Q15) | |
static Vec3_t | LVELOCD2Q9 [9] |
Local velocities (D2Q9) | |
static Vec3_t | LVELOCD3Q15 [15] |
Local velocities (D3Q15) | |
static const size_t | OPPOSITED2Q9 [9] = { 0, 3, 4, 1, 2, 7, 8, 5, 6 } |
Opposite directions (D2Q9) | |
static const size_t | OPPOSITED3Q15 [15] = { 0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13} |
Opposite directions (D3Q15) |
Cell::Cell | ( | size_t | ID, |
LBMethod | Method, | ||
iVec3_t | Indexes, | ||
iVec3_t | Ndim, | ||
double | Cs, | ||
double | Tau | ||
) | [inline] |
Constructor, it receives the grid type, ht einteger position and the total integer dimension of the domain and the spatial and time steps.
void Cell::BounceBack | ( | ) | [inline] |
Apply the bounceback rule to this cell.
double Cell::Density | ( | ) | [inline] |
Calculate density.
Calculate the equilibrium distribution function.
void Cell::Initialize | ( | double | Rho, |
Vec3_t const & | V | ||
) | [inline] |
Initialize cell with a given velocity and density.
double Cell::VelDen | ( | Vec3_t & | V | ) | [inline] |
Calculate both (faster)
void Cell::Velocity | ( | Vec3_t & | V | ) | [inline] |
Calculate velocity.
Applied body force.
Fixed Applied body force.
double Cell::Cs |
Velocity of the grid.
Array<double> Cell::Ftemp |
Temporary distribution functions.
double Cell::Gamma |
Solid/Fluid ratio.
double Cell::Gs |
Interaction constant between solid and fluid.
size_t Cell::ID |
Tag for the particle.
Vector of indexes.
bool Cell::IsSolid |
It is a solid node.
Vec3_t Cell::LVELOCD2Q9 [static] |
Local velocities (D2Q9)
Vec3_t Cell::LVELOCD3Q15 [static] |
Local velocities (D3Q15)
Is 2D, 3D and how many velocities it has.
Array<size_t> Cell::Neighs |
Array of neighbors indexes.
size_t Cell::Nneigh |
Number of neighbors.
Array<double> Cell::Omeis |
Array of collision operators.
size_t const* Cell::Op |
Pointer to opposite velocities.
const size_t Cell::OPPOSITED2Q9 = { 0, 3, 4, 1, 2, 7, 8, 5, 6 } [static] |
Opposite directions (D2Q9)
const size_t Cell::OPPOSITED3Q15 = { 0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13} [static] |
Opposite directions (D3Q15)
double Cell::RhoBC |
Density at boundary.
double Cell::Tau |
Relaxation Time.
Velocity at boundary.
double const* Cell::W |
Pointer to array of weights.
const double Cell::WEIGHTSD2Q9 = { 4./9., 1./9., 1./9., 1./9., 1./9., 1./36., 1./36., 1./36., 1./36. } [static] |
Weights for the equilibrium distribution functions (D2Q9)
const double Cell::WEIGHTSD3Q15 = { 2./9., 1./9., 1./9., 1./9., 1./9., 1./9., 1./9., 1./72., 1./72. , 1./72., 1./72., 1./72., 1./72., 1./72., 1./72.} [static] |
Weights for the equilibrium distribution functions (D3Q15)