LBIBCell
 All Classes Functions Variables Friends Pages
LbmLib::solver::FluidSolver Class Reference

the Fluid Solver which solves the D2Q9 LBGK More...

#include <FluidSolver.hpp>

Inheritance diagram for LbmLib::solver::FluidSolver:
LbmLib::solver::AbstractSolver LbmLib::solver::AbstractSolver LbmLib::solver::Luo1993ForceModel

Public Member Functions

 FluidSolver (const nodes::PhysicalNode &physicalNode)
 FluidSolver Initialises the fluid solver. More...
 
 ~FluidSolver ()
 ~FluidSolver Destructor non virtual to avoid inheritance
 
virtual void loadSolver (std::stringstream *const stream)
 loads the solver from the file More...
 
virtual void writeSolver (std::ostream *const stream)
 writes the solver to the file More...
 
virtual void collide ()
 collide The collision step of the LBM
 
virtual void advect ()
 advect The advect step of the LBM
 
virtual double & accessDistribution (const Direction &dir)
 accessDistribution Access to the distribution More...
 
virtual void rescaleDistributions (const double factor)
 Rescales all distributions by a factor. More...
 
double getRho () const
 getRho Calculates the Rho More...
 
const Field< double > & getVelocity () const
 getVelocity Returns the current velocity of the fluid More...
 
void setVelocity (Field< double > velocity)
 setVelocity Sets the velocity of this fluid Algorithm. Should only be used for initialisation. More...
 
virtual void initSolver ()
 initSolver Use this to initalise the solver
 
void addForce (Field< double > f)
 adds f to the current force More...
 
void resetForce ()
 resets the force on this fluid solver to 0 More...
 
void addMass (double mass)
 addMass The mass which is added to this fluid solver More...
 
 FluidSolver (const nodes::PhysicalNode &physicalNode)
 FluidSolver Initialises the fluid solver. More...
 
 ~FluidSolver ()
 ~FluidSolver Destructor non virtual to avoid inheritance
 
virtual void loadSolver (std::stringstream *const stream)
 loads the solver from the file More...
 
virtual void writeSolver (std::ostream *const stream)
 writes the solver to the file More...
 
virtual void collide ()
 collide The collision step of the LBM
 
virtual void advect ()
 advect The advect step of the LBM
 
virtual double & accessDistribution (const Direction &dir)
 accessDistribution Access to the distribution More...
 
virtual void rescaleDistributions (const double factor)
 Rescales all distributions by a factor. More...
 
double getRho () const
 getRho Calculates the Rho More...
 
const Field< double > & getVelocity () const
 getVelocity Returns the current velocity of the fluid More...
 
void setVelocity (Field< double > velocity)
 setVelocity Sets the velocity of this fluid Algorithm. Should only be used for initialisation. More...
 
virtual void initSolver ()
 initSolver Use this to initalise the solver
 
void addForce (Field< double > f)
 adds f to the current force More...
 
void resetForce ()
 resets the force on this fluid solver to 0 More...
 
void addMass (double mass)
 addMass The mass which is added to this fluid solver More...
 
- Public Member Functions inherited from LbmLib::solver::AbstractSolver
virtual ~AbstractSolver ()
 ~AbstractSolver Destructor
 
void setTau (double tau)
 setTau Setter method for the tau parameter of the solver More...
 
double getTau () const
 getTau Getter method for the tau parameter More...
 

Additional Inherited Members

- Protected Member Functions inherited from LbmLib::solver::AbstractSolver
 AbstractSolver ()
 AbstractSolver Protected to disable direct instantiation.
 

Detailed Description

the Fluid Solver which solves the D2Q9 LBGK

Definition at line 41 of file FluidSolver.hpp.

Constructor & Destructor Documentation

LbmLib::solver::FluidSolver::FluidSolver ( const nodes::PhysicalNode physicalNode)
explicit

FluidSolver Initialises the fluid solver.

Parameters
physicalNodeThe physical node which is the parent of this solver

Definition at line 266 of file FluidSolver.cpp.

LbmLib::solver::FluidSolver::FluidSolver ( const nodes::PhysicalNode physicalNode)
explicit

FluidSolver Initialises the fluid solver.

Parameters
physicalNodeThe physical node which is the parent of this solver

Member Function Documentation

virtual double& LbmLib::solver::FluidSolver::accessDistribution ( const Direction &  dir)
virtual

accessDistribution Access to the distribution

Parameters
dirthe direction where the Distribution is wanted
Returns
A Reference to the Distribution

Implements LbmLib::solver::AbstractSolver.

double & LbmLib::solver::FluidSolver::accessDistribution ( const Direction &  dir)
virtual

accessDistribution Access to the distribution

Parameters
dirthe direction where the Distribution is wanted
Returns
A Reference to the Distribution

Implements LbmLib::solver::AbstractSolver.

Definition at line 225 of file FluidSolver.cpp.

void LbmLib::solver::FluidSolver::addForce ( Field< double >  f)

adds f to the current force

Postcondition
force_ = force_ + f
Parameters
fthe added force
void LbmLib::solver::FluidSolver::addForce ( Field< double >  f)

adds f to the current force

Postcondition
force_ = force_ + f
Parameters
fthe added force

Definition at line 196 of file FluidSolver.cpp.

void LbmLib::solver::FluidSolver::addMass ( double  mass)

addMass The mass which is added to this fluid solver

Parameters
massThe mass to add
void LbmLib::solver::FluidSolver::addMass ( double  mass)

addMass The mass which is added to this fluid solver

Parameters
massThe mass to add

Definition at line 253 of file FluidSolver.cpp.

double LbmLib::solver::FluidSolver::getRho ( ) const

getRho Calculates the Rho

Returns
returns the rho
double LbmLib::solver::FluidSolver::getRho ( ) const

getRho Calculates the Rho

Returns
returns the rho

Definition at line 248 of file FluidSolver.cpp.

const Field<double>& LbmLib::solver::FluidSolver::getVelocity ( ) const

getVelocity Returns the current velocity of the fluid

Returns
The velocity of the fluid
const Field< double > & LbmLib::solver::FluidSolver::getVelocity ( ) const

getVelocity Returns the current velocity of the fluid

Returns
The velocity of the fluid

Definition at line 242 of file FluidSolver.cpp.

virtual void LbmLib::solver::FluidSolver::loadSolver ( std::stringstream *const  stream)
virtual

loads the solver from the file

Parameters
streamthe stream where the solver is loaded from

Implements LbmLib::solver::AbstractSolver.

void LbmLib::solver::FluidSolver::loadSolver ( std::stringstream *const  stream)
virtual

loads the solver from the file

Parameters
streamthe stream where the solver is loaded from

Implements LbmLib::solver::AbstractSolver.

Definition at line 208 of file FluidSolver.cpp.

virtual void LbmLib::solver::FluidSolver::rescaleDistributions ( const double  factor)
virtual

Rescales all distributions by a factor.

Parameters
factorThe rescaling factor.

Implements LbmLib::solver::AbstractSolver.

void LbmLib::solver::FluidSolver::rescaleDistributions ( const double  factor)
virtual

Rescales all distributions by a factor.

Parameters
factorThe rescaling factor.

Implements LbmLib::solver::AbstractSolver.

Definition at line 229 of file FluidSolver.cpp.

void LbmLib::solver::FluidSolver::resetForce ( )

resets the force on this fluid solver to 0

Postcondition
force_ = 0,0
void LbmLib::solver::FluidSolver::resetForce ( )

resets the force on this fluid solver to 0

Postcondition
force_ = 0,0

Definition at line 220 of file FluidSolver.cpp.

void LbmLib::solver::FluidSolver::setVelocity ( Field< double >  velocity)

setVelocity Sets the velocity of this fluid Algorithm. Should only be used for initialisation.

Parameters
velocityThe velocity
void LbmLib::solver::FluidSolver::setVelocity ( Field< double >  velocity)

setVelocity Sets the velocity of this fluid Algorithm. Should only be used for initialisation.

Parameters
velocityThe velocity

Definition at line 235 of file FluidSolver.cpp.

virtual void LbmLib::solver::FluidSolver::writeSolver ( std::ostream *const  stream)
virtual

writes the solver to the file

Parameters
streamthe stream where the solver is written to

Implements LbmLib::solver::AbstractSolver.

void LbmLib::solver::FluidSolver::writeSolver ( std::ostream *const  stream)
virtual

writes the solver to the file

Parameters
streamthe stream where the solver is written to

Implements LbmLib::solver::AbstractSolver.

Definition at line 200 of file FluidSolver.cpp.


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