Skip to content
Snippets Groups Projects
Commit 6641f507 authored by Mathis Kelm's avatar Mathis Kelm Committed by Timo Koch
Browse files

[freeflow][ncni] fix diffusive enthalpy flux

parent 1d871b47
No related branches found
No related tags found
1 merge request!2986Port compositional freeflow model and tests to new staggered
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment