StandardChemistryModel.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) 2011-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 "StandardChemistryModel.H"
30 #include "reactingMixture.H"
31 #include "UniformField.H"
33 
34 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 
36 template<class ReactionThermo, class ThermoType>
38 (
39  ReactionThermo& thermo
40 )
41 :
43  ODESystem(),
44  Y_(this->thermo().composition().Y()),
45  reactions_
46  (
47  dynamic_cast<const reactingMixture<ThermoType>&>(this->thermo())
48  ),
49  specieThermo_
50  (
51  dynamic_cast<const reactingMixture<ThermoType>&>
52  (this->thermo()).speciesData()
53  ),
54 
55  nSpecie_(Y_.size()),
56  nReaction_(reactions_.size()),
57  Treact_
58  (
60  (
61  "Treact",
62  0.0
63  )
64  ),
65  RR_(nSpecie_),
66  c_(nSpecie_),
67  dcdt_(nSpecie_)
68 {
69  // Create the fields for the chemistry sources
70  forAll(RR_, fieldi)
71  {
72  RR_.set
73  (
74  fieldi,
76  (
77  IOobject
78  (
79  "RR." + Y_[fieldi].name(),
80  this->mesh().time().timeName(),
81  this->mesh(),
82  IOobject::NO_READ,
83  IOobject::NO_WRITE
84  ),
85  this->mesh(),
87  )
88  );
89  }
90 
91  Info<< "StandardChemistryModel: Number of species = " << nSpecie_
92  << " and reactions = " << nReaction_ << endl;
93 }
94 
95 
96 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
97 
98 template<class ReactionThermo, class ThermoType>
101 {}
102 
103 
104 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
105 
106 template<class ReactionThermo, class ThermoType>
108 (
109  const scalarField& c,
110  const scalar T,
111  const scalar p,
112  scalarField& dcdt
113 ) const
114 {
115  scalar pf, cf, pr, cr;
116  label lRef, rRef;
117 
118  dcdt = Zero;
119 
120  forAll(reactions_, i)
121  {
122  const Reaction<ThermoType>& R = reactions_[i];
123 
124  scalar omegai = omega
125  (
126  R, c, T, p, pf, cf, lRef, pr, cr, rRef
127  );
128 
129  forAll(R.lhs(), s)
130  {
131  const label si = R.lhs()[s].index;
132  const scalar sl = R.lhs()[s].stoichCoeff;
133  dcdt[si] -= sl*omegai;
134  }
135 
136  forAll(R.rhs(), s)
137  {
138  const label si = R.rhs()[s].index;
139  const scalar sr = R.rhs()[s].stoichCoeff;
140  dcdt[si] += sr*omegai;
141  }
142  }
143 }
144 
145 
146 template<class ReactionThermo, class ThermoType>
148 (
149  const label index,
150  const scalarField& c,
151  const scalar T,
152  const scalar p,
153  scalar& pf,
154  scalar& cf,
155  label& lRef,
156  scalar& pr,
157  scalar& cr,
158  label& rRef
159 ) const
160 {
161  const Reaction<ThermoType>& R = reactions_[index];
162  scalar w = omega(R, c, T, p, pf, cf, lRef, pr, cr, rRef);
163  return(w);
164 }
165 
166 
167 template<class ReactionThermo, class ThermoType>
169 (
170  const Reaction<ThermoType>& R,
171  const scalarField& c,
172  const scalar T,
173  const scalar p,
174  scalar& pf,
175  scalar& cf,
176  label& lRef,
177  scalar& pr,
178  scalar& cr,
179  label& rRef
180 ) const
181 {
182  const scalar kf = R.kf(p, T, c);
183  const scalar kr = R.kr(kf, p, T, c);
184 
185  pf = 1.0;
186  pr = 1.0;
187 
188  const label Nl = R.lhs().size();
189  const label Nr = R.rhs().size();
190 
191  label slRef = 0;
192  lRef = R.lhs()[slRef].index;
193 
194  pf = kf;
195  for (label s = 1; s < Nl; s++)
196  {
197  const label si = R.lhs()[s].index;
198 
199  if (c[si] < c[lRef])
200  {
201  const scalar exp = R.lhs()[slRef].exponent;
202  pf *= pow(max(c[lRef], 0.0), exp);
203  lRef = si;
204  slRef = s;
205  }
206  else
207  {
208  const scalar exp = R.lhs()[s].exponent;
209  pf *= pow(max(c[si], 0.0), exp);
210  }
211  }
212  cf = max(c[lRef], 0.0);
213 
214  {
215  const scalar exp = R.lhs()[slRef].exponent;
216  if (exp < 1.0)
217  {
218  if (cf > SMALL)
219  {
220  pf *= pow(cf, exp - 1.0);
221  }
222  else
223  {
224  pf = 0.0;
225  }
226  }
227  else
228  {
229  pf *= pow(cf, exp - 1.0);
230  }
231  }
232 
233  label srRef = 0;
234  rRef = R.rhs()[srRef].index;
235 
236  // Find the matrix element and element position for the rhs
237  pr = kr;
238  for (label s = 1; s < Nr; s++)
239  {
240  const label si = R.rhs()[s].index;
241  if (c[si] < c[rRef])
242  {
243  const scalar exp = R.rhs()[srRef].exponent;
244  pr *= pow(max(c[rRef], 0.0), exp);
245  rRef = si;
246  srRef = s;
247  }
248  else
249  {
250  const scalar exp = R.rhs()[s].exponent;
251  pr *= pow(max(c[si], 0.0), exp);
252  }
253  }
254  cr = max(c[rRef], 0.0);
255 
256  {
257  const scalar exp = R.rhs()[srRef].exponent;
258  if (exp < 1.0)
259  {
260  if (cr>SMALL)
261  {
262  pr *= pow(cr, exp - 1.0);
263  }
264  else
265  {
266  pr = 0.0;
267  }
268  }
269  else
270  {
271  pr *= pow(cr, exp - 1.0);
272  }
273  }
274 
275  return pf*cf - pr*cr;
276 }
277 
278 
279 template<class ReactionThermo, class ThermoType>
281 (
282  const scalar time,
283  const scalarField& c,
284  scalarField& dcdt
285 ) const
286 {
287  const scalar T = c[nSpecie_];
288  const scalar p = c[nSpecie_ + 1];
289 
290  forAll(c_, i)
291  {
292  c_[i] = max(c[i], 0.0);
293  }
294 
295  omega(c_, T, p, dcdt);
296 
297  // Constant pressure
298  // dT/dt = ...
299  scalar rho = 0.0;
300  scalar cSum = 0.0;
301  for (label i = 0; i < nSpecie_; i++)
302  {
303  const scalar W = specieThermo_[i].W();
304  cSum += c_[i];
305  rho += W*c_[i];
306  }
307  scalar cp = 0.0;
308  for (label i=0; i<nSpecie_; i++)
309  {
310  cp += c_[i]*specieThermo_[i].cp(p, T);
311  }
312  cp /= rho;
313 
314  scalar dT = 0.0;
315  for (label i = 0; i < nSpecie_; i++)
316  {
317  const scalar hi = specieThermo_[i].ha(p, T);
318  dT += hi*dcdt[i];
319  }
320  dT /= rho*cp;
321 
322  dcdt[nSpecie_] = -dT;
323 
324  // dp/dt = ...
325  dcdt[nSpecie_ + 1] = 0.0;
326 }
327 
328 
329 template<class ReactionThermo, class ThermoType>
331 (
332  const scalar t,
333  const scalarField& c,
334  scalarField& dcdt,
335  scalarSquareMatrix& dfdc
336 ) const
337 {
338  const scalar T = c[nSpecie_];
339  const scalar p = c[nSpecie_ + 1];
340 
341  forAll(c_, i)
342  {
343  c_[i] = max(c[i], 0.0);
344  }
345 
346  dfdc = Zero;
347 
348  // Length of the first argument must be nSpecie_
349  omega(c_, T, p, dcdt);
350 
351  forAll(reactions_, ri)
352  {
353  const Reaction<ThermoType>& R = reactions_[ri];
354 
355  const scalar kf0 = R.kf(p, T, c_);
356  const scalar kr0 = R.kr(kf0, p, T, c_);
357 
358  forAll(R.lhs(), j)
359  {
360  const label sj = R.lhs()[j].index;
361  scalar kf = kf0;
362  forAll(R.lhs(), i)
363  {
364  const label si = R.lhs()[i].index;
365  const scalar el = R.lhs()[i].exponent;
366  if (i == j)
367  {
368  if (el < 1.0)
369  {
370  if (c_[si] > SMALL)
371  {
372  kf *= el*pow(c_[si], el - 1.0);
373  }
374  else
375  {
376  kf = 0.0;
377  }
378  }
379  else
380  {
381  kf *= el*pow(c_[si], el - 1.0);
382  }
383  }
384  else
385  {
386  kf *= pow(c_[si], el);
387  }
388  }
389 
390  forAll(R.lhs(), i)
391  {
392  const label si = R.lhs()[i].index;
393  const scalar sl = R.lhs()[i].stoichCoeff;
394  dfdc(si, sj) -= sl*kf;
395  }
396  forAll(R.rhs(), i)
397  {
398  const label si = R.rhs()[i].index;
399  const scalar sr = R.rhs()[i].stoichCoeff;
400  dfdc(si, sj) += sr*kf;
401  }
402  }
403 
404  forAll(R.rhs(), j)
405  {
406  const label sj = R.rhs()[j].index;
407  scalar kr = kr0;
408  forAll(R.rhs(), i)
409  {
410  const label si = R.rhs()[i].index;
411  const scalar er = R.rhs()[i].exponent;
412  if (i == j)
413  {
414  if (er < 1.0)
415  {
416  if (c_[si] > SMALL)
417  {
418  kr *= er*pow(c_[si], er - 1.0);
419  }
420  else
421  {
422  kr = 0.0;
423  }
424  }
425  else
426  {
427  kr *= er*pow(c_[si], er - 1.0);
428  }
429  }
430  else
431  {
432  kr *= pow(c_[si], er);
433  }
434  }
435 
436  forAll(R.lhs(), i)
437  {
438  const label si = R.lhs()[i].index;
439  const scalar sl = R.lhs()[i].stoichCoeff;
440  dfdc(si, sj) += sl*kr;
441  }
442  forAll(R.rhs(), i)
443  {
444  const label si = R.rhs()[i].index;
445  const scalar sr = R.rhs()[i].stoichCoeff;
446  dfdc(si, sj) -= sr*kr;
447  }
448  }
449  }
450 
451  // Calculate the dcdT elements numerically
452  const scalar delta = 1.0e-3;
453 
454  omega(c_, T + delta, p, dcdt_);
455  for (label i=0; i<nSpecie_; i++)
456  {
457  dfdc(i, nSpecie_) = dcdt_[i];
458  }
459 
460  omega(c_, T - delta, p, dcdt_);
461  for (label i=0; i<nSpecie_; i++)
462  {
463  dfdc(i, nSpecie_) = 0.5*(dfdc(i, nSpecie_) - dcdt_[i])/delta;
464  }
465 
466  dfdc(nSpecie_, nSpecie_) = 0;
467  dfdc(nSpecie_ + 1, nSpecie_) = 0;
468 }
469 
470 
471 template<class ReactionThermo, class ThermoType>
474 {
476  (
477  new volScalarField
478  (
479  IOobject
480  (
481  "tc",
482  this->time().timeName(),
483  this->mesh(),
484  IOobject::NO_READ,
485  IOobject::NO_WRITE,
486  false
487  ),
488  this->mesh(),
489  dimensionedScalar("small", dimTime, SMALL),
490  extrapolatedCalculatedFvPatchScalarField::typeName
491  )
492  );
493 
494  scalarField& tc = ttc.ref();
495 
496  tmp<volScalarField> trho(this->thermo().rho());
497  const scalarField& rho = trho();
498 
499  const scalarField& T = this->thermo().T();
500  const scalarField& p = this->thermo().p();
501 
502  const label nReaction = reactions_.size();
503 
504  scalar pf, cf, pr, cr;
505  label lRef, rRef;
506 
507  if (this->chemistry_)
508  {
509  forAll(rho, celli)
510  {
511  const scalar rhoi = rho[celli];
512  const scalar Ti = T[celli];
513  const scalar pi = p[celli];
514 
515  scalar cSum = 0.0;
516 
517  for (label i=0; i<nSpecie_; i++)
518  {
519  c_[i] = rhoi*Y_[i][celli]/specieThermo_[i].W();
520  cSum += c_[i];
521  }
522 
523  forAll(reactions_, i)
524  {
525  const Reaction<ThermoType>& R = reactions_[i];
526 
527  omega(R, c_, Ti, pi, pf, cf, lRef, pr, cr, rRef);
528 
529  forAll(R.rhs(), s)
530  {
531  tc[celli] += R.rhs()[s].stoichCoeff*pf*cf;
532  }
533  }
534 
535  tc[celli] = nReaction*cSum/tc[celli];
536  }
537  }
538 
539  ttc.ref().correctBoundaryConditions();
540 
541  return ttc;
542 }
543 
544 
545 template<class ReactionThermo, class ThermoType>
548 {
549  tmp<volScalarField> tQdot
550  (
551  new volScalarField
552  (
553  IOobject
554  (
555  "Qdot",
556  this->mesh_.time().timeName(),
557  this->mesh_,
558  IOobject::NO_READ,
559  IOobject::NO_WRITE,
560  false
561  ),
562  this->mesh_,
564  )
565  );
566 
567  if (this->chemistry_)
568  {
569  scalarField& Qdot = tQdot.ref();
570 
571  forAll(Y_, i)
572  {
573  forAll(Qdot, celli)
574  {
575  const scalar hi = specieThermo_[i].Hc();
576  Qdot[celli] -= hi*RR_[i][celli];
577  }
578  }
579  }
580 
581  return tQdot;
582 }
583 
584 
585 template<class ReactionThermo, class ThermoType>
588 (
589  const label ri,
590  const label si
591 ) const
592 {
593  scalar pf, cf, pr, cr;
594  label lRef, rRef;
595 
597  (
599  (
600  IOobject
601  (
602  "RR",
603  this->mesh().time().timeName(),
604  this->mesh(),
605  IOobject::NO_READ,
606  IOobject::NO_WRITE
607  ),
608  this->mesh(),
610  )
611  );
612 
614 
615  tmp<volScalarField> trho(this->thermo().rho());
616  const scalarField& rho = trho();
617 
618  const scalarField& T = this->thermo().T();
619  const scalarField& p = this->thermo().p();
620 
621  forAll(rho, celli)
622  {
623  const scalar rhoi = rho[celli];
624  const scalar Ti = T[celli];
625  const scalar pi = p[celli];
626 
627  for (label i=0; i<nSpecie_; i++)
628  {
629  const scalar Yi = Y_[i][celli];
630  c_[i] = rhoi*Yi/specieThermo_[i].W();
631  }
632 
633  const scalar w = omegaI
634  (
635  ri,
636  c_,
637  Ti,
638  pi,
639  pf,
640  cf,
641  lRef,
642  pr,
643  cr,
644  rRef
645  );
646 
647  RR[celli] = w*specieThermo_[si].W();
648  }
649 
650  return tRR;
651 }
652 
653 
654 template<class ReactionThermo, class ThermoType>
656 {
657  if (!this->chemistry_)
658  {
659  return;
660  }
661 
662  tmp<volScalarField> trho(this->thermo().rho());
663  const scalarField& rho = trho();
664 
665  const scalarField& T = this->thermo().T();
666  const scalarField& p = this->thermo().p();
667 
668  forAll(rho, celli)
669  {
670  const scalar rhoi = rho[celli];
671  const scalar Ti = T[celli];
672  const scalar pi = p[celli];
673 
674  for (label i=0; i<nSpecie_; i++)
675  {
676  const scalar Yi = Y_[i][celli];
677  c_[i] = rhoi*Yi/specieThermo_[i].W();
678  }
679 
680  omega(c_, Ti, pi, dcdt_);
681 
682  for (label i=0; i<nSpecie_; i++)
683  {
684  RR_[i][celli] = dcdt_[i]*specieThermo_[i].W();
685  }
686  }
687 }
688 
689 
690 template<class ReactionThermo, class ThermoType>
691 template<class DeltaTType>
693 (
694  const DeltaTType& deltaT
695 )
696 {
698 
699  scalar deltaTMin = GREAT;
700 
701  if (!this->chemistry_)
702  {
703  return deltaTMin;
704  }
705 
706  tmp<volScalarField> trho(this->thermo().rho());
707  const scalarField& rho = trho();
708 
709  const scalarField& T = this->thermo().T();
710  const scalarField& p = this->thermo().p();
711 
712  scalarField c0(nSpecie_);
713 
714  forAll(rho, celli)
715  {
716  scalar Ti = T[celli];
717 
718  if (Ti > Treact_)
719  {
720  const scalar rhoi = rho[celli];
721  scalar pi = p[celli];
722 
723  for (label i=0; i<nSpecie_; i++)
724  {
725  c_[i] = rhoi*Y_[i][celli]/specieThermo_[i].W();
726  c0[i] = c_[i];
727  }
728 
729  // Initialise time progress
730  scalar timeLeft = deltaT[celli];
731 
732  // Calculate the chemical source terms
733  while (timeLeft > SMALL)
734  {
735  scalar dt = timeLeft;
736  this->solve(c_, Ti, pi, dt, this->deltaTChem_[celli]);
737  timeLeft -= dt;
738  }
739 
740  deltaTMin = min(this->deltaTChem_[celli], deltaTMin);
741 
742  this->deltaTChem_[celli] =
743  min(this->deltaTChem_[celli], this->deltaTChemMax_);
744 
745  for (label i=0; i<nSpecie_; i++)
746  {
747  RR_[i][celli] =
748  (c_[i] - c0[i])*specieThermo_[i].W()/deltaT[celli];
749  }
750  }
751  else
752  {
753  for (label i=0; i<nSpecie_; i++)
754  {
755  RR_[i][celli] = 0;
756  }
757  }
758  }
759 
760  return deltaTMin;
761 }
762 
763 
764 template<class ReactionThermo, class ThermoType>
766 (
767  const scalar deltaT
768 )
769 {
770  // Don't allow the time-step to change more than a factor of 2
771  return min
772  (
774  2*deltaT
775  );
776 }
777 
778 
779 template<class ReactionThermo, class ThermoType>
781 (
782  const scalarField& deltaT
783 )
784 {
785  return this->solve<scalarField>(deltaT);
786 }
787 
788 
789 // ************************************************************************* //
Foam::constant::thermodynamic::RR
const scalar RR
Universal gas constant: default in [J/(kmol K)].
Definition: thermodynamicConstants.C:46
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
p
volScalarField & p
Definition: createFieldRefs.H:8
reactingMixture.H
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::StandardChemistryModel::~StandardChemistryModel
virtual ~StandardChemistryModel()
Destructor.
Definition: StandardChemistryModel.C:100
cp
const volScalarField & cp
Definition: setRegionSolidFields.H:8
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimEnergy
const dimensionSet dimEnergy
StandardChemistryModel.H
thermo
psiReactionThermo & thermo
Definition: createFields.H:28
Foam::reactingMixture
Foam::reactingMixture.
Definition: reactingMixture.H:57
Foam::BasicChemistryModel
Basic chemistry model templated on thermodynamics.
Definition: BasicChemistryModel.H:57
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:261
Foam::StandardChemistryModel::jacobian
virtual void jacobian(const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const
Calculate the Jacobian of the system.
Definition: StandardChemistryModel.C:331
rho
rho
Definition: readInitialConditions.H:88
Foam::StandardChemistryModel::derivatives
virtual void derivatives(const scalar t, const scalarField &c, scalarField &dcdt) const
Calculate the derivatives in dydx.
Definition: StandardChemistryModel.C:281
composition
basicSpecieMixture & composition
Definition: createFieldRefs.H:6
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
solve
CEqn solve()
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
trho
tmp< volScalarField > trho
Definition: setRegionSolidFields.H:4
Foam::UniformField
A class representing the concept of a uniform field which stores only the single value and providing ...
Definition: UniformField.H:51
Foam::dimTime
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:54
R
#define R(A, B, C, D, E, F, K, M)
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:228
Foam::Field< scalar >
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
correct
fvOptions correct(rho)
delta
scalar delta
Definition: LISASMDCalcMethod2.H:8
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::StandardChemistryModel::calculate
virtual void calculate()
Calculates the reaction rates.
Definition: StandardChemistryModel.C:655
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
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
timeName
word timeName
Definition: getTimeIndex.H:3
Qdot
scalar Qdot
Definition: solveChemistry.H:2
Foam::StandardChemistryModel::tc
virtual tmp< volScalarField > tc() const
Return the chemical time scale.
Definition: StandardChemistryModel.C:473
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:52
T
const volScalarField & T
Definition: createFieldRefs.H:2
Y
PtrList< volScalarField > & Y
Definition: createFieldRefs.H:7
Foam::StandardChemistryModel::omega
virtual void omega(const scalarField &c, const scalar T, const scalar p, scalarField &dcdt) const
dc/dt = omega, rate of change in concentration, for each species
Definition: StandardChemistryModel.C:108
Foam::SquareMatrix< scalar >
Foam::constant::mathematical::pi
constexpr scalar pi(M_PI)
Foam::ODESystem
Abstract base class for the systems of ordinary differential equations.
Definition: ODESystem.H:49
Foam::StandardChemistryModel::omegaI
virtual scalar omegaI(label iReaction, const scalarField &c, const scalar T, const scalar p, scalar &pf, scalar &cf, label &lRef, scalar &pr, scalar &cr, label &rRef) const
Return the reaction rate for iReaction and the reference.
Definition: StandardChemistryModel.C:148
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::StandardChemistryModel::Qdot
virtual tmp< volScalarField > Qdot() const
Return the heat release rate [kg/m/s3].
Definition: StandardChemistryModel.C:547
Foam::dimVolume
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:61
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::Reaction
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
Definition: Reaction.H:56
Foam::StandardChemistryModel::calculateRR
virtual tmp< volScalarField::Internal > calculateRR(const label reactionI, const label speciei) const
Return reaction rate of the speciei in reactionI.
Definition: StandardChemistryModel.C:588
UniformField.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
extrapolatedCalculatedFvPatchFields.H
Foam::StandardChemistryModel
Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equa...
Definition: StandardChemistryModel.H:61