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

inletOutletTotalTemperatureFvPatchScalarField.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::inletOutletTotalTemperatureFvPatchScalarField
00026 
00027 Description
00028     Foam::inletOutletTotalTemperatureFvPatchScalarField
00029 
00030 SourceFiles
00031     inletOutletTotalTemperatureFvPatchScalarField.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef inletOutletTotalTemperatureFvPatchScalarField_H
00036 #define inletOutletTotalTemperatureFvPatchScalarField_H
00037 
00038 #include <finiteVolume/inletOutletFvPatchFields.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046              Class inletOutletTotalTemperatureFvPatch Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 class inletOutletTotalTemperatureFvPatchScalarField
00050 :
00051     public inletOutletFvPatchScalarField
00052 {
00053     // Private data
00054 
00055         //- Name of the velocity field
00056         word UName_;
00057 
00058         //- Name of the flux transporting the field
00059         word phiName_;
00060 
00061         //- Name of the compressibility field used to calculate the wave speed
00062         word psiName_;
00063 
00064         //- Heat capacity ratio
00065         scalar gamma_;
00066 
00067         //- Total pressure
00068         scalarField T0_;
00069 
00070 
00071 public:
00072 
00073     //- Runtime type information
00074     TypeName("inletOutletTotalTemperature");
00075 
00076 
00077     // Constructors
00078 
00079         //- Construct from patch and internal field
00080         inletOutletTotalTemperatureFvPatchScalarField
00081         (
00082             const fvPatch&,
00083             const DimensionedField<scalar, volMesh>&
00084         );
00085 
00086         //- Construct from patch, internal field and dictionary
00087         inletOutletTotalTemperatureFvPatchScalarField
00088         (
00089             const fvPatch&,
00090             const DimensionedField<scalar, volMesh>&,
00091             const dictionary&
00092         );
00093 
00094         //- Construct by mapping given
00095         //  inletOutletTotalTemperatureFvPatchScalarField onto a new patch
00096         inletOutletTotalTemperatureFvPatchScalarField
00097         (
00098             const inletOutletTotalTemperatureFvPatchScalarField&,
00099             const fvPatch&,
00100             const DimensionedField<scalar, volMesh>&,
00101             const fvPatchFieldMapper&
00102         );
00103 
00104         //- Construct as copy
00105         inletOutletTotalTemperatureFvPatchScalarField
00106         (
00107             const inletOutletTotalTemperatureFvPatchScalarField&
00108         );
00109 
00110         //- Construct and return a clone
00111         virtual tmp<fvPatchScalarField> clone() const
00112         {
00113             return tmp<fvPatchScalarField>
00114             (
00115                 new inletOutletTotalTemperatureFvPatchScalarField(*this)
00116             );
00117         }
00118 
00119         //- Construct as copy setting internal field reference
00120         inletOutletTotalTemperatureFvPatchScalarField
00121         (
00122             const inletOutletTotalTemperatureFvPatchScalarField&,
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 inletOutletTotalTemperatureFvPatchScalarField(*this, iF)
00135             );
00136         }
00137 
00138 
00139     // Member functions
00140 
00141         // Access
00142 
00143             //- Return the total pressure
00144             const scalarField& T0() const
00145             {
00146                 return T0_;
00147             }
00148 
00149             //- Return reference to the total pressure to allow adjustment
00150             scalarField& T0()
00151             {
00152                 return T0_;
00153             }
00154 
00155 
00156         // Mapping functions
00157 
00158             //- Map (and resize as needed) from self given a mapping object
00159             virtual void autoMap
00160             (
00161                 const fvPatchFieldMapper&
00162             );
00163 
00164             //- Reverse map the given fvPatchField onto this fvPatchField
00165             virtual void rmap
00166             (
00167                 const fvPatchScalarField&,
00168                 const labelList&
00169             );
00170 
00171 
00172         // Evaluation functions
00173 
00174             //- Update the coefficients associated with the patch field
00175             virtual void updateCoeffs();
00176 
00177 
00178         //- Write
00179         virtual void write(Ostream&) const;
00180 };
00181 
00182 
00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00184 
00185 } // End namespace Foam
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 #endif
00190 
00191 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines