All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
C2H6.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::C2H6
26 
27 Description
28  ethane
29 
30 SourceFiles
31  C2H6.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef C2H6_H
36 #define C2H6_H
37 
38 #include "liquidProperties.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class C2H6 Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class C2H6
60 :
61  public liquidProperties
62 {
63  // Private Data
64 
78 
79 
80 public:
81 
82  friend class liquidProperties;
83 
84  //- Runtime type information
85  TypeName("C2H6");
86 
87 
88  // Constructors
89 
90  //- Construct null
91  C2H6();
92 
93  //- Construct from components
94  C2H6
95  (
96  const liquidProperties& l,
97  const thermophysicalFunctions::NSRDS5& density,
98  const thermophysicalFunctions::NSRDS1& vapourPressure,
99  const thermophysicalFunctions::NSRDS6& heatOfVapourisation,
100  const thermophysicalFunctions::NSRDS14& heatCapacity,
101  const thermophysicalFunctions::NSRDS0& enthalpy,
102  const thermophysicalFunctions::NSRDS7& idealGasHeatCapacity,
103  const thermophysicalFunctions::NSRDS4& secondVirialCoeff,
104  const thermophysicalFunctions::NSRDS1& dynamicViscosity,
105  const thermophysicalFunctions::NSRDS2& vapourDynamicViscosity,
106  const thermophysicalFunctions::NSRDS0& thermalConductivity,
107  const thermophysicalFunctions::NSRDS2& vapourThermalConductivity,
108  const thermophysicalFunctions::NSRDS6& surfaceTension,
109  const thermophysicalFunctions::APIdiffCoef& vapourDiffusivity
110  );
111 
112  //- Construct from dictionary
113  C2H6(const dictionary& dict);
114 
115  //- Construct and return clone
116  virtual autoPtr<liquidProperties> clone() const
117  {
118  return autoPtr<liquidProperties>(new C2H6(*this));
119  }
120 
121 
122  // Member Functions
123 
124  //- Liquid density [kg/m^3]
125  inline scalar rho(scalar p, scalar T) const;
126 
127  //- Vapour pressure [Pa]
128  inline scalar pv(scalar p, scalar T) const;
129 
130  //- Heat of vapourisation [J/kg]
131  inline scalar hl(scalar p, scalar T) const;
132 
133  //- Liquid heat capacity [J/kg/K]
134  inline scalar Cp(scalar p, scalar T) const;
135 
136  //- Liquid enthalpy [J/kg]
137  inline scalar h(scalar p, scalar T) const;
138 
139  //- Ideal gas heat capacity [J/kg/K]
140  inline scalar Cpg(scalar p, scalar T) const;
141 
142  //- Second Virial Coefficient [m^3/kg]
143  inline scalar B(scalar p, scalar T) const;
144 
145  //- Liquid viscosity [Pa s]
146  inline scalar mu(scalar p, scalar T) const;
147 
148  //- Vapour viscosity [Pa s]
149  inline scalar mug(scalar p, scalar T) const;
150 
151  //- Liquid thermal conductivity [W/m/K]
152  inline scalar kappa(scalar p, scalar T) const;
153 
154  //- Vapour thermal conductivity [W/m/K]
155  inline scalar kappag(scalar p, scalar T) const;
156 
157  //- Surface tension [N/m]
158  inline scalar sigma(scalar p, scalar T) const;
159 
160  //- Vapour diffusivity [m^2/s]
161  inline scalar D(scalar p, scalar T) const;
162 
163  //- Vapour diffusivity [m^2/s] with specified binary pair
164  inline scalar D(scalar p, scalar T, scalar Wb) const;
165 
166 
167  // I-O
168 
169  //- Write the function coefficients
170  void write(Ostream& os) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #include "C2H6I.H"
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
dictionary dict
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: C2H6I.H:32
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: C2H6I.H:92
scalar D(scalar p, scalar T) const
Vapour diffusivity [m^2/s].
Definition: C2H6I.H:98
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: C2H6.H:115
C2H6()
Construct null.
Definition: C2H6.C:40
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/kg/K].
Definition: C2H6I.H:56
TypeName("C2H6")
Runtime type information.
ethane
Definition: C2H6.H:58
void write(Ostream &os) const
Write the function coefficients.
Definition: C2H6.C:131
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: C2H6I.H:68
The thermophysical properties of a liquid.
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/kg/K].
Definition: C2H6I.H:44
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: C2H6I.H:38
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/m/K].
Definition: C2H6I.H:86
scalar h(scalar p, scalar T) const
Liquid enthalpy [J/kg].
Definition: C2H6I.H:50
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: C2H6I.H:62
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: C2H6I.H:26
volScalarField & p
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: C2H6I.H:74
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/m/K].
Definition: C2H6I.H:80
Namespace for OpenFOAM.