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 FluidSystems | ||
10 | * \brief @copybrief Dumux::FluidSystems::OnePAdapter | ||
11 | */ | ||
12 | #ifndef DUMUX_FLUIDSYTEMS_ONEP_ADAPTER_HH | ||
13 | #define DUMUX_FLUIDSYTEMS_ONEP_ADAPTER_HH | ||
14 | |||
15 | #include <cassert> | ||
16 | |||
17 | #include <dune/common/exceptions.hh> | ||
18 | |||
19 | #include <dumux/material/fluidsystems/base.hh> | ||
20 | #include <dumux/material/fluidstates/adapter.hh> | ||
21 | |||
22 | namespace Dumux::FluidSystems { | ||
23 | |||
24 | /*! | ||
25 | * \ingroup FluidSystems | ||
26 | * \brief An adapter for multi-phase fluid systems to be used with (compositional) one-phase models | ||
27 | * \tparam MPFluidSystem the multi-phase fluid system to be adapted | ||
28 | * \tparam phase the index of the phase we choose from the multi-phase fluid system | ||
29 | */ | ||
30 | template <class MPFluidSystem, int phase = 0> | ||
31 | class OnePAdapter | ||
32 | : public Base<typename MPFluidSystem::Scalar, OnePAdapter<MPFluidSystem, phase>> | ||
33 | { | ||
34 | using ThisType = OnePAdapter<MPFluidSystem, phase>; | ||
35 | |||
36 | static_assert(phase < MPFluidSystem::numPhases, "Phase does not exist in multi-phase fluidsystem!"); | ||
37 | |||
38 | struct AdapterPolicy | ||
39 | { | ||
40 | using FluidSystem = MPFluidSystem; | ||
41 | |||
42 | // the phase index is always zero, other phases than the chosen phase should never be called | ||
43 | static int phaseIdx(int mpFluidPhaseIdx) | ||
44 | { return 0; } | ||
45 | |||
46 | // the main component is currently excepted to have the same index as it's phase | ||
47 | // (see Fluidsystems::Base::getMainComponent for more information) | ||
48 | // so we swap the main component with the first component | ||
49 | // this mapping works in both ways since we are only swapping components | ||
50 | 2313664698 | static constexpr int compIdx(int compIdx) | |
51 | { | ||
52 |
44/50✓ Branch 0 taken 109614706 times.
✓ Branch 1 taken 109614700 times.
✓ Branch 2 taken 81088782 times.
✓ Branch 3 taken 81088780 times.
✓ Branch 4 taken 99910146 times.
✓ Branch 5 taken 99910119 times.
✓ Branch 6 taken 118747144 times.
✓ Branch 7 taken 118747135 times.
✓ Branch 8 taken 85994369 times.
✓ Branch 9 taken 85994366 times.
✓ Branch 10 taken 101951683 times.
✓ Branch 11 taken 101951682 times.
✓ Branch 12 taken 41500022 times.
✓ Branch 13 taken 40876497 times.
✓ Branch 14 taken 51092214 times.
✓ Branch 15 taken 50104327 times.
✓ Branch 16 taken 58194294 times.
✓ Branch 17 taken 38957957 times.
✓ Branch 18 taken 7052712 times.
✓ Branch 19 taken 7052713 times.
✓ Branch 20 taken 53564 times.
✓ Branch 21 taken 53564 times.
✓ Branch 22 taken 19851932 times.
✓ Branch 23 taken 18239404 times.
✓ Branch 24 taken 18212622 times.
✓ Branch 25 taken 18212622 times.
✓ Branch 26 taken 18041150 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 7800 times.
✓ Branch 29 taken 7800 times.
✓ Branch 30 taken 3900 times.
✓ Branch 31 taken 3900 times.
✓ Branch 32 taken 3900 times.
✓ Branch 33 taken 3900 times.
✓ Branch 34 taken 1950 times.
✓ Branch 35 taken 1950 times.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✓ Branch 40 taken 850 times.
✓ Branch 41 taken 850 times.
✓ Branch 42 taken 850 times.
✓ Branch 43 taken 850 times.
✓ Branch 44 taken 850 times.
✓ Branch 45 taken 850 times.
✓ Branch 46 taken 850 times.
✓ Branch 47 taken 850 times.
✓ Branch 48 taken 1950 times.
✗ Branch 49 not taken.
|
1582153056 | if (compIdx == 0) |
53 | return phase; | ||
54 |
20/28✓ Branch 0 taken 6 times.
✓ Branch 1 taken 68596859 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 41109848 times.
✓ Branch 4 taken 27 times.
✓ Branch 5 taken 40317361 times.
✓ Branch 6 taken 9 times.
✓ Branch 7 taken 29318175 times.
✓ Branch 8 taken 3 times.
✓ Branch 9 taken 13774333 times.
✓ Branch 10 taken 3 times.
✓ Branch 11 taken 72538455 times.
✓ Branch 12 taken 1 times.
✓ Branch 13 taken 1971 times.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 150862856 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 22 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 44 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✓ Branch 26 taken 1 times.
✓ Branch 27 taken 1 times.
|
416519978 | else if (compIdx == phase) |
55 | return 0; | ||
56 | else | ||
57 | 53 | return compIdx; | |
58 | } | ||
59 | }; | ||
60 | |||
61 | template<class FluidState> | ||
62 | 293533653 | static auto adaptFluidState(const FluidState& fluidState) | |
63 |
3/6✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1 times.
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
141346577 | { return FluidStateAdapter<FluidState, AdapterPolicy>(fluidState); } |
64 | |||
65 | public: | ||
66 | using Scalar = typename MPFluidSystem::Scalar; | ||
67 | using ParameterCache = NullParameterCache; | ||
68 | |||
69 | //! export the wrapped MultiPhaseFluidSystem type | ||
70 | using MultiPhaseFluidSystem = MPFluidSystem; | ||
71 | //! the index of the phase we choose from the multi-phase fluid system | ||
72 | static constexpr int multiphaseFluidsystemPhaseIdx = phase; | ||
73 | |||
74 | //! number of phases in the fluid system | ||
75 | static constexpr int numPhases = 1; | ||
76 | //! for compositional models, the number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined, | ||
77 | //! while for non-compositional models, the number of components must equal the number of phases (1 in this case) | ||
78 | static constexpr int numComponents = MultiPhaseFluidSystem::isMiscible() ? MultiPhaseFluidSystem::numComponents : numPhases; | ||
79 | //! number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined | ||
80 | static constexpr int phase0Idx = 0; //!< index of the only phase | ||
81 | |||
82 | //! convert a component index of the multi-phase component index to the actual component index | ||
83 |
10/10✓ Branch 0 taken 21984 times.
✓ Branch 1 taken 21984 times.
✓ Branch 2 taken 21984 times.
✓ Branch 3 taken 21984 times.
✓ Branch 4 taken 49466 times.
✓ Branch 5 taken 49466 times.
✓ Branch 6 taken 48356 times.
✓ Branch 7 taken 48356 times.
✓ Branch 8 taken 48356 times.
✓ Branch 9 taken 48356 times.
|
380292 | static constexpr int compIdx(int multiPhaseFluidSystemCompIdx) |
84 |
8/10✓ Branch 1 taken 31536 times.
✓ Branch 2 taken 12432 times.
✓ Branch 3 taken 24496 times.
✓ Branch 4 taken 144 times.
✓ Branch 7 taken 48356 times.
✓ Branch 8 taken 48356 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 96712 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 74292 times.
|
548454 | { return AdapterPolicy::compIdx(multiPhaseFluidSystemCompIdx); } |
85 | |||
86 | /*! | ||
87 | * \brief Initialize the fluid system's static parameters generically | ||
88 | */ | ||
89 | template<class ...Args> | ||
90 |
2/4✓ Branch 1 taken 70 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
80 | static void init(Args&&... args) |
91 |
2/4✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
78 | { MultiPhaseFluidSystem::init(std::forward<Args>(args)...); } |
92 | |||
93 | /**************************************** | ||
94 | * Fluid phase related static parameters | ||
95 | ****************************************/ | ||
96 | /*! | ||
97 | * \brief Return the human readable name of a fluid phase | ||
98 | * | ||
99 | * \param phaseIdx The index of the fluid phase to consider | ||
100 | */ | ||
101 | 1953 | static std::string phaseName(int phaseIdx = 0) | |
102 |
31/52✓ Branch 1 taken 25 times.
✓ Branch 2 taken 24 times.
✓ Branch 4 taken 3 times.
✓ Branch 5 taken 20 times.
✓ Branch 7 taken 3 times.
✓ Branch 8 taken 15 times.
✓ Branch 10 taken 3 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 12 times.
✓ Branch 34 taken 12 times.
✓ Branch 35 taken 36 times.
✓ Branch 36 taken 12 times.
✓ Branch 38 taken 1 times.
✗ Branch 39 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 44 taken 1 times.
✗ Branch 45 not taken.
✓ Branch 47 taken 1 times.
✗ Branch 48 not taken.
✓ Branch 50 taken 1 times.
✗ Branch 51 not taken.
✓ Branch 53 taken 1 times.
✗ Branch 54 not taken.
✓ Branch 56 taken 1 times.
✗ Branch 57 not taken.
✓ Branch 59 taken 1 times.
✗ Branch 60 not taken.
✓ Branch 62 taken 1 times.
✗ Branch 63 not taken.
✓ Branch 65 taken 1 times.
✗ Branch 66 not taken.
✓ Branch 68 taken 1 times.
✗ Branch 69 not taken.
✓ Branch 0 taken 26 times.
✓ Branch 3 taken 36 times.
✗ Branch 6 not taken.
✗ Branch 9 not taken.
|
556 | { return MultiPhaseFluidSystem::phaseName(phase); } |
103 | |||
104 | /*! | ||
105 | * \brief A human readable name for the component. | ||
106 | * | ||
107 | * \param compIdx The index of the component to consider | ||
108 | */ | ||
109 |
12/12✓ Branch 0 taken 8719 times.
✓ Branch 1 taken 8716 times.
✓ Branch 2 taken 8739 times.
✓ Branch 3 taken 8715 times.
✓ Branch 4 taken 5868 times.
✓ Branch 5 taken 5868 times.
✓ Branch 6 taken 5868 times.
✓ Branch 7 taken 5868 times.
✓ Branch 8 taken 6 times.
✓ Branch 9 taken 6 times.
✓ Branch 10 taken 6 times.
✓ Branch 11 taken 6 times.
|
395877 | static std::string componentName(int compIdx) |
110 |
27/48✓ Branch 1 taken 4 times.
✓ Branch 2 taken 276103 times.
✓ Branch 4 taken 3 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5870 times.
✓ Branch 11 taken 5 times.
✓ Branch 13 taken 1 times.
✓ Branch 14 taken 11736 times.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 4 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 39 taken 1 times.
✗ Branch 40 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 51 taken 1 times.
✗ Branch 52 not taken.
✓ Branch 54 taken 1 times.
✗ Branch 55 not taken.
✓ Branch 57 taken 1 times.
✗ Branch 58 not taken.
✓ Branch 60 taken 1 times.
✗ Branch 61 not taken.
✓ Branch 63 taken 1 times.
✗ Branch 64 not taken.
✓ Branch 66 taken 1 times.
✗ Branch 67 not taken.
✓ Branch 3 taken 22 times.
✓ Branch 6 taken 52425 times.
✗ Branch 15 not taken.
✗ Branch 12 not taken.
|
410053 | { return MultiPhaseFluidSystem::componentName(AdapterPolicy::compIdx(compIdx)); } |
111 | |||
112 | /*! | ||
113 | * \brief A human readable name for the component. | ||
114 | */ | ||
115 | static std::string name() | ||
116 | { return MultiPhaseFluidSystem::phaseName(phase); } | ||
117 | |||
118 | /*! | ||
119 | * \brief There is only one phase, so no mass transfer between phases can occur | ||
120 | */ | ||
121 | static constexpr bool isMiscible() | ||
122 | { return false; } | ||
123 | |||
124 | /*! | ||
125 | * \brief Returns whether the fluid is gaseous | ||
126 | */ | ||
127 | static constexpr bool isGas(int phaseIdx = 0) | ||
128 | { return MultiPhaseFluidSystem::isGas(phase); } | ||
129 | |||
130 | /*! | ||
131 | * \brief Returns true if and only if a fluid phase is assumed to | ||
132 | * be an ideal mixture. | ||
133 | * | ||
134 | * We define an ideal mixture as a fluid phase where the fugacity | ||
135 | * coefficients of all components times the pressure of the phase | ||
136 | * are independent on the fluid composition. This assumption is true | ||
137 | * if only a single component is involved. If you are unsure what | ||
138 | * this function should return, it is safe to return false. The | ||
139 | * only damage done will be (slightly) increased computation times | ||
140 | * in some cases. | ||
141 | * | ||
142 | * \param phaseIdx The index of the fluid phase to consider | ||
143 | */ | ||
144 | static constexpr bool isIdealMixture(int phaseIdx = 0) | ||
145 | { return MultiPhaseFluidSystem::isIdealMixture(phase); } | ||
146 | |||
147 | /*! | ||
148 | * \brief Returns true if the fluid is assumed to be compressible | ||
149 | */ | ||
150 | static constexpr bool isCompressible(int phaseIdx = 0) | ||
151 | { return MultiPhaseFluidSystem::isCompressible(phase); } | ||
152 | |||
153 | /*! | ||
154 | * \brief Returns true if the fluid viscosity is constant | ||
155 | */ | ||
156 | static constexpr bool viscosityIsConstant(int phaseIdx = 0) | ||
157 | { return MultiPhaseFluidSystem::viscosityIsConstant(phase); } | ||
158 | |||
159 | /*! | ||
160 | * \brief Returns true if the fluid is assumed to be an ideal gas | ||
161 | */ | ||
162 | static constexpr bool isIdealGas(int phaseIdx = 0) | ||
163 | { return MultiPhaseFluidSystem::isIdealGas(phase); } | ||
164 | |||
165 | /*! | ||
166 | * \brief The mass in \f$\mathrm{[kg]}\f$ of one mole of the component. | ||
167 | */ | ||
168 |
14/14✓ Branch 0 taken 49943509 times.
✓ Branch 1 taken 49674675 times.
✓ Branch 2 taken 58835127 times.
✓ Branch 3 taken 58835127 times.
✓ Branch 4 taken 2636456 times.
✓ Branch 5 taken 2636471 times.
✓ Branch 6 taken 23865617 times.
✓ Branch 7 taken 15658210 times.
✓ Branch 8 taken 7175387 times.
✓ Branch 9 taken 7175387 times.
✓ Branch 10 taken 85062204 times.
✓ Branch 11 taken 75450872 times.
✓ Branch 12 taken 199171830 times.
✓ Branch 13 taken 54205350 times.
|
1200150024 | static Scalar molarMass(int compIdx) |
169 |
7/12✓ Branch 3 taken 21451242 times.
✓ Branch 4 taken 21451240 times.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
✓ Branch 1 taken 160012406 times.
✓ Branch 2 taken 5790 times.
✓ Branch 8 taken 3248080 times.
✗ Branch 9 not taken.
✓ Branch 22 taken 752800 times.
✗ Branch 23 not taken.
✗ Branch 0 not taken.
✗ Branch 5 not taken.
|
1174333410 | { return MultiPhaseFluidSystem::molarMass(AdapterPolicy::compIdx(compIdx)); } |
170 | |||
171 | using Base<Scalar, ThisType>::density; | ||
172 | //! \copydoc Base<Scalar,ThisType>::density(const FluidState&,int) | ||
173 | template <class FluidState> | ||
174 |
1/2✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
|
37203639 | static Scalar density(const FluidState &fluidState, int phaseIdx = 0) |
175 | { | ||
176 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 80218494 times.
|
80222398 | assert(phaseIdx == 0); |
177 |
4/6✓ Branch 1 taken 13 times.
✓ Branch 2 taken 2 times.
✓ Branch 4 taken 13 times.
✓ Branch 5 taken 2 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
|
83147140 | return MultiPhaseFluidSystem::density(adaptFluidState(fluidState), phase); |
178 | } | ||
179 | |||
180 | using Base<Scalar, ThisType>::molarDensity; | ||
181 | //! \copydoc Base<Scalar,ThisType>::molarDensity(const FluidState&,int) | ||
182 | template <class FluidState> | ||
183 | 73766093 | static Scalar molarDensity(const FluidState &fluidState, int phaseIdx = 0) | |
184 | { | ||
185 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 79646344 times.
|
79646348 | assert(phaseIdx == 0); |
186 | 79690893 | return MultiPhaseFluidSystem::molarDensity(adaptFluidState(fluidState), phase); | |
187 | } | ||
188 | |||
189 | using Base<Scalar, ThisType>::enthalpy; | ||
190 | //! \copydoc Base<Scalar,ThisType>::enthalpy(const FluidState&,int) | ||
191 | template <class FluidState> | ||
192 | 39709785 | static Scalar enthalpy(const FluidState &fluidState, int phaseIdx = 0) | |
193 | { | ||
194 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 39707831 times.
|
39709785 | assert(phaseIdx == 0); |
195 | 39709785 | return MultiPhaseFluidSystem::enthalpy(adaptFluidState(fluidState), phase); | |
196 | } | ||
197 | |||
198 | /*! | ||
199 | * \brief Returns the specific enthalpy \f$\mathrm{[J/kg]}\f$ of a component in a specific phase | ||
200 | * \param fluidState An arbitrary fluid state | ||
201 | * \param phaseIdx The index of the fluid phase to consider | ||
202 | * \param compIdx The index of the component to consider | ||
203 | * | ||
204 | */ | ||
205 | template <class FluidState> | ||
206 | 63048872 | static Scalar componentEnthalpy(const FluidState &fluidState, | |
207 | int phaseIdx, | ||
208 | int compIdx) | ||
209 | { | ||
210 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 55164072 times.
|
55164072 | assert(phaseIdx == 0); |
211 | 63048872 | return MultiPhaseFluidSystem::componentEnthalpy(adaptFluidState(fluidState), phase, | |
212 | 55164072 | AdapterPolicy::compIdx(compIdx)); | |
213 | } | ||
214 | |||
215 | using Base<Scalar, ThisType>::viscosity; | ||
216 | //! \copydoc Base<Scalar,ThisType>::viscosity(const FluidState&,int) | ||
217 | template <class FluidState> | ||
218 |
1/2✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
|
41850968 | static Scalar viscosity(const FluidState &fluidState, int phaseIdx = 0) |
219 | { | ||
220 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 77143589 times.
|
77147493 | assert(phaseIdx == 0); |
221 |
4/6✓ Branch 1 taken 13 times.
✓ Branch 2 taken 2 times.
✓ Branch 4 taken 13 times.
✓ Branch 5 taken 2 times.
✗ Branch 3 not taken.
✗ Branch 6 not taken.
|
77147508 | return MultiPhaseFluidSystem::viscosity(adaptFluidState(fluidState), phase); |
222 | } | ||
223 | |||
224 | using Base<Scalar, ThisType>::fugacityCoefficient; | ||
225 | //! \copydoc Base<Scalar,ThisType>::fugacityCoefficient(const FluidState&,int,int) | ||
226 | template <class FluidState> | ||
227 | 14 | static Scalar fugacityCoefficient(const FluidState &fluidState, | |
228 | int phaseIdx, | ||
229 | int compIdx) | ||
230 | { | ||
231 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
|
14 | assert(phaseIdx == 0); |
232 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
14 | return MultiPhaseFluidSystem::fugacityCoefficient(adaptFluidState(fluidState), phase, |
233 | 14 | AdapterPolicy::compIdx(compIdx)); | |
234 | } | ||
235 | |||
236 | using Base<Scalar, ThisType>::diffusionCoefficient; | ||
237 | //! \copydoc Base<Scalar,ThisType>::diffusionCoefficient(const FluidState&,int,int) | ||
238 | template <class FluidState> | ||
239 | 14 | static Scalar diffusionCoefficient(const FluidState &fluidState, | |
240 | int phaseIdx, | ||
241 | int compIdx) | ||
242 | { | ||
243 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
|
14 | assert(phaseIdx == 0); |
244 | 14 | return MultiPhaseFluidSystem::diffusionCoefficient(adaptFluidState(fluidState), phase, | |
245 | AdapterPolicy::compIdx(compIdx)); | ||
246 | } | ||
247 | |||
248 | using Base<Scalar, ThisType>::binaryDiffusionCoefficient; | ||
249 | //! \copydoc Base<Scalar,ThisType>::binaryDiffusionCoefficient(const FluidState&,int,int,int) | ||
250 | template <class FluidState> | ||
251 | 77157313 | static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, | |
252 | int phaseIdx, | ||
253 | int compIIdx, | ||
254 | int compJIdx) | ||
255 | { | ||
256 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 77157298 times.
|
77157313 | assert(phaseIdx == 0); |
257 |
2/2✓ Branch 0 taken 6 times.
✓ Branch 1 taken 40564058 times.
|
77157325 | return MultiPhaseFluidSystem::binaryDiffusionCoefficient(adaptFluidState(fluidState), phase, |
258 | AdapterPolicy::compIdx(compIIdx), | ||
259 | 77157299 | AdapterPolicy::compIdx(compJIdx)); | |
260 | } | ||
261 | |||
262 | using Base<Scalar, ThisType>::thermalConductivity; | ||
263 | //! \copydoc Base<Scalar,ThisType>::thermalConductivity(const FluidState&,int) | ||
264 | template <class FluidState> | ||
265 | 70650975 | static Scalar thermalConductivity(const FluidState &fluidState, | |
266 | int phaseIdx = 0) | ||
267 | { | ||
268 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 15425568 times.
|
15425572 | assert(phaseIdx == 0); |
269 | 70650975 | return MultiPhaseFluidSystem::thermalConductivity(adaptFluidState(fluidState), phase); | |
270 | } | ||
271 | |||
272 | using Base<Scalar, ThisType>::heatCapacity; | ||
273 | //! \copydoc Base<Scalar,ThisType>::heatCapacity(const FluidState&,int) | ||
274 | template <class FluidState> | ||
275 | 19581317 | static Scalar heatCapacity(const FluidState &fluidState, | |
276 | int phaseIdx = 0) | ||
277 | { | ||
278 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1391823 times.
|
1391827 | assert(phaseIdx == 0); |
279 | 19581317 | return MultiPhaseFluidSystem::heatCapacity(adaptFluidState(fluidState), phase); | |
280 | } | ||
281 | |||
282 | /*! | ||
283 | * \brief Vapor pressure of a component \f$\mathrm{[Pa]}\f$. | ||
284 | * | ||
285 | * \param fluidState The fluid state | ||
286 | * \param compIdx The index of the component to consider | ||
287 | */ | ||
288 | template <class FluidState> | ||
289 | 2 | static Scalar vaporPressure(const FluidState &fluidState, | |
290 | int compIdx) | ||
291 | { | ||
292 |
1/2✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
|
2 | return MultiPhaseFluidSystem::vaporPressure(adaptFluidState(fluidState), |
293 | AdapterPolicy::compIdx(compIdx)); | ||
294 | } | ||
295 | }; | ||
296 | |||
297 | } // namespace Dumux::FluidSystems | ||
298 | |||
299 | #endif | ||
300 |