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 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
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 // ************************************************************************* //
reducedUnits.H
IOstreams.H
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Foam::reducedUnits::refPressure
scalar refPressure() const
Definition: reducedUnitsI.H:78
Foam::reducedUnits::refMass
scalar refMass() const
Definition: reducedUnitsI.H:42
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::reducedUnits::refForce
scalar refForce() const
Definition: reducedUnitsI.H:60
Foam::reducedUnits::refVelocity
scalar refVelocity() const
Definition: reducedUnitsI.H:66
Foam::reducedUnits::refNumberDensity
scalar refNumberDensity() const
Definition: reducedUnitsI.H:90
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::reducedUnits::refTime
scalar refTime() const
Definition: reducedUnitsI.H:36
Foam::reducedUnits::refLength
scalar refLength() const
Definition: reducedUnitsI.H:30
os
OBJstream os(runTime.globalPath()/outputName)
Foam::reducedUnits::refVolume
scalar refVolume() const
Definition: reducedUnitsI.H:72
Foam::reducedUnits::refMassDensity
scalar refMassDensity() const
Definition: reducedUnitsI.H:84
Foam::reducedUnits::refTemp
scalar refTemp() const
Definition: reducedUnitsI.H:48
Foam::tab
constexpr char tab
Definition: Ostream.H:403
Foam::nl
constexpr char nl
Definition: Ostream.H:404
Foam::reducedUnits::refEnergy
scalar refEnergy() const
Definition: reducedUnitsI.H:54
FUNCTION_NAME
#define FUNCTION_NAME
Definition: messageStream.H:295
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::reducedUnits
Definition: reducedUnits.H:59
kb
scalar kb
Definition: solveBulkSurfactant.H:7