FreeFOAM The Cross-Platform CFD Toolkit
fixedFluxPressureFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::fixedFluxPressureFvPatchScalarField
26 
27 Description
28  Foam::fixedFluxPressureFvPatchScalarField
29 
30 SourceFiles
31  fixedFluxPressureFvPatchScalarField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fixedFluxPressureFvPatchScalarFields_H
36 #define fixedFluxPressureFvPatchScalarFields_H
37 
40 #include <OpenFOAM/Switch.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class fixedFluxPressureFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public fixedGradientFvPatchScalarField
54 {
55  // Private data
56 
57  //- Name of the velocity field
58  word UName_;
59 
60  //- Name of the flux transporting the field
61  word phiName_;
62 
63  //- Name of the density field used to normalise the mass flux
64  // if neccessary
65  word rhoName_;
66 
67  //- Is the pressure adjoint, i.e. has the opposite sign
68  Switch adjoint_;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("fixedFluxPressure");
75 
76 
77  // Constructors
78 
79  //- Construct from patch and internal field
81  (
82  const fvPatch&,
84  );
85 
86  //- Construct from patch, internal field and dictionary
88  (
89  const fvPatch&,
91  const dictionary&
92  );
93 
94  //- Construct by mapping given fixedFluxPressureFvPatchScalarField onto
95  // a new patch
97  (
99  const fvPatch&,
101  const fvPatchFieldMapper&
102  );
103 
104  //- Construct as copy
106  (
108  );
109 
110  //- Construct and return a clone
112  {
114  (
116  );
117  }
118 
119  //- Construct as copy setting internal field reference
121  (
124  );
125 
126  //- Construct and return a clone setting internal field reference
128  (
130  ) const
131  {
133  (
135  );
136  }
137 
138 
139  // Member functions
140 
141  //- Update the coefficients associated with the patch field
142  virtual void updateCoeffs();
143 
144  //- Write
145  virtual void write(Ostream&) const;
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************ vim: set sw=4 sts=4 et: ************************ //