From bda4f0d6dee20cb6e9fa420835c62691e47bb6b8 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Sat, 18 May 2019 15:59:41 +0200 Subject: [PATCH] [material] Add static assert that ThCondJohansen only works for 2 phases --- .../fluidmatrixinteractions/2p/thermalconductivityjohansen.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh index c98ef3ab5b..f8f74b2fc9 100644 --- a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh +++ b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh @@ -99,6 +99,10 @@ public: template<class VolumeVariables> static Scalar effectiveThermalConductivity(const VolumeVariables& volVars) { + using FluidSystem = typename VolumeVariables::FluidSystem; + static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!"); + // TODO: there should be an assertion that the indices are correct and 0 is actually the wetting phase! + const Scalar sw = volVars.saturation(Indices::wPhaseIdx); const Scalar lambdaW = volVars.fluidThermalConductivity(Indices::wPhaseIdx); const Scalar lambdaN = volVars.fluidThermalConductivity(Indices::nPhaseIdx); -- GitLab