1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
33 \*---------------------------------------------------------------------------*/
35 #ifndef fanFvPatchField_H
36 #define fanFvPatchField_H
38 #include "jumpCyclicFvPatchField.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class fanFvPatchField Declaration
47 \*---------------------------------------------------------------------------*/
52 public jumpCyclicFvPatchField<Type>
56 //- Fan pressure rise polynomial coefficients
65 //- Runtime type information
71 //- Construct from patch and internal field
75 const DimensionedField<Type, volMesh>&
78 //- Construct from patch, internal field and dictionary
82 const DimensionedField<Type, volMesh>&,
86 //- Construct by mapping given fanFvPatchField onto a new patch
89 const fanFvPatchField<Type>&,
91 const DimensionedField<Type, volMesh>&,
92 const fvPatchFieldMapper&
98 const fanFvPatchField<Type>&
101 //- Construct and return a clone
102 virtual tmp<fvPatchField<Type> > clone() const
104 return tmp<fvPatchField<Type> >
106 new fanFvPatchField<Type>(*this)
110 //- Construct as copy setting internal field reference
113 const fanFvPatchField<Type>&,
114 const DimensionedField<Type, volMesh>&
117 //- Construct and return a clone setting internal field reference
118 virtual tmp<fvPatchField<Type> > clone
120 const DimensionedField<Type, volMesh>& iF
123 return tmp<fvPatchField<Type> >
125 new fanFvPatchField<Type>(*this, iF)
134 //- Return the polynomial coefficients
135 const List<scalar>& f() const
140 //- Return the "jump" across the patch.
141 virtual tmp<Field<Type> > jump() const
143 if (this->cyclicPatch().owner())
149 return refCast<const fanFvPatchField<Type> >
151 this->neighbourPatchField()
159 //- Map (and resize as needed) from self given a mapping object
162 const fvPatchFieldMapper&
165 //- Reverse map the given fvPatchField onto this fvPatchField
168 const fvPatchField<Type>&,
172 // Evaluation functions
174 //- Update the coefficients associated with the patch field
175 virtual void updateCoeffs();
179 virtual void write(Ostream&) const;
183 //- Specialisation of the jump-condition for the pressure
185 void fanFvPatchField<scalar>::updateCoeffs();
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 } // End namespace Foam
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 # include "fanFvPatchField.C"
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 // ************************************************************************* //