Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / regionModels / surfaceFilmModels / derivedFvPatchFields / filmHeightInletVelocity / filmHeightInletVelocityFvPatchVectorField.H
blobf13cd133c958e9e3efdb726b444b614979c55192
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2010-2011 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::filmHeightInletVelocityFvPatchVectorField
27 Description
28     Velocity inlet boundary condition for patches where the film height is
29     specified. The inflow velocity is obtained from the flux with a direction
30     normal to the patch faces.
32 SourceFiles
33     filmHeightInletVelocityFvPatchVectorField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef filmHeightInletVelocityFvPatchVectorField_H
38 #define filmHeightInletVelocityFvPatchVectorField_H
40 #include "fvPatchFields.H"
41 #include "fixedValueFvPatchFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49          Class filmHeightInletVelocityFvPatchVectorField Declaration
50 \*---------------------------------------------------------------------------*/
52 class filmHeightInletVelocityFvPatchVectorField
54     public fixedValueFvPatchVectorField
56     // Private data
58         //- Name of flux field
59         word phiName_;
61         //- Name of density field
62         word rhoName_;
64         //- Name of film height field
65         word deltafName_;
68 public:
70     //- Runtime type information
71     TypeName("filmHeightInletVelocity");
74     // Constructors
76         //- Construct from patch and internal field
77         filmHeightInletVelocityFvPatchVectorField
78         (
79             const fvPatch&,
80             const DimensionedField<vector, volMesh>&
81         );
83         //- Construct from patch, internal field and dictionary
84         filmHeightInletVelocityFvPatchVectorField
85         (
86             const fvPatch&,
87             const DimensionedField<vector, volMesh>&,
88             const dictionary&
89         );
91         //- Construct by mapping given filmHeightInletVelocityFvPatchVectorField
92         //  onto a new patch
93         filmHeightInletVelocityFvPatchVectorField
94         (
95             const filmHeightInletVelocityFvPatchVectorField&,
96             const fvPatch&,
97             const DimensionedField<vector, volMesh>&,
98             const fvPatchFieldMapper&
99         );
101         //- Construct as copy
102         filmHeightInletVelocityFvPatchVectorField
103         (
104             const filmHeightInletVelocityFvPatchVectorField&
105         );
107         //- Construct and return a clone
108         virtual tmp<fvPatchVectorField> clone() const
109         {
110             return tmp<fvPatchVectorField>
111             (
112                 new filmHeightInletVelocityFvPatchVectorField(*this)
113             );
114         }
116         //- Construct as copy setting internal field reference
117         filmHeightInletVelocityFvPatchVectorField
118         (
119             const filmHeightInletVelocityFvPatchVectorField&,
120             const DimensionedField<vector, volMesh>&
121         );
123         //- Construct and return a clone setting internal field reference
124         virtual tmp<fvPatchVectorField> clone
125         (
126             const DimensionedField<vector, volMesh>& iF
127         ) const
128         {
129             return tmp<fvPatchVectorField>
130             (
131                 new filmHeightInletVelocityFvPatchVectorField(*this, iF)
132             );
133         }
136     // Member functions
138         // Access
140             //- Return the name of phi
141             const word& phiName() const
142             {
143                 return phiName_;
144             }
146             //- Return reference to the name of phi to allow adjustment
147             word& phiName()
148             {
149                 return phiName_;
150             }
152             //- Return the name of rho
153             const word& rhoName() const
154             {
155                 return rhoName_;
156             }
158             //- Return reference to the name of rho to allow adjustment
159             word& rhoName()
160             {
161                 return rhoName_;
162             }
164             //- Return the name of deltaf
165             const word& deltafName() const
166             {
167                 return deltafName_;
168             }
170             //- Return reference to the name of df to allow adjustment
171             word& deltafName()
172             {
173                 return deltafName_;
174             }
177         //- Update the coefficients associated with the patch field
178         virtual void updateCoeffs();
180         //- Write
181         virtual void write(Ostream&) const;
184     // Member operators
186         virtual void operator=(const fvPatchField<vector>& pvf);
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 #endif
198 // ************************************************************************* //