opm-common
RKParams.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 RK_PARAMS_HPP
27 #define RK_PARAMS_HPP
28 
29 namespace Opm {
30 
31 template <class Scalar, class FluidSystem>
32 class RKParams
33 {
34  static constexpr Scalar R = Constants<Scalar>::R;
35 
36 public:
37 
38  static Scalar calcOmegaA(Scalar temperature, unsigned compIdx)
39  {
40  Scalar Tr = temperature / FluidSystem::criticalTemperature(compIdx);
41  return 0.4274802 / sqrt(Tr);
42  }
43 
44  static Scalar calcOmegaB()
45  {
46  return Scalar(0.08664035);
47  }
48 
49  static Scalar calcm1()
50  {
51  return Scalar(0.0);
52  }
53 
54  static Scalar calcm2()
55  {
56  return Scalar(1.0);
57  }
58 
59 }; // class RKParams
60 
61 } // namespace Opm
62 
63 #endif
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Constants.hpp:41
Definition: RKParams.hpp:32