diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 29981d4..280a10d 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -68,6 +68,13 @@ namespace sim { */ void simulate(); + /** + * @brief Calculate and set new state of the continuous fluid simulation. Move mixture positions and create new mixtures if necessary. + * + * @param timeStep Time step in s for which the new mixtures state should be calculated. + */ + void calculateNewMixtures(InstantaneousMixingModel* model, double timeStep); + /** * @brief Print the results as pressure at the nodes and flow rates at the channels */ diff --git a/src/simulation/Simulation.hh b/src/simulation/Simulation.hh index d40ff79..3bc45f4 100644 --- a/src/simulation/Simulation.hh +++ b/src/simulation/Simulation.hh @@ -76,6 +76,10 @@ namespace sim { // compute nodal analysis again std::cout << "[Simulation] Conduct nodal analysis " << 0 <<"..." << std::endl; pressureConverged = nodal::conductNodalAnalysis(this->network); + + if (PLATFORM == ORGAN) { + calculateNewMixtures(); + } }