filmPyrolysisVelocityCoupledFvPatchVectorField.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::filmPyrolysisVelocityCoupledFvPatchVectorField
28 
29 Description
30  This boundary condition is designed to be used in conjunction with surface
31  film and pyrolysis modelling.
32 
33  It provides a velocity boundary condition for patches on the primary region
34  based on whether the patch is seen to be 'wet', retrieved from the film
35  alpha field.
36  - if the patch is wet, the velocity is set using the film velocity
37  - otherwise, it is set using pyrolysis out-gassing velocity
38 
39  Example of the boundary condition specification:
40  \verbatim
41  <patchName>
42  {
43  type filmPyrolysisVelocityCoupled;
44  phi phi; // name of flux field (default = phi)
45  rho rho; // name of density field (default = rho)
46  deltaWet 1e-4; // threshold height for 'wet' film
47  value uniform (0 0 0); // initial velocity / [m/s]
48  }
49  \endverbatim
50 
51 SourceFiles
52  filmPyrolysisVelocityCoupledFvPatchVectorField.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef filmPyrolysisVelocityCoupledFvPatchVectorField_H
57 #define filmPyrolysisVelocityCoupledFvPatchVectorField_H
58 
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class filmPyrolysisVelocityCoupledFvPatchVectorField Declaration
68 \*---------------------------------------------------------------------------*/
69 
71 :
72  public fixedValueFvPatchVectorField
73 {
74  // Private data
75 
76  //- Name of film region
77  word filmRegionName_;
78 
79  //- Name of pyrolysis region
80  word pyrolysisRegionName_;
81 
82  //- Name of flux field
83  word phiName_;
84 
85  //- Name of density field
86  word rhoName_;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("filmPyrolysisVelocityCoupled");
93 
94 
95  // Constructors
96 
97  //- Construct from patch and internal field
99  (
100  const fvPatch&,
102  );
103 
104  //- Construct from patch, internal field and dictionary
106  (
107  const fvPatch&,
109  const dictionary&
110  );
111 
112  //- Construct by mapping given
113  // filmPyrolysisVelocityCoupledFvPatchVectorField onto a new patch
115  (
117  const fvPatch&,
119  const fvPatchFieldMapper&
120  );
121 
122  //- Construct as copy
124  (
126  );
127 
128  //- Construct and return a clone
129  virtual tmp<fvPatchVectorField> clone() const
130  {
132  (
134  );
135  }
136 
137  //- Construct as copy setting internal field reference
139  (
142  );
143 
144  //- Construct and return a clone setting internal field reference
146  (
148  ) const
149  {
151  (
153  );
154  }
155 
156 
157  // Member functions
158 
159  // Access
160 
161  //- Return the name of phi
162  const word& phiName() const
163  {
164  return phiName_;
165  }
166 
167  //- Return reference to the name of phi to allow adjustment
168  word& phiName()
169  {
170  return phiName_;
171  }
172 
173  //- Return the name of rho
174  const word& rhoName() const
175  {
176  return rhoName_;
177  }
178 
179  //- Return reference to the name of rho to allow adjustment
180  word& rhoName()
181  {
182  return rhoName_;
183  }
184 
185 
186  //- Update the coefficients associated with the patch field
187  virtual void updateCoeffs();
188 
189  //- Write
190  virtual void write(Ostream&) const;
191 };
192 
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.C:213
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:128
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField
This boundary condition is designed to be used in conjunction with surface film and pyrolysis modelli...
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:69
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::phiName
const word & phiName() const
Return the name of phi.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:161
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::filmPyrolysisVelocityCoupledFvPatchVectorField
filmPyrolysisVelocityCoupledFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.C:39
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fixedValueFvPatchFields.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::rhoName
const word & rhoName() const
Return the name of rho.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:173
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.C:122
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::phiName
word & phiName()
Return reference to the name of phi to allow adjustment.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:167
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::rhoName
word & rhoName()
Return reference to the name of rho to allow adjustment.
Definition: filmPyrolysisVelocityCoupledFvPatchVectorField.H:179
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::TypeName
TypeName("filmPyrolysisVelocityCoupled")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54