Skip to content
Snippets Groups Projects
Commit e9a83517 authored by Timo Koch's avatar Timo Koch
Browse files

[material] Make thermalcond average work for multiple phases

parent fa48965b
No related branches found
No related tags found
1 merge request!1605Feature/simplify effective laws
...@@ -61,13 +61,20 @@ public: ...@@ -61,13 +61,20 @@ public:
template<class VolumeVariables> template<class VolumeVariables>
static Scalar effectiveThermalConductivity(const VolumeVariables& volVars) static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{ {
//Get the thermal conductivities and the porosity from the volume variables constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
const Scalar lambdaW = volVars.fluidThermalConductivity(0);
// Get the thermal conductivities and the porosity from the volume variables
Scalar lambdaFluid = 0.0;
for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
const Scalar lambdaSolid = volVars.solidThermalConductivity(); const Scalar lambdaSolid = volVars.solidThermalConductivity();
const Scalar porosity = volVars.porosity(); const Scalar porosity = volVars.porosity();
return lambdaSolid*(1-porosity) + lambdaW*porosity; return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
} }
}; };
} // end namespace Dumux } // end namespace Dumux
#endif #endif
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