Commit b1997e2d authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'feature/richards-fix-iofields' into 'master'

[richards] Do not require moleFraction/molarDensity interface for regular model

See merge request !2502
parents fd2d1680 3258d734
......@@ -68,7 +68,7 @@ public:
if(gravity)
out.addVolumeVariable([](const auto& v){ return v.pressureHead(FS::liquidPhaseIdx); },
IOName::pressureHead());
if (enableWaterDiffusionInAir)
if constexpr (enableWaterDiffusionInAir)
out.addVolumeVariable([](const auto& v){ return v.moleFraction(FS::gasPhaseIdx, FS::liquidCompIdx); },
IOName::moleFraction<FS>(FS::gasPhaseIdx, FS::liquidCompIdx));
out.addVolumeVariable([](const auto& v){ return v.waterContent(FS::liquidPhaseIdx); },
......
......@@ -111,7 +111,7 @@ public:
* volVars.saturation(liquidPhaseIdx);
// for extended Richards we consider water in air
if (enableWaterDiffusionInAir)
if constexpr (enableWaterDiffusionInAir)
storage[conti0EqIdx] += volVars.porosity()
* volVars.molarDensity(gasPhaseIdx)
* volVars.moleFraction(gasPhaseIdx, liquidCompIdx)
......@@ -155,7 +155,7 @@ public:
flux[conti0EqIdx] = fluxVars.advectiveFlux(liquidPhaseIdx, upwindTerm);
// for extended Richards we consider water vapor diffusion in air
if (enableWaterDiffusionInAir)
if constexpr (enableWaterDiffusionInAir)
{
//check for the reference system and adapt units of the diffusive flux accordingly.
if (FluxVariables::MolecularDiffusionType::referenceSystemFormulation() == ReferenceSystemFormulation::massAveraged)
......
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