My Project
Loading...
Searching...
No Matches
SRKParams.hpp
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 Copyright 2022 NORCE.
5 Copyright 2022 SINTEF Digital, Mathematics and Cybernetics.
6
7 This file is part of the Open Porous Media project (OPM).
8
9 OPM is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 2 of the License, or
12 (at your option) any later version.
13
14 OPM is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OPM. If not, see <http://www.gnu.org/licenses/>.
21
22 Consult the COPYING file in the top-level source directory of this
23 module for the precise wording of the license and the list of
24 copyright holders.
25*/
26#ifndef SRK_PARAMS_HPP
27#define SRK_PARAMS_HPP
28
29namespace Opm {
30
31template <class Scalar, class FluidSystem>
33{
34 static constexpr Scalar R = Constants<Scalar>::R;
35
36public:
37
38 static Scalar calcOmegaA(Scalar temperature, unsigned compIdx)
39 {
40 Scalar Tr = temperature / FluidSystem::criticalTemperature(compIdx);
41 Scalar omega = FluidSystem::acentricFactor(compIdx);
42 Scalar f_omega = 0.48 + omega * (1.574 + omega * (-0.176));
43 Valgrind::CheckDefined(f_omega);
44
45 Scalar tmp = 1 + f_omega*(1 - sqrt(Tr));
46 return 0.4274802 * tmp * tmp;
47 }
48
49 static Scalar calcOmegaB()
50 {
51 return Scalar(0.08664035);
52 }
53
54 static Scalar calcm1()
55 {
56 return Scalar(0.0);
57 }
58
59 static Scalar calcm2()
60 {
61 return Scalar(1.0);
62 }
63
64}; // class SRKParams
65
66} // namespace Opm
67
68#endif
Definition Constants.hpp:40
Definition SRKParams.hpp:33
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30