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

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