From 5c1bbd304bd54c4f213f62e852b905bb280d325f Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Thu, 18 Jan 2024 16:04:32 +0100 Subject: [PATCH] Compute entalpy for thermal boundary --- ebos/eclequilinitializer.hh | 4 ++++ ebos/eclproblem.hh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ebos/eclequilinitializer.hh b/ebos/eclequilinitializer.hh index 5bced53cb..68d8b31ea 100644 --- a/ebos/eclequilinitializer.hh +++ b/ebos/eclequilinitializer.hh @@ -170,6 +170,10 @@ public: const auto& rho = FluidSystem::density(fluidState, phaseIdx, regionIdx); fluidState.setDensity(phaseIdx, rho); + if (enableEnergy) { + const auto& h = FluidSystem::enthalpy(fluidState, phaseIdx, regionIdx); + fluidState.setEnthalpy(phaseIdx, h); + } } // set the salt concentration diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 004e7adb1..2216277e6 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -1597,7 +1597,10 @@ public: const auto& rho = FluidSystem::density(fluidState, phaseIdx, pvtRegionIdx); fluidState.setDensity(phaseIdx, rho); - + if (enableEnergy) { + const auto& h = FluidSystem::enthalpy(fluidState, phaseIdx, pvtRegionIdx); + fluidState.setEnthalpy(phaseIdx, h); + } } fluidState.checkDefined(); return fluidState;