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

SinglePhaseMixture.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) 2008-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::SinglePhaseMixture
00027 
00028 Description
00029     Templated parcel single phase, multi-component class
00030 
00031 SourceFiles
00032     SinglePhaseMixture.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef SinglePhaseMixture_H
00037 #define SinglePhaseMixture_H
00038 
00039 #include "CompositionModel.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                       Class SinglePhaseMixture Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 template<class CloudType>
00051 class SinglePhaseMixture
00052 :
00053     public CompositionModel<CloudType>
00054 {
00055     // Private data
00056 
00057         // Indices of the phases - only 1 will be set
00058 
00059             //- Gas
00060             label idGas_;
00061 
00062             //- Liquid
00063             label idLiquid_;
00064 
00065             //- Solid
00066             label idSolid_;
00067 
00068 
00069     // Private member functions
00070 
00071         //- Construct the indices and check correct specification of
00072         //  1 gas or 1 liquid or 1 solid
00073         void constructIds();
00074 
00075 
00076 public:
00077 
00078     //- Runtime type information
00079     TypeName("SinglePhaseMixture");
00080 
00081 
00082     // Constructors
00083 
00084         //- Construct from dictionary
00085         SinglePhaseMixture(const dictionary& dict, CloudType& owner);
00086 
00087 
00088     //- Destructor
00089     virtual ~SinglePhaseMixture();
00090 
00091 
00092     // Member Functions
00093 
00094         // Access
00095 
00096             // Gas properties
00097 
00098                 //- Return the list of gas mass fractions
00099                 const scalarField& YGas0() const;
00100 
00101                 //- Return the total gas mass fraction
00102                 scalar YGasTot0() const;
00103 
00104 
00105             // Liquid properties
00106 
00107                 //- Return the list of liquid mass fractions
00108                 const scalarField& YLiquid0() const;
00109 
00110                 //- Return the total liquid mass fraction
00111                 scalar YLiquidTot0() const;
00112 
00113 
00114             // Solid properties
00115 
00116                 //- Return the list of solid mass fractions
00117                 const scalarField& YSolid0() const;
00118 
00119                 //- Return the total solid mass fraction
00120                 scalar YSolidTot0() const;
00121 
00122 
00123             // Mixture properties
00124 
00125                 //- Return the list of mixture mass fractions
00126                 virtual const scalarField& YMixture0() const;
00127 
00128                 // Indices of gas, liquid and solid phases in phase properties
00129                 // list
00130 
00131                     //- Gas id
00132                     virtual label idGas() const;
00133 
00134                     //- Liquid id
00135                     virtual label idLiquid() const;
00136 
00137                     //- Solid id
00138                     virtual label idSolid() const;
00139 };
00140 
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 } // End namespace Foam
00145 
00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00147 
00148 #ifdef NoRepository
00149 #   include "SinglePhaseMixture.C"
00150 #endif
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #endif
00155 
00156 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd