OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

SRFVelocityFvPatchVectorField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::SRFVelocityFvPatchVectorField
00027 
00028 Description
00029     Velocity patch to be used with SRF model
00030 
00031 SourceFiles
00032     SRFVelocityFvPatchVectorField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef SRFVelocityFvPatchVectorField_H
00037 #define SRFVelocityFvPatchVectorField_H
00038 
00039 #include "fvPatchFields.H"
00040 #include "fixedValueFvPatchFields.H"
00041 #include "Switch.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                Class SRFVelocityFvPatchVectorField Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class SRFVelocityFvPatchVectorField
00053 :
00054     public fixedValueFvPatchVectorField
00055 {
00056     // Private data
00057 
00058         //- Is the supplied inlet value relative to the SRF
00059         Switch relative_;
00060 
00061         //- Inlet value
00062         vectorField inletValue_;
00063 
00064 
00065 public:
00066 
00067     //- Runtime type information
00068     TypeName("SRFVelocity");
00069 
00070 
00071     // Constructors
00072 
00073         //- Construct from patch and internal field
00074         SRFVelocityFvPatchVectorField
00075         (
00076             const fvPatch&,
00077             const DimensionedField<vector, volMesh>&
00078         );
00079 
00080         //- Construct from patch, internal field and dictionary
00081         SRFVelocityFvPatchVectorField
00082         (
00083             const fvPatch&,
00084             const DimensionedField<vector, volMesh>&,
00085             const dictionary&
00086         );
00087 
00088         //- Construct by mapping given SRFVelocityFvPatchVectorField
00089         //  onto a new patch
00090         SRFVelocityFvPatchVectorField
00091         (
00092             const SRFVelocityFvPatchVectorField&,
00093             const fvPatch&,
00094             const DimensionedField<vector, volMesh>&,
00095             const fvPatchFieldMapper&
00096         );
00097 
00098         //- Construct as copy
00099         SRFVelocityFvPatchVectorField
00100         (
00101             const SRFVelocityFvPatchVectorField&
00102         );
00103 
00104         //- Construct and return a clone
00105         virtual tmp<fvPatchVectorField> clone() const
00106         {
00107             return tmp<fvPatchVectorField>
00108             (
00109                 new SRFVelocityFvPatchVectorField(*this)
00110             );
00111         }
00112 
00113         //- Construct as copy setting internal field reference
00114         SRFVelocityFvPatchVectorField
00115         (
00116             const SRFVelocityFvPatchVectorField&,
00117             const DimensionedField<vector, volMesh>&
00118         );
00119 
00120         //- Construct and return a clone setting internal field reference
00121         virtual tmp<fvPatchVectorField> clone
00122         (
00123             const DimensionedField<vector, volMesh>& iF
00124         ) const
00125         {
00126             return tmp<fvPatchVectorField>
00127             (
00128                 new SRFVelocityFvPatchVectorField(*this, iF)
00129             );
00130         }
00131 
00132 
00133     // Member functions
00134 
00135         // Access
00136 
00137             //- Return const access to the relative flag
00138             const Switch& relative() const
00139             {
00140                 return relative_;
00141             }
00142 
00143 
00144         // Mapping functions
00145 
00146             //- Map (and resize as needed) from self given a mapping object
00147             virtual void autoMap
00148             (
00149                 const fvPatchFieldMapper&
00150             );
00151 
00152             //- Reverse map the given fvPatchField onto this fvPatchField
00153             virtual void rmap
00154             (
00155                 const fvPatchVectorField&,
00156                 const labelList&
00157             );
00158 
00159 
00160         // Evaluation functions
00161 
00162             //- Update the coefficients associated with the patch field
00163             virtual void updateCoeffs();
00164 
00165 
00166         // I-O
00167 
00168             //- Write
00169             virtual void write(Ostream&) const;
00170 };
00171 
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 } // End namespace Foam
00176 
00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00178 
00179 #endif
00180 
00181 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd