BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / parcels / Templates / ThermoParcel / ThermoParcelI.H
blobe5c7e349c53c3727ece0469c51e89c3fc8c52d20
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.
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.
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.
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/>.
24 \*---------------------------------------------------------------------------*/
26 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
28 template<class ParcelType>
29 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties()
31     ParcelType::constantProperties(),
32     T0_(0.0),
33     TMin_(0.0),
34     Cp0_(0.0),
35     epsilon0_(0.0),
36     f0_(0.0),
37     Pr_(0.0)
41 template<class ParcelType>
42 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
44     const constantProperties& cp
47     ParcelType::constantProperties(cp),
48     T0_(cp.T0_),
49     TMin_(cp.TMin_),
50     Cp0_(cp.Cp0_),
51     epsilon0_(cp.epsilon0_),
52     f0_(cp.f0_),
53     Pr_(cp.Pr_)
57 template<class ParcelType>
58 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
60     const dictionary& parentDict,
61     const bool readFields
64     ParcelType::constantProperties(parentDict, readFields),
65     T0_(0.0),
66     TMin_(0.0),
67     Cp0_(0.0),
68     epsilon0_(0.0),
69     f0_(0.0),
70     Pr_(0.0)
72     if (readFields)
73     {
74         this->dict().lookup("T0") >> T0_;
75         this->dict().lookup("TMin") >> TMin_;
76         this->dict().lookup("Cp0") >> Cp0_;
77         this->dict().lookup("epsilon0") >> epsilon0_;
78         this->dict().lookup("f0") >> f0_;
79         this->dict().lookup("Pr") >> Pr_;
80     }
84 template<class ParcelType>
85 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
87     const label parcelTypeId,
88     const scalar rhoMin,
89     const scalar rho0,
90     const scalar minParticleMass,
91     const scalar youngsModulus,
92     const scalar poissonsRatio,
93     const scalar T0,
94     const scalar TMin,
95     const scalar Cp0,
96     const scalar epsilon0,
97     const scalar f0,
98     const scalar Pr
101     ParcelType::constantProperties
102     (
103         parcelTypeId,
104         rhoMin,
105         rho0,
106         minParticleMass,
107         youngsModulus,
108         poissonsRatio
109     ),
110     T0_(T0),
111     TMin_(TMin),
112     Cp0_(Cp0),
113     epsilon0_(epsilon0),
114     f0_(f0),
115     Pr_(Pr)
119 template<class ParcelType>
120 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
122     const polyMesh& mesh,
123     const vector& position,
124     const label cellI,
125     const label tetFaceI,
126     const label tetPtI
129     ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
130     T_(0.0),
131     Cp_(0.0),
132     Tc_(0.0),
133     Cpc_(0.0)
137 template<class ParcelType>
138 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
140     const polyMesh& mesh,
141     const vector& position,
142     const label cellI,
143     const label tetFaceI,
144     const label tetPtI,
145     const label typeId,
146     const scalar nParticle0,
147     const scalar d0,
148     const scalar dTarget0,
149     const vector& U0,
150     const vector& f0,
151     const vector& angularMomentum0,
152     const vector& torque0,
153     const constantProperties& constProps
156     ParcelType
157     (
158         mesh,
159         position,
160         cellI,
161         tetFaceI,
162         tetPtI,
163         typeId,
164         nParticle0,
165         d0,
166         dTarget0,
167         U0,
168         f0,
169         angularMomentum0,
170         torque0,
171         constProps
172     ),
173     T_(constProps.T0()),
174     Cp_(constProps.Cp0()),
175     Tc_(0.0),
176     Cpc_(0.0)
180 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
182 template<class ParcelType>
183 inline Foam::scalar
184 Foam::ThermoParcel<ParcelType>::constantProperties::T0() const
186     return T0_;
190 template<class ParcelType>
191 inline Foam::scalar
192 Foam::ThermoParcel<ParcelType>::constantProperties::TMin() const
194     return TMin_;
198 template<class ParcelType>
199 inline Foam::scalar
200 Foam::ThermoParcel<ParcelType>::constantProperties::Cp0() const
202     return Cp0_;
206 template<class ParcelType>
207 inline Foam::scalar
208 Foam::ThermoParcel<ParcelType>::constantProperties::epsilon0() const
210     return epsilon0_;
214 template<class ParcelType>
215 inline Foam::scalar
216 Foam::ThermoParcel<ParcelType>::constantProperties::f0() const
218     return f0_;
222 template<class ParcelType>
223 inline Foam::scalar
224 Foam::ThermoParcel<ParcelType>::constantProperties::Pr() const
226     return Pr_;
230 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
232 template<class ParcelType>
233 inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const
235     return T_;
239 template<class ParcelType>
240 inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cp() const
242     return Cp_;
246 template<class ParcelType>
247 inline Foam::scalar Foam::ThermoParcel<ParcelType>::hs() const
249     return Cp_*(T_ - 298.15);
253 template<class ParcelType>
254 inline Foam::scalar Foam::ThermoParcel<ParcelType>::Tc() const
256     return Tc_;
260 template<class ParcelType>
261 inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cpc() const
263     return Cpc_;
267 template<class ParcelType>
268 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
270     return T_;
274 template<class ParcelType>
275 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::Cp()
277     return Cp_;
281 // ************************************************************************* //