22 #include <LbmLib/include/solver/BoundarySolverNoFluxD2Q5.hpp>
23 #include <LbmLib/include/solver/CDESolver/CDEAbstractSolver.hpp>
25 #include <LbmLib/include/nodes/BoundaryNode.hpp>
26 #include <LbmLib/include/nodes/PhysicalNode.hpp>
33 BoundarySolverNoFluxD2Q5::BoundarySolverNoFluxD2Q5() : BaseBoundarySolver(),
40 if ((dir > T) && (dir < NE)) {
41 std::swap(distribution_,
44 getDirectionToNeighbour()));
64 feq = Cf * (1 + 3 * ux);
68 getInverseDirection(dir)) -
70 calculateEquilibrium(dir);
71 distribution_ = feq + fneq;
75 feq = Cf * (1 + 3 * uy);
79 getInverseDirection(dir)) -
81 calculateEquilibrium(dir);
82 distribution_ = feq + fneq;
86 feq = Cf * (1 - 3 * ux);
90 getInverseDirection(dir)) -
92 calculateEquilibrium(dir);
93 distribution_ = feq + fneq;
97 feq = Cf * (1 - 3 * uy);
101 getInverseDirection(dir)) -
103 calculateEquilibrium(dir);
104 distribution_ = feq + fneq;
109 "for the boundary condition only e,n,w and s direction exists there must somewhere be an error");
118 return distribution_;
121 const std::string BoundarySolverNoFluxD2Q5::name =
"BoundarySolverNoFluxD2Q5";
solver::CDEAbstractSolver & getCDESolverSlow(const std::string &name) const
getCDESolverSlow Getter method for the cde Solver
std::vector< std::string > cdeSolvers_
cdeSolvers_ The cde solver this boundary solver is responsible for.
virtual void advect()
advect The advect step of the LBM
virtual void preAdvect()
preAdvect Executed before the advection step
virtual double & accessDistribution(const Direction &dir)=0
accessDistribution Access to the distribution
PhysicalNode * getPhysicalNeighbour() const
getFluidNeighbour Getter for the Physical neighbour
virtual double & accessDistribution(const Direction &dir)
accessDistribution Access to the distribution
virtual double getC() const =0
getC Calculates the concentration on this node
virtual void postAdvect()
postAdvect Executed after the advection step
Direction getDirectionToNeighbour() const
getDirectionToNeighbour returns the direction to the next neighbour
virtual void initSolver()
initSolver Use this to initalise the solver
double getXVelocity() const
getXVelocity Getter for x-velocity component
const nodes::BoundaryNode * boundaryNode_
physicalNode_ The physical Node which owns this solver
double getYVelocity() const
getYVelocity Getter for the y-velocity component