38 namespace regionModels
40 namespace pyrolysisModels
52 void reactingOneDim::readReactingOneDimControls()
71 readReactingOneDimControls();
85 readReactingOneDimControls();
111 qrBf[
patchi] =
max(qrBf[patchi], scalar(0));
119 label localPyrolysisFacei = 0;
129 const scalar qr0 = qrp[facei];
130 point Cf0 = Cf[facei];
132 scalar kappaInt = 0.0;
135 const label celli = cells[
k];
136 const point& Cf1 = cellC[celli];
137 const scalar
delta =
mag(Cf1 - Cf0);
139 qr_[celli] = qr0*
exp(-kappaInt);
164 surfaceScalarField::Boundary& phiGasBf =
167 label totalFaceId = 0;
178 scalar massInt = 0.0;
181 const label celli = cells[
k];
182 massInt += RRiGas[celli]*cellVol[celli];
183 phiHsGas_[celli] += massInt*HsiGas[celli];
186 phiGasp[facei] += massInt;
190 Info<<
" Gas : " << gasTable[gasI]
191 <<
" on patch : " << patchi
192 <<
" mass produced at face(local) : " 194 <<
" is : " << massInt
195 <<
" [kg/s] " <<
endl;
279 for (
label i=0; i<
Ys_.size()-1; i++)
379 reactingOneDim::reactingOneDim
381 const word& modelType,
383 const word& regionType
478 reactingOneDim::reactingOneDim
480 const word& modelType,
483 const word& regionType
604 Info<<
"\nPyrolysis region: " <<
type() <<
"added mass : " 605 << massAdded <<
endl;
614 scalar
DiNum = -great;
716 Info<<
"pyrolysis min/max(T) = " 728 Info<<
indent <<
"Total gas mass produced [kg] = " 730 <<
indent <<
"Total solid mass lost [kg] = " 732 <<
indent <<
"Total pyrolysis gases [kg/s] = " 734 <<
indent <<
"Total heat release rate [J/s] = "
virtual const volScalarField & T() const
Return const temperature [K].
bool useChemistrySolvers_
Use chemistry solvers (ode or sequential)
#define forAll(list, i)
Loop across all elements in list.
Base class for pyrolysis models.
volScalarField chemistryQdot_
Heat release rate [J/s/m3].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & indent(Ostream &os)
Indent stream.
dimensionedScalar addedGasMass_
Cumulative mass generation of the gas phase [kg].
bool moving() const
Is mesh moving.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
Type gMin(const FieldField< Field, Type > &f)
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
const Boundary & boundaryField() const
Return const-reference to the boundary field.
scalar totalGasMassFlux_
Total mass gas flux at the pyrolysing walls [kg/s].
defineTypeNameAndDebug(noPyrolysis, 0)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
scalar maxDiff_
Maximum diffussivity.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
autoPtr< solidReactionThermo > solidThermo_
Reference to solid thermo.
label k
Boltzmann constant.
const Time & time() const
Return the reference to the time database.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
void calculateMassTransfer()
Mass check.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
virtual bool read()
Read control parameters.
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
scalar minimumDelta_
Minimum delta for combustion.
Macros for easy insertion into run-time selection tables.
dimensionedScalar totalHeatRR_
Total heat release rate [J/s].
void solveSpeciesMass()
Solve solid species mass conservation.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
dictionary()
Construct top-level dictionary null.
static autoPtr< basicSolidChemistryModel > New(solidReactionThermo &thermo)
Selector.
Switch moveMesh_
Flag to allow mesh movement.
autoPtr< basicSolidChemistryModel > solidChemistry_
Reference to the solid chemistry model.
const volScalarField & rho() const
Fields.
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
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)
virtual void preEvolveRegion()
Pre-evolve region.
A class for handling words, derived from string.
Calculate the laplacian of the given field.
labelListList boundaryFaceCells_
Global cell IDs.
const dictionary & solution() const
Return the solution dictionary.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
scalar deltaTValue() const
Return time step value.
const Type & value() const
Return const reference to value.
const fvMesh & regionMesh() const
Return the region mesh database.
virtual void info()
Provide some feedback.
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
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.
Switch infoOutput_
Active information output.
virtual ~reactingOneDim()
Destructor.
volScalarField phiHsGas_
Sensible enthalpy gas flux [J/m2/s].
const vectorField & cellCentres() const
void updateqr()
Update radiative flux in pyrolysis region.
bool qrHSource_
Add in depth radiation source term.
Calculate the divergence of the given field.
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
void solveEnergy()
Solve energy.
const surfaceScalarField & nMagSf() const
Return the face area magnitudes / [m2].
Switch active_
Active flag.
Type gMax(const FieldField< Field, Type > &f)
void updateMesh(const scalarField &mass0)
Update/move mesh based on change in mass.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
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.
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
static autoPtr< solidReactionThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const word & name() const
Return reference to name.
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)
const Time & time_
Reference to the time database.
void max(const dimensioned< Type > &)
Mesh data needed to do the Finite Volume discretisation.
virtual void evolveRegion()
Evolve the pyrolysis equations.
void updateFields()
Update submodels.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dictionary & controlDict() const
void updatePhiGas()
Update enthalpy flux for pyrolysis gases.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
void correctBoundaryConditions()
Correct boundary field.
label nNonOrthCorr_
Number of non-orthogonal correctors.
dimensioned< scalar > mag(const dimensioned< Type > &)
PtrList< volScalarField > & Ys_
List of solid components.
const doubleScalar e
Elementary charge.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
void solveContinuity()
Solve continuity equation.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
A class for managing temporary objects.
const dictionary & coeffs() const
Return the model coefficients dictionary.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
volScalarField rho_
Density [kg/m3].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool gasHSource_
Add gas enthalpy source term.
virtual void preEvolveRegion()
Pre-evolve region.
volScalarField qr_
Coupled region radiative heat flux [W/m2].
labelList primaryPatchIDs_
List of patch IDs on the primary region coupled to this region.
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
dimensionedScalar deltaT() const
Return time step.
bool read()
Read control parameters from dictionary.
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.
#define InfoInFunction
Report an information message using Foam::Info.