diffusionMulticomponent.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015 OpenCFD Ltd
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::combustionModels::diffusionMulticomponent
26 
27 Description
28 
29  Diffusion based turbulent combustion model for multicomponent species.
30 
31  The model calculates the laminar finite rate source terms based on
32  the kinetic for each reaction in order to begin the combustion and
33  evaluates the minimum between this and the cross diffusion rate term
34  defined as D*prob*muEff*mag(grad(Yi)*grad(Yj)) if laminarIgn is true.
35 
36  where:
37 
38  D : is a model dynamic constant defined as C*f02 where:
39  C is a model constant
40  f02 = 1 + sqr(O2/oxidantRes), oxidantRes is an user input
41 
42  muEff : is the effective turbulent viscosity
43  prob : is a normalized Gaussian shaped distribution around the stoichiometric
44  value of each reaction. The distribtion is controled by 'sigma'
45  for standard deviation and ftCorr for correction of the stoichiometric
46  value.
47 
48  In the combustion properties dictionary:
49 
50  diffusionMulticomponentCoeffs
51  {
52  Ci (1.0 1.0); // Default to 1
53  fuels (CH4 CO);
54  oxidants (O2 O2);
55  YoxStream (0.23 0.23); // Default to 0.23
56  YfStream (1.0 1.0); // Default to 1.0
57  sigma (0.02 0.02); // Default to 0.02
58  oxidantRes (0.025 0.005);
59  ftCorr (0.0 0.0); // Default to 0.0
60  laminarIgn false; // Default false
61  }
62 
63 
64 SourceFiles
65  diffusionMulticomponent.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef diffusionMulticomponent_H
70 #define diffusionMulticomponent_H
71 
72 #include "scalarList.H"
73 #include "tmp.H"
74 #include "Reaction.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 namespace combustionModels
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class diffusionMulticomponent Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 template<class CombThermoType, class ThermoType>
89 :
90  public CombThermoType
91 {
92  // Private data
93 
94  //- Reactions
96 
97  //- Thermodynamic data of the species
99 
100  //- Pointer list of source terms
102 
103  //- Model constants
104  scalarList Ci_;
105 
106  //- List of fuels for each reaction
108 
109  //- List of oxidants for each reaction
111 
112  //- Heat of combustion [J/Kg]
114 
115  //- Stoichiometric air-fuel mass ratio
117 
118  //- Stoichiometric oxygen-fuel mass ratio
119  scalarList s_;
120 
121  //- Oxydaser sream mass concentrations
123 
124  //- Fuel stream mass concentrations
126 
127  //- Mean distribution for gaussian probabililty
129 
130  //- Residual oxydaser
132 
133  //- ft stochiometric correction
135 
136  //- Relaxatnio factor on total source
137  scalar alpha_;
138 
139  //- Switch on to laminar combustion for ignition
140  bool laminarIgn_;
141 
142 
143  // Private Member Functions
144 
145  //- Return the chemical time scale
146  tmp<volScalarField> tc() const;
147 
148  //- Initialize
149  void init();
150 
151  //- Disallow copy construct
153 
154  //- Disallow default bitwise assignment
155  void operator=(const diffusionMulticomponent&);
156 
157 
158 public:
159 
160  //- Runtime type information
161  TypeName("diffusionMulticomponent");
162 
163 
164  // Constructors
165 
166  //- Construct from components
168  (
169  const word& modelType,
170  const fvMesh& mesh,
171  const word& phaseName
172  );
173 
174 
175  //- Destructor
176  virtual ~diffusionMulticomponent();
177 
178 
179  // Member Functions
180 
181  // Evolution
182 
183  //- Correct combustion rate
184  virtual void correct();
185 
186  //- Fuel consumption rate matrix.
187  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
188 
189  //- Heat release rate calculated from fuel consumption rate matrix
190  virtual tmp<volScalarField> dQ() const;
191 
192  //- Return source for enthalpy equation [kg/m/s3]
193  virtual tmp<volScalarField> Sh() const;
194 
195 
196  // IO
197 
198  //- Update properties from given dictionary
199  virtual bool read();
200 };
201 
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 } // End namespace combustionModels
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #ifdef NoRepository
211 # include "diffusionMulticomponent.C"
212 #endif
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
Foam::combustionModels::diffusionMulticomponent::init
void init()
Initialize.
Definition: diffusionMulticomponent.C:36
Foam::combustionModels::diffusionMulticomponent::~diffusionMulticomponent
virtual ~diffusionMulticomponent()
Destructor.
Definition: diffusionMulticomponent.C:192
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::combustionModels::diffusionMulticomponent::RijPtr_
PtrList< volScalarField > RijPtr_
Pointer list of source terms.
Definition: diffusionMulticomponent.H:100
Foam::combustionModels::diffusionMulticomponent::stoicRatio_
scalarList stoicRatio_
Stoichiometric air-fuel mass ratio.
Definition: diffusionMulticomponent.H:115
Foam::combustionModels::diffusionMulticomponent::Ci_
scalarList Ci_
Model constants.
Definition: diffusionMulticomponent.H:103
Foam::combustionModels::diffusionMulticomponent::R
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
Definition: diffusionMulticomponent.C:410
Foam::combustionModels::diffusionMulticomponent::oxidantRes_
scalarList oxidantRes_
Residual oxydaser.
Definition: diffusionMulticomponent.H:130
Foam::combustionModels::diffusionMulticomponent::specieThermo_
const PtrList< ThermoType > & specieThermo_
Thermodynamic data of the species.
Definition: diffusionMulticomponent.H:97
Foam::combustionModels::diffusionMulticomponent::diffusionMulticomponent
diffusionMulticomponent(const diffusionMulticomponent &)
Disallow copy construct.
Foam::combustionModels::diffusionMulticomponent::YoxStream_
scalarList YoxStream_
Oxydaser sream mass concentrations.
Definition: diffusionMulticomponent.H:121
scalarList.H
Foam::combustionModels::diffusionMulticomponent::reactions_
const PtrList< Reaction< ThermoType > > & reactions_
Reactions.
Definition: diffusionMulticomponent.H:94
Foam::combustionModels::diffusionMulticomponent::qFuel_
scalarList qFuel_
Heat of combustion [J/Kg].
Definition: diffusionMulticomponent.H:112
Foam::combustionModels::diffusionMulticomponent::operator=
void operator=(const diffusionMulticomponent &)
Disallow default bitwise assignment.
diffusionMulticomponent.C
Foam::combustionModels::diffusionMulticomponent::laminarIgn_
bool laminarIgn_
Switch on to laminar combustion for ignition.
Definition: diffusionMulticomponent.H:139
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::combustionModels::diffusionMulticomponent::correct
virtual void correct()
Correct combustion rate.
Definition: diffusionMulticomponent.C:208
Foam::combustionModels::diffusionMulticomponent::fuelNames_
wordList fuelNames_
List of fuels for each reaction.
Definition: diffusionMulticomponent.H:106
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::combustionModels::diffusionMulticomponent
Diffusion based turbulent combustion model for multicomponent species.
Definition: diffusionMulticomponent.H:87
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Reaction.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::combustionModels::diffusionMulticomponent::s_
scalarList s_
Stoichiometric oxygen-fuel mass ratio.
Definition: diffusionMulticomponent.H:118
Foam::combustionModels::diffusionMulticomponent::sigma_
scalarList sigma_
Mean distribution for gaussian probabililty.
Definition: diffusionMulticomponent.H:127
Foam::combustionModels::diffusionMulticomponent::dQ
virtual tmp< volScalarField > dQ() const
Heat release rate calculated from fuel consumption rate matrix.
Definition: diffusionMulticomponent.C:429
Foam::combustionModels::diffusionMulticomponent::read
virtual bool read()
Update properties from given dictionary.
Definition: diffusionMulticomponent.C:496
Foam::combustionModels::diffusionMulticomponent::Sh
virtual tmp< volScalarField > Sh() const
Return source for enthalpy equation [kg/m/s3].
Definition: diffusionMulticomponent.C:463
tmp.H
Foam::combustionModels::diffusionMulticomponent::tc
tmp< volScalarField > tc() const
Return the chemical time scale.
Definition: diffusionMulticomponent.C:200
Foam::combustionModels::diffusionMulticomponent::YfStream_
scalarList YfStream_
Fuel stream mass concentrations.
Definition: diffusionMulticomponent.H:124
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::combustionModels::diffusionMulticomponent::ftCorr_
scalarList ftCorr_
ft stochiometric correction
Definition: diffusionMulticomponent.H:133
Foam::combustionModels::diffusionMulticomponent::TypeName
TypeName("diffusionMulticomponent")
Runtime type information.
Foam::combustionModels::diffusionMulticomponent::alpha_
scalar alpha_
Relaxatnio factor on total source.
Definition: diffusionMulticomponent.H:136
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::combustionModels::diffusionMulticomponent::oxidantNames_
wordList oxidantNames_
List of oxidants for each reaction.
Definition: diffusionMulticomponent.H:109
Y
PtrList< volScalarField > & Y
Definition: createFields.H:36