reducedUnitsIO.C
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 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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\*---------------------------------------------------------------------------*/
27
28#include "reducedUnits.H"
29#include "IOstreams.H"
30
31// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
32
34{
35 os << nl << "Defined: " << nl
36 << tab << "refLength = " << rU.refLength() << " m" << nl
37 << tab << "refTime = " << rU.refTime() << " s" << nl
38 << tab << "refMass = " << rU.refMass() << " kg" << nl
39 << tab << "Boltzmann constant, kb = " << reducedUnits::kb << " J/K"
40 << nl << "Calculated: " << nl
41 << tab << "refEnergy = " << rU.refEnergy() << " J" << nl
42 << tab << "refTemp = " << rU.refTemp() << " K" << nl
43 << tab << "refForce = " << rU.refForce() << " N" << nl
44 << tab << "refVelocity = " << rU.refVelocity() << " m/s" << nl
45 << tab << "refVolume = " << rU.refVolume() << " m^3" << nl
46 << tab << "refPressure = " << rU.refPressure() << " N/m^2" << nl
47 << tab << "refMassDensity = " << rU.refMassDensity() << " kg/m^3" << nl
48 << tab << "refNumberDensity = " << rU.refNumberDensity() << " m^-3"
49 << endl;
50
51 os.check(FUNCTION_NAME);
52 return os;
53}
54
55
56// ************************************************************************* //
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
scalar refPressure() const
Definition: reducedUnitsI.H:78
scalar refVelocity() const
Definition: reducedUnitsI.H:66
scalar refVolume() const
Definition: reducedUnitsI.H:72
scalar refTemp() const
Definition: reducedUnitsI.H:48
scalar refNumberDensity() const
Definition: reducedUnitsI.H:90
scalar refMass() const
Definition: reducedUnitsI.H:42
scalar refEnergy() const
Definition: reducedUnitsI.H:54
scalar refLength() const
Definition: reducedUnitsI.H:30
scalar refMassDensity() const
Definition: reducedUnitsI.H:84
scalar refTime() const
Definition: reducedUnitsI.H:36
scalar refForce() const
Definition: reducedUnitsI.H:60
OBJstream os(runTime.globalPath()/outputName)
#define FUNCTION_NAME
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53
constexpr char tab
The tab '\t' character(0x09)
Definition: Ostream.H:52