Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / finiteVolume / fields / fvPatchFields / derived / fixedFluxPressure / fixedFluxPressureFvPatchScalarField.H
blobc618083d9cb9b29596972ef34f3e0a35431dafc9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::fixedFluxPressureFvPatchScalarField
27 Description
28     Foam::fixedFluxPressureFvPatchScalarField
30 SourceFiles
31     fixedFluxPressureFvPatchScalarField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef fixedFluxPressureFvPatchScalarFields_H
36 #define fixedFluxPressureFvPatchScalarFields_H
38 #include "fvPatchFields.H"
39 #include "fixedGradientFvPatchFields.H"
40 #include "Switch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                    Class fixedFluxPressureFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class fixedFluxPressureFvPatchScalarField
53     public fixedGradientFvPatchScalarField
55     // Private data
57         //- Name of the velocity field
58         word UName_;
60         //- Name of the flux transporting the field
61         word phiName_;
63         //- Name of the density field used to normalise the mass flux
64         //  if neccessary
65         word rhoName_;
67         //- Name of the pressure diffusivity factor
68         word rAUName_;
70         //- Is the pressure adjoint, i.e. has the opposite sign
71         Switch adjoint_;
74 public:
76     //- Runtime type information
77     TypeName("fixedFluxPressure");
80     // Constructors
82         //- Construct from patch and internal field
83         fixedFluxPressureFvPatchScalarField
84         (
85             const fvPatch&,
86             const DimensionedField<scalar, volMesh>&
87         );
89         //- Construct from patch, internal field and dictionary
90         fixedFluxPressureFvPatchScalarField
91         (
92             const fvPatch&,
93             const DimensionedField<scalar, volMesh>&,
94             const dictionary&
95         );
97         //- Construct by mapping given fixedFluxPressureFvPatchScalarField onto
98         //  a new patch
99         fixedFluxPressureFvPatchScalarField
100         (
101             const fixedFluxPressureFvPatchScalarField&,
102             const fvPatch&,
103             const DimensionedField<scalar, volMesh>&,
104             const fvPatchFieldMapper&
105         );
107         //- Construct as copy
108         fixedFluxPressureFvPatchScalarField
109         (
110             const fixedFluxPressureFvPatchScalarField&
111         );
113         //- Construct and return a clone
114         virtual tmp<fvPatchScalarField> clone() const
115         {
116             return tmp<fvPatchScalarField>
117             (
118                 new fixedFluxPressureFvPatchScalarField(*this)
119             );
120         }
122         //- Construct as copy setting internal field reference
123         fixedFluxPressureFvPatchScalarField
124         (
125             const fixedFluxPressureFvPatchScalarField&,
126             const DimensionedField<scalar, volMesh>&
127         );
129         //- Construct and return a clone setting internal field reference
130         virtual tmp<fvPatchScalarField> clone
131         (
132             const DimensionedField<scalar, volMesh>& iF
133         ) const
134         {
135             return tmp<fvPatchScalarField>
136             (
137                 new fixedFluxPressureFvPatchScalarField(*this, iF)
138             );
139         }
142     // Member functions
144         //- Update the coefficients associated with the patch field
145         virtual void updateCoeffs();
147         //- Write
148         virtual void write(Ostream&) const;
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 #endif
160 // ************************************************************************* //