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

ODEChemistryModelI.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) 2009-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 #include <finiteVolume/volFields.H>
00027 #include <finiteVolume/zeroGradientFvPatchFields.H>
00028 
00029 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00030 
00031 template<class CompType, class ThermoType>
00032 inline Foam::PtrList<Foam::scalarField>&
00033 Foam::ODEChemistryModel<CompType, ThermoType>::RR()
00034 {
00035     return RR_;
00036 }
00037 
00038 
00039 template<class CompType, class ThermoType>
00040 inline const Foam::PtrList<Foam::Reaction<ThermoType> >&
00041 Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
00042 {
00043     return reactions_;
00044 }
00045 
00046 
00047 template<class CompType, class ThermoType>
00048 inline const Foam::PtrList<ThermoType>&
00049 Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
00050 {
00051     return specieThermo_;
00052 }
00053 
00054 
00055 template<class CompType, class ThermoType>
00056 inline Foam::label
00057 Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
00058 {
00059     return nSpecie_;
00060 }
00061 
00062 
00063 template<class CompType, class ThermoType>
00064 inline Foam::label
00065 Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
00066 {
00067     return nReaction_;
00068 }
00069 
00070 
00071 template<class CompType, class ThermoType>
00072 inline const Foam::chemistrySolver<CompType, ThermoType>&
00073 Foam::ODEChemistryModel<CompType, ThermoType>::solver() const
00074 {
00075     return solver_;
00076 }
00077 
00078 
00079 template<class CompType, class ThermoType>
00080 inline Foam::tmp<Foam::volScalarField>
00081 Foam::ODEChemistryModel<CompType, ThermoType>::RR
00082 (
00083     const label i
00084 ) const
00085 {
00086     tmp<volScalarField> tRR
00087     (
00088         new volScalarField
00089         (
00090             IOobject
00091             (
00092                 "RR(" + this->Y_[i].name() + ')',
00093                 this->time().timeName(),
00094                 this->mesh(),
00095                 IOobject::NO_READ,
00096                 IOobject::NO_WRITE
00097             ),
00098             this->mesh(),
00099             dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0),
00100             zeroGradientFvPatchScalarField::typeName
00101         )
00102     );
00103 
00104     if (this->chemistry_)
00105     {
00106         tRR().internalField() = RR_[i];
00107         tRR().correctBoundaryConditions();
00108     }
00109     return tRR;
00110 }
00111 
00112 
00113 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines