FreeFOAM The Cross-Platform CFD Toolkit
timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField.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) 1991-2010 OpenCFD Ltd.
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::timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField
26 
27 Description
28  Velocity inlet boundary condition for patches where the pressure is
29  specified. The inflow velocity is obtained from the flux with the
30  "inletDirection" direction mapped from a time/space-varying table.
31 
32 SourceFiles
33  timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField_H
38 #define timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class timeVaryingMappedPressureDirectedInletVelocityFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public timeVaryingMappedFixedValueFvPatchVectorField
54 {
55  // Private data
56 
57  word phiName_;
58  word rhoName_;
59 
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("timeVaryingMappedPressureDirectedInletVelocity");
65 
66 
67  // Constructors
68 
69  //- Construct from patch and internal field
71  (
72  const fvPatch&,
74  );
75 
76  //- Construct from patch, internal field and dictionary
78  (
79  const fvPatch&,
81  const dictionary&
82  );
83 
84  //- Construct by mapping given
85  // timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField
86  // onto a new patch
88  (
90  const fvPatch&,
92  const fvPatchFieldMapper&
93  );
94 
95  //- Construct as copy
97  (
99  );
100 
101  //- Construct and return a clone
103  {
105  (
106  new
108  (
109  *this
110  )
111  );
112  }
113 
114  //- Construct as copy setting internal field reference
116  (
119  );
120 
121  //- Construct and return a clone setting internal field reference
123  (
125  ) const
126  {
128  (
129  new
131  (
132  *this,
133  iF
134  )
135  );
136  }
137 
138 
139  // Member functions
140 
141  // Access
142 
143  //- Return the name of rho
144  const word& rhoName() const
145  {
146  return rhoName_;
147  }
148 
149  //- Return reference to the name of rho to allow adjustment
151  {
152  return rhoName_;
153  }
154 
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
163  {
164  return phiName_;
165  }
166 
167 
168  // Mapping functions
169 
170  //- Map (and resize as needed) from self given a mapping object
171  virtual void autoMap
172  (
173  const fvPatchFieldMapper&
174  );
175 
176  //- Reverse map the given fvPatchField onto this fvPatchField
177  virtual void rmap
178  (
179  const fvPatchVectorField&,
180  const labelList&
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 // ************************ vim: set sw=4 sts=4 et: ************************ //