thermoSingleLayerI.H
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-2013 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 "thermoSingleLayer.H"
27 #include "filmRadiationModel.H"
28 #include "heatTransferModel.H"
29 #include "phaseChangeModel.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace regionModels
36 {
37 namespace surfaceFilmModels
38 {
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 inline const SLGThermo& thermoSingleLayer::thermo() const
43 {
44  return thermo_;
45 }
46 
47 
49 (
50  const scalarField& T,
51  const label patchI
52 ) const
53 {
54  const scalarField& Cp = Cp_.boundaryField()[patchI];
55  return Cp*(T - 298.15);
56 }
57 
58 
60 (
61  const volScalarField& T
62 ) const
63 {
64  return tmp<volScalarField>
65  (
66  new volScalarField
67  (
68  IOobject
69  (
70  "hs(" + T.name() + ")",
71  time().timeName(),
72  regionMesh(),
75  ),
76  Cp_*(T - (dimensionedScalar("Tstd", dimTemperature, 298.15))),
77  zeroGradientFvPatchScalarField::typeName
78  )
79  );
80 }
81 
82 
84 (
85  const volScalarField& hs
86 ) const
87 {
89  (
90  new volScalarField
91  (
92  IOobject
93  (
94  "T(" + hs.name() + ")",
95  time().timeName(),
96  regionMesh(),
99  ),
100  hs/Cp_ + dimensionedScalar("Tstd", dimTemperature, 298.15),
101  zeroGradientFvPatchScalarField::typeName
102  )
103  );
104 
105  tT().min(Tmax_);
106  tT().max(Tmin_);
107 
108  return tT;
109 }
110 
111 
113 {
114  return hsSp_;
115 }
116 
117 
119 {
120  return hsSpPrimary_;
121 }
122 
123 
125 {
126  return TPrimary_;
127 }
128 
129 
131 {
132  return YPrimary_;
133 }
134 
135 
137 {
138  return htcs_();
139 }
140 
141 
143 {
144  return htcw_();
145 }
146 
147 
149 {
150  return phaseChange_();
151 }
152 
153 
155 {
156  return radiation_();
157 }
158 
159 
161 {
162  const scalarField htc(htcw_->h()().boundaryField()[patchI]);
163  const scalarField& Tp = T_.boundaryField()[patchI];
164  const scalarField& Twp = Tw_.boundaryField()[patchI];
165 
166  return htc*(Tp - Twp);
167 }
168 
169 
171 {
172  const scalarField htc(htcs_->h()().boundaryField()[patchI]);
173  const scalarField& Tp = T_.boundaryField()[patchI];
174  const scalarField& Tpp = TPrimary_.boundaryField()[patchI];
175 
176  return htc*(Tp - Tpp);
177 }
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace surfaceFilmModels
183 } // End namespace regionModels
184 } // End namespace Foam
185 
186 // ************************************************************************* //
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::Tw_
volScalarField Tw_
Temperature - wall / [K].
Definition: thermoSingleLayer.H:106
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::hs
virtual const volScalarField & hs() const
Return the film sensible enthalpy [J/kg].
Definition: thermoSingleLayer.C:725
Foam::regionModels::surfaceFilmModels::heatTransferModel
Definition: heatTransferModel.H:54
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::YPrimary
const PtrList< volScalarField > & YPrimary() const
Specie mass fractions / [0-1].
Definition: thermoSingleLayerI.H:130
Foam::SLGThermo
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: SLGThermo.H:62
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::htcs_
autoPtr< heatTransferModel > htcs_
Heat transfer coefficient bewteen film surface and primary.
Definition: thermoSingleLayer.H:173
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::htcs
const heatTransferModel & htcs() const
Return const access to the (surface) heat transfer model.
Definition: thermoSingleLayerI.H:136
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::thermo
const SLGThermo & thermo() const
Return const reference to the SLGThermo object.
Definition: thermoSingleLayerI.H:42
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::phaseChange_
autoPtr< phaseChangeModel > phaseChange_
Phase change.
Definition: thermoSingleLayer.H:179
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::T_
volScalarField T_
Temperature - mean / [K].
Definition: thermoSingleLayer.H:100
Foam::IOobject::NO_WRITE
@ NO_WRITE
Definition: IOobject.H:118
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::radiation
const filmRadiationModel & radiation() const
Return const access to the radiation model.
Definition: thermoSingleLayerI.H:154
thermoSingleLayer.H
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::hsSp_
volScalarField hsSp_
Energy / [J/m2/s].
Definition: thermoSingleLayer.H:146
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::IOobject::NO_READ
@ NO_READ
Definition: IOobject.H:111
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::thermo_
const SLGThermo & thermo_
Reference to the SLGThermo.
Definition: thermoSingleLayer.H:88
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::Qconvp
tmp< scalarField > Qconvp(const label patchI) const
Return the convective heat energy from primary region to film.
Definition: thermoSingleLayerI.H:170
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::T
virtual const volScalarField & T() const
Return the film mean temperature [K].
Definition: thermoSingleLayer.C:707
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::YPrimary_
PtrList< volScalarField > YPrimary_
List of specie mass fractions / [0-1].
Definition: thermoSingleLayer.H:163
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::TPrimary_
volScalarField TPrimary_
Temperature / [K].
Definition: thermoSingleLayer.H:160
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::hsSp
const volScalarField & hsSp() const
Energy / [J/m2/s].
Definition: thermoSingleLayerI.H:112
filmRadiationModel.H
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::hsSpPrimary_
volScalarField hsSpPrimary_
Energy / [J/m2/s].
Definition: thermoSingleLayer.H:153
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::hsSpPrimary
const volScalarField & hsSpPrimary() const
Energy / [J/m2/s].
Definition: thermoSingleLayerI.H:118
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::phaseChange
const phaseChangeModel & phaseChange() const
Return const access to the phase change model.
Definition: thermoSingleLayerI.H:148
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::htcw
const heatTransferModel & htcw() const
Return const access to the (wall) heat transfer model.
Definition: thermoSingleLayerI.H:142
timeName
word timeName
Definition: getTimeIndex.H:3
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::radiation_
autoPtr< filmRadiationModel > radiation_
Radiation.
Definition: thermoSingleLayer.H:182
Foam::dimTemperature
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Definition: dimensionSets.H:52
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::TPrimary
const volScalarField & TPrimary() const
Temperature / [K].
Definition: thermoSingleLayerI.H:124
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::htcw_
autoPtr< heatTransferModel > htcw_
Heat transfer coefficient bewteen wall and film [W/m2/K].
Definition: thermoSingleLayer.H:176
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::regionModels::surfaceFilmModels::filmRadiationModel
Definition: filmRadiationModel.H:54
Foam::regionModels::surfaceFilmModels::thermoSingleLayer::Qconvw
tmp< scalarField > Qconvw(const label patchI) const
Return the convective heat energy from film to wall.
Definition: thermoSingleLayerI.H:160
phaseChangeModel.H
Foam::regionModels::surfaceFilmModels::phaseChangeModel
Definition: phaseChangeModel.H:55