diff --git a/dumux/flux/porenetwork/grainfourierslaw.hh b/dumux/flux/porenetwork/grainfourierslaw.hh index 5e4438063d3b2c8d3128241748f2af4b5e456b53..c3cb061e4d0180ec947990c80c883bab72948013 100644 --- a/dumux/flux/porenetwork/grainfourierslaw.hh +++ b/dumux/flux/porenetwork/grainfourierslaw.hh @@ -50,6 +50,9 @@ struct TruncatedPyramidGrainFouriersLaw auto getPyramidBaseLengthFromVolume = [&](const Scalar v, const Scalar h) { + // Using the formula for the volume of a pyramid frustum to calculate its base length: + // v = 1/3 h * (a^2 + a*b + b^2), where a is the base side length, b the top side length, + // h the height and v the volume of the frustum. const Scalar b = topSideLength; using std::sqrt; return 0.5*sqrt(3.0) * sqrt(-(b*b*h-4.0*v)/h) -0.5*b; @@ -58,7 +61,7 @@ struct TruncatedPyramidGrainFouriersLaw // the pyramid base length of the inside pore const Scalar insideBaseSideLength = [&]() { - static const bool useAdaptedVolume = getParamFromGroup<bool>(problem.paramGroup(), "GrainFouriersLaw.UseAdaptedVolumeForPyramid", false); + static const bool useAdaptedVolume = getParamFromGroup<bool>(problem.paramGroup(), "Problem.UseVolumeEqualPyramid", false); if (useAdaptedVolume) return getPyramidBaseLengthFromVolume(0.5*insideVolVars.poreVolume(), insideHeight); @@ -69,7 +72,7 @@ struct TruncatedPyramidGrainFouriersLaw // the pyramid base length of the outside pore const Scalar outsideBaseSideLength = [&]() { - static const bool useAdaptedVolume = getParamFromGroup<bool>(problem.paramGroup(), "GrainFouriersLaw.UseAdaptedVolumeForPyramid", false); + static const bool useAdaptedVolume = getParamFromGroup<bool>(problem.paramGroup(), "Problem.UseVolumeEqualPyramid", false); if (useAdaptedVolume) return getPyramidBaseLengthFromVolume(0.5*outsideVolVars.poreVolume(), outsideHeight); diff --git a/test/multidomain/dualnetwork/fourierslaw.hh b/test/multidomain/dualnetwork/fourierslaw.hh index f01f6a331871a68d49a5c54f78fd19383ebbee4e..e3672706c612bcb08ee9a55019bf2e4741f6523b 100644 --- a/test/multidomain/dualnetwork/fourierslaw.hh +++ b/test/multidomain/dualnetwork/fourierslaw.hh @@ -103,6 +103,9 @@ struct FluidOrGrainPyramidFouriersLaw static const bool realVolume = getParamFromGroup<bool>(problem.paramGroup(), "Problem.UseVolumeEqualPyramid", true); if (realVolume) { + // Using the formula for the volume of a pyramid frustum to calculate its base length and base area: + // v = 1/3 h * (a^2 + a*b + b^2), where a is the base side length, b the top side length, + // h the height and v the volume of the frustum . using std::sqrt; const Scalar vol = 0.5 * volVars.poreVolume(); const Scalar baseLenTop = sqrt(pyramidFrustumTopArea);