version 3.8
diffusivitymillingtonquirk.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH
13#define DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH
14
15#include <cmath>
16#include <algorithm>
17
18namespace Dumux {
19
38template<class Scalar>
40{
41public:
50 template<class VolumeVariables>
51 static Scalar effectiveDiffusionCoefficient(const VolumeVariables& volVars,
52 const int phaseIdx,
53 const int compIdxI,
54 const int compIdxJ)
55 {
56 // instead of D_eff,pm = phi * Sw * 1/phi^2 * (phi * Sw)^(7/3) * D
57 // we calculate the more efficient
58 // D_eff,pm = phi * Sw^3 * cubicroot(phi * Sw) * D
59
60 using std::cbrt;
61 using std::max;
62 const Scalar diffCoeff = volVars.diffusionCoefficient(phaseIdx, compIdxI, compIdxJ);
63 const Scalar porosity = volVars.porosity();
64 const Scalar sat = max<Scalar>(volVars.saturation(phaseIdx), 0.0);
65 return porosity * (sat*sat*sat) * cbrt(porosity * sat) * diffCoeff;
66 }
67
68};
69}
70#endif
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:40
static Scalar effectiveDiffusionCoefficient(const VolumeVariables &volVars, const int phaseIdx, const int compIdxI, const int compIdxJ)
Returns the effective diffusion coefficient after Millington Quirk.
Definition: diffusivitymillingtonquirk.hh:51
std::string porosity() noexcept
I/O name of porosity.
Definition: name.hh:127
Definition: adapt.hh:17