MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
Public Member Functions | Public Attributes | Static Public Attributes
Cell Class Reference

#include <Cell.h>

List of all members.

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)

Constructor & Destructor Documentation

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.


Member Function Documentation

void Cell::BounceBack ( ) [inline]

Apply the bounceback rule to this cell.

double Cell::Density ( ) [inline]

Calculate density.

double Cell::Feq ( size_t  k,
Vec3_t const &  V,
double  Rho 
) [inline]

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.


Member Data Documentation

Applied body force.

Fixed Applied body force.

Vec3_t const* Cell::C

Pointer to velocity constants.

double Cell::Cs

Velocity of the grid.

Array<double> Cell::F

Distribution functions.

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.

It is a solid node.

Local velocities (D2Q9)

Local velocities (D3Q15)

Is 2D, 3D and how many velocities it has.

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::Rho

Density of the Cell.

double Cell::RhoBC

Density at boundary.

double Cell::Tau

Relaxation Time.

Velocity of the Cell.

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)


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines