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/>.
25 Foam::SRFVelocityFvPatchVectorField
28 Velocity patch to be used with SRF model
31 SRFVelocityFvPatchVectorField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef SRFVelocityFvPatchVectorField_H
36 #define SRFVelocityFvPatchVectorField_H
38 #include "fvPatchFields.H"
39 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class SRFVelocityFvPatchVectorField Declaration
49 \*---------------------------------------------------------------------------*/
51 class SRFVelocityFvPatchVectorField
53 public fixedValueFvPatchVectorField
57 //- Is the supplied inlet value relative to the SRF
61 vectorField inletValue_;
66 //- Runtime type information
67 TypeName("SRFVelocity");
72 //- Construct from patch and internal field
73 SRFVelocityFvPatchVectorField
76 const DimensionedField<vector, volMesh>&
79 //- Construct from patch, internal field and dictionary
80 SRFVelocityFvPatchVectorField
83 const DimensionedField<vector, volMesh>&,
87 //- Construct by mapping given SRFVelocityFvPatchVectorField
89 SRFVelocityFvPatchVectorField
91 const SRFVelocityFvPatchVectorField&,
93 const DimensionedField<vector, volMesh>&,
94 const fvPatchFieldMapper&
98 SRFVelocityFvPatchVectorField
100 const SRFVelocityFvPatchVectorField&
103 //- Construct and return a clone
104 virtual tmp<fvPatchVectorField> clone() const
106 return tmp<fvPatchVectorField>
108 new SRFVelocityFvPatchVectorField(*this)
112 //- Construct as copy setting internal field reference
113 SRFVelocityFvPatchVectorField
115 const SRFVelocityFvPatchVectorField&,
116 const DimensionedField<vector, volMesh>&
119 //- Construct and return a clone setting internal field reference
120 virtual tmp<fvPatchVectorField> clone
122 const DimensionedField<vector, volMesh>& iF
125 return tmp<fvPatchVectorField>
127 new SRFVelocityFvPatchVectorField(*this, iF)
136 //- Return const access to the relative flag
137 const Switch& relative() const
145 //- Map (and resize as needed) from self given a mapping object
148 const fvPatchFieldMapper&
151 //- Reverse map the given fvPatchField onto this fvPatchField
154 const fvPatchVectorField&,
159 // Evaluation functions
161 //- Update the coefficients associated with the patch field
162 virtual void updateCoeffs();
168 virtual void write(Ostream&) const;
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 // ************************************************************************* //