diff --git a/dumux/discretization/box/fourierslawnonequilibrium.hh b/dumux/discretization/box/fourierslawnonequilibrium.hh index 3f113527bee37518e3006a52a56a1a97c76bd8a2..6741fe57c2c86043bb6c62197088045c42cfbca8 100644 --- a/dumux/discretization/box/fourierslawnonequilibrium.hh +++ b/dumux/discretization/box/fourierslawnonequilibrium.hh @@ -121,7 +121,7 @@ public: { // compute the temperature gradient with the shape functions if (phaseIdx < numEnergyEqFluid) - gradTemp.axpy(elemVolVars[scv].temperature(phaseIdx), fluxVarsCache.gradN(scv.indexInElement())); + gradTemp.axpy(elemVolVars[scv].temperatureFluid(phaseIdx), fluxVarsCache.gradN(scv.indexInElement())); else gradTemp.axpy(elemVolVars[scv].temperatureSolid(), fluxVarsCache.gradN(scv.indexInElement())); } diff --git a/dumux/porousmediumflow/mpnc/volumevariables.hh b/dumux/porousmediumflow/mpnc/volumevariables.hh index 7859a5c76e6f411ec9bdf70c81b9e01b3feaaf43..af27b0712a40eb23354c0ab81c6b352a6bc34439 100644 --- a/dumux/porousmediumflow/mpnc/volumevariables.hh +++ b/dumux/porousmediumflow/mpnc/volumevariables.hh @@ -852,12 +852,7 @@ public: * identical. */ Scalar temperature() const - { - return fluidState_.temperature(0/* phaseIdx*/); - } - - Scalar temperature(const int phaseIdx) const - { return fluidState_.temperature(phaseIdx); } + { return fluidState_.temperature(0/* phaseIdx*/); } /*! * \brief Return enthalpy \f$\mathrm{[kg/m^3]}\f$ the of the fluid phase. diff --git a/dumux/porousmediumflow/nonequilibrium/localresidual.hh b/dumux/porousmediumflow/nonequilibrium/localresidual.hh index bca6937aa1a1e9d1eda2d5b01fe66a8bca920c21..cedc6c02a257856fa0ae52241da37c3ea9134ed8 100644 --- a/dumux/porousmediumflow/nonequilibrium/localresidual.hh +++ b/dumux/porousmediumflow/nonequilibrium/localresidual.hh @@ -296,7 +296,7 @@ public: Valgrind::CheckDefined(mu_nPhaseWComp); const Scalar characteristicLength = volVars.characteristicLength() ; - const Scalar temperature = volVars.temperature(phase0Idx); + const Scalar temperature = volVars.temperatureFluid(phase0Idx); const Scalar pn = volVars.pressure(phase1Idx); const Scalar henry = FluidSystem::henry(temperature) ; const Scalar gradNinWApprox = ( mu_wPhaseNComp - mu_nPhaseNCompEquil) / characteristicLength; // very 2p2c // 1. / henry * diff --git a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh index 06820f4deba6d124cd2ecee34b2c1c68383299ec..71de498dc637a75672229db126bf6e7c9fa24aa9 100644 --- a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh +++ b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh @@ -174,7 +174,7 @@ public: const Scalar as = 6.0 * (1.0-volVars.porosity()) / characteristicLength ; //temperature fluid is the same for both fluids - const Scalar TFluid = volVars.temperature(0); + const Scalar TFluid = volVars.temperatureFluid(0); const Scalar TSolid = volVars.temperatureSolid(); const Scalar satW = fs.saturation(phase0Idx) ; @@ -424,8 +424,8 @@ public: const Scalar aws = volVars.interfacialArea(phase0Idx, sPhaseIdx); const Scalar ans = volVars.interfacialArea(phase1Idx, sPhaseIdx); - const Scalar Tw = volVars.temperature(phase0Idx); - const Scalar Tn = volVars.temperature(phase1Idx); + const Scalar Tw = volVars.temperatureFluid(phase0Idx); + const Scalar Tn = volVars.temperatureFluid(phase1Idx); const Scalar Ts = volVars.temperatureSolid(); const Scalar lambdaWetting = volVars.fluidThermalConductivity(phase0Idx); diff --git a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh index aeb2ea2942a61f746e0af0c0f4860a5e39a822d3..f72e8317a90c1f2e9fefb0a50c52731d09eacc94 100644 --- a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh +++ b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh @@ -94,8 +94,8 @@ public: ParentType::update(elemSol, problem, element, scv); ParameterCache paramCache; - paramCache.updateAll(this->fluidState_); - updateInterfacialArea(elemSol, this->fluidState_, paramCache, problem, element, scv); + paramCache.updateAll(this->fluidState()); + updateInterfacialArea(elemSol, this->fluidState(), paramCache, problem, element, scv); } /*! @@ -213,8 +213,8 @@ public: ParentType::update(elemSol, problem, element, scv); ParameterCache paramCache; - paramCache.updateAll(this->fluidState_); - updateInterfacialArea(elemSol, this->fluidState_, paramCache, problem, element, scv); + paramCache.updateAll(this->fluidState()); + updateInterfacialArea(elemSol, this->fluidState(), paramCache, problem, element, scv); } /*! @@ -354,8 +354,8 @@ public: ParentType::update(elemSol, problem, element, scv); ParameterCache paramCache; - paramCache.updateAll(this->fluidState_); - updateInterfacialArea(elemSol, this->fluidState_, paramCache, problem, element, scv); + paramCache.updateAll(this->fluidState()); + updateInterfacialArea(elemSol, this->fluidState(), paramCache, problem, element, scv); } /*! diff --git a/dumux/porousmediumflow/nonequilibrium/vtkoutputfields.hh b/dumux/porousmediumflow/nonequilibrium/vtkoutputfields.hh index 63384a4854d2b35ba9faf5dc58c0cc13e9158648..0b679457924c5569204695db0105458dc330492f 100644 --- a/dumux/porousmediumflow/nonequilibrium/vtkoutputfields.hh +++ b/dumux/porousmediumflow/nonequilibrium/vtkoutputfields.hh @@ -41,7 +41,7 @@ public: EquilibriumVtkOutputFields::init(vtk); for (int i = 0; i < ModelTraits::numEnergyEqFluid(); ++i) - vtk.addVolumeVariable( [i](const auto& v){ return v.temperature(i); }, "T_" + FluidSystem::phaseName(i) ); + vtk.addVolumeVariable( [i](const auto& v){ return v.temperatureFluid(i); }, "T_" + FluidSystem::phaseName(i) ); for (int i = 0; i < ModelTraits::numEnergyEqSolid(); ++i) vtk.addVolumeVariable( [i](const auto& v){ return v.temperatureSolid(); }, "T_solid" ); for (int i = 0; i < ModelTraits::numPhases(); ++i){ diff --git a/dumux/porousmediumflow/nonisothermal/volumevariables.hh b/dumux/porousmediumflow/nonisothermal/volumevariables.hh index cb9c3709c044c961689e5235e947670f3d5f4cfa..75845b4ff291fccf69c392ebb117435ab653056d 100644 --- a/dumux/porousmediumflow/nonisothermal/volumevariables.hh +++ b/dumux/porousmediumflow/nonisothermal/volumevariables.hh @@ -191,6 +191,15 @@ public: Scalar temperatureSolid() const { return asImp_().solidState().temperature(); } + + /*! + * \brief Returns the temperature of a fluid phase assuming thermal nonequilibrium + * the sub-control volume. + * \param phaseIdx The local index of the phases + */ + Scalar temperatureFluid(const int phaseIdx) const + { return asImp_().fluidState().temperature(phaseIdx); } + /*! * \brief Returns the total heat capacity \f$\mathrm{[J/(kg K)]}\f$ of the rock matrix in * the sub-control volume.