22 #include <LbmLib/include/solver/BoundarySolverNoFlux.hpp>
23 #include <LbmLib/include/solver/CDESolver/CDEAbstractSolver.hpp>
25 #include <LbmLib/include/nodes/BoundaryNode.hpp>
26 #include <LbmLib/include/nodes/PhysicalNode.hpp>
33 BoundarySolverNoFlux::BoundarySolverNoFlux() : BaseBoundarySolver(),
40 if ((dir > T) && (dir < NE)) {
41 std::swap(distribution_,
44 getDirectionToNeighbour()));
64 feq = Cf * (1 + 2 * ux);
68 getInverseDirection(dir)) -
70 calculateEquilibrium(dir);
71 distribution_ = feq + fneq;
75 feq = Cf * (1 + 2 * uy);
79 getInverseDirection(dir)) -
81 calculateEquilibrium(dir);
82 distribution_ = feq + fneq;
86 feq = Cf * (1 - 2 * ux);
90 getInverseDirection(dir)) -
92 calculateEquilibrium(dir);
93 distribution_ = feq + fneq;
97 feq = Cf * (1 - 2 * 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 BoundarySolverNoFlux::name =
"BoundarySolverNoFlux";
solver::CDEAbstractSolver & getCDESolverSlow(const std::string &name) const
getCDESolverSlow Getter method for the cde Solver
virtual void preAdvect()
preAdvect Executed before the advection step
std::vector< std::string > cdeSolvers_
cdeSolvers_ The cde solver this boundary solver is responsible for.
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 advect()
advect The advect step of the LBM
Direction getDirectionToNeighbour() const
getDirectionToNeighbour returns the direction to the next neighbour
virtual void postAdvect()
postAdvect Executed after the advection step
double getXVelocity() const
getXVelocity Getter for x-velocity component
virtual void initSolver()
initSolver Use this to initalise the solver
const nodes::BoundaryNode * boundaryNode_
physicalNode_ The physical Node which owns this solver
double getYVelocity() const
getYVelocity Getter for the y-velocity component