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

ReactingCloudI_.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 \*---------------------------------------------------------------------------*/
00025 
00026 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00027 
00028 template<class ParcelType>
00029 inline const typename ParcelType::constantProperties&
00030 Foam::ReactingCloud<ParcelType>::constProps() const
00031 {
00032     return constProps_;
00033 }
00034 
00035 
00036 template<class ParcelType>
00037 inline const Foam::multiComponentMixture<typename ParcelType::thermoType>&
00038 Foam::ReactingCloud<ParcelType>::mcCarrierThermo() const
00039 {
00040     return mcCarrierThermo_;
00041 }
00042 
00043 
00044 template<class ParcelType>
00045 inline Foam::multiComponentMixture<typename ParcelType::thermoType>&
00046 Foam::ReactingCloud<ParcelType>::mcCarrierThermo()
00047 {
00048     return mcCarrierThermo_;
00049 }
00050 
00051 
00052 template<class ParcelType>
00053 inline const Foam::CompositionModel<Foam::ReactingCloud<ParcelType> >&
00054 Foam::ReactingCloud<ParcelType>::composition() const
00055 {
00056     return compositionModel_;
00057 }
00058 
00059 
00060 template<class ParcelType>
00061 inline const Foam::PhaseChangeModel<Foam::ReactingCloud<ParcelType> >&
00062 Foam::ReactingCloud<ParcelType>::phaseChange() const
00063 {
00064     return phaseChangeModel_;
00065 }
00066 
00067 
00068 template<class ParcelType>
00069 inline Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
00070 Foam::ReactingCloud<ParcelType>::rhoTrans(const label i)
00071 {
00072     return rhoTrans_[i];
00073 }
00074 
00075 
00076 template<class ParcelType>
00077 inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
00078 Foam::ReactingCloud<ParcelType>::rhoTrans()
00079 {
00080     return rhoTrans_;
00081 }
00082 
00083 
00084 template<class ParcelType>
00085 inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
00086 Foam::ReactingCloud<ParcelType>::Srho(const label i) const
00087 {
00088     return rhoTrans_[i]/(this->db().time().deltaT()*this->mesh().V());
00089 }
00090 
00091 
00092 template<class ParcelType>
00093 inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
00094 Foam::ReactingCloud<ParcelType>::Srho() const
00095 {
00096     tmp<DimensionedField<scalar, volMesh> > trhoTrans
00097     (
00098         new DimensionedField<scalar, volMesh>
00099         (
00100             IOobject
00101             (
00102                 this->name() + "rhoTrans",
00103                 this->db().time().timeName(),
00104                 this->db(),
00105                 IOobject::NO_READ,
00106                 IOobject::NO_WRITE,
00107                 false
00108             ),
00109             this->mesh(),
00110             dimensionedScalar("zero", rhoTrans_[0].dimensions(), 0.0)
00111         )
00112     );
00113 
00114     scalarField& sourceField = trhoTrans().field();
00115     forAll (rhoTrans_, i)
00116     {
00117         sourceField += rhoTrans_[i];
00118     }
00119 
00120     return trhoTrans/(this->db().time().deltaT()*this->mesh().V());
00121 }
00122 
00123 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines