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

incompressible.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::incompressible
00026 
00027 Description
00028     Incompressible gas/liquid equation of state.
00029 
00030 SourceFiles
00031     incompressibleI.H
00032     incompressible.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef incompressible_H
00037 #define incompressible_H
00038 
00039 #include <specie/specie.H>
00040 #include <OpenFOAM/autoPtr.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                         Class incompressible Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class incompressible
00052 :
00053     public specie
00054 {
00055     // Private data
00056 
00057         //- Density
00058         scalar rho_;
00059 
00060 
00061 public:
00062 
00063     // Constructors
00064 
00065         //- Construct from components
00066         inline incompressible(const specie& sp, const scalar rho);
00067 
00068         //- Construct from Istream
00069         incompressible(Istream&);
00070 
00071         //- Construct as named copy
00072         inline incompressible(const word& name, const incompressible&);
00073 
00074         //- Construct and return a clone
00075         inline autoPtr<incompressible> clone() const;
00076 
00077         // Selector from Istream
00078         inline static autoPtr<incompressible> New(Istream& is);
00079 
00080 
00081     // Member functions
00082 
00083         //- Return density [kg/m^3]
00084         inline scalar rho(scalar p, scalar T) const;
00085 
00086         //- Return compressibility rho/p [s^2/m^2]
00087         inline scalar psi(scalar p, scalar T) const;
00088 
00089         //- Return compression factor []
00090         inline scalar Z(scalar p, scalar T) const;
00091 
00092 
00093     // Member operators
00094 
00095         inline void operator+=(const incompressible&);
00096         inline void operator-=(const incompressible&);
00097 
00098         inline void operator*=(const scalar);
00099 
00100 
00101     // Friend operators
00102 
00103         inline friend incompressible operator+
00104         (
00105             const incompressible&,
00106             const incompressible&
00107         );
00108 
00109         inline friend incompressible operator-
00110         (
00111             const incompressible&,
00112             const incompressible&
00113         );
00114 
00115         inline friend incompressible operator*
00116         (
00117             const scalar s,
00118             const incompressible&
00119         );
00120 
00121         inline friend incompressible operator==
00122         (
00123             const incompressible&,
00124             const incompressible&
00125         );
00126 
00127 
00128     // Ostream Operator
00129 
00130         friend Ostream& operator<<(Ostream&, const incompressible&);
00131 };
00132 
00133 
00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00135 
00136 } // End namespace Foam
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 #include "incompressibleI.H"
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #endif
00145 
00146 // ************************************************************************* //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines