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

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