initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / fields / fvPatchFields / derived / fixedPressureCompressibleDensity / fixedPressureCompressibleDensityFvPatchScalarField.H
blobfbd2616aab6de5791a513df45ffd4e72eef858cd
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 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::fixedPressureCompressibleDensityFvPatchScalarField
28 Description
29     Calculate compressible density as a function of pressure and fluid
30     properties.
32     Example of the boundary condition specification:
33     @verbatim
34         inlet
35         {
36             type        fixedPressureCompressibleDensity;
37             p           p;               // Name of static pressure field
38             value       uniform 1;       // Initial value
39         }
40     @endverbatim
42 SourceFiles
43     fixedPressureCompressibleDensityFvPatchScalarField.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
48 #define fixedPressureCompressibleDensityFvPatchScalarField_H
50 #include "fixedValueFvPatchFields.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 namespace Foam
57 /*---------------------------------------------------------------------------*\
58       Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
59 \*---------------------------------------------------------------------------*/
61 class fixedPressureCompressibleDensityFvPatchScalarField
63     public fixedValueFvPatchScalarField
65     // Private data
67         //- Name of static pressure field
68         word pName_;
71 public:
73     //- Runtime type information
74     TypeName("fixedPressureCompressibleDensity");
77     // Constructors
79         //- Construct from patch and internal field
80         fixedPressureCompressibleDensityFvPatchScalarField
81         (
82             const fvPatch&,
83             const DimensionedField<scalar, volMesh>&
84         );
86         //- Construct from patch, internal field and dictionary
87         fixedPressureCompressibleDensityFvPatchScalarField
88         (
89             const fvPatch&,
90             const DimensionedField<scalar, volMesh>&,
91             const dictionary&
92         );
94         //- Construct by mapping given
95         //  fixedPressureCompressibleDensityFvPatchScalarField
96         //  onto a new patch
97         fixedPressureCompressibleDensityFvPatchScalarField
98         (
99             const fixedPressureCompressibleDensityFvPatchScalarField&,
100             const fvPatch&,
101             const DimensionedField<scalar, volMesh>&,
102             const fvPatchFieldMapper&
103         );
105         //- Construct as copy
106         fixedPressureCompressibleDensityFvPatchScalarField
107         (
108             const fixedPressureCompressibleDensityFvPatchScalarField&
109         );
111         //- Construct and return a clone
112         virtual tmp<fvPatchScalarField> clone() const
113         {
114             return tmp<fvPatchScalarField>
115             (
116                 new fixedPressureCompressibleDensityFvPatchScalarField(*this)
117             );
118         }
120         //- Construct as copy setting internal field reference
121         fixedPressureCompressibleDensityFvPatchScalarField
122         (
123             const fixedPressureCompressibleDensityFvPatchScalarField&,
124             const DimensionedField<scalar, volMesh>&
125         );
127         //- Construct and return a clone setting internal field reference
128         virtual tmp<fvPatchScalarField> clone
129         (
130             const DimensionedField<scalar, volMesh>& iF
131         ) const
132         {
133             return tmp<fvPatchScalarField>
134             (
135                 new fixedPressureCompressibleDensityFvPatchScalarField
136                 (
137                     *this,
138                     iF
139                 )
140             );
141         }
144     // Member functions
146         //- Update the coefficients associated with the patch field
147         virtual void updateCoeffs();
149         //- Write
150         virtual void write(Ostream&) const;
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #endif
162 // ************************************************************************* //