diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index c9a0267e772fbee8f275ebdaf4e3fc0aa281d988..6deead7d5a1d80bdd8eb9f1b7bd4a66d4493a219 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -210,9 +210,6 @@ public: setSwitched_(false); resetPhasePresence_(); - /*this->localJacobian().updateStaticData(this->curSolFunction(), - this->prevSolFunction()); - */ }; /*! @@ -650,9 +647,11 @@ protected: if (xll + xlg > xlMax) { // liquid phase appears - std::cout << "liquid phase appears at vertex " << globalIdx + /* + std::cout << "Liquid phase appears at vertex " << globalIdx << ", coordinates: " << globalPos << ", xll + xlg: " << xll + xlg << std::endl; + */ newPhasePresence = bothPhases; if (formulation == pgSl) globalSol[globalIdx][switchIdx] = 0.001; @@ -678,9 +677,11 @@ protected: if (xgl + xgg > xgMax) { // gas phase appears + /* std::cout << "gas phase appears at vertex " << globalIdx << ", coordinates: " << globalPos << ", x_gl + x_gg: " << xgl + xgg << std::endl; + */ newPhasePresence = bothPhases; if (formulation == pgSl) globalSol[globalIdx][switchIdx] = 0.999; @@ -698,9 +699,11 @@ protected: { wouldSwitch = true; // gas phase disappears + /* std::cout << "Gas phase disappears at vertex " << globalIdx << ", coordinates: " << globalPos << ", Sg: " << volVars.saturation(gPhaseIdx) << std::endl; + */ newPhasePresence = lPhaseOnly; globalSol[globalIdx][switchIdx] @@ -710,9 +713,11 @@ protected: { wouldSwitch = true; // liquid phase disappears + /* std::cout << "Liquid phase disappears at vertex " << globalIdx << ", coordinates: " << globalPos << ", Sl: " << volVars.saturation(lPhaseIdx) << std::endl; + */ newPhasePresence = gPhaseOnly; globalSol[globalIdx][switchIdx] diff --git a/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh b/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh index d68cb03bef800d7c27b8de01662206aa59d0dd0b..fb15233e81d956ce09c7e110c1c3bdbabb36cb9e 100644 --- a/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh +++ b/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh @@ -63,7 +63,7 @@ public: TwoPTwoCNewtonController() { this->setRelTolerance(1e-7); - this->setTargetSteps(9); + this->setTargetSteps(10); this->setMaxSteps(18); }; diff --git a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh index 7a52dec36c066b086ef634b952a931901c736c35..2b429347f88b9c9ae4aa3eaa9319e1ca5a06a9aa 100644 --- a/dumux/boxmodels/2p2c/2p2cvolumevariables.hh +++ b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh @@ -154,10 +154,10 @@ public: ///////////// // update the temperature part of the energy module Scalar T = asImp_().getTemperature(priVars, - element, - elemGeom, - scvIdx, - problem); + element, + elemGeom, + scvIdx, + problem); Valgrind::CheckDefined(T); for (int i = 0; i < numPhases; ++i) fs.setTemperature(i, T); @@ -426,15 +426,23 @@ public: #endif protected: - - Scalar getTemperature_(const PrimaryVariables &priVars, - const Element &element, - const FVElementGeometry &elemGeom, - int scvIdx, - const Problem &problem) + Scalar getTemperature(const PrimaryVariables &priVars, + const Element &element, + const FVElementGeometry &elemGeom, + int scvIdx, + const Problem &problem) { return problem.temperature(element, elemGeom, scvIdx); } + + template <class MutableParameters> + void updateEnergy(MutableParameters &mutParams, + const PrimaryVariables &priVars, + const Element &element, + const FVElementGeometry &elemGeom, + int scvIdx, + const Problem &problem) + {}; Scalar porosity_; //!< Effective porosity within the control volume Scalar mobility_[numPhases]; //!< Effective mobility within the control volume