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

veryInhomogeneousMixture.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 Class
00025     Foam::veryInhomogeneousMixture
00026 
00027 Description
00028     Foam::veryInhomogeneousMixture
00029 
00030 SourceFiles
00031     veryInhomogeneousMixture.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef veryInhomogeneousMixture_H
00036 #define veryInhomogeneousMixture_H
00037 
00038 #include <reactionThermophysicalModels/basicMultiComponentMixture.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                   Class veryInhomogeneousMixture Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class ThermoType>
00050 class veryInhomogeneousMixture
00051 :
00052     public basicMultiComponentMixture
00053 {
00054     // Private data
00055 
00056         static const int nSpecies_ = 3;
00057         static const char* specieNames_[3];
00058 
00059         dimensionedScalar stoicRatio_;
00060 
00061         ThermoType fuel_;
00062         ThermoType oxidant_;
00063         ThermoType products_;
00064 
00065         mutable ThermoType mixture_;
00066 
00067         //- Mixture fraction
00068         volScalarField& ft_;
00069 
00070         //- Fuel mass fraction
00071         volScalarField& fu_;
00072 
00073         //- Regress variable
00074         volScalarField& b_;
00075 
00076         //- Construct as copy (not implemented)
00077         veryInhomogeneousMixture(const veryInhomogeneousMixture<ThermoType>&);
00078 
00079 
00080 public:
00081 
00082     //- The type of thermodynamics this mixture is instantiated for
00083     typedef ThermoType thermoType;
00084 
00085 
00086     // Constructors
00087 
00088         //- Construct from dictionary and mesh
00089         veryInhomogeneousMixture(const dictionary&, const fvMesh&);
00090 
00091 
00092     //- Destructor
00093     virtual ~veryInhomogeneousMixture()
00094     {}
00095 
00096 
00097     // Member functions
00098 
00099         const dimensionedScalar& stoicRatio() const
00100         {
00101             return stoicRatio_;
00102         }
00103 
00104         const ThermoType& mixture(const scalar, const scalar) const;
00105 
00106         const ThermoType& cellMixture(const label celli) const
00107         {
00108             return mixture(ft_[celli], fu_[celli]);
00109         }
00110 
00111         const ThermoType& patchFaceMixture
00112         (
00113             const label patchi,
00114             const label facei
00115         ) const
00116         {
00117             return mixture
00118             (
00119                 ft_.boundaryField()[patchi][facei],
00120                 fu_.boundaryField()[patchi][facei]
00121             );
00122         }
00123 
00124         const ThermoType& cellReactants(const label celli) const
00125         {
00126             return mixture(ft_[celli], ft_[celli]);
00127         }
00128 
00129         const ThermoType& patchFaceReactants
00130         (
00131             const label patchi,
00132             const label facei
00133         ) const
00134         {
00135             return mixture
00136             (
00137                 ft_.boundaryField()[patchi][facei],
00138                 ft_.boundaryField()[patchi][facei]
00139             );
00140         }
00141 
00142         const ThermoType& cellProducts(const label celli) const
00143         {
00144             scalar ft = ft_[celli];
00145             return mixture(ft, fres(ft, stoicRatio().value()));
00146         }
00147 
00148         const ThermoType& patchFaceProducts
00149         (
00150             const label patchi,
00151             const label facei
00152         ) const
00153         {
00154             scalar ft = ft_.boundaryField()[patchi][facei];
00155             return mixture(ft, fres(ft, stoicRatio().value()));
00156         }
00157 
00158         //- Read dictionary
00159         void read(const dictionary&);
00160 };
00161 
00162 
00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00164 
00165 } // End namespace Foam
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00168 
00169 #ifdef NoRepository
00170 #   include <reactionThermophysicalModels/veryInhomogeneousMixture.C>
00171 #endif
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 #endif
00176 
00177 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines