BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / parcels / Templates / ReactingParcel / ReactingParcelI.H
blob04b85b99dcfab1a5ca1eb6b9638197550178afb4
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
30 Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties()
32     ParcelType::constantProperties(),
33     pMin_(0.0),
34     constantVolume_(false),
35     Tvap_(0.0),
36     Tbp_(0.0)
40 template<class ParcelType>
41 inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
43     const constantProperties& cp
46     ParcelType::constantProperties(cp),
47     pMin_(cp.pMin_),
48     constantVolume_(cp.constantVolume_),
49     Tvap_(cp.Tvap_),
50     Tbp_(cp.Tbp_)
54 template<class ParcelType>
55 inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
57     const dictionary& parentDict,
58     const bool readFields
61     ParcelType::constantProperties(parentDict, readFields),
62     pMin_(0.0),
63     constantVolume_(false),
64     Tvap_(0.0),
65     Tbp_(0.0)
67     if (readFields)
68     {
69         this->dict().lookup("pMin") >> pMin_;
70         this->dict().lookup("constantVolume") >> constantVolume_;
71         this->dict().lookup("Tvap") >> Tvap_;
72         this->dict().lookup("Tbp") >> Tbp_;
73     }
77 template<class ParcelType>
78 inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
80     const label parcelTypeId,
81     const scalar rhoMin,
82     const scalar rho0,
83     const scalar minParticleMass,
84     const scalar youngsModulus,
85     const scalar poissonsRatio,
86     const scalar T0,
87     const scalar TMin,
88     const scalar Cp0,
89     const scalar epsilon0,
90     const scalar f0,
91     const scalar Pr,
92     const scalar pMin,
93     const Switch& constantVolume,
94     const scalar Tvap,
95     const scalar Tbp
98     ParcelType::constantProperties
99     (
100         parcelTypeId,
101         rhoMin,
102         rho0,
103         minParticleMass,
104         youngsModulus,
105         poissonsRatio,
106         T0,
107         TMin,
108         Cp0,
109         epsilon0,
110         f0,
111         Pr
112     ),
113     pMin_(pMin),
114     constantVolume_(constantVolume),
115     Tvap_(Tvap),
116     Tbp_(Tbp)
120 template<class ParcelType>
121 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
123     const polyMesh& mesh,
124     const vector& position,
125     const label cellI,
126     const label tetFaceI,
127     const label tetPtI
130     ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
131     mass0_(0.0),
132     Y_(0),
133     pc_(0.0)
137 template<class ParcelType>
138 inline Foam::ReactingParcel<ParcelType>::ReactingParcel
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 scalarField& Y0,
154     const constantProperties& constProps
157     ParcelType
158     (
159         mesh,
160         position,
161         cellI,
162         tetFaceI,
163         tetPtI,
164         typeId,
165         nParticle0,
166         d0,
167         dTarget0,
168         U0,
169         f0,
170         angularMomentum0,
171         torque0,
172         constProps
173     ),
174     mass0_(0.0),
175     Y_(Y0),
176     pc_(0.0)
178     // Set initial parcel mass
179     mass0_ = this->mass();
183 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
185 template<class ParcelType>
186 inline Foam::scalar
187 Foam::ReactingParcel<ParcelType>::constantProperties::pMin() const
189     return pMin_;
193 template<class ParcelType>
194 inline Foam::Switch
195 Foam::ReactingParcel<ParcelType>::constantProperties::constantVolume() const
197     return constantVolume_;
201 template<class ParcelType>
202 inline Foam::scalar
203 Foam::ReactingParcel<ParcelType>::constantProperties::Tvap() const
205     return Tvap_;
209 template<class ParcelType>
210 inline Foam::scalar
211 Foam::ReactingParcel<ParcelType>::constantProperties::Tbp() const
213     return Tbp_;
217 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
219 template<class ParcelType>
220 inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
222     return mass0_;
226 template<class ParcelType>
227 inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() const
229     return Y_;
233 template<class ParcelType>
234 inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
236     return pc_;
240 template<class ParcelType>
241 inline Foam::scalar& Foam::ReactingParcel<ParcelType>::pc()
243     return pc_;
247 template<class ParcelType>
248 inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
250     return mass0_;
254 template<class ParcelType>
255 inline Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y()
257     return Y_;
261 // ************************************************************************* //