FreeFOAM The Cross-Platform CFD Toolkit
fanFvPatchField.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::fanFvPatchField
26 
27 Description
28  Foam::fanFvPatchField
29 
30 SourceFiles
31  fanFvPatchField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fanFvPatchField_H
36 #define fanFvPatchField_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class jumpCyclicFvPatch Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class Type>
51 :
52  public jumpCyclicFvPatchField<Type>
53 {
54  // Private data
55 
56  //- Fan pressure rise polynomial coefficients
57  List<scalar> f_;
58 
59  //- "jump" field
60  Field<Type> jump_;
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("fan");
67 
68 
69  // Constructors
70 
71  //- Construct from patch and internal field
73  (
74  const fvPatch&,
76  );
77 
78  //- Construct from patch, internal field and dictionary
80  (
81  const fvPatch&,
83  const dictionary&
84  );
85 
86  //- Construct by mapping given fanFvPatchField onto a new patch
88  (
89  const fanFvPatchField<Type>&,
90  const fvPatch&,
92  const fvPatchFieldMapper&
93  );
94 
95  //- Construct as copy
97  (
99  );
100 
101  //- Construct and return a clone
102  virtual tmp<fvPatchField<Type> > clone() const
103  {
104  return tmp<fvPatchField<Type> >
105  (
106  new fanFvPatchField<Type>(*this)
107  );
108  }
109 
110  //- Construct as copy setting internal field reference
112  (
113  const fanFvPatchField<Type>&,
115  );
116 
117  //- Construct and return a clone setting internal field reference
118  virtual tmp<fvPatchField<Type> > clone
119  (
121  ) const
122  {
123  return tmp<fvPatchField<Type> >
124  (
125  new fanFvPatchField<Type>(*this, iF)
126  );
127  }
128 
129 
130  // Member functions
131 
132  // Access
133 
134  //- Return the "jump" across the patch as a "half" field
135  virtual tmp<Field<Type> > jump() const
136  {
137  return jump_;
138  }
139 
140 
141  // Mapping functions
142 
143  //- Map (and resize as needed) from self given a mapping object
144  virtual void autoMap
145  (
146  const fvPatchFieldMapper&
147  );
148 
149  //- Reverse map the given fvPatchField onto this fvPatchField
150  virtual void rmap
151  (
152  const fvPatchField<Type>&,
153  const labelList&
154  );
155 
156  // Evaluation functions
157 
158  //- Update the coefficients associated with the patch field
159  virtual void updateCoeffs();
160 
161 
162  //- Write
163  virtual void write(Ostream&) const;
164 };
165 
166 
167 //- Specialisation of the jump-condition for the pressure
168 template<>
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #ifdef NoRepository
180 #endif
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************ vim: set sw=4 sts=4 et: ************************ //