41 namespace regionModels
43 namespace pyrolysisModels
55 void reactingOneDim::readReactingOneDimControls()
75 readReactingOneDimControls();
89 readReactingOneDimControls();
115 Qrp =
max(Qrp, scalar(0.0));
123 label localPyrolysisFaceI = 0;
133 const scalar Qr0 = Qrp[faceI];
134 point Cf0 = Cf[faceI];
136 scalar kappaInt = 0.0;
139 const label cellI = cells[
k];
140 const point& Cf1 = cellC[cellI];
141 const scalar
delta =
mag(Cf1 - Cf0);
143 Qr_[cellI] = Qr0*
exp(-kappaInt);
168 label totalFaceId = 0;
179 scalar massInt = 0.0;
182 const label cellI = cells[
k];
183 massInt += RRiGas[cellI]*cellVol[cellI];
184 phiHsGas_[cellI] += massInt*HsiGas[cellI];
187 phiGasp[faceI] += massInt;
191 Info<<
" Gas : " << gasTable[gasI]
192 <<
" on patch : " << patchI
193 <<
" mass produced at face(local) : " 195 <<
" is : " << massInt
196 <<
" [kg/s] " <<
endl;
246 Info<<
"reactingOneDim::solveContinuity()" <<
endl;
278 Info<<
"reactingOneDim::solveSpeciesMass()" <<
endl;
283 for (
label i=0; i<
Ys_.size()-1; i++)
319 Info<<
"reactingOneDim::solveEnergy()" <<
endl;
385 reactingOneDim::reactingOneDim
387 const word& modelType,
389 const word& regionType
486 reactingOneDim::reactingOneDim
488 const word& modelType,
491 const word& regionType
612 Info<<
"\nPyrolysis region: " <<
type() <<
"added mass : " 613 << massAdded <<
endl;
622 scalar
DiNum = -GREAT;
724 Info<<
"pyrolysis min/max(T) = " 736 Info<<
indent <<
"Total gas mass produced [kg] = " 738 <<
indent <<
"Total solid mass lost [kg] = " 740 <<
indent <<
"Total pyrolysis gases [kg/s] = " 742 <<
indent <<
"Total heat release rate [J/s] = " virtual tmp< volScalarField > rho() const
Density [kg/m^3].
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
labelListList boundaryFaceCells_
Global cell IDs.
dictionary()
Construct top-level dictionary null.
virtual void info()
Provide some feedback.
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
tmp< labelField > moveMesh(const scalarList &deltaV, const scalar minDelta=0.0)
Move mesh points according to change in cell volumes.
PtrList< volScalarField > & Ys_
List of solid components.
Mesh data needed to do the Finite Volume discretisation.
void updateQr()
Update radiative flux in pyrolysis region.
const word & name() const
Return reference to name.
void solveEnergy()
Solve energy.
virtual const volScalarField & T() const
Temperature [K].
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
scalar maxDiff_
Maximum diffussivity.
label nNonOrthCorr_
Number of non-orthogonal correctors.
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
void clear() const
If object pointer points to valid object:
scalar totalGasMassFlux_
Total mass gas flux at the pyrolysing walls [kg/s].
solidReactionThermo & solidThermo_
Reference to solid thermo.
static autoPtr< basicSolidChemistryModel > New(const fvMesh &mesh, const word &phaseName=word::null)
Selector.
defineTypeNameAndDebug(noPyrolysis, 0)
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
bool gasHSource_
Add gas enthalpy source term.
Switch active_
Active flag.
Ostream & indent(Ostream &os)
Indent stream.
virtual void correct()=0
Update properties.
labelList primaryPatchIDs_
List of patch IDs on the primary region coupled to this region.
virtual tmp< volScalarField > a(const label bandI=0) const
Absorption coefficient (net)
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh)
virtual tmp< volScalarField > kappa() const =0
Thermal diffusivity for temperature of mixture [J/m/s/K].
volScalarField Yt(0.0 *Y[0])
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const surfaceScalarField & nMagSf() const
Return the face area magnitudes / [m2].
virtual volScalarField & p()
Pressure [Pa].
InternalField & internalField()
Return internal field.
tmp< GeometricField< Type, fvPatchField, volMesh > > laplacian(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionSet dimEnergy
const fvMesh & regionMesh() const
Return the region mesh database.
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
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.
const Time & time() const
Return the reference to the time database.
void calculateMassTransfer()
Mass check.
Base class for pyrolysis models.
void solveContinuity()
Solve continuity equation.
const vectorField & cellCentres() const
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
dimensionedScalar lostSolidMass_
Cumulative lost mass of the condensed phase [kg].
virtual basicSpecieMixture & composition()=0
Return the composition of the multi-component mixture.
const surfaceVectorField & Cf() const
Return face centres as surfaceVectorField.
void updatePhiGas()
Update enthalpy flux for pyrolysis gases.
virtual void preEvolveRegion()
Pre-evolve region.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedScalar addedGasMass_
Cumulative mass generation of the gas phase [kg].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< volScalarField > Cp() const =0
Heat capacity at constant pressure [J/kg/K].
Calculate the laplacian of the given field.
surfaceScalarField phiGas_
Total gas mass flux to the primary region [kg/m2/s].
autoPtr< basicSolidChemistryModel > solidChemistry_
Reference to the solid chemistry model.
volScalarField rho_
Density [kg/m3].
Type gSum(const FieldField< Field, Type > &f)
bool QrHSource_
Add in depth radiation source term.
dimensionedScalar totalHeatRR_
Total heat release rate [J/s].
const double e
Elementary charge.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
scalar deltaTValue() const
Return time step value.
volScalarField Qr_
Coupled region radiative heat flux [W/m2].
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label k
Boltzmann constant.
virtual void preEvolveRegion()
Pre-evolve region.
virtual void evolveRegion()
Evolve the pyrolysis equations.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
const volScalarField & rho() const
Fields.
Macros for easy insertion into run-time selection tables.
const dimensionSet & dimensions() const
Return dimensions.
void updateFields()
Update submodels.
const absorptionEmissionModel & absorptionEmission() const
Access to absorptionEmission model.
bool useChemistrySolvers_
Use chemistry solvers (ode or sequential)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const dictionary & solution() const
Return the solution dictionary.
virtual const volScalarField & T() const
Return const temperature [K].
const cellShapeList & cells
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
const dictionary & coeffs() const
Return the model coefficients dictionary.
scalar minimumDelta_
Minimum delta for combustion.
#define forAllReverse(list, i)
Calculate the divergence of the given field.
volScalarField phiHsGas_
Sensible enthalpy gas flux [J/m2/s].
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
void solveSpeciesMass()
Solve solid species mass conservation.
void correctBoundaryConditions()
Correct boundary field.
virtual ~reactingOneDim()
Destructor.
Switch moveMesh_
Flag to allow mesh movement.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const dimensionSet dimVolume(pow3(dimLength))
volScalarField chemistrySh_
Heat release [J/s/m3].
virtual scalar addMassSources(const label patchI, const label faceI)
External hook to add mass to the primary region.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
const Time & time_
Reference to the time database.
void updateMesh(const scalarField &mass0)
Update/move mesh based on change in mass.
bool read()
Read control parameters from dictionary.
A wordList with hashed indices for faster lookup by name.
void max(const dimensioned< Type > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar deltaT() const
Return time step.
virtual bool read()
Read control parameters.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
bool moving() const
Is mesh moving.
Volume integrate volField creating a volField.
const dictionary & controlDict() const
Switch infoOutput_
Active information output.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
const Type & value() const
Return const reference to value.
static autoPtr< radiationModel > New(const volScalarField &T)
Return a reference to the selected radiation model.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].