CH4N2O.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-2021 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::CH4N2O
26 
27 Description
28  urea, note that some of the properties are unavailable in the literature
29  and have been copied from water.
30 
31 SourceFiles
32  CH4N2O.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef CH4N2O_H
37 #define CH4N2O_H
38 
39 #include "liquidProperties.H"
40 #include "NSRDS0.H"
41 #include "NSRDS1.H"
42 #include "NSRDS2.H"
43 #include "NSRDS3.H"
44 #include "NSRDS4.H"
45 #include "NSRDS5.H"
46 #include "NSRDS6.H"
47 #include "NSRDS7.H"
48 #include "NSRDS14.H"
49 #include "APIdiffCoef.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class CH4N2O Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class CH4N2O
61 :
62  public liquidProperties
63 {
64  // Private Data
65 
66  Function1s::NSRDS0 rho_;
71  Function1s::NSRDS7 Cpg_;
74  Function1s::NSRDS2 mug_;
75  Function1s::NSRDS0 kappa_;
76  Function1s::NSRDS2 kappag_;
77  Function1s::NSRDS6 sigma_;
79 
80  //- Liquid heat of formation [J/kg]
81  scalar Hf_;
82 
83 
84 public:
85 
86  friend class liquidProperties;
87 
88  //- Runtime type information
89  TypeName("CH4N2O");
90 
91 
92  // Constructors
93 
94  //- Construct null
95  CH4N2O();
96 
97  //- Construct from components
98  CH4N2O
99  (
100  const liquidProperties& l,
101  const Function1s::NSRDS0& density,
102  const Function1s::NSRDS1& vapourPressure,
103  const Function1s::NSRDS6& heatOfVapourisation,
104  const Function1s::NSRDS0& heatCapacity,
105  const Function1s::NSRDS0& enthalpy,
106  const Function1s::NSRDS7& idealGasHeatCapacity,
107  const Function1s::NSRDS4& secondVirialCoeff,
108  const Function1s::NSRDS1& dynamicViscosity,
109  const Function1s::NSRDS2& vapourDynamicViscosity,
110  const Function1s::NSRDS0& thermalConductivity,
111  const Function1s::NSRDS2& vapourThermalConductivity,
112  const Function1s::NSRDS6& surfaceTension,
113  const Function2s::APIdiffCoef& vapourDiffusivity
114  );
115 
116  //- Construct from dictionary
117  CH4N2O(const dictionary& dict);
118 
119  //- Construct and return clone
120  virtual autoPtr<liquidProperties> clone() const
121  {
122  return autoPtr<liquidProperties>(new CH4N2O(*this));
123  }
124 
125 
126  // Member Functions
127 
128  //- Liquid density [kg/m^3]
129  inline scalar rho(scalar p, scalar T) const;
130 
131  //- Vapour pressure [Pa]
132  inline scalar pv(scalar p, scalar T) const;
133 
134  //- Heat of vapourisation [J/kg]
135  inline scalar hl(scalar p, scalar T) const;
136 
137  //- Liquid heat capacity [J/kg/K]
138  inline scalar Cp(scalar p, scalar T) const;
139 
140  //- Liquid sensible enthalpy [J/kg]
141  inline scalar Hs(scalar p, scalar T) const;
142 
143  //- Liquid heat of formation [J/kg]
144  inline scalar Hf() const;
145 
146  //- Liquid absolute enthalpy [J/kg]
147  inline scalar Ha(scalar p, scalar T) const;
148 
149  //- Ideal gas heat capacity [J/kg/K]
150  inline scalar Cpg(scalar p, scalar T) const;
151 
152  //- Second Virial Coefficient [m^3/kg]
153  inline scalar B(scalar p, scalar T) const;
154 
155  //- Liquid viscosity [Pa s]
156  inline scalar mu(scalar p, scalar T) const;
157 
158  //- Vapour viscosity [Pa s]
159  inline scalar mug(scalar p, scalar T) const;
160 
161  //- Liquid thermal conductivity [W/m/K]
162  inline scalar kappa(scalar p, scalar T) const;
163 
164  //- Vapour thermal conductivity [W/m/K]
165  inline scalar kappag(scalar p, scalar T) const;
166 
167  //- Surface tension [N/m]
168  inline scalar sigma(scalar p, scalar T) const;
169 
170  //- Vapour diffusivity [m^2/s]
171  inline scalar D(scalar p, scalar T) const;
172 
173  //- Vapour diffusivity [m^2/s] with specified binary pair
174  inline scalar D(scalar p, scalar T, scalar Wb) const;
175 
176 
177  // I-O
178 
179  //- Write the function coefficients
180  void write(Ostream& os) const;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace Foam
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #include "CH4N2OI.H"
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: CH4N2OI.H:86
dictionary dict
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: CH4N2O.H:119
NSRDS function number 100.
Definition: NSRDS0.H:69
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: CH4N2OI.H:74
scalar Hf() const
Liquid heat of formation [J/kg].
Definition: CH4N2OI.H:56
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: CH4N2OI.H:26
urea, note that some of the properties are unavailable in the literature and have been copied from wa...
Definition: CH4N2O.H:59
void write(Ostream &os) const
Write the function coefficients.
Definition: CH4N2O.C:147
TypeName("CH4N2O")
Runtime type information.
NSRDS function number 104.
Definition: NSRDS4.H:69
scalar Hs(scalar p, scalar T) const
Liquid sensible enthalpy [J/kg].
Definition: CH4N2OI.H:50
NSRDS function number 102.
Definition: NSRDS2.H:69
The thermophysical properties of a liquid.
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: CH4N2OI.H:38
NSRDS-AICHE function number 107.
Definition: NSRDS7.H:69
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/m/K].
Definition: CH4N2OI.H:98
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/kg/K].
Definition: CH4N2OI.H:44
scalar Ha(scalar p, scalar T) const
Liquid absolute enthalpy [J/kg].
Definition: CH4N2OI.H:62
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
scalar D(scalar p, scalar T) const
Vapour diffusivity [m^2/s].
Definition: CH4N2OI.H:110
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
NSRDS function number 101.
Definition: NSRDS1.H:69
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: CH4N2OI.H:32
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: CH4N2OI.H:80
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: CH4N2OI.H:104
NSRDS function number 106.
Definition: NSRDS6.H:69
CH4N2O()
Construct null.
Definition: CH4N2O.C:43
Namespace for OpenFOAM.
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/kg/K].
Definition: CH4N2OI.H:68
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/m/K].
Definition: CH4N2OI.H:92