1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 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
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
26 Foam::fixedFluxPressureFvPatchScalarField
29 Foam::fixedFluxPressureFvPatchScalarField
32 fixedFluxPressureFvPatchScalarField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fixedFluxPressureFvPatchScalarFields_H
37 #define fixedFluxPressureFvPatchScalarFields_H
39 #include "fvPatchFields.H"
40 #include "fixedGradientFvPatchFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class fixedFluxPressureFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
52 class fixedFluxPressureFvPatchScalarField
54 public fixedGradientFvPatchScalarField
58 //- Name of the velocity field
61 //- Name of the flux transporting the field
64 //- Name of the density field used to normalise the mass flux
68 //- Is the pressure adjoint, i.e. has the opposite sign
74 //- Runtime type information
75 TypeName("fixedFluxPressure");
80 //- Construct from patch and internal field
81 fixedFluxPressureFvPatchScalarField
84 const DimensionedField<scalar, volMesh>&
87 //- Construct from patch, internal field and dictionary
88 fixedFluxPressureFvPatchScalarField
91 const DimensionedField<scalar, volMesh>&,
95 //- Construct by mapping given fixedFluxPressureFvPatchScalarField onto
97 fixedFluxPressureFvPatchScalarField
99 const fixedFluxPressureFvPatchScalarField&,
101 const DimensionedField<scalar, volMesh>&,
102 const fvPatchFieldMapper&
105 //- Construct as copy
106 fixedFluxPressureFvPatchScalarField
108 const fixedFluxPressureFvPatchScalarField&
111 //- Construct and return a clone
112 virtual tmp<fvPatchScalarField> clone() const
114 return tmp<fvPatchScalarField>
116 new fixedFluxPressureFvPatchScalarField(*this)
120 //- Construct as copy setting internal field reference
121 fixedFluxPressureFvPatchScalarField
123 const fixedFluxPressureFvPatchScalarField&,
124 const DimensionedField<scalar, volMesh>&
127 //- Construct and return a clone setting internal field reference
128 virtual tmp<fvPatchScalarField> clone
130 const DimensionedField<scalar, volMesh>& iF
133 return tmp<fvPatchScalarField>
135 new fixedFluxPressureFvPatchScalarField(*this, iF)
142 //- Update the coefficients associated with the patch field
143 virtual void updateCoeffs();
146 virtual void write(Ostream&) const;
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 // ************************************************************************* //