All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
liquid.C
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) 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 \*---------------------------------------------------------------------------*/
25 
26 #include "liquid.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(liquid, 0);
34  addToRunTimeSelectionTable(liquidProperties, liquid, dictionary);
35 }
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
40 :
41  liquidProperties(dict),
42  rho_(thermophysicalFunction::New(dict, "rho")),
43  pv_(thermophysicalFunction::New(dict, "pv")),
44  hl_(thermophysicalFunction::New(dict, "hl")),
45  Cp_(thermophysicalFunction::New(dict, "Cp")),
46  h_(thermophysicalFunction::New(dict, "h")),
47  Cpg_(thermophysicalFunction::New(dict, "Cpg")),
48  B_(thermophysicalFunction::New(dict, "B")),
49  mu_(thermophysicalFunction::New(dict, "mu")),
50  mug_(thermophysicalFunction::New(dict, "mug")),
51  kappa_(thermophysicalFunction::New(dict, "kappa")),
52  kappag_(thermophysicalFunction::New(dict, "kappag")),
53  sigma_(thermophysicalFunction::New(dict, "sigma")),
54  D_(thermophysicalFunction::New(dict, "D"))
55 {}
56 
57 
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59 
61 {
62  liquidProperties::write(os); os << nl;
63  rho_->write(os); os << nl;
64  pv_->write(os); os << nl;
65  hl_->write(os); os << nl;
66  Cp_->write(os); os << nl;
67  h_->write(os); os << nl;
68  Cpg_->write(os); os << nl;
69  B_->write(os); os << nl;
70  mu_->write(os); os << nl;
71  mug_->write(os); os << nl;
72  kappa_->write(os); os << nl;
73  kappag_->write(os); os << nl;
74  sigma_->write(os); os << nl;
75  D_->write(os); os << endl;
76 }
77 
78 
79 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
liquid(const dictionary &dict)
Construct from dictionary.
Definition: liquid.C:39
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Macros for easy insertion into run-time selection tables.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Abstract base class for thermo-physical functions.
The thermophysical properties of a liquid.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static const char nl
Definition: Ostream.H:260
defineTypeNameAndDebug(combustionModel, 0)
void write(Ostream &os) const
Write the function coefficients.
Definition: liquid.C:60
virtual void write(Ostream &os) const =0
Write the function coefficients.
Namespace for OpenFOAM.