16 #ifndef FLUIDSOLVER_HPP
17 #define FLUIDSOLVER_HPP
19 #include <LbmLib/include/Field.hpp>
20 #include <LbmLib/include/solver/AbstractSolver.hpp>
32 class FluidSolver :
public AbstractSolver {
38 explicit FluidSolver(
const nodes::PhysicalNode& physicalNode);
48 virtual void loadSolver(std::stringstream*
const stream);
54 virtual void writeSolver(std::ostream*
const stream);
125 void initWithVelocity();
139 std::array<double, 9> distributions_;
163 #endif // FLUIDSOLVER_HPP
void setVelocity(Field< double > velocity)
setVelocity Sets the velocity of this fluid Algorithm. Should only be used for initialisation.
void addForce(Field< double > f)
adds f to the current force
virtual void writeSolver(std::ostream *const stream)
writes the solver to the file
FluidSolver(const nodes::PhysicalNode &physicalNode)
FluidSolver Initialises the fluid solver.
virtual double & accessDistribution(const Direction &dir)
accessDistribution Access to the distribution
void addMass(double mass)
addMass The mass which is added to this fluid solver
class representing a physical node
virtual void initSolver()
initSolver Use this to initalise the solver
double getRho() const
getRho Calculates the Rho
void resetForce()
resets the force on this fluid solver to 0
virtual void rescaleDistributions(const double factor)
Rescales all distributions by a factor.
const Field< double > & getVelocity() const
getVelocity Returns the current velocity of the fluid
virtual void loadSolver(std::stringstream *const stream)
loads the solver from the file
virtual void advect()
advect The advect step of the LBM
virtual void collide()
collide The collision step of the LBM
The DirectionOperations_ class Provides methods to handle the Directions. Use the Function Directions...
~FluidSolver()
~FluidSolver Destructor non virtual to avoid inheritance