chemPointISAT.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
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 \*---------------------------------------------------------------------------*/
25 
26 #include "chemPointISAT.H"
27 #include "ISAT.H"
28 #include "odeChemistryModel.H"
29 #include "SVD.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 // Defined as static to be able to dynamically change it during simulations
34 // (all chemPoints refer to the same object)
35 Foam::scalar Foam::chemPointISAT::tolerance_;
36 
37 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
38 
39 void Foam::chemPointISAT::qrDecompose
40 (
41  const label nCols,
43 )
44 {
45  scalarField c(nCols);
46  scalarField d(nCols);
47  scalar scale, sigma, sum;
48 
49  for (label k=0; k<nCols-1; k++)
50  {
51  scale = 0;
52  for (label i=k; i<nCols; i++)
53  {
54  scale=max(scale, mag(R(i, k)));
55  }
56  if (scale == 0)
57  {
58  c[k] = d[k] = 0;
59  }
60  else
61  {
62  for (label i=k; i<nCols; i++)
63  {
64  R(i, k) /= scale;
65  }
66  sum = 0;
67  for (label i=k; i<nCols; i++)
68  {
69  sum += sqr(R(i, k));
70  }
71  sigma = sign(R(k, k))*sqrt(sum);
72  R(k, k) += sigma;
73  c[k] = sigma*R(k, k);
74  d[k] = -scale*sigma;
75  for (label j=k+1; j<nCols; j++)
76  {
77  sum = 0;
78  for ( label i=k; i<nCols; i++)
79  {
80  sum += R(i, k)*R(i, j);
81  }
82  scalar tau = sum/c[k];
83  for ( label i=k; i<nCols; i++)
84  {
85  R(i, j) -= tau*R(i, k);
86  }
87  }
88  }
89  }
90 
91  d[nCols-1] = R(nCols-1, nCols-1);
92 
93  // form R
94  for (label i=0; i<nCols; i++)
95  {
96  R(i, i) = d[i];
97  for ( label j=0; j<i; j++)
98  {
99  R(i, j)=0;
100  }
101  }
102 }
103 
104 
105 void Foam::chemPointISAT::qrUpdate
106 (
108  const label n,
109  const scalarField& u,
110  const scalarField& v
111 )
112 {
113  label k;
114 
115  scalarField w(u);
116  for (k=n-1; k>=0; k--)
117  {
118  if (w[k] != 0)
119  {
120  break;
121  }
122  }
123 
124  if (k < 0)
125  {
126  k = 0;
127  }
128 
129  for (label i=k-1; i>=0; i--)
130  {
131  rotate(R, i, w[i], -w[i+1], n);
132  if (w[i] == 0)
133  {
134  w[i] = mag(w[i+1]);
135  }
136  else if (mag(w[i]) > mag(w[i+1]))
137  {
138  w[i] = mag(w[i])*sqrt(1.0 + sqr(w[i+1]/w[i]));
139  }
140  else
141  {
142  w[i] = mag(w[i+1])*sqrt(1.0 + sqr(w[i]/w[i+1]));
143  }
144  }
145 
146  for (label i=0; i<n; i++)
147  {
148  R(0, i) += w[0]*v[i];
149  }
150 
151  for (label i=0; i<k; i++)
152  {
153  rotate(R, i, R(i, i), -R(i+1, i), n);
154  }
155 }
156 
157 
158 void Foam::chemPointISAT::rotate
159 (
161  const label i,
162  const scalar a,
163  const scalar b,
164  label n
165 )
166 {
167  scalar c, fact, s, w, y;
168 
169  if (a == 0)
170  {
171  c = 0;
172  s = (b >= 0 ? 1 : -1);
173  }
174  else if (mag(a) > mag(b))
175  {
176  fact = b/a;
177  c = sign(a)/sqrt(1.0 + sqr(fact));
178  s = fact*c;
179  }
180  else
181  {
182  fact = a/b;
183  s = sign(b)/sqrt(1.0 + sqr(fact));
184  c = fact*s;
185  }
186 
187  for (label j=i;j<n;j++)
188  {
189  y = R(i, j);
190  w = R(i+1, j);
191  R(i, j) = c*y-s*w;
192  R(i+1, j) = s*y+c*w;
193  }
194 }
195 
196 
197 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
198 
200 (
202  const scalarField& phi,
203  const scalarField& Rphi,
204  const scalarSquareMatrix& A,
205  const scalarField& scaleFactor,
206  const scalar tolerance,
207  const label completeSpaceSize,
208  const label nActive,
209  const label maxNumNewDim,
210  const Switch printProportion,
211  binaryNode* node
212 )
213 :
214  table_(table),
215  phi_(phi),
216  Rphi_(Rphi),
217  A_(A),
218  scaleFactor_(scaleFactor),
219  node_(node),
220  completeSpaceSize_(completeSpaceSize),
221  nGrowth_(0),
222  nActive_(nActive),
223  timeTag_(table.timeSteps()),
224  lastTimeUsed_(table.timeSteps()),
225  toRemove_(false),
226  maxNumNewDim_(maxNumNewDim),
227  printProportion_(printProportion),
228  numRetrieve_(0),
229  nLifeTime_(0)
230 {
231  tolerance_ = tolerance;
232 
233  iddeltaT_ = completeSpaceSize - 1;
234  scaleFactor_[iddeltaT_] *= phi_[iddeltaT_]/tolerance_;
235 
236  idT_ = completeSpaceSize - 3;
237  idp_ = completeSpaceSize - 2;
238 
239  if (table_.reduction())
240  {
241  simplifiedToCompleteIndex_.setSize(nActive_);
242  completeToSimplifiedIndex_.setSize(completeSpaceSize - 3);
243 
244  forAll(completeToSimplifiedIndex_, i)
245  {
246  completeToSimplifiedIndex_[i] = table_.chemistry().cTos(i);
247  }
248 
249  forAll(simplifiedToCompleteIndex_, i)
250  {
251  simplifiedToCompleteIndex_[i] = table_.chemistry().sToc(i);
252  }
253  }
254 
255  const label reduOrCompDim =
256  table_.reduction() ? nActive_ + 3 : completeSpaceSize;
257 
258  // SVD decomposition A = U*D*V^T
259  SVD svdA(A);
260 
261  scalarDiagonalMatrix D(reduOrCompDim);
262  const scalarDiagonalMatrix& S = svdA.S();
263 
264  // Replace the value of vector D by max(D, 1/2), first ISAT paper
265  for (label i=0; i<reduOrCompDim; i++)
266  {
267  D[i] = max(S[i], 0.5);
268  }
269 
270  // Rebuild A with max length, tol and scale factor before QR decomposition
271  scalarRectangularMatrix Atilde(reduOrCompDim);
272 
273  // Result stored in Atilde
274  multiply(Atilde, svdA.U(), D, svdA.V().T());
275 
276  for (label i=0; i<reduOrCompDim; i++)
277  {
278  for (label j=0; j<reduOrCompDim; j++)
279  {
280  label compi = i;
281 
282  if (table_.reduction())
283  {
284  compi = simplifiedToCompleteIndex(i);
285  }
286 
287  // SF*A/tolerance
288  // (where SF is diagonal with inverse of scale factors)
289  // SF*A is the same as dividing each line by the scale factor
290  // corresponding to the species of this line
291  Atilde(i, j) /= (tolerance*scaleFactor[compi]);
292  }
293  }
294 
295  // The object LT_ (the transpose of the Q) describe the EOA, since we have
296  // A^T B^T B A that should be factorised into L Q^T Q L^T and is set in the
297  // qrDecompose function
298  LT_ = scalarSquareMatrix(Atilde);
299 
300  qrDecompose(reduOrCompDim, LT_);
301 }
302 
303 
305 (
307 )
308 :
309  table_(p.table_),
310  phi_(p.phi()),
311  Rphi_(p.Rphi()),
312  LT_(p.LT()),
313  A_(p.A()),
314  scaleFactor_(p.scaleFactor()),
315  node_(p.node()),
316  completeSpaceSize_(p.completeSpaceSize()),
317  nGrowth_(p.nGrowth()),
318  nActive_(p.nActive()),
319  simplifiedToCompleteIndex_(p.simplifiedToCompleteIndex()),
320  timeTag_(p.timeTag()),
321  lastTimeUsed_(p.lastTimeUsed()),
322  toRemove_(p.toRemove()),
323  maxNumNewDim_(p.maxNumNewDim()),
324  numRetrieve_(0),
325  nLifeTime_(0),
326  completeToSimplifiedIndex_(p.completeToSimplifiedIndex())
327 {
328  tolerance_ = p.tolerance();
329 
330  idT_ = completeSpaceSize() - 3;
331  idp_ = completeSpaceSize() - 2;
332  iddeltaT_ = completeSpaceSize() - 1;
333 }
334 
335 
336 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
337 
339 {
340  const scalarField dphi(phiq - phi());
341 
342  const label dim =
343  table_.reduction() ? nActive_ : completeSpaceSize() - 3;
344 
345  scalar epsTemp = 0;
346  List<scalar> propEps(completeSpaceSize(), scalar(0));
347 
348  for (label i=0; i<completeSpaceSize()-3; i++)
349  {
350  scalar temp = 0;
351 
352  // When mechanism reduction is inactive OR on active species multiply L
353  // by dphi to get the distance in the active species direction else (for
354  // inactive species), just multiply the diagonal element and dphi
355  if
356  (
357  !(table_.reduction())
358  ||(table_.reduction() && completeToSimplifiedIndex_[i] != -1)
359  )
360  {
361  const label si =
362  table_.reduction()
363  ? completeToSimplifiedIndex_[i]
364  : i;
365 
366  for (label j=si; j<dim; j++)// LT is upper triangular
367  {
368  const label sj =
369  table_.reduction()
370  ? simplifiedToCompleteIndex_[j]
371  : j;
372 
373  temp += LT_(si, j)*dphi[sj];
374  }
375 
376  temp += LT_(si, dim)*dphi[idT_];
377  temp += LT_(si, dim+1)*dphi[idp_];
378  temp += LT_(si, dim+2)*dphi[iddeltaT_];
379  }
380  else
381  {
382  temp = dphi[i]/(tolerance_*scaleFactor_[i]);
383  }
384 
385  epsTemp += sqr(temp);
386 
387  if (printProportion_)
388  {
389  propEps[i] = temp;
390  }
391  }
392 
393  // Temperature
394  epsTemp +=
395  sqr
396  (
397  LT_(dim, dim)*dphi[idT_]
398  +LT_(dim, dim+1)*dphi[idp_]
399  +LT_(dim, dim+2)*dphi[iddeltaT_]
400  );
401 
402  // Pressure
403  epsTemp +=
404  sqr
405  (
406  LT_(dim+1, dim+1)*dphi[idp_]
407  +LT_(dim+1, dim+2)*dphi[iddeltaT_]
408  );
409 
410  epsTemp += sqr(LT_[dim+2][dim+2]*dphi[iddeltaT_]);
411 
412  if (printProportion_)
413  {
414  propEps[idT_] = sqr
415  (
416  LT_(dim, dim)*dphi[idT_]
417  + LT_(dim, dim+1)*dphi[idp_]
418  );
419 
420  propEps[idp_] =
421  sqr(LT_(dim+1, dim+1)*dphi[idp_]);
422 
423  propEps[iddeltaT_] =
424  sqr(LT_[dim+2][dim+2]*dphi[iddeltaT_]);
425  }
426 
427  if (sqrt(epsTemp) > 1 + tolerance_)
428  {
429  if (printProportion_)
430  {
431  scalar max = -1;
432  label maxIndex = -1;
433  for (label i=0; i<completeSpaceSize(); i++)
434  {
435  if(max < propEps[i])
436  {
437  max = propEps[i];
438  maxIndex = i;
439  }
440  }
441  word propName;
442  if (maxIndex >= completeSpaceSize() - 3)
443  {
444  if (maxIndex == idT_)
445  {
446  propName = "T";
447  }
448  else if (maxIndex == idp_)
449  {
450  propName = "p";
451  }
452  else if (maxIndex == iddeltaT_)
453  {
454  propName = "deltaT";
455  }
456  }
457  else
458  {
459  propName = table_.chemistry().Y()[maxIndex].member();
460  }
461 
462  Info<< "Direction maximum impact to error in ellipsoid: "
463  << propName << endl;
464 
465  Info<< "Proportion to the total error on the retrieve: "
466  << max/(epsTemp+small) << endl;
467  }
468  return false;
469  }
470  else
471  {
472  return true;
473  }
474 }
475 
476 
478 (
479  const scalarField& phiq,
480  const scalarField& Rphiq
481 )
482 {
483  scalar eps2 = 0;
484  const scalarField dR(Rphiq - Rphi());
485  const scalarField dphi(phiq - phi());
486  const scalarField& scaleFactorV(scaleFactor());
487  const scalarSquareMatrix& Avar(A());
488  scalar dRl = 0;
489 
490  const label dim =
491  table_.reduction() ? nActive_ : completeSpaceSize() - 2;
492 
493  // Since we build only the solution for the species, T and p are not
494  // included
495  for (label i=0; i<completeSpaceSize()-3; i++)
496  {
497  dRl = 0;
498  if (table_.reduction())
499  {
500  const label si = completeToSimplifiedIndex_[i];
501 
502  // If this species is active
503  if (si != -1)
504  {
505  for (label j=0; j<dim; j++)
506  {
507  const label sj = simplifiedToCompleteIndex_[j];
508  dRl += Avar(si, j)*dphi[sj];
509  }
510  dRl += Avar(si, nActive_)*dphi[idT_];
511  dRl += Avar(si, nActive_+1)*dphi[idp_];
512  dRl += Avar(si, nActive_+2)*dphi[iddeltaT_];
513  }
514  else
515  {
516  dRl = dphi[i];
517  }
518  }
519  else
520  {
521  for (label j=0; j<completeSpaceSize(); j++)
522  {
523  dRl += Avar(i, j)*dphi[j];
524  }
525  }
526  eps2 += sqr((dR[i]-dRl)/scaleFactorV[i]);
527  }
528 
529  eps2 = sqrt(eps2);
530  if (eps2 > tolerance())
531  {
532  return false;
533  }
534  else
535  {
536  // if the solution is in the ellipsoid of accuracy
537  return true;
538  }
539 }
540 
541 
543 {
544  const scalarField dphi(phiq - phi());
545  const label initNActiveSpecies(nActive_);
546 
547  if (table_.reduction())
548  {
549  label activeAdded(0);
550  DynamicList<label> dimToAdd(0);
551 
552  // check if the difference of active species is lower than the maximum
553  // number of new dimensions allowed
554  for (label i=0; i<completeSpaceSize()-3; i++)
555  {
556  // first test if the current chemPoint has an inactive species
557  // corresponding to an active one in the query point
558  if
559  (
560  completeToSimplifiedIndex_[i] == -1
561  && table_.chemistry().cTos(i) != -1
562  )
563  {
564  activeAdded++;
565  dimToAdd.append(i);
566  }
567  // then test if an active species in the current chemPoint
568  // corresponds to an inactive on the query side
569  if
570  (
571  completeToSimplifiedIndex_[i] != -1
572  && table_.chemistry().cTos(i) == -1
573  )
574  {
575  activeAdded++;
576  // we don't need to add a new dimension but we count it to have
577  // control on the difference through maxNumNewDim
578  }
579  // finally test if both points have inactive species but
580  // with a dphi!=0
581  if
582  (
583  completeToSimplifiedIndex_[i] == -1
584  && table_.chemistry().cTos(i) == -1
585  && dphi[i] != 0
586  )
587  {
588  activeAdded++;
589  dimToAdd.append(i);
590  }
591  }
592 
593  // if the number of added dimension is too large, growth fail
594  if (activeAdded > maxNumNewDim_)
595  {
596  return false;
597  }
598 
599  // the number of added dimension to the current chemPoint
600  nActive_ += dimToAdd.size();
601  simplifiedToCompleteIndex_.setSize(nActive_);
602  forAll(dimToAdd, i)
603  {
604  label si = nActive_ - dimToAdd.size() + i;
605  // add the new active species
606  simplifiedToCompleteIndex_[si] = dimToAdd[i];
607  completeToSimplifiedIndex_[dimToAdd[i]] = si;
608  }
609 
610  // update LT and A :
611  //-add new column and line for the new active species
612  //-transfer last two lines of the previous matrix (p and T) to the end
613  // (change the diagonal position)
614  //-set all element of the new lines and columns to zero except diagonal
615  // (=1/(tolerance*scaleFactor))
616  if (nActive_ > initNActiveSpecies)
617  {
618  const scalarSquareMatrix LTvar = LT_; // take a copy of LT_
619  const scalarSquareMatrix Avar = A_; // take a copy of A_
620  LT_ = scalarSquareMatrix(nActive_+3, Zero);
621  A_ = scalarSquareMatrix(nActive_+3, Zero);
622 
623  // write the initial active species
624  for (label i=0; i<initNActiveSpecies; i++)
625  {
626  for (label j=0; j<initNActiveSpecies; j++)
627  {
628  LT_(i, j) = LTvar(i, j);
629  A_(i, j) = Avar(i, j);
630  }
631  }
632 
633  // write the columns for temperature and pressure
634  for (label i=0; i<initNActiveSpecies; i++)
635  {
636  for (label j=1; j>=0; j--)
637  {
638  LT_(i, nActive_+j)=LTvar(i, initNActiveSpecies+j);
639  A_(i, nActive_+j)=Avar(i, initNActiveSpecies+j);
640  LT_(nActive_+j, i)=LTvar(initNActiveSpecies+j, i);
641  A_(nActive_+j, i)=Avar(initNActiveSpecies+j, i);
642  }
643  }
644  // end with the diagonal elements for temperature and pressure
645  LT_(nActive_, nActive_)=
646  LTvar(initNActiveSpecies, initNActiveSpecies);
647  A_(nActive_, nActive_)=
648  Avar(initNActiveSpecies, initNActiveSpecies);
649  LT_(nActive_+1, nActive_+1)=
650  LTvar(initNActiveSpecies+1, initNActiveSpecies+1);
651  A_(nActive_+1, nActive_+1)=
652  Avar(initNActiveSpecies+1, initNActiveSpecies+1);
653  LT_(nActive_+2, nActive_+2)=
654  LTvar(initNActiveSpecies+2, initNActiveSpecies+2);
655  A_(nActive_+2, nActive_+2)=
656  Avar(initNActiveSpecies+2, initNActiveSpecies+2);
657 
658  for (label i=initNActiveSpecies; i<nActive_;i++)
659  {
660  LT_(i, i)=
661  1.0
662  /(tolerance_*scaleFactor_[simplifiedToCompleteIndex_[i]]);
663  A_(i, i) = 1;
664  }
665  }
666  }
667 
668  const label dim =
669  table_.reduction() ? nActive_ + 3 : completeSpaceSize();
670 
671  // beginning of grow algorithm
672  scalarField phiTilde(dim, 0);
673  scalar normPhiTilde = 0;
674  // p' = L^T.(p-phi)
675 
676  for (label i=0; i<dim; i++)
677  {
678  for (label j=i; j<dim-3; j++)// LT is upper triangular
679  {
680  const label sj =
681  table_.reduction()
682  ? simplifiedToCompleteIndex_[j]
683  : j;
684 
685  phiTilde[i] += LT_(i, j)*dphi[sj];
686  }
687 
688  phiTilde[i] += LT_(i, dim-3)*dphi[idT_];
689  phiTilde[i] += LT_(i, dim-3+1)*dphi[idp_];
690  phiTilde[i] += LT_(i, dim-3+2)*dphi[iddeltaT_];
691 
692  normPhiTilde += sqr(phiTilde[i]);
693  }
694 
695  const scalar invSqrNormPhiTilde = 1.0/normPhiTilde;
696  normPhiTilde = sqrt(normPhiTilde);
697 
698  // gamma = (1/|p'| - 1)/|p'|^2
699  const scalar gamma = (1/normPhiTilde - 1)*invSqrNormPhiTilde;
700  const scalarField u(gamma*phiTilde);
701  scalarField v(dim, 0);
702 
703  for (label i=0; i<dim; i++)
704  {
705  for (label j=0; j<=i;j++)
706  {
707  v[i] += phiTilde[j]*LT_(j, i);
708  }
709  }
710 
711  qrUpdate(LT_,dim, u, v);
712  nGrowth_++;
713 
714  return true;
715 }
716 
717 
718 // ************************************************************************* //
scalar y
label k
label n
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:433
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Definition: DynamicListI.H:296
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
void setSize(const label)
Reset size of List.
Definition: List.C:281
Form T() const
Return the transpose of the matrix.
Definition: Matrix.C:387
Singular value decomposition of a rectangular matrix.
Definition: SVD.H:52
const scalarRectangularMatrix & V() const
Return the square matrix V.
Definition: SVDI.H:44
const scalarRectangularMatrix & U() const
Return U.
Definition: SVDI.H:38
const scalarDiagonalMatrix & S() const
Return the singular values.
Definition: SVDI.H:50
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
Node of the binary tree.
Definition: binaryNode.H:49
Leaf of the binary tree. The chemPoint stores the composition 'phi', the mapping of this composition ...
bool inEOA(const scalarField &phiq)
To RETRIEVE the mapping from the stored chemPoint phi, the query.
const scalarField & scaleFactor() const
bool grow(const scalarField &phiq)
More details about the minimum-volume ellipsoid covering an.
bool checkSolution(const scalarField &phiq, const scalarField &Rphiq)
If phiq is not in the EOA, then the mapping is computed.
chemPointISAT(chemistryTabulationMethods::ISAT &table, const scalarField &phi, const scalarField &Rphi, const scalarSquareMatrix &A, const scalarField &scaleFactor, const scalar tolerance, const label completeSpaceSize, const label nActive, const label maxNumNewDim, const Switch printProportion, binaryNode *node=nullptr)
Construct from components.
const scalarSquareMatrix & A() const
const scalar & tolerance() const
label & completeSpaceSize()
const List< label > & simplifiedToCompleteIndex() const
Implementation of the ISAT (In-situ adaptive tabulation), for chemistry calculation.
Definition: ISAT.H:63
const odeChemistryModel & chemistry()
Definition: ISAT.H:255
bool reduction() const
Return true if reduction is applied to the state variables.
Definition: ISAT.H:250
label sToc(const label si) const
Return the index in the complete set of species.
label cTos(const label ci) const
Return the index in the simplified set of species.
A class for handling words, derived from string.
Definition: word.H:62
const vector tau
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
volScalarField & b
Definition: createFields.H:27
const volSymmTensorField R(IOobject("R", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), turbulence->R())
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionedScalar c
Speed of light in a vacuum.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
static const coefficient D("D", dimTemperature, 257.14)
static const coefficient A("A", dimPressure, 611.21)
void rotate(const bool reverse, barycentric &coordinates)
Rotation transform. Corrects the coordinates when the track moves.
Definition: tracking.C:1034
static const zero Zero
Definition: zero.H:97
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:258
messageStream Info
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void multiply(LagrangianPatchField< Type > &f, const LagrangianPatchField< scalar > &f1, const LagrangianPatchField< Type > &f2)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
static scalar R(const scalar a, const scalar x)
Definition: invIncGamma.C:102
SquareMatrix< scalar > scalarSquareMatrix
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
volScalarField & p