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 EOS | ||
10 | * \brief Base class for Peng-Robinson parameters of a | ||
11 | * single-component fluid or a mixture | ||
12 | * | ||
13 | * See: | ||
14 | * | ||
15 | * R. Reid, et al. (1987, pp. 43-44) \cite reid1987 | ||
16 | */ | ||
17 | #ifndef DUMUX_PENG_ROBINSON_PARAMS_HH | ||
18 | #define DUMUX_PENG_ROBINSON_PARAMS_HH | ||
19 | |||
20 | namespace Dumux { | ||
21 | |||
22 | /*! | ||
23 | * \ingroup EOS | ||
24 | * \brief Stores and provides access to the Peng-Robinson parameters | ||
25 | * | ||
26 | * See: | ||
27 | * | ||
28 | * R. Reid, et al. (1987, pp. 43-44) \cite reid1987 | ||
29 | */ | ||
30 | template <class Scalar> | ||
31 | class PengRobinsonParams | ||
32 | { | ||
33 | public: | ||
34 | /*! | ||
35 | * \brief Returns the attractive parameter 'a' of the | ||
36 | * Peng-Robinson fluid. | ||
37 | */ | ||
38 | 3464208 | Scalar a() const | |
39 |
7/8✓ Branch 0 taken 10 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 12 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 14 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 12 times.
✓ Branch 7 taken 2 times.
|
3464208 | { return a_; } |
40 | |||
41 | |||
42 | /*! | ||
43 | * \brief Returns the repulsive parameter 'b' of the Peng-Robinson | ||
44 | * fluid. | ||
45 | */ | ||
46 | 1151254 | Scalar b() const | |
47 |
10/12✗ Branch 0 not taken.
✓ Branch 1 taken 133028 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 133035 times.
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 12 times.
✓ Branch 7 taken 2 times.
✓ Branch 8 taken 12 times.
✓ Branch 9 taken 2 times.
✓ Branch 10 taken 12 times.
✓ Branch 11 taken 2 times.
|
1151254 | { return b_; } |
48 | |||
49 | /*! | ||
50 | * \brief Set the attractive parameter 'a' of the Peng-Robinson | ||
51 | * fluid. | ||
52 | * \param value value of the attractive parameter | ||
53 | */ | ||
54 | 141224 | void setA(Scalar value) | |
55 | 103215 | { a_ = value; } | |
56 | |||
57 | /*! | ||
58 | * \brief Set the repulsive parameter 'b' of the Peng-Robinson | ||
59 | * fluid. | ||
60 | * \param value value of the repulsive parameter | ||
61 | */ | ||
62 | 141224 | void setB(Scalar value) | |
63 | 103215 | { b_ = value; } | |
64 | |||
65 | protected: | ||
66 | Scalar a_; | ||
67 | Scalar b_; | ||
68 | }; | ||
69 | |||
70 | } // end namespace | ||
71 | |||
72 | #endif | ||
73 |