1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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(),
41 template<class ParcelType>
42 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
44 const constantProperties& cp
47 ParcelType::constantProperties(cp),
51 epsilon0_(cp.epsilon0_),
57 template<class ParcelType>
58 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
60 const dictionary& parentDict,
64 ParcelType::constantProperties(parentDict, readFields),
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_;
84 template<class ParcelType>
85 inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
87 const label parcelTypeId,
90 const scalar minParticleMass,
91 const scalar youngsModulus,
92 const scalar poissonsRatio,
96 const scalar epsilon0,
101 ParcelType::constantProperties
119 template<class ParcelType>
120 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
122 const polyMesh& mesh,
123 const vector& position,
125 const label tetFaceI,
129 ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
137 template<class ParcelType>
138 inline Foam::ThermoParcel<ParcelType>::ThermoParcel
140 const polyMesh& mesh,
141 const vector& position,
143 const label tetFaceI,
146 const scalar nParticle0,
148 const scalar dTarget0,
151 const vector& angularMomentum0,
152 const vector& torque0,
153 const constantProperties& constProps
174 Cp_(constProps.Cp0()),
180 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
182 template<class ParcelType>
184 Foam::ThermoParcel<ParcelType>::constantProperties::T0() const
190 template<class ParcelType>
192 Foam::ThermoParcel<ParcelType>::constantProperties::TMin() const
198 template<class ParcelType>
200 Foam::ThermoParcel<ParcelType>::constantProperties::Cp0() const
206 template<class ParcelType>
208 Foam::ThermoParcel<ParcelType>::constantProperties::epsilon0() const
214 template<class ParcelType>
216 Foam::ThermoParcel<ParcelType>::constantProperties::f0() const
222 template<class ParcelType>
224 Foam::ThermoParcel<ParcelType>::constantProperties::Pr() const
230 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
232 template<class ParcelType>
233 inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const
239 template<class ParcelType>
240 inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cp() const
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
260 template<class ParcelType>
261 inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cpc() const
267 template<class ParcelType>
268 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
274 template<class ParcelType>
275 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::Cp()
281 // ************************************************************************* //