opm-common
CompositionalFluidState.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  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 
19  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
30 #ifndef OPM_COMPOSITIONAL_FLUID_STATE_HPP
31 #define OPM_COMPOSITIONAL_FLUID_STATE_HPP
32 
33 #include <opm/common/utility/gpuDecorators.hpp>
34 
44 
45 namespace Opm {
46 
52 template <class ValueT, class FluidSystem, bool storeEnthalpy=true>
54 
55 // specialization for the enthalpy enabled case
56 template <class ValueT, class FluidSystem>
57 class CompositionalFluidState<ValueT, FluidSystem, true>
58  : public ModularFluidState<ValueT,
59  FluidSystem::numPhases,
60  FluidSystem::numComponents,
61  FluidStateExplicitPressureModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> >,
62  FluidStateEquilibriumTemperatureModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> >,
63  FluidStateExplicitCompositionModule<ValueT, FluidSystem, CompositionalFluidState<ValueT, FluidSystem, true> >,
64  FluidStateExplicitFugacityModule<ValueT, FluidSystem::numPhases, FluidSystem::numComponents, CompositionalFluidState<ValueT, FluidSystem, true> >,
65  FluidStateExplicitSaturationModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> >,
66  FluidStateExplicitDensityModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> >,
67  FluidStateExplicitViscosityModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> >,
68  FluidStateExplicitEnthalpyModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, true> > >
69 {
70 public:
76  OPM_HOST_DEVICE const FluidSystem& fluidSystem() const
77  {
78  static FluidSystem instance;
79  return instance;
80  }
81 };
82 
83 // specialization for the enthalpy disabled case
84 template <class ValueT, class FluidSystem>
85 class CompositionalFluidState<ValueT, FluidSystem, false>
86  : public ModularFluidState<ValueT,
87  FluidSystem::numPhases,
88  FluidSystem::numComponents,
89  FluidStateExplicitPressureModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> >,
90  FluidStateEquilibriumTemperatureModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> >,
91  FluidStateExplicitCompositionModule<ValueT, FluidSystem, CompositionalFluidState<ValueT, FluidSystem, false> >,
92  FluidStateExplicitFugacityModule<ValueT, FluidSystem::numPhases, FluidSystem::numComponents, CompositionalFluidState<ValueT, FluidSystem, false> >,
93  FluidStateExplicitSaturationModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> >,
94  FluidStateExplicitDensityModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> >,
95  FluidStateExplicitViscosityModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> >,
96  FluidStateNullEnthalpyModule<ValueT, FluidSystem::numPhases, CompositionalFluidState<ValueT, FluidSystem, false> > >
97 {
98 public:
104  OPM_HOST_DEVICE const FluidSystem& fluidSystem() const
105  {
106  static FluidSystem instance;
107  return instance;
108 
109  }
110 };
111 
112 } // namespace Opm
113 
114 #endif
Modules for the ModularFluidState which represent enthalpy.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Modules for the ModularFluidState which represent fugacity/chemical potential.
Modules for the ModularFluidState which represent viscosity.
OPM_HOST_DEVICE const FluidSystem & fluidSystem() const
Return the fluid system used by this fluid state.
Definition: CompositionalFluidState.hpp:104
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: ModularFluidState.hpp:51
Modules for the ModularFluidState which represent pressure.
Modules for the ModularFluidState which represent composition.
Modules for the ModularFluidState which represent temperature.
OPM_HOST_DEVICE const FluidSystem & fluidSystem() const
Return the fluid system used by this fluid state.
Definition: CompositionalFluidState.hpp:76
Modules for the ModularFluidState which represent saturation.
Modules for the ModularFluidState which represent density.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: CompositionalFluidState.hpp:53