Fix tutorials: coupled/conjugateHeatFoam/conjugateCavity: fix Allrun file
[OpenFOAM-1.6-ext.git] / src / finiteVolume / fields / fvPatchFields / derived / pressureInletVelocity / pressureInletVelocityFvPatchVectorField.H
blob7ac8a061b838b4c2b225f42450e8c44bbaef3920
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::pressureInletVelocityFvPatchVectorField
28 Description
29     Velocity inlet boundary condition for patches where the pressure is
30     specified. The inflow velocity is obtained from the flux with a direction
31     normal to the patch faces.  If reverse flow is possible or expected use
32     the "pressureInletOutletVelocityFvPatchVectorField" BC instead.
34 SourceFiles
35     pressureInletVelocityFvPatchVectorField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef pressureInletVelocityFvPatchVectorField_H
40 #define pressureInletVelocityFvPatchVectorField_H
42 #include "fvPatchFields.H"
43 #include "fixedValueFvPatchFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 namespace Foam
50 /*---------------------------------------------------------------------------*\
51                  Class pressureInletVelocityFvPatch Declaration
52 \*---------------------------------------------------------------------------*/
54 class pressureInletVelocityFvPatchVectorField
56     public fixedValueFvPatchVectorField
58     // Private data
60         word phiName_;
61         word rhoName_;
64 public:
66     //- Runtime type information
67     TypeName("pressureInletVelocity");
70     // Constructors
72         //- Construct from patch and internal field
73         pressureInletVelocityFvPatchVectorField
74         (
75             const fvPatch&,
76             const DimensionedField<vector, volMesh>&
77         );
79         //- Construct from patch, internal field and dictionary
80         pressureInletVelocityFvPatchVectorField
81         (
82             const fvPatch&,
83             const DimensionedField<vector, volMesh>&,
84             const dictionary&
85         );
87         //- Construct by mapping given pressureInletVelocityFvPatchVectorField
88         //  onto a new patch
89         pressureInletVelocityFvPatchVectorField
90         (
91             const pressureInletVelocityFvPatchVectorField&,
92             const fvPatch&,
93             const DimensionedField<vector, volMesh>&,
94             const fvPatchFieldMapper&
95         );
97         //- Construct as copy
98         pressureInletVelocityFvPatchVectorField
99         (
100             const pressureInletVelocityFvPatchVectorField&
101         );
103         //- Construct and return a clone
104         virtual tmp<fvPatchVectorField> clone() const
105         {
106             return tmp<fvPatchVectorField>
107             (
108                 new pressureInletVelocityFvPatchVectorField(*this)
109             );
110         }
112         //- Construct as copy setting internal field reference
113         pressureInletVelocityFvPatchVectorField
114         (
115             const pressureInletVelocityFvPatchVectorField&,
116             const DimensionedField<vector, volMesh>&
117         );
119         //- Construct and return a clone setting internal field reference
120         virtual tmp<fvPatchVectorField> clone
121         (
122             const DimensionedField<vector, volMesh>& iF
123         ) const
124         {
125             return tmp<fvPatchVectorField>
126             (
127                 new pressureInletVelocityFvPatchVectorField(*this, iF)
128             );
129         }
132     // Member functions
134         // Access
136             //- Return the name of rho
137             const word& rhoName() const
138             {
139                 return rhoName_;
140             }
142             //- Return reference to the name of rho to allow adjustment
143             word& rhoName()
144             {
145                 return rhoName_;
146             }
148             //- Return the name of phi
149             const word& phiName() const
150             {
151                 return phiName_;
152             }
154             //- Return reference to the name of phi to allow adjustment
155             word& phiName()
156             {
157                 return phiName_;
158             }
161         //- Update the coefficients associated with the patch field
162         virtual void updateCoeffs();
164         //- Write
165         virtual void write(Ostream&) const;
168     // Member operators
170         virtual void operator=(const fvPatchField<vector>& pvf);
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #endif
182 // ************************************************************************* //