DAC.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "DAC.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class CompType, class ThermoType>
35 (
36  const IOdictionary& dict,
38 )
39 :
41  searchInitSet_(this->coeffsDict_.subDict("initialSet").size()),
42  zprime_(0),
43  nbCLarge_(this->coeffsDict_.template getOrDefault<label>("nbCLarge", 3)),
44  sC_(this->nSpecie_, 0),
45  sH_(this->nSpecie_, 0),
46  sO_(this->nSpecie_, 0),
47  sN_(this->nSpecie_, 0),
48  CO2Id_(-1),
49  COId_(-1),
50  HO2Id_(-1),
51  H2OId_(-1),
52  NOId_(-1),
53  automaticSIS_
54  (
55  this->coeffsDict_.template getOrDefault<Switch>
56  (
57  "automaticSIS",
58  true
59  )
60  ),
61  phiTol_
62  (
63  this->coeffsDict_.template getOrDefault<scalar>
64  (
65  "phiTol", this->tolerance()
66  )
67  ),
68  NOxThreshold_
69  (
70  this->coeffsDict_.template getOrDefault<scalar>
71  (
72  "NOxThreshold",
73  1800
74  )
75  ),
76  CO2Name_(this->coeffsDict_.template getOrDefault<word>("CO2", "CO2")),
77  COName_(this->coeffsDict_.template getOrDefault<word>("CO", "CO")),
78  HO2Name_(this->coeffsDict_.template getOrDefault<word>("HO2", "HO2")),
79  H2OName_(this->coeffsDict_.template getOrDefault<word>("H2O", "H2O")),
80  NOName_(this->coeffsDict_.template getOrDefault<word>("NO", "NO")),
81  forceFuelInclusion_
82  (
83  this->coeffsDict_.template getOrDefault<Switch>
84  (
85  "forceFuelInclusion",
86  false
87  )
88  )
89 {
90  label j = 0;
91  dictionary initSet = this->coeffsDict_.subDict("initialSet");
92 
93  for (label i = 0; i < chemistry.nSpecie(); i++)
94  {
95  if (initSet.found(chemistry.Y()[i].member()))
96  {
97  searchInitSet_[j++] = i;
98  }
99  }
100 
101  if (j < searchInitSet_.size())
102  {
104  << searchInitSet_.size()-j
105  << " species in the initial set is not in the mechanism "
106  << initSet
107  << exit(FatalError);
108  }
109 
110 
111  const List<List<specieElement>>& specieComposition =
112  chemistry.specieComp();
113 
114  for (label i=0; i<this->nSpecie_; i++)
115  {
116  const List<specieElement>& curSpecieComposition =
117  specieComposition[i];
118 
119  // For all elements in the current species
120  forAll(curSpecieComposition, j)
121  {
122  const specieElement& curElement = curSpecieComposition[j];
123 
124  if (curElement.name() == "C")
125  {
126  sC_[i] = curElement.nAtoms();
127  }
128  else if (curElement.name() == "H")
129  {
130  sH_[i] = curElement.nAtoms();
131  }
132  else if (curElement.name() == "O")
133  {
134  sO_[i] = curElement.nAtoms();
135  }
136  else if (curElement.name() == "N")
137  {
138  sN_[i] = curElement.nAtoms();
139  }
140  else
141  {
142  Info<< " element " << curElement.name() << " not considered"
143  << endl;
144  }
145  }
146  if (this->chemistry_.Y()[i].member() == CO2Name_)
147  {
148  CO2Id_ = i;
149  }
150  else if (this->chemistry_.Y()[i].member() == COName_)
151  {
152  COId_ = i;
153  }
154  else if (this->chemistry_.Y()[i].member() == HO2Name_)
155  {
156  HO2Id_ = i;
157  }
158  else if (this->chemistry_.Y()[i].member() == H2OName_)
159  {
160  H2OId_ = i;
161  }
162  else if (this->chemistry_.Y()[i].member() == NOName_)
163  {
164  NOId_ = i;
165  }
166  }
167 
168  if ((CO2Id_==-1 || COId_==-1 || HO2Id_==-1 || H2OId_==-1) && automaticSIS_)
169  {
171  << "The name of the species used in automatic SIS are not found in "
172  << " the mechanism. You should either set the name for CO2, CO, H2O"
173  << " and HO2 properly or set automaticSIS to off "
174  << exit(FatalError);
175  }
176 
177  // To compute zprime, the fuel species should be specified.
178  // According to the given mass fraction, an equivalent O/C ratio is computed
179  if (automaticSIS_)
180  {
181  dictionary fuelDict;
182  if (this->coeffsDict_.found("fuelSpecies"))
183  {
184  fuelDict = this->coeffsDict_.subDict("fuelSpecies");
185  fuelSpecies_ = fuelDict.toc();
186  if (fuelSpecies_.size() == 0)
187  {
189  << "With automatic SIS, the fuel species should be "
190  << "specified in the fuelSpecies subDict"
191  << exit(FatalError);
192  }
193  }
194  else
195  {
197  << "With automatic SIS, the fuel species should be "
198  << "specified in the fuelSpecies subDict"
199  << exit(FatalError);
200  }
201 
202 
203  fuelSpeciesID_.setSize(fuelSpecies_.size());
204  fuelSpeciesProp_.setSize(fuelSpecies_.size());
205  scalar Mmtot(0.0);
206 
207  forAll(fuelSpecies_, i)
208  {
209  fuelSpeciesProp_[i] = fuelDict.get<scalar>(fuelSpecies_[i]);
210  for (label j=0; j<this->nSpecie_; j++)
211  {
212  if (this->chemistry_.Y()[j].member() == fuelSpecies_[i])
213  {
214  fuelSpeciesID_[i] = j;
215  break;
216  }
217  }
218  scalar curMm =
219  this->chemistry_.specieThermo()[fuelSpeciesID_[i]].W();
220  Mmtot += fuelSpeciesProp_[i]/curMm;
221  }
222 
223  Mmtot = 1.0/Mmtot;
224  scalar nbC(0.0);
225  scalar nbO(0.0);
226  forAll(fuelSpecies_, i)
227  {
228  label curID = fuelSpeciesID_[i];
229  scalar curMm = this->chemistry_.specieThermo()[curID].W();
230 
231  nbC += fuelSpeciesProp_[i]*Mmtot/curMm*sC_[curID];
232  nbO += fuelSpeciesProp_[i]*Mmtot/curMm*sO_[curID];
233  }
234  zprime_ = nbO/nbC;
235  }
236 }
237 
238 
239 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
240 
241 template<class CompType, class ThermoType>
243 {}
244 
245 
246 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
247 
248 
249 template<class CompType, class ThermoType>
251 (
252  const scalarField &c,
253  const scalar T,
254  const scalar p
255 )
256 {
257  scalarField& completeC(this->chemistry_.completeC());
258  scalarField c1(this->chemistry_.nEqns(), Zero);
259  for (label i=0; i<this->nSpecie_; i++)
260  {
261  c1[i] = c[i];
262  completeC[i] = c[i];
263  }
264 
265  c1[this->nSpecie_] = T;
266  c1[this->nSpecie_+1] = p;
267 
268  // Compute the rAB matrix
269  RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, Zero);
270  scalarField PA(this->nSpecie_, Zero);
271  scalarField CA(this->nSpecie_, Zero);
272 
273  // Number of initialized rAB for each lines
274  Field<label> NbrABInit(this->nSpecie_, Zero);
275  // Position of the initialized rAB, -1 when not initialized
276  RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1);
277  // Index of the other species involved in the rABNum
278  RectangularMatrix<label> rABOtherSpec(this->nSpecie_, this->nSpecie_, -1);
279 
280  scalar pf, cf, pr, cr;
281  label lRef, rRef;
282  for (const Reaction<ThermoType>& R : this->chemistry_.reactions())
283  {
284  // for each reaction compute omegai
285  scalar omegai = this->chemistry_.omega
286  (
287  R, c1, T, p, pf, cf, lRef, pr, cr, rRef
288  );
289 
290  // Then for each pair of species composing this reaction,
291  // compute the rAB matrix (separate the numerator and
292  // denominator)
293 
294  // While computing the rAB for all the species involved in the reaction
295  // we should consider that one can write a reaction A+B=2C as A+B=C+C
296  // In this case, the following algorithm only take once the effect
297  // of the species. It stores the species encountered in the reaction but
298  // use another list to see if this species has already been used
299 
300  DynamicList<scalar> wA(R.lhs().size() + R.rhs().size());
301  DynamicList<label> wAID(R.lhs().size() + R.rhs().size());
302 
303  forAll(R.lhs(), s) // Compute rAB for all species in the left hand side
304  {
305  label ss = R.lhs()[s].index;
306  scalar sl = -R.lhs()[s].stoichCoeff; // vAi = v''-v' => here -v'
307  List<bool> deltaBi(this->nSpecie_, false);
308  FIFOStack<label> usedIndex;
309  forAll(R.lhs(), j)
310  {
311  label sj = R.lhs()[j].index;
312  usedIndex.push(sj);
313  deltaBi[sj] = true;
314  }
315  forAll(R.rhs(), j)
316  {
317  label sj = R.rhs()[j].index;
318  usedIndex.push(sj);
319  deltaBi[sj] = true;
320  }
321 
322  // Disable for self reference (by definition rAA=0)
323  deltaBi[ss] = false;
324 
325  while (!usedIndex.empty())
326  {
327  label curIndex = usedIndex.pop();
328  if (deltaBi[curIndex])
329  {
330  // Disable to avoid counting it more than once
331  deltaBi[curIndex] = false;
332  // Test if this rAB is not initialized
333  if (rABPos(ss, curIndex) == -1)
334  {
335  // It starts at rABPos(ss, sj)=0
336  rABPos(ss, curIndex) = NbrABInit[ss];
337  NbrABInit[ss]++;
338  // to avoid overflow
339  rABNum(ss, rABPos(ss, curIndex)) = sl*omegai;
340  // store the other specie involved
341  rABOtherSpec(ss, rABPos(ss, curIndex)) = curIndex;
342  }
343  else
344  {
345  rABNum(ss, rABPos(ss, curIndex)) += sl*omegai;
346  }
347  }
348  }
349 
350  bool found(false);
351  forAll(wAID, id)
352  {
353  if (ss == wAID[id])
354  {
355  wA[id] += sl*omegai;
356  found = true;
357  }
358  }
359  if (!found)
360  {
361  wA.append(sl*omegai);
362  wAID.append(ss);
363  }
364  }
365 
366  // Compute rAB for all species in the right hand side
367  forAll(R.rhs(), s)
368  {
369  label ss = R.rhs()[s].index;
370  scalar sl = R.rhs()[s].stoichCoeff; // vAi = v''-v' => here v''
371  List<bool> deltaBi(this->nSpecie_, false);
372  FIFOStack<label> usedIndex;
373  forAll(R.lhs(), j)
374  {
375  label sj = R.lhs()[j].index;
376  usedIndex.push(sj);
377  deltaBi[sj] = true;
378  }
379  forAll(R.rhs(), j)
380  {
381  label sj = R.rhs()[j].index;
382  usedIndex.push(sj);
383  deltaBi[sj] = true;
384  }
385 
386  // Disable for self reference (by definition rAA=0)
387  deltaBi[ss] = false;
388 
389  while (!usedIndex.empty())
390  {
391  label curIndex = usedIndex.pop();
392  if (deltaBi[curIndex])
393  {
394  // Disable to avoid counting it more than once
395  deltaBi[curIndex] = false;
396 
397  // Test if this rAB is not initialized
398  if (rABPos(ss, curIndex) == -1)
399  {
400  // it starts at rABPos(ss, sj)=0
401  rABPos(ss, curIndex) = NbrABInit[ss];
402  NbrABInit[ss]++;
403  rABNum(ss, rABPos(ss, curIndex)) = sl*omegai;
404  rABOtherSpec(ss, rABPos(ss, curIndex)) = curIndex;
405  }
406  else
407  {
408  rABNum(ss, rABPos(ss, curIndex)) += sl*omegai;
409  }
410  }
411  }
412 
413  bool found(false);
414  forAll(wAID, id)
415  {
416  if (ss==wAID[id])
417  {
418  wA[id] += sl*omegai;
419  found = true;
420  }
421  }
422  if (!found)
423  {
424  wA.append(sl*omegai);
425  wAID.append(ss);
426  }
427  }
428  wAID.shrink();
429 
430  // Now that every species of the reactions has been visited, we can
431  // compute the production and consumption rate. This way, it avoids
432  // getting wrong results when species are present in both lhs and rhs
433  forAll(wAID, id)
434  {
435  if (wA[id] > 0.0)
436  {
437  if (PA[wAID[id]] == 0.0)
438  {
439  PA[wAID[id]] = wA[id];
440  }
441  else
442  {
443  PA[wAID[id]] += wA[id];
444  }
445  }
446  else
447  {
448  if (CA[wAID[id]] == 0.0)
449  {
450  CA[wAID[id]] = -wA[id];
451  }
452  else
453  {
454  CA[wAID[id]] += -wA[id];
455  }
456  }
457  }
458  }
459  // rii = 0.0 by definition
460 
461  scalar phiLarge(0.0);
462  scalar phiProgress(0.0);
463  if (automaticSIS_)
464  {
465  // Compute the progress equivalence ratio
466  // and the equivalence ratio for fuel decomposition
467  label nElements = 4; // 4 main elements (C, H, O, N)
468 
469  // Total number of C, H and O (in this order)
470  scalarList Na(nElements, Zero);
471  scalarList Nal(nElements, Zero); // for large hydrocarbons
472 
473  for (label i=0; i<this->nSpecie_; i++)
474  {
475  // Complete combustion products are not considered
476  if
477  (
478  this->chemistry_.Y()[i].member() == "CO2"
479  || this->chemistry_.Y()[i].member() == "H2O"
480  )
481  {
482  continue;
483  }
484 
485  Na[0] += sC_[i]*c[i];
486  Na[1] += sH_[i]*c[i];
487  Na[2] += sO_[i]*c[i];
488  if (sC_[i]>nbCLarge_ || this->chemistry_.Y()[i].member() == "O2")
489  {
490  Nal[0] += sC_[i]*c[i];
491  Nal[1] += sH_[i]*c[i];
492  Nal[2] += sO_[i]*c[i];
493  }
494  }
495 
496  // 2C(-CO2) + H(-H2O)/2 - z'C(-CO2)
497  // Progress equivalence ratio = ----------------------------------
498  // O(-CO2-H2O) - z' C(-CO2)
499  // where minus means that this species is not considered for the number
500  // of atoms and z' is the ratio of the number of O and C in the fuel(s)
501  phiProgress = (2*Na[0]+Na[1]/2-zprime_*Na[0])/(Na[2]-zprime_*Na[0]);
502 
503  // 2Cl + Hl/2
504  // Equivalence ratio for fuel decomposition = ----------
505  // Ol(+O2)
506  phiLarge = (2*Nal[0] + Nal[1]/2)/Nal[2];
507  }
508 
509  // Using the rAB matrix (numerator and denominator separated)
510  // compute the R value according to the search initiating set
511  scalarField Rvalue(this->nSpecie_, Zero);
512  label speciesNumber = 0;
513 
514  // Set all species to inactive and activate them according
515  // to rAB and initial set
516  for (label i=0; i<this->nSpecie_; ++i)
517  {
518  this->activeSpecies_[i] = false;
519  }
520 
521  // Initialize the FIFOStack for search set
523 
524  const labelList& SIS(searchInitSet_);
525 
526  // If automaticSIS is on, the search initiating set is selected according to
527  // phiProgress and phiLarge
528  if (automaticSIS_)
529  {
530  if (phiLarge >= phiTol_ && phiProgress >= phiTol_)
531  {
532  // When phiLarge and phiProgress >= phiTol then
533  // CO, HO2 and fuel are in the SIS
534  Q.push(COId_);
535  ++speciesNumber;
536  this->activeSpecies_[COId_] = true;
537  Rvalue[COId_] = 1.0;
538  Q.push(HO2Id_);
539  ++speciesNumber;
540  this->activeSpecies_[HO2Id_] = true;
541  Rvalue[HO2Id_] = 1.0;
542  for (const label fuelId : fuelSpeciesID_)
543  {
544  Q.push(fuelId);
545  ++speciesNumber;
546  this->activeSpecies_[fuelId] = true;
547  Rvalue[fuelId] = 1.0;
548  }
549 
550  }
551  else if (phiLarge < phiTol_ && phiProgress >= phiTol_)
552  {
553  // When phiLarge < phiTol and phiProgress >= phiTol then
554  // CO, HO2 are in the SIS
555  Q.push(COId_);
556  ++speciesNumber;
557  this->activeSpecies_[COId_] = true;
558  Rvalue[COId_] = 1.0;
559  Q.push(HO2Id_);
560  ++speciesNumber;
561  this->activeSpecies_[HO2Id_] = true;
562  Rvalue[HO2Id_] = 1.0;
563 
564  if (forceFuelInclusion_)
565  {
566  for (const label fuelId : fuelSpeciesID_)
567  {
568  Q.push(fuelId);
569  ++speciesNumber;
570  this->activeSpecies_[fuelId] = true;
571  Rvalue[fuelId] = 1.0;
572  }
573  }
574  }
575  else
576  {
577  // When phiLarge and phiProgress< phiTol then
578  // CO2, H2O are in the SIS
579  Q.push(CO2Id_);
580  speciesNumber++;
581  this->activeSpecies_[CO2Id_] = true;
582  Rvalue[CO2Id_] = 1.0;
583 
584  Q.push(H2OId_);
585  speciesNumber++;
586  this->activeSpecies_[H2OId_] = true;
587  Rvalue[H2OId_] = 1.0;
588  if (forceFuelInclusion_)
589  {
590  for (const label fuelId : fuelSpeciesID_)
591  {
592  Q.push(fuelId);
593  ++speciesNumber;
594  this->activeSpecies_[fuelId] = true;
595  Rvalue[fuelId] = 1.0;
596  }
597  }
598  }
599 
600  if (T > NOxThreshold_ && NOId_ != -1)
601  {
602  Q.push(NOId_);
603  ++speciesNumber;
604  this->activeSpecies_[NOId_] = true;
605  Rvalue[NOId_] = 1.0;
606  }
607  }
608  else // No automaticSIS => all species of the SIS are added
609  {
610  for (label i=0; i<SIS.size(); i++)
611  {
612  label q = SIS[i];
613  this->activeSpecies_[q] = true;
614  ++speciesNumber;
615  Q.push(q);
616  Rvalue[q] = 1.0;
617  }
618  }
619 
620  // Execute the main loop for R-value
621  while (!Q.empty())
622  {
623  label u = Q.pop();
624  scalar Den = max(PA[u], CA[u]);
625  if (Den != 0)
626  {
627  for (label v=0; v<NbrABInit[u]; ++v)
628  {
629  label otherSpec = rABOtherSpec(u, v);
630  scalar rAB = mag(rABNum(u, v))/Den;
631  if (rAB > 1)
632  {
633  rAB = 1;
634  }
635 
636  // The direct link is weaker than the user-defined tolerance
637  if (rAB >= this->tolerance())
638  {
639  scalar Rtemp = Rvalue[u]*rAB;
640  // a link analysed previously is stronger
641  // the (composed) link is stronger than the user-defined
642  // tolerance
643  if ((Rvalue[otherSpec]<Rtemp) && (Rtemp>=this->tolerance()))
644  {
645  Q.push(otherSpec);
646  Rvalue[otherSpec] = Rtemp;
647  if (!this->activeSpecies_[otherSpec])
648  {
649  this->activeSpecies_[otherSpec] = true;
650  ++speciesNumber;
651  }
652  }
653  }
654  }
655  }
656  }
657 
658  // Put a flag on the reactions containing at least one removed species
659  forAll(this->chemistry_.reactions(), i)
660  {
661  const Reaction<ThermoType>& R = this->chemistry_.reactions()[i];
662  this->chemistry_.reactionsDisabled()[i] = false;
663 
664  forAll(R.lhs(), s)
665  {
666  label ss = R.lhs()[s].index;
667  if (!this->activeSpecies_[ss])
668  {
669  // Flag the reaction to disable it
670  this->chemistry_.reactionsDisabled()[i] = true;
671  break;
672  }
673  }
674  if (!this->chemistry_.reactionsDisabled()[i])
675  {
676  forAll(R.rhs(), s)
677  {
678  label ss = R.rhs()[s].index;
679  if (!this->activeSpecies_[ss])
680  {
681  // Flag the reaction to disable it
682  this->chemistry_.reactionsDisabled()[i] = true;
683  break;
684  }
685  }
686  }
687  }
688 
689  this->NsSimp_ = speciesNumber;
690  scalarField& simplifiedC(this->chemistry_.simplifiedC());
691  simplifiedC.setSize(this->NsSimp_ + 2);
692  DynamicList<label>& s2c(this->chemistry_.simplifiedToCompleteIndex());
693  s2c.setSize(this->NsSimp_);
694  Field<label>& c2s(this->chemistry_.completeToSimplifiedIndex());
695 
696  label j = 0;
697  for (label i=0; i<this->nSpecie_; i++)
698  {
699  if (this->activeSpecies_[i])
700  {
701  s2c[j] = i;
702  simplifiedC[j] = c[i];
703  c2s[i] = j++;
704  if (!this->chemistry_.active(i))
705  {
706  this->chemistry_.setActive(i);
707  }
708  }
709  else
710  {
711  c2s[i] = -1;
712  }
713  }
714 
715  simplifiedC[this->NsSimp_] = T;
716  simplifiedC[this->NsSimp_+1] = p;
717  this->chemistry_.setNsDAC(this->NsSimp_);
718 
719  // Change temporary Ns in chemistryModel
720  // to make the function nEqns working
721  this->chemistry_.setNSpecie(this->NsSimp_);
722 }
723 
724 
725 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
p
volScalarField & p
Definition: createFieldRefs.H:8
s
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputSpray.H:25
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::DynamicList< scalar >
Foam::dictionary::found
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Definition: dictionaryI.H:87
chemistry
BasicChemistryModel< psiReactionThermo > & chemistry
Definition: createFieldRefs.H:1
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:107
Foam::specieElement::name
const word & name() const
Return the name of the element.
Definition: specieElementI.H:56
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::chemistryReductionMethods::DAC::reduceMechanism
virtual void reduceMechanism(const scalarField &c, const scalar T, const scalar p)
Reduce the mechanism.
Definition: DAC.C:251
Foam::FIFOStack::push
void push(const T &element)
Push an element onto the back of the stack.
Definition: FIFOStack.H:78
R
#define R(A, B, C, D, E, F, K, M)
Foam::constant::physicoChemical::c1
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
Foam::specieElement::nAtoms
label nAtoms() const
Return the number of atoms of this element in the specie.
Definition: specieElementI.H:68
Foam::Field< scalar >
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::chemistryReductionMethods::DAC::~DAC
virtual ~DAC()
Destructor.
Definition: DAC.C:242
Foam::dictionary::subDict
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Definition: dictionary.C:460
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::RectangularMatrix< scalar >
Foam::DynamicList::setSize
void setSize(const label n)
Same as resize()
Definition: DynamicList.H:224
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
T
const volScalarField & T
Definition: createFieldRefs.H:2
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
found
bool found
Definition: TABSMDCalcMethod2.H:32
Foam::FIFOStack::pop
T pop()
Pop the bottom element off the stack.
Definition: FIFOStack.H:90
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::specieElement
Definition: specieElement.H:55
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::dictionary::toc
wordList toc() const
Return the table of contents.
Definition: dictionary.C:602
DAC.H
Foam::TDACChemistryModel< CompType, ThermoType >
Foam::FIFOStack
A FIFO stack based on a singly-linked list.
Definition: FIFOStack.H:51
Foam::chemistryReductionMethod
An abstract class for methods of chemical mechanism reduction.
Definition: chemistryReductionMethod.H:56
Foam::Reaction
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
Definition: Reaction.H:59
Foam::chemistryReductionMethods::DAC::DAC
DAC(const IOdictionary &dict, TDACChemistryModel< CompType, ThermoType > &chemistry)
Construct from components.
Definition: DAC.C:35