solidProperties.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 | Copyright (C) 2011 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 "solidProperties.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32  defineTypeNameAndDebug(solidProperties, 0);
33  defineRunTimeSelectionTable(solidProperties,);
34  defineRunTimeSelectionTable(solidProperties, Istream);
35  defineRunTimeSelectionTable(solidProperties, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 (
42  scalar rho,
43  scalar Cp,
44  scalar K,
45  scalar Hf,
46  scalar emissivity
47 )
48 :
49  rho_(rho),
50  Cp_(Cp),
51  K_(K),
52  Hf_(Hf),
53  emissivity_(emissivity)
54 {}
55 
56 
58 :
59  rho_(readScalar(is)),
60  Cp_(readScalar(is)),
61  K_(readScalar(is)),
62  Hf_(readScalar(is)),
63  emissivity_(readScalar(is))
64 {}
65 
66 
68 :
69  rho_(readScalar(dict.lookup("rho"))),
70  Cp_(readScalar(dict.lookup("Cp"))),
71  K_(readScalar(dict.lookup("K"))),
72  Hf_(readScalar(dict.lookup("Hf"))),
73  emissivity_(readScalar(dict.lookup("emissivity")))
74 {}
75 
76 
78 :
79  rho_(s.rho_),
80  Cp_(s.Cp_),
81  K_(s.K_),
82  Hf_(s.Hf_),
83  emissivity_(s.emissivity_)
84 {}
85 
86 
87 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
88 
90 {
91  os << rho_ << token::SPACE
92  << Cp_ << token::SPACE
93  << K_ << token::SPACE
94  << Hf_ << token::SPACE
95  << emissivity_;
96 }
97 
98 
99 // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
100 
102 {
103  s.writeData(os);
104  return os;
105 }
106 
107 
108 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
stressControl lookup("compactNormalStress") >> compactNormalStress
solidProperties(scalar rho, scalar Cp, scalar K, scalar Hf, scalar emissivity)
Construct from components.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
Definition: doubleScalar.H:63
virtual void writeData(Ostream &os) const
Write the solidProperties properties.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
The thermophysical properties of a solid.
Ostream & operator<<(Ostream &, const ensightPart &)
Namespace for OpenFOAM.