PengRobinsonParams.hpp
Go to the documentation of this file.
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 (C) 2012 by Bernd Flemisch
5  Copyright (C) 2011-2013 by Andreas Lauser
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 */
26 #ifndef OPM_PENG_ROBINSON_PARAMS_HPP
27 #define OPM_PENG_ROBINSON_PARAMS_HPP
28 
30 
31 namespace Opm
32 {
41 template <class Scalar>
43 {
44 public:
49  Scalar a() const
50  { return a_; }
51 
56  Scalar b() const
57  { return b_; }
58 
63  void checkDefined() const
64  {
65 #ifndef NDEBUG
68 #endif
69  }
70 
75  void setA(Scalar value)
76  { a_ = value; }
77 
82  void setB(Scalar value)
83  { b_ = value; }
84 
85 protected:
86  Scalar a_;
87  Scalar b_;
88 };
89 
90 } // namespace Opm
91 
92 #endif
bool CheckDefined(const T &value OPM_UNUSED)
Make valgrind complain if any of the memory occupied by an object is undefined.
Definition: Valgrind.hpp:74
Definition: Air_Mesitylene.hpp:31
Stores and provides access to the Peng-Robinson parameters.
Definition: PengRobinsonParams.hpp:42
Some templates to wrap the valgrind client request macros.
void checkDefined() const
If run under valgrind, this method produces an warning if the parameters where not determined correct...
Definition: PengRobinsonParams.hpp:63
Scalar a() const
Returns the attractive parameter 'a' of the Peng-Robinson fluid.
Definition: PengRobinsonParams.hpp:49
void setB(Scalar value)
Set the repulsive parameter 'b' of the Peng-Robinson fluid.
Definition: PengRobinsonParams.hpp:82
Scalar a_
Definition: PengRobinsonParams.hpp:86
Scalar b() const
Returns the repulsive parameter 'b' of the Peng-Robinson fluid.
Definition: PengRobinsonParams.hpp:56
void setA(Scalar value)
Set the attractive parameter 'a' of the Peng-Robinson fluid.
Definition: PengRobinsonParams.hpp:75
Scalar b_
Definition: PengRobinsonParams.hpp:87