filmPyrolysisTemperatureCoupledFvPatchScalarField.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField
28 
29 Description
30  This boundary condition is designed to be used in conjunction with surface
31  film and pyrolysis modelling. It provides a temperature boundary condition
32  for patches on the primary region based on whether the patch is seen to
33  be 'wet', retrieved from the film alpha field.
34 
35  - if the patch is wet, the temperature is set using the film temperature
36  - otherwise, it is set using pyrolysis temperature
37 
38  Example of the boundary condition specification:
39  \verbatim
40  <patchName>
41  {
42  type filmPyrolysisTemperatureCoupled;
43  phi phi; // name of flux field (default = phi)
44  rho rho; // name of density field (default = rho)
45  deltaWet 1e-4; // threshold height for 'wet' film
46  value uniform 300; // initial temperature / [K]
47  }
48  \endverbatim
49 
50 SourceFiles
51  filmPyrolysisTemperatureCoupledFvPatchScalarField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef filmPyrolysisTemperatureCoupledFvPatchScalarField_H
56 #define filmPyrolysisTemperatureCoupledFvPatchScalarField_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class filmPyrolysisTemperatureCoupledFvPatchScalarField Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
71  public fixedValueFvPatchScalarField
72 {
73  // Private data
74 
75  //- Name of film region
76  const word filmRegionName_;
77 
78  //- Name of pyrolysis region
79  const word pyrolysisRegionName_;
80 
81  //- Name of flux field
82  word phiName_;
83 
84  //- Name of density field
85  word rhoName_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("filmPyrolysisTemperatureCoupled");
92 
93 
94  // Constructors
95 
96  //- Construct from patch and internal field
98  (
99  const fvPatch&,
101  );
102 
103  //- Construct from patch, internal field and dictionary
105  (
106  const fvPatch&,
108  const dictionary&
109  );
110 
111  //- Construct by mapping given
112  // filmPyrolysisTemperatureCoupledFvPatchScalarField onto a new patch
114  (
116  const fvPatch&,
118  const fvPatchFieldMapper&
119  );
120 
121  //- Construct as copy
123  (
125  );
126 
127  //- Construct and return a clone
128  virtual tmp<fvPatchScalarField> clone() const
129  {
131  (
133  );
134  }
135 
136  //- Construct as copy setting internal field reference
138  (
141  );
142 
143  //- Construct and return a clone setting internal field reference
145  (
147  ) const
148  {
150  (
152  );
153  }
154 
155 
156  // Member functions
157 
158  // Access
159 
160  //- Return the name of phi
161  const word& phiName() const
162  {
163  return phiName_;
164  }
166  //- Return reference to the name of phi to allow adjustment
167  word& phiName()
168  {
169  return phiName_;
170  }
171 
172  //- Return the name of rho
173  const word& rhoName() const
174  {
175  return rhoName_;
176  }
177 
178  //- Return reference to the name of rho to allow adjustment
179  word& rhoName()
180  {
181  return rhoName_;
182  }
184 
185  //- Update the coefficients associated with the patch field
186  virtual void updateCoeffs();
187 
188  //- Write
189  virtual void write(Ostream&) const;
190 };
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace Foam
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
filmPyrolysisTemperatureCoupledFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
TypeName("filmPyrolysisTemperatureCoupled")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:63
A FieldMapper for finite-volume patch fields.
This boundary condition is designed to be used in conjunction with surface film and pyrolysis modelli...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Namespace for OpenFOAM.