Commit b4a2ed59 authored by Katharina Heck's avatar Katharina Heck Committed by Timo Koch
Browse files

[cleanup] use temperatureFluid to make it more obvious which temperature is...

[cleanup] use temperatureFluid to make it more obvious which temperature is meant for thermal nonequilibrium
parent b8af4c45
......@@ -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()));
}
......
......@@ -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.
......
......@@ -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 *
......
......@@ -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);
......
......@@ -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);
}
/*!
......
......@@ -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){
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment