CH4N2O.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::CH4N2O
28 
29 Description
30  urea, note that some of the properties are unavailable in the literature
31  and have been copied from water.
32 
33 SourceFiles
34  CH4N2O.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef CH4N2O_H
39 #define CH4N2O_H
40 
41 #include "liquidProperties.H"
42 #include "NSRDSfunc0.H"
43 #include "NSRDSfunc1.H"
44 #include "NSRDSfunc2.H"
45 #include "NSRDSfunc3.H"
46 #include "NSRDSfunc4.H"
47 #include "NSRDSfunc5.H"
48 #include "NSRDSfunc6.H"
49 #include "NSRDSfunc7.H"
50 #include "NSRDSfunc14.H"
51 #include "APIdiffCoefFunc.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class CH4N2O Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class CH4N2O
63 :
64  public liquidProperties
65 {
66  // Private data
67 
68  NSRDSfunc0 rho_;
69  NSRDSfunc1 pv_;
70  NSRDSfunc6 hl_;
71  NSRDSfunc0 Cp_;
72  NSRDSfunc0 h_;
73  NSRDSfunc7 Cpg_;
74  NSRDSfunc4 B_;
75  NSRDSfunc1 mu_;
76  NSRDSfunc2 mug_;
77  NSRDSfunc0 kappa_;
78  NSRDSfunc2 kappag_;
79  NSRDSfunc6 sigma_;
80  APIdiffCoefFunc D_;
81 
82 public:
83 
84  friend class liquidProperties;
85 
86  //- Runtime type information
87  TypeName("CH4N2O");
88 
89 
90  // Constructors
91 
92  //- Construct null
93  CH4N2O();
94 
95  //- Construct from components
96  CH4N2O
97  (
98  const liquidProperties& l,
99  const NSRDSfunc0& density,
100  const NSRDSfunc1& vapourPressure,
101  const NSRDSfunc6& heatOfVapourisation,
102  const NSRDSfunc0& heatCapacity,
103  const NSRDSfunc0& enthalpy,
104  const NSRDSfunc7& idealGasHeatCapacity,
105  const NSRDSfunc4& secondVirialCoeff,
106  const NSRDSfunc1& dynamicViscosity,
107  const NSRDSfunc2& vapourDynamicViscosity,
108  const NSRDSfunc0& thermalConductivity,
109  const NSRDSfunc2& vapourThermalConductivity,
110  const NSRDSfunc6& surfaceTension,
111  const APIdiffCoefFunc& vapourDiffussivity
112  );
113 
114  //- Construct from dictionary
115  CH4N2O(const dictionary& dict);
116 
117  //- Construct and return clone
118  virtual autoPtr<liquidProperties> clone() const
119  {
121  }
122 
123 
124  // Member Functions
125 
126  //- Liquid density [kg/m^3]
127  inline scalar rho(scalar p, scalar T) const;
128 
129  //- Vapour pressure [Pa]
130  inline scalar pv(scalar p, scalar T) const;
131 
132  //- Heat of vapourisation [J/kg]
133  inline scalar hl(scalar p, scalar T) const;
134 
135  //- Liquid heat capacity [J/(kg K)]
136  inline scalar Cp(scalar p, scalar T) const;
137 
138  //- Liquid Enthalpy [J/(kg)]
139  inline scalar h(scalar p, scalar T) const;
140 
141  //- Ideal gas heat capacity [J/(kg K)]
142  inline scalar Cpg(scalar p, scalar T) const;
143 
144  //- Second Virial Coefficient [m^3/kg]
145  inline scalar B(scalar p, scalar T) const;
146 
147  //- Liquid viscosity [Pa s]
148  inline scalar mu(scalar p, scalar T) const;
149 
150  //- Vapour viscosity [Pa s]
151  inline scalar mug(scalar p, scalar T) const;
152 
153  //- Liquid thermal conductivity [W/(m K)]
154  inline scalar kappa(scalar p, scalar T) const;
155 
156  //- Vapour thermal conductivity [W/(m K)]
157  inline scalar kappag(scalar p, scalar T) const;
158 
159  //- Surface tension [N/m]
160  inline scalar sigma(scalar p, scalar T) const;
161 
162  //- Vapour diffusivity [m2/s]
163  inline scalar D(scalar p, scalar T) const;
164 
165  //- Vapour diffusivity [m2/s] with specified binary pair
166  inline scalar D(scalar p, scalar T, scalar Wb) const;
167 
168 
169  // I-O
170 
171  //- Write the function coefficients
172  void writeData(Ostream& os) const;
173 
174  //- Ostream Operator
175  friend Ostream& operator<<(Ostream& os, const CH4N2O& l);
176 };
177 
178 
179 Ostream& operator<<(Ostream& os, const CH4N2O& l);
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #include "CH4N2OI.H"
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
NSRDSfunc2.H
p
volScalarField & p
Definition: createFieldRefs.H:8
NSRDSfunc0.H
Foam::CH4N2O::sigma
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: CH4N2OI.H:94
NSRDSfunc3.H
NSRDSfunc6.H
NSRDSfunc4.H
Foam::CH4N2O::Cpg
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/(kg K)].
Definition: CH4N2OI.H:58
NSRDSfunc7.H
Foam::CH4N2O::pv
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: CH4N2OI.H:34
NSRDSfunc5.H
NSRDSfunc14.H
Foam::NSRDSfunc0
NSRDS function number 100.
Definition: NSRDSfunc0.H:69
Foam::CH4N2O::rho
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: CH4N2OI.H:28
Foam::NSRDSfunc7
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:69
Foam::CH4N2O::kappa
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/(m K)].
Definition: CH4N2OI.H:82
Foam::CH4N2O::Cp
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/(kg K)].
Definition: CH4N2OI.H:46
Foam::CH4N2O
urea, note that some of the properties are unavailable in the literature and have been copied from wa...
Definition: CH4N2O.H:61
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::NSRDSfunc4
NSRDS function number 104.
Definition: NSRDSfunc4.H:69
Foam::liquidProperties
The thermophysical properties of a liquid.
Definition: liquidProperties.H:51
Foam::CH4N2O::TypeName
TypeName("CH4N2O")
Runtime type information.
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
APIdiffCoefFunc.H
Foam::CH4N2O::kappag
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/(m K)].
Definition: CH4N2OI.H:88
Foam::APIdiffCoefFunc
API function for vapour mass diffusivity.
Definition: APIdiffCoefFunc.H:53
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam::NSRDSfunc1
NSRDS function number 101.
Definition: NSRDSfunc1.H:69
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::CH4N2O::h
scalar h(scalar p, scalar T) const
Liquid Enthalpy [J/(kg)].
Definition: CH4N2OI.H:52
liquidProperties.H
Foam::CH4N2O::mug
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: CH4N2OI.H:76
Foam::CH4N2O::clone
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: CH4N2O.H:117
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
NSRDSfunc1.H
Foam::CH4N2O::CH4N2O
CH4N2O()
Construct null.
Definition: CH4N2O.C:42
Foam::NSRDSfunc2
NSRDS function number 102.
Definition: NSRDSfunc2.H:69
CH4N2OI.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::CH4N2O::writeData
void writeData(Ostream &os) const
Write the function coefficients.
Definition: CH4N2O.C:126
Foam::CH4N2O::B
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: CH4N2OI.H:64
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:69
Foam::CH4N2O::D
scalar D(scalar p, scalar T) const
Vapour diffusivity [m2/s].
Definition: CH4N2OI.H:100
Foam::CH4N2O::operator<<
friend Ostream & operator<<(Ostream &os, const CH4N2O &l)
Ostream Operator.
Foam::CH4N2O::hl
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: CH4N2OI.H:40
Foam::CH4N2O::mu
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: CH4N2OI.H:70