From 6641f5075a4753da8610b7db80e3ffad162f24d1 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Wed, 26 Jul 2023 06:50:51 +0200 Subject: [PATCH] [freeflow][ncni] fix diffusive enthalpy flux --- .../freeflow/navierstokes/mass/1pnc/fluxvariables.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dumux/freeflow/navierstokes/mass/1pnc/fluxvariables.hh b/dumux/freeflow/navierstokes/mass/1pnc/fluxvariables.hh index 109ed2639b..b81686553b 100644 --- a/dumux/freeflow/navierstokes/mass/1pnc/fluxvariables.hh +++ b/dumux/freeflow/navierstokes/mass/1pnc/fluxvariables.hh @@ -134,8 +134,15 @@ public: /*! * \brief Returns the flux of enthalpy in J/s carried by diffusing molecules. */ - Scalar diffusiveEnthalpyFlux(const NumEqVector& diffusiveFlux, int phaseIdx = 0) const + Scalar diffusiveEnthalpyFlux(int phaseIdx = 0) const { + const auto diffusiveFlux = MolecularDiffusionType::flux(this->problem(), + this->element(), + this->fvGeometry(), + this->elemVolVars(), + this->scvFace(), + phaseIdx, + this->elemFluxVarsCache()); static constexpr auto referenceSystemFormulation = MolecularDiffusionType::referenceSystemFormulation(); Scalar flux = 0.0; const auto& scvf = this->scvFace(); @@ -190,7 +197,7 @@ public: if constexpr (ModelTraits::enableEnergyBalance()) { ParentType::addHeatFlux(flux); - flux[ModelTraits::Indices::energyEqIdx] += diffusiveEnthalpyFlux(diffusiveFlux); + flux[ModelTraits::Indices::energyEqIdx] += diffusiveEnthalpyFlux(); } return flux; -- GitLab