OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

fixedFluxPressureFvPatchScalarField.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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::fixedFluxPressureFvPatchScalarField
00027 
00028 Description
00029     Foam::fixedFluxPressureFvPatchScalarField
00030 
00031 SourceFiles
00032     fixedFluxPressureFvPatchScalarField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef fixedFluxPressureFvPatchScalarFields_H
00037 #define fixedFluxPressureFvPatchScalarFields_H
00038 
00039 #include "fvPatchFields.H"
00040 #include "fixedGradientFvPatchFields.H"
00041 #include "Switch.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class fixedFluxPressureFvPatch Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class fixedFluxPressureFvPatchScalarField
00053 :
00054     public fixedGradientFvPatchScalarField
00055 {
00056     // Private data
00057 
00058         //- Name of the velocity field
00059         word UName_;
00060 
00061         //- Name of the flux transporting the field
00062         word phiName_;
00063 
00064         //- Name of the density field used to normalise the mass flux
00065         //  if neccessary
00066         word rhoName_;
00067 
00068         //- Is the pressure adjoint, i.e. has the opposite sign
00069         Switch adjoint_;
00070 
00071 
00072 public:
00073 
00074     //- Runtime type information
00075     TypeName("fixedFluxPressure");
00076 
00077 
00078     // Constructors
00079 
00080         //- Construct from patch and internal field
00081         fixedFluxPressureFvPatchScalarField
00082         (
00083             const fvPatch&,
00084             const DimensionedField<scalar, volMesh>&
00085         );
00086 
00087         //- Construct from patch, internal field and dictionary
00088         fixedFluxPressureFvPatchScalarField
00089         (
00090             const fvPatch&,
00091             const DimensionedField<scalar, volMesh>&,
00092             const dictionary&
00093         );
00094 
00095         //- Construct by mapping given fixedFluxPressureFvPatchScalarField onto
00096         //  a new patch
00097         fixedFluxPressureFvPatchScalarField
00098         (
00099             const fixedFluxPressureFvPatchScalarField&,
00100             const fvPatch&,
00101             const DimensionedField<scalar, volMesh>&,
00102             const fvPatchFieldMapper&
00103         );
00104 
00105         //- Construct as copy
00106         fixedFluxPressureFvPatchScalarField
00107         (
00108             const fixedFluxPressureFvPatchScalarField&
00109         );
00110 
00111         //- Construct and return a clone
00112         virtual tmp<fvPatchScalarField> clone() const
00113         {
00114             return tmp<fvPatchScalarField>
00115             (
00116                 new fixedFluxPressureFvPatchScalarField(*this)
00117             );
00118         }
00119 
00120         //- Construct as copy setting internal field reference
00121         fixedFluxPressureFvPatchScalarField
00122         (
00123             const fixedFluxPressureFvPatchScalarField&,
00124             const DimensionedField<scalar, volMesh>&
00125         );
00126 
00127         //- Construct and return a clone setting internal field reference
00128         virtual tmp<fvPatchScalarField> clone
00129         (
00130             const DimensionedField<scalar, volMesh>& iF
00131         ) const
00132         {
00133             return tmp<fvPatchScalarField>
00134             (
00135                 new fixedFluxPressureFvPatchScalarField(*this, iF)
00136             );
00137         }
00138 
00139 
00140     // Member functions
00141 
00142         //- Update the coefficients associated with the patch field
00143         virtual void updateCoeffs();
00144 
00145         //- Write
00146         virtual void write(Ostream&) const;
00147 };
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd