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 as copy setting internal field reference
130  (
133  );
134 
135  //- Return a clone
136  virtual tmp<fvPatchField<vector>> clone() const
137  {
138  return fvPatchField<vector>::Clone(*this);
139  }
140 
141  //- Clone with an internal field reference
143  (
145  ) const
146  {
147  return fvPatchField<vector>::Clone(*this, iF);
148  }
149 
150 
151  // Member functions
152 
153  // Access
155  //- Return the name of phi
156  const word& phiName() const
157  {
158  return phiName_;
159  }
160 
161  //- Return reference to the name of phi to allow adjustment
162  word& phiName()
163  {
164  return phiName_;
165  }
166 
167  //- Return the name of rho
168  const word& rhoName() const
169  {
170  return rhoName_;
171  }
172 
173  //- Return reference to the name of rho to allow adjustment
174  word& rhoName()
175  {
176  return rhoName_;
177  }
179 
180  //- Update the coefficients associated with the patch field
181  virtual void updateCoeffs();
182 
183  //- Write
184  virtual void write(Ostream&) const;
185 };
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
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 a number of values (eg...
Definition: dictionary.H:129
TypeName("filmPyrolysisVelocityCoupled")
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
A class for handling words, derived from Foam::string.
Definition: word.H:63
A FieldMapper for finite-volume patch fields.
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:56
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...
virtual tmp< fvPatchField< vector > > clone() const
Return a clone.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.