Skip to content
Snippets Groups Projects
Commit fc7ae2b0 authored by andy's avatar andy
Browse files

ENH: Updated radiation handling in pyrolysis regions

parent f4c7f38f
No related merge requests found
......@@ -90,58 +90,6 @@ bool reactingOneDim::read(const dictionary& dict)
}
void reactingOneDim::updateQr()
{
// Retrieve field from coupled region using mapped boundary conditions
QrCoupled_.correctBoundaryConditions();
// Update local Qr from coupled Qr field
Qr_ == dimensionedScalar("zero", Qr_.dimensions(), 0.0);
forAll(intCoupledPatchIDs_, i)
{
const label patchI = intCoupledPatchIDs_[i];
scalarField& Qrp = Qr_.boundaryField()[patchI];
// Qr is negative going out the solid
// If the surface is emitting the radiative flux is set to zero
Qrp = max(Qrp, scalar(0.0));
}
const volScalarField kappaRad_(kappaRad());
// Propagate Qr through 1-D regions
label totalFaceId = 0;
forAll(intCoupledPatchIDs_, i)
{
const label patchI = intCoupledPatchIDs_[i];
const scalarField& Qrp = Qr_.boundaryField()[patchI];
const vectorField& Cf = regionMesh().Cf().boundaryField()[patchI];
forAll(Qrp, faceI)
{
const scalar Qr0 = Qrp[faceI];
point Cf0 = Cf[faceI];
const labelList& cells = boundaryFaceCells_[totalFaceId];
scalar kappaInt = 0.0;
forAll(cells, k)
{
const label cellI = cells[k];
const point& Cf1 = regionMesh().cellCentres()[cellI];
const scalar delta = mag(Cf1 - Cf0);
kappaInt += kappaRad_[cellI]*delta;
Qr_[cellI] = Qr0*exp(-kappaInt);
Cf0 = Cf1;
}
totalFaceId ++;
}
}
Qr_.correctBoundaryConditions();
}
void reactingOneDim::updatePhiGas()
{
phiHsGas_ == dimensionedScalar("zero", phiHsGas_.dimensions(), 0.0);
......@@ -198,8 +146,6 @@ void reactingOneDim::updatePhiGas()
void reactingOneDim::updateFields()
{
updateQr();
updatePhiGas();
}
......@@ -305,8 +251,6 @@ void reactingOneDim::solveEnergy()
tmp<volScalarField> alpha(solidThermo_.alpha());
const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf());
const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_));
fvScalarMatrix hEqn
......@@ -315,7 +259,6 @@ void reactingOneDim::solveEnergy()
- fvm::laplacian(alpha, h_)
==
chemistrySh_
+ fvc::div(phiQr)
+ fvc::div(phiGas)
);
......@@ -380,7 +323,6 @@ reactingOneDim::reactingOneDim(const word& modelType, const fvMesh& mesh)
),
Ys_(solidThermo_.composition().Y()),
h_(solidThermo_.he()),
primaryRadFluxName_(coeffs().lookupOrDefault<word>("radFluxName", "Qr")),
nNonOrthCorr_(-1),
maxDiff_(10),
minimumDelta_(1e-4),
......@@ -427,34 +369,6 @@ reactingOneDim::reactingOneDim(const word& modelType, const fvMesh& mesh)
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
),
QrCoupled_
(
IOobject
(
primaryRadFluxName_,
time().timeName(),
regionMesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
regionMesh()
),
Qr_
(
IOobject
(
"QrPyr",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
regionMesh(),
dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0),
zeroGradientFvPatchVectorField::typeName
),
lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)),
addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)),
totalGasMassFlux_(0.0),
......@@ -492,7 +406,6 @@ reactingOneDim::reactingOneDim
),
Ys_(solidThermo_.composition().Y()),
h_(solidThermo_.he()),
primaryRadFluxName_(dict.lookupOrDefault<word>("radFluxName", "Qr")),
nNonOrthCorr_(-1),
maxDiff_(10),
minimumDelta_(1e-4),
......@@ -539,34 +452,6 @@ reactingOneDim::reactingOneDim
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
),
QrCoupled_
(
IOobject
(
primaryRadFluxName_,
time().timeName(),
regionMesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
regionMesh()
),
Qr_
(
IOobject
(
"QrPyr",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
regionMesh(),
dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0),
zeroGradientFvPatchVectorField::typeName
),
lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)),
addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)),
totalGasMassFlux_(0.0),
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -125,16 +125,6 @@ protected:
volScalarField chemistrySh_;
// Source term fields
//- Coupled region radiative heat flux [W/m2]
// Requires user to input mapping info for coupled patches
volScalarField QrCoupled_;
//- In depth radiative heat flux [W/m2]
volScalarField Qr_;
// Checks
//- Cumulative lost mass of the condensed phase [kg]
......@@ -164,9 +154,6 @@ protected:
//- Update/move mesh based on change in mass
void updateMesh(const scalarField& mass0);
//- Update radiative flux in pyrolysis region
void updateQr();
//- Update enthalpy flux for pyrolysis gases
void updatePhiGas();
......@@ -259,12 +246,6 @@ public:
virtual scalar solidRegionDiffNo() const;
// Source fields (read/write access)
//- In depth radiative heat flux
inline const volScalarField& Qr() const;
// Evolution
//- Pre-evolve region
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -34,11 +34,4 @@ Foam::regionModels::pyrolysisModels::reactingOneDim::nNonOrthCorr() const
}
inline const Foam::volScalarField&
Foam::regionModels::pyrolysisModels::reactingOneDim::Qr() const
{
return Qr_;
}
// ************************************************************************* //
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment