reactingOneDim.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 | Copyright (C) 2011-2016 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 "reactingOneDim.H"
28 #include "surfaceInterpolate.H"
29 #include "fvm.H"
30 #include "fvcDiv.H"
31 #include "fvcVolumeIntegrate.H"
32 #include "fvMatrices.H"
34 #include "fvcLaplacian.H"
35 
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
37 
38 namespace Foam
39 {
40 namespace regionModels
41 {
42 namespace pyrolysisModels
43 {
44 
45 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
46 
47 defineTypeNameAndDebug(reactingOneDim, 0);
48 
49 addToRunTimeSelectionTable(pyrolysisModel, reactingOneDim, mesh);
50 addToRunTimeSelectionTable(pyrolysisModel, reactingOneDim, dictionary);
51 
52 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
53 
54 void reactingOneDim::readReactingOneDimControls()
55 {
56  const dictionary& solution = this->solution().subDict("SIMPLE");
57  solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
58  time().controlDict().lookup("maxDi") >> maxDiff_;
59 
60  coeffs().lookup("minimumDelta") >> minimumDelta_;
61 
62  coeffs().lookup("gasHSource") >> gasHSource_;
63  coeffs().lookup("QrHSource") >> QrHSource_;
65  coeffs().lookupOrDefault<bool>("useChemistrySolvers", true);
66 
67 }
68 
69 
71 {
73  {
74  readReactingOneDimControls();
75  return true;
76  }
77  else
78  {
79  return false;
80  }
81 }
82 
83 
85 {
86  if (pyrolysisModel::read(dict))
87  {
88  readReactingOneDimControls();
89  return true;
90  }
91  else
92  {
93  return false;
94  }
95 }
96 
97 
99 {
100  // Update local Qr from coupled Qr field
101  Qr_ == dimensionedScalar("zero", Qr_.dimensions(), 0.0);
102 
103  // Retrieve field from coupled region using mapped boundary conditions
105 
106  volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef();
107 
109  {
110  const label patchi = intCoupledPatchIDs_[i];
111 
112  // Qr is positive going in the solid
113  // If the surface is emitting the radiative flux is set to zero
114  QrBf[patchi] = max(QrBf[patchi], scalar(0.0));
115  }
116 
117  const vectorField& cellC = regionMesh().cellCentres();
118 
120 
121  // Propagate Qr through 1-D regions
122  label localPyrolysisFacei = 0;
124  {
125  const label patchi = intCoupledPatchIDs_[i];
126 
127  const scalarField& Qrp = Qr_.boundaryField()[patchi];
128  const vectorField& Cf = regionMesh().Cf().boundaryField()[patchi];
129 
130  forAll(Qrp, facei)
131  {
132  const scalar Qr0 = Qrp[facei];
133  point Cf0 = Cf[facei];
134  const labelList& cells = boundaryFaceCells_[localPyrolysisFacei++];
135  scalar kappaInt = 0.0;
136  forAll(cells, k)
137  {
138  const label celli = cells[k];
139  const point& Cf1 = cellC[celli];
140  const scalar delta = mag(Cf1 - Cf0);
141  kappaInt += kappa()[celli]*delta;
142  Qr_[celli] = Qr0*exp(-kappaInt);
143  Cf0 = Cf1;
144  }
145  }
146  }
147 }
148 
149 
151 {
152  phiHsGas_ == dimensionedScalar("zero", phiHsGas_.dimensions(), 0.0);
153  phiGas_ == dimensionedScalar("zero", phiGas_.dimensions(), 0.0);
154 
155  const speciesTable& gasTable = solidChemistry_->gasTable();
156 
157  forAll(gasTable, gasI)
158  {
159  tmp<volScalarField> tHsiGas =
160  solidChemistry_->gasHs(solidThermo_.p(), solidThermo_.T(), gasI);
161 
162  const volScalarField& HsiGas = tHsiGas();
163 
164  const DimensionedField<scalar, volMesh>& RRiGas =
165  solidChemistry_->RRg(gasI);
166 
167  surfaceScalarField::Boundary& phiGasBf =
169 
170  label totalFaceId = 0;
172  {
173  const label patchi = intCoupledPatchIDs_[i];
174 
175  scalarField& phiGasp = phiGasBf[patchi];
176  const scalarField& cellVol = regionMesh().V();
177 
178  forAll(phiGasp, facei)
179  {
180  const labelList& cells = boundaryFaceCells_[totalFaceId++];
181  scalar massInt = 0.0;
182  forAllReverse(cells, k)
183  {
184  const label celli = cells[k];
185  massInt += RRiGas[celli]*cellVol[celli];
186  phiHsGas_[celli] += massInt*HsiGas[celli];
187  }
188 
189  phiGasp[facei] += massInt;
190 
191  if (debug)
192  {
193  Info<< " Gas : " << gasTable[gasI]
194  << " on patch : " << patchi
195  << " mass produced at face(local) : "
196  << facei
197  << " is : " << massInt
198  << " [kg/s] " << endl;
199  }
200  }
201  }
202  }
203 }
204 
205 
207 {
208  if (QrHSource_)
209  {
210  updateQr();
211  }
212 
213  updatePhiGas();
214 }
215 
216 
218 {
219  if (!moveMesh_)
220  {
221  return;
222  }
223 
224  const scalarField newV(mass0/rho_);
225 
226  Info<< "Initial/final volumes = " << gSum(regionMesh().V()) << ", "
227  << gSum(newV) << " [m3]" << endl;
228 
229  // move the mesh
230  const labelList moveMap = moveMesh(regionMesh().V() - newV, minimumDelta_);
231 
232  // flag any cells that have not moved as non-reacting
233  forAll(moveMap, i)
234  {
235  if (moveMap[i] == 0)
236  {
237  solidChemistry_->setCellReacting(i, false);
238  }
239  }
240 }
241 
242 
244 {
245  if (debug)
246  {
247  InfoInFunction << endl;
248  }
249 
250  const scalarField mass0 = rho_*regionMesh().V();
251 
252  fvScalarMatrix rhoEqn
253  (
254  fvm::ddt(rho_)
255  ==
256  - solidChemistry_->RRg()
257  );
258 
259  if (regionMesh().moving())
260  {
261  surfaceScalarField phiRhoMesh
262  (
264  );
265 
266  rhoEqn += fvc::div(phiRhoMesh);
267  }
268 
269  rhoEqn.solve();
270 
271  updateMesh(mass0);
272 }
273 
274 
276 {
277  if (debug)
278  {
279  InfoInFunction << endl;
280  }
281 
282  volScalarField Yt(0.0*Ys_[0]);
283 
284  for (label i=0; i<Ys_.size()-1; i++)
285  {
286  volScalarField& Yi = Ys_[i];
287 
288  fvScalarMatrix YiEqn
289  (
290  fvm::ddt(rho_, Yi)
291  ==
292  solidChemistry_->RRs(i)
293  );
294 
295  if (regionMesh().moving())
296  {
297  surfaceScalarField phiYiRhoMesh
298  (
300  );
301 
302  YiEqn += fvc::div(phiYiRhoMesh);
303 
304  }
305 
306  YiEqn.solve(regionMesh().solver("Yi"));
307  Yi.max(0.0);
308  Yt += Yi;
309  }
310 
311  Ys_[Ys_.size() - 1] = 1.0 - Yt;
312 
313 }
314 
315 
317 {
318  if (debug)
319  {
320  InfoInFunction << endl;
321  }
322 
324 
325  fvScalarMatrix hEqn
326  (
327  fvm::ddt(rho_, h_)
330  - fvc::laplacian(kappa(), T())
331  ==
333  - fvm::Sp(solidChemistry_->RRg(), h_)
334  );
335 
336  if (gasHSource_)
337  {
339  hEqn += fvc::div(phiGas);
340  }
341 
342  if (QrHSource_)
343  {
345  hEqn += fvc::div(phiQr);
346  }
347 
348  if (regionMesh().moving())
349  {
350  surfaceScalarField phihMesh
351  (
353  );
354 
355  hEqn += fvc::div(phihMesh);
356  }
357 
358  hEqn.relax();
359  hEqn.solve();
360 }
361 
362 
364 {
365  totalGasMassFlux_ = 0;
367  {
368  const label patchi = intCoupledPatchIDs_[i];
370  }
371 
372  if (infoOutput_)
373  {
375 
376  addedGasMass_ +=
378  lostSolidMass_ +=
380  }
381 }
382 
383 
384 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
385 
386 reactingOneDim::reactingOneDim
387 (
388  const word& modelType,
389  const fvMesh& mesh,
390  const word& regionType
391 )
392 :
393  pyrolysisModel(modelType, mesh, regionType),
395  solidThermo_(solidChemistry_->solidThermo()),
397  rho_
398  (
399  IOobject
400  (
401  "rho",
402  regionMesh().time().timeName(),
403  regionMesh(),
406  ),
407  solidThermo_.rho()
408  ),
410  h_(solidThermo_.he()),
411  nNonOrthCorr_(-1),
412  maxDiff_(10),
413  minimumDelta_(1e-4),
414 
415  phiGas_
416  (
417  IOobject
418  (
419  "phiGas",
420  time().timeName(),
421  regionMesh(),
424  ),
425  regionMesh(),
426  dimensionedScalar("zero", dimMass/dimTime, 0.0)
427  ),
428 
429  phiHsGas_
430  (
431  IOobject
432  (
433  "phiHsGas",
434  time().timeName(),
435  regionMesh(),
438  ),
439  regionMesh(),
440  dimensionedScalar("zero", dimEnergy/dimTime, 0.0)
441  ),
442 
444  (
445  IOobject
446  (
447  "chemistrySh",
448  time().timeName(),
449  regionMesh(),
452  ),
453  regionMesh(),
455  ),
456 
457  Qr_
458  (
459  IOobject
460  (
461  "Qr",
462  time().timeName(),
463  regionMesh(),
466  ),
467  regionMesh()
468  ),
469 
471  addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)),
472  totalGasMassFlux_(0.0),
474  gasHSource_(false),
475  QrHSource_(false),
477 {
478  if (active_)
479  {
480  read();
481  }
482 }
483 
484 
485 reactingOneDim::reactingOneDim
486 (
487  const word& modelType,
488  const fvMesh& mesh,
489  const dictionary& dict,
490  const word& regionType
491 )
492 :
493  pyrolysisModel(modelType, mesh, dict, regionType),
495  solidThermo_(solidChemistry_->solidThermo()),
497  rho_
498  (
499  IOobject
500  (
501  "rho",
502  regionMesh().time().timeName(),
503  regionMesh(),
506  ),
507  solidThermo_.rho()
508  ),
510  h_(solidThermo_.he()),
511  nNonOrthCorr_(-1),
512  maxDiff_(10),
513  minimumDelta_(1e-4),
514 
515  phiGas_
516  (
517  IOobject
518  (
519  "phiGas",
520  time().timeName(),
521  regionMesh(),
524  ),
525  regionMesh(),
526  dimensionedScalar("zero", dimMass/dimTime, 0.0)
527  ),
528 
529  phiHsGas_
530  (
531  IOobject
532  (
533  "phiHsGas",
534  time().timeName(),
535  regionMesh(),
538  ),
539  regionMesh(),
540  dimensionedScalar("zero", dimEnergy/dimTime, 0.0)
541  ),
542 
544  (
545  IOobject
546  (
547  "chemistrySh",
548  time().timeName(),
549  regionMesh(),
552  ),
553  regionMesh(),
555  ),
556 
557  Qr_
558  (
559  IOobject
560  (
561  "Qr",
562  time().timeName(),
563  regionMesh(),
566  ),
567  regionMesh()
568  ),
569 
571  addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)),
572  totalGasMassFlux_(0.0),
574  gasHSource_(false),
575  QrHSource_(false),
577 {
578  if (active_)
579  {
580  read(dict);
581  }
582 }
583 
584 
585 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
586 
588 {}
589 
590 
591 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
592 
594 {
595  label index = 0;
597  {
598  if (primaryPatchIDs_[i] == patchi)
599  {
600  index = i;
601  break;
602  }
603  }
604 
605  const label localPatchId = intCoupledPatchIDs_[index];
606 
607  const scalar massAdded = phiGas_.boundaryField()[localPatchId][facei];
608 
609  if (debug)
610  {
611  Info<< "\nPyrolysis region: " << type() << "added mass : "
612  << massAdded << endl;
613  }
614 
615  return massAdded;
616 }
617 
618 
620 {
621  scalar DiNum = -GREAT;
622 
623  if (regionMesh().nInternalFaces() > 0)
624  {
625  surfaceScalarField KrhoCpbyDelta
626  (
630  );
631 
632  DiNum = max(KrhoCpbyDelta.primitiveField())*time().deltaTValue();
633  }
634 
635  return DiNum;
636 }
637 
638 
640 {
641  return maxDiff_;
642 }
643 
644 
646 {
647  return rho_;
648 }
649 
650 
652 {
653  return solidThermo_.T();
654 }
655 
656 
658 {
659  return solidThermo_.Cp();
660 }
661 
662 
664 {
665  return radiation_->absorptionEmission().a();
666 }
667 
668 
670 {
671  return solidThermo_.kappa();
672 }
673 
674 
676 {
677  return phiGas_;
678 }
679 
680 
682 {
684 
685  // Initialise all cells as able to react
686  forAll(h_, celli)
687  {
688  solidChemistry_->setCellReacting(celli, true);
689  }
690 }
691 
692 
694 {
695  Info<< "\nEvolving pyrolysis in region: " << regionMesh().name() << endl;
696 
698  {
699  solidChemistry_->solve(time().deltaTValue());
700  }
701  else
702  {
703  solidChemistry_->calculate();
704  }
705 
706  solveContinuity();
707 
708  chemistrySh_ = solidChemistry_->Sh()();
709 
710  updateFields();
711 
713 
714  for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
715  {
716  solveEnergy();
717  }
718 
720 
722 
723  Info<< "pyrolysis min/max(T) = "
725  << ", "
727  << endl;
728 }
729 
730 
732 {
733  Info<< "\nPyrolysis in region: " << regionMesh().name() << endl;
734 
735  Info<< indent << "Total gas mass produced [kg] = "
736  << addedGasMass_.value() << nl
737  << indent << "Total solid mass lost [kg] = "
738  << lostSolidMass_.value() << nl
739  << indent << "Total pyrolysis gases [kg/s] = "
740  << totalGasMassFlux_ << nl
741  << indent << "Total heat release rate [J/s] = "
742  << totalHeatRR_.value() << nl;
743 }
744 
745 
746 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
747 
748 } // End namespace Foam
749 } // End namespace regionModels
750 } // End namespace pyrolysisModels
751 
752 // ************************************************************************* //
scalar DiNum
scalar delta
surfaceScalarField & phi
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
bool useChemistrySolvers_
Use chemistry solvers (ode or sequential)
const dictionary & solution() const
Return the solution dictionary.
Definition: regionModelI.H:103
solidReactionThermo & solidThermo_
Reference to solid thermo.
volScalarField chemistrySh_
Heat release [J/s/m3].
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
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
virtual tmp< volScalarField > kappa() const =0
Thermal diffusivity for temperature of mixture [J/m/s/K].
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:223
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
dimensionedScalar addedGasMass_
Cumulative mass generation of the gas phase [kg].
const double e
Elementary charge.
Definition: doubleFloat.H:78
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
scalar totalGasMassFlux_
Total mass gas flux at the pyrolysing walls [kg/s].
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:633
static autoPtr< basicSolidChemistryModel > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
tmp< labelField > moveMesh(const scalarList &deltaV, const scalar minDelta=0.0)
Move mesh points according to change in cell volumes.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Definition: UList.H:440
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const Type & value() const
Return const reference to value.
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
label k
Boltzmann constant.
const absorptionEmissionModel & absorptionEmission() const
Access to absorptionEmission model.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcLaplacian.C:45
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
virtual bool read()
Read control parameters.
virtual basicSpecieMixture & composition()=0
Return the composition of the multi-component mixture.
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
scalar minimumDelta_
Minimum delta for combustion.
Macros for easy insertion into run-time selection tables.
bool moving() const
Is mesh moving.
Definition: polyMesh.H:493
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
dimensionedScalar totalHeatRR_
Total heat release rate [J/s].
void solveSpeciesMass()
Solve solid species mass conservation.
virtual volScalarField & p()
Pressure [Pa].
Definition: basicThermo.C:466
const dictionary & coeffs() const
Return the model coefficients dictionary.
Definition: regionModelI.H:96
dictionary()
Construct top-level dictionary null.
Definition: dictionary.C:113
virtual const volScalarField & T() const
Return const temperature [K].
virtual tmp< volScalarField > rho() const
Density [kg/m^3].
Definition: solidThermo.C:120
Switch moveMesh_
Flag to allow mesh movement.
Definition: regionModel1D.H:99
autoPtr< basicSolidChemistryModel > solidChemistry_
Reference to the solid chemistry model.
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
static autoPtr< radiationModel > New(const volScalarField &T)
Return a reference to the selected radiation model.
Type gSum(const FieldField< Field, Type > &f)
surfaceScalarField phiGas_
Total gas mass flux to the primary region [kg/m2/s].
dimensionedScalar exp(const dimensionedScalar &ds)
const cellShapeList & cells
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual void preEvolveRegion()
Pre-evolve region.
Definition: regionModel.C:543
A class for handling words, derived from string.
Definition: word.H:59
Calculate the laplacian of the given field.
labelListList boundaryFaceCells_
Global cell IDs.
Definition: regionModel1D.H:84
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvmDdt.C:46
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
virtual void info()
Provide some feedback.
const vectorField & cellCentres() const
Volume integrate volField creating a volField.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:71
Switch infoOutput_
Active information output.
Definition: regionModel.H:96
word timeName
Definition: getTimeIndex.H:3
volScalarField phiHsGas_
Sensible enthalpy gas flux [J/m2/s].
const dimensionSet & dimensions() const
Return dimensions.
Calculate the divergence of the given field.
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
virtual const volScalarField & T() const
Temperature [K].
Definition: basicThermo.C:478
static const char nl
Definition: Ostream.H:262
volScalarField Qr_
Coupled region radiative heat flux [W/m2].
Switch active_
Active flag.
Definition: regionModel.H:93
void updateMesh(const scalarField &mass0)
Update/move mesh based on change in mass.
scalar deltaTValue() const
Return time step value.
Definition: TimeStateI.H:41
virtual tmp< volScalarField > Cp() const =0
Heat capacity at constant pressure [J/kg/K].
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceScalarField & nMagSf() const
Return the face area magnitudes / [m2].
const dimensionSet dimEnergy
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
dimensionedScalar lostSolidMass_
Cumulative lost mass of the condensed phase [kg].
virtual scalar addMassSources(const label patchi, const label facei)
External hook to add mass to the primary region.
void updateQr()
Update radiative flux in pyrolysis region.
label patchi
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:53
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
A wordList with hashed indices for faster lookup by name.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvmLaplacian.C:46
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
const Time & time_
Reference to the time database.
Definition: regionModel.H:90
void max(const dimensioned< Type > &)
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
Definition: basicThermo.C:490
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual void evolveRegion()
Evolve the pyrolysis equations.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
void updatePhiGas()
Update enthalpy flux for pyrolysis gases.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const volScalarField & rho() const
Fields.
void correctBoundaryConditions()
Correct boundary field.
messageStream Info
label nNonOrthCorr_
Number of non-orthogonal correctors.
dimensioned< scalar > mag(const dimensioned< Type > &)
PtrList< volScalarField > & Ys_
List of solid components.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
const dictionary & controlDict() const
Definition: Time.H:274
void solveContinuity()
Solve continuity equation.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
Definition: regionModel.H:117
A class for managing temporary objects.
Definition: PtrList.H:54
virtual void correct()=0
Update properties.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
bool gasHSource_
Add gas enthalpy source term.
virtual void preEvolveRegion()
Pre-evolve region.
labelList primaryPatchIDs_
List of patch IDs on the primary region coupled to this region.
Definition: regionModel.H:114
const word & name() const
Return reference to name.
Definition: fvMesh.H:257
bool read()
Read control parameters from dictionary.
bool QrHSource_
Add in depth radiation source term.
Namespace for OpenFOAM.
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh)
volScalarField Yt(0.0 *Y[0])
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:451
#define InfoInFunction
Report an information message using Foam::Info.