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