FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

fixedPressureCompressibleDensityFvPatchScalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::fixedPressureCompressibleDensityFvPatchScalarField
00026 
00027 Description
00028     Calculate compressible density as a function of pressure and fluid
00029     properties.
00030 
00031     Example of the boundary condition specification:
00032     @verbatim
00033         inlet
00034         {
00035             type        fixedPressureCompressibleDensity;
00036             p           p;               // Name of static pressure field
00037             value       uniform 1;       // Initial value
00038         }
00039     @endverbatim
00040 
00041 SourceFiles
00042     fixedPressureCompressibleDensityFvPatchScalarField.C
00043 
00044 \*---------------------------------------------------------------------------*/
00045 
00046 #ifndef fixedPressureCompressibleDensityFvPatchScalarField_H
00047 #define fixedPressureCompressibleDensityFvPatchScalarField_H
00048 
00049 #include <finiteVolume/fixedValueFvPatchFields.H>
00050 
00051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00052 
00053 namespace Foam
00054 {
00055 
00056 /*---------------------------------------------------------------------------*\
00057       Class fixedPressureCompressibleDensityFvPatchScalarField Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class fixedPressureCompressibleDensityFvPatchScalarField
00061 :
00062     public fixedValueFvPatchScalarField
00063 {
00064     // Private data
00065 
00066         //- Name of static pressure field
00067         word pName_;
00068 
00069 
00070 public:
00071 
00072     //- Runtime type information
00073     TypeName("fixedPressureCompressibleDensity");
00074 
00075 
00076     // Constructors
00077 
00078         //- Construct from patch and internal field
00079         fixedPressureCompressibleDensityFvPatchScalarField
00080         (
00081             const fvPatch&,
00082             const DimensionedField<scalar, volMesh>&
00083         );
00084 
00085         //- Construct from patch, internal field and dictionary
00086         fixedPressureCompressibleDensityFvPatchScalarField
00087         (
00088             const fvPatch&,
00089             const DimensionedField<scalar, volMesh>&,
00090             const dictionary&
00091         );
00092 
00093         //- Construct by mapping given
00094         //  fixedPressureCompressibleDensityFvPatchScalarField
00095         //  onto a new patch
00096         fixedPressureCompressibleDensityFvPatchScalarField
00097         (
00098             const fixedPressureCompressibleDensityFvPatchScalarField&,
00099             const fvPatch&,
00100             const DimensionedField<scalar, volMesh>&,
00101             const fvPatchFieldMapper&
00102         );
00103 
00104         //- Construct as copy
00105         fixedPressureCompressibleDensityFvPatchScalarField
00106         (
00107             const fixedPressureCompressibleDensityFvPatchScalarField&
00108         );
00109 
00110         //- Construct and return a clone
00111         virtual tmp<fvPatchScalarField> clone() const
00112         {
00113             return tmp<fvPatchScalarField>
00114             (
00115                 new fixedPressureCompressibleDensityFvPatchScalarField(*this)
00116             );
00117         }
00118 
00119         //- Construct as copy setting internal field reference
00120         fixedPressureCompressibleDensityFvPatchScalarField
00121         (
00122             const fixedPressureCompressibleDensityFvPatchScalarField&,
00123             const DimensionedField<scalar, volMesh>&
00124         );
00125 
00126         //- Construct and return a clone setting internal field reference
00127         virtual tmp<fvPatchScalarField> clone
00128         (
00129             const DimensionedField<scalar, volMesh>& iF
00130         ) const
00131         {
00132             return tmp<fvPatchScalarField>
00133             (
00134                 new fixedPressureCompressibleDensityFvPatchScalarField
00135                 (
00136                     *this,
00137                     iF
00138                 )
00139             );
00140         }
00141 
00142 
00143     // Member functions
00144 
00145         //- Update the coefficients associated with the patch field
00146         virtual void updateCoeffs();
00147 
00148         //- Write
00149         virtual void write(Ostream&) const;
00150 };
00151 
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 } // End namespace Foam
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 #endif
00160 
00161 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines