opm-common
Toggle main menu visibility
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
29
namespace
Opm
{
30
31
template
<
class
Scalar,
class
Flu
id
System>
32
class
SRKParams
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
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
Opm::Valgrind::CheckDefined
OPM_HOST_DEVICE bool CheckDefined(const T &value)
Make valgrind complain if any of the memory occupied by an object is undefined.
Definition
Valgrind.hpp:76
Opm::Constants::R
static constexpr Scalar R
The ideal gas constant [J/(mol K)].
Definition
Constants.hpp:45
Opm::SRKParams
Definition
SRKParams.hpp:33
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
material
eos
SRKParams.hpp
Generated by
1.17.0