Line | Branch | Exec | Source |
---|---|---|---|
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup EffectiveDiffusivity | ||
10 | * \brief Relation for the effective diffusion coefficient after Millington and Quirk | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH | ||
14 | #define DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH | ||
15 | |||
16 | #include <cmath> | ||
17 | #include <algorithm> | ||
18 | |||
19 | namespace Dumux { | ||
20 | |||
21 | /*! | ||
22 | * \addtogroup EffectiveDiffusivity | ||
23 | * \copydetails Dumux::DiffusivityMillingtonQuirk | ||
24 | */ | ||
25 | |||
26 | /*! | ||
27 | * \ingroup EffectiveDiffusivity | ||
28 | * \brief Relation for the effective diffusion coefficient after Millington and Quirk | ||
29 | * | ||
30 | * ### Millington Quirk | ||
31 | * | ||
32 | * For `DiffusivityMillingtonQuirk`, | ||
33 | * the tortuosity coefficient is estimated after Millington and Quirk (1961) \cite millington1961 | ||
34 | * by | ||
35 | * \f[ | ||
36 | * \tau = \frac{1}{\phi^2} \left(\phi S_\alpha\right)^{7/3}. | ||
37 | * \f] | ||
38 | * | ||
39 | * See also Helmig (1997) \cite helmig1997 [page 129]. | ||
40 | */ | ||
41 | template<class Scalar> | ||
42 | class DiffusivityMillingtonQuirk | ||
43 | { | ||
44 | public: | ||
45 | /*! | ||
46 | * \brief Returns the effective diffusion coefficient (\f$\mathrm{m^2/s}\f$) | ||
47 | * | ||
48 | * Returns the effective diffusion coefficient (\f$\mathrm{m^2/s}\f$) | ||
49 | * of component \f$ \kappa \f$ (index `compIdxI`) in phase \f$ \alpha \f$ computed as | ||
50 | * \f$ D^\kappa_{\text{eff},\alpha} = \phi S_\alpha \tau D^\kappa_\alpha \f$. | ||
51 | * | ||
52 | * \param volVars The Volume Variables | ||
53 | * \param phaseIdx the index of the phase | ||
54 | * \param compIdxI the component index i | ||
55 | * \param compIdxJ the component index j | ||
56 | */ | ||
57 | template<class VolumeVariables> | ||
58 |
2/2✓ Branch 0 taken 7709892 times.
✓ Branch 1 taken 40132916 times.
|
328654008 | static Scalar effectiveDiffusionCoefficient(const VolumeVariables& volVars, |
59 | const int phaseIdx, | ||
60 | const int compIdxI, | ||
61 | const int compIdxJ) | ||
62 | { | ||
63 | // instead of D_eff = phi S tau D = phi S 1/phi^2 (phi S)^(7/3) D | ||
64 | // we implement more efficiently D_eff = phi S^3 cubicroot(phi S) D | ||
65 | using std::cbrt; | ||
66 | using std::max; | ||
67 |
3/3✓ Branch 0 taken 4965500 times.
✓ Branch 1 taken 252255732 times.
✓ Branch 2 taken 538662 times.
|
328654008 | const Scalar diffCoeff = volVars.diffusionCoefficient(phaseIdx, compIdxI, compIdxJ); |
68 | 328654008 | const Scalar porosity = volVars.porosity(); | |
69 |
3/4✓ Branch 0 taken 4966736 times.
✓ Branch 1 taken 304371010 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 4962600 times.
|
333946002 | const Scalar sat = max<Scalar>(volVars.saturation(phaseIdx), 0.0); |
70 | 328654008 | return porosity * (sat*sat*sat) * cbrt(porosity * sat) * diffCoeff; | |
71 | } | ||
72 | }; | ||
73 | |||
74 | } // end namespace Dumux | ||
75 | |||
76 | #endif | ||
77 |