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::fixedPressureCompressibleDensityFvPatchScalarField
29 Calculate compressible density as a function of pressure and fluid
32 Example of the boundary condition specification:
36 type fixedPressureCompressibleDensity;
37 p p; // Name of static pressure field
38 value uniform 1; // Initial value
43 fixedPressureCompressibleDensityFvPatchScalarField.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
48 #define fixedPressureCompressibleDensityFvPatchScalarField_H
50 #include "fixedValueFvPatchFields.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 /*---------------------------------------------------------------------------*\
58 Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
59 \*---------------------------------------------------------------------------*/
61 class fixedPressureCompressibleDensityFvPatchScalarField
63 public fixedValueFvPatchScalarField
67 //- Name of static pressure field
73 //- Runtime type information
74 TypeName("fixedPressureCompressibleDensity");
79 //- Construct from patch and internal field
80 fixedPressureCompressibleDensityFvPatchScalarField
83 const DimensionedField<scalar, volMesh>&
86 //- Construct from patch, internal field and dictionary
87 fixedPressureCompressibleDensityFvPatchScalarField
90 const DimensionedField<scalar, volMesh>&,
94 //- Construct by mapping given
95 // fixedPressureCompressibleDensityFvPatchScalarField
97 fixedPressureCompressibleDensityFvPatchScalarField
99 const fixedPressureCompressibleDensityFvPatchScalarField&,
101 const DimensionedField<scalar, volMesh>&,
102 const fvPatchFieldMapper&
105 //- Construct as copy
106 fixedPressureCompressibleDensityFvPatchScalarField
108 const fixedPressureCompressibleDensityFvPatchScalarField&
111 //- Construct and return a clone
112 virtual tmp<fvPatchScalarField> clone() const
114 return tmp<fvPatchScalarField>
116 new fixedPressureCompressibleDensityFvPatchScalarField(*this)
120 //- Construct as copy setting internal field reference
121 fixedPressureCompressibleDensityFvPatchScalarField
123 const fixedPressureCompressibleDensityFvPatchScalarField&,
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 fixedPressureCompressibleDensityFvPatchScalarField
146 //- Update the coefficients associated with the patch field
147 virtual void updateCoeffs();
150 virtual void write(Ostream&) const;
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 // ************************************************************************* //