22 #include <LbmLib/include/solver/MassSolver/MassSolverSingleGrowingCell.hpp>
23 #include <LbmLib/include/nodes/PhysicalNode.hpp>
24 #include <LbmLib/include/solver/CDESolver/CDEAbstractSolver.hpp>
25 #include <LbmLib/include/GlobalSimulationParameters.hpp>
26 #include <UtilLib/include/Log.hpp>
36 const double source = 0.0025;
38 double cdeconcentration;
42 MassSolverSingleGrowingCell::MassSolverSingleGrowingCell() : BaseMassSolver()
46 const std::vector<std::vector<nodes::PhysicalNode*> >& fluidGrid) {
48 #pragma omp parallel for schedule(dynamic)
49 for (
unsigned int it = 0; it < fluidGrid.size(); it++) {
50 for (
unsigned int i = 0; i < fluidGrid[0].size(); i++) {
53 if (Parameters.getCurrentIteration() < 4000) {
54 if (fluidGrid[it][i]->getDomainIdentifier() != 0 ) {
56 fluidGrid[it][i]->getFluidSolver().addMass(source);
68 #pragma omp parallel for schedule(dynamic)
69 for (
size_t ity = 0; ity < fluidGrid.size(); ity++) {
70 scalingfactor = 1.0/fluidGrid[ity][0]->getFluidSolver().getRho();
71 fluidGrid[ity][0]->getFluidSolver().rescaleDistributions(scalingfactor);
74 for (
auto cdes = fluidGrid[ity][0]->getCDESolvers().begin();
75 cdes != fluidGrid[ity][0]->getCDESolvers().end();
77 (*cdes)->rescaleDistributions(scalingfactor);
82 #pragma omp parallel for schedule(dynamic)
83 for (
size_t itx = 0; itx <fluidGrid[0].size(); itx++) {
84 scalingfactor = 1.0/fluidGrid[0][itx]->getFluidSolver().getRho();
85 fluidGrid[0][itx]->getFluidSolver().rescaleDistributions(scalingfactor);
88 for (
auto cdes = fluidGrid[0][itx]->getCDESolvers().begin();
89 cdes != fluidGrid[0][itx]->getCDESolvers().end();
91 (*cdes)->rescaleDistributions(scalingfactor);
96 const std::string MassSolverSingleGrowingCell::name =
"MassSolverSingleGrowingCell";
virtual void calculateMass(const std::vector< std::vector< nodes::PhysicalNode * > > &fluidGrid)
calculates the mass on the pysical nodes