radiation: Corrected the name of the radiative heat flux from Qr to qr

The standard naming convention for heat flux is "q" and this is used for the
conductive and convective heat fluxes is OpenFOAM.  The use of "Qr" for
radiative heat flux is an anomaly which causes confusion, particularly for
boundary conditions in which "Q" is used to denote power in Watts.  The name of
the radiative heat flux has now been corrected to "qr" and all models, boundary
conditions and tutorials updated.
This commit is contained in:
Henry Weller
2017-04-08 22:23:40 +01:00
parent e72e7c5625
commit 8aac0a1808
50 changed files with 283 additions and 284 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ Description
Each view factor between the agglomerated faces i and j (Fij) is calculated Each view factor between the agglomerated faces i and j (Fij) is calculated
using a double integral of the sub-areas composing the agglomaration. using a double integral of the sub-areas composing the agglomaration.
The patches involved in the view factor calculation are taken from the Qr The patches involved in the view factor calculation are taken from the qr
volScalarField (radiative flux) when is greyDiffusiveRadiationViewFactor volScalarField (radiative flux) when is greyDiffusiveRadiationViewFactor
otherwise they are not included. otherwise they are not included.
@ -272,11 +272,11 @@ int main(int argc, char *argv[])
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0); const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
volScalarField Qr volScalarField qr
( (
IOobject IOobject
( (
"Qr", "qr",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -338,17 +338,17 @@ int main(int argc, char *argv[])
labelList viewFactorsPatches(patches.size()); labelList viewFactorsPatches(patches.size());
const volScalarField::Boundary& Qrb = Qr.boundaryField(); const volScalarField::Boundary& qrb = qr.boundaryField();
label count = 0; label count = 0;
forAll(Qrb, patchi) forAll(qrb, patchi)
{ {
const polyPatch& pp = patches[patchi]; const polyPatch& pp = patches[patchi];
const fvPatchScalarField& QrpI = Qrb[patchi]; const fvPatchScalarField& qrpI = qrb[patchi];
if ((isA<fixedValueFvPatchScalarField>(QrpI)) && (pp.size() > 0)) if ((isA<fixedValueFvPatchScalarField>(qrpI)) && (pp.size() > 0))
{ {
viewFactorsPatches[count] = QrpI.patch().index(); viewFactorsPatches[count] = qrpI.patch().index();
nCoarseFaces += coarsePatches[patchi].size(); nCoarseFaces += coarsePatches[patchi].size();
nFineFaces += patches[patchi].size(); nFineFaces += patches[patchi].size();
count ++; count ++;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,9 +53,9 @@ thermalBaffle1DFvPatchScalarField
Qs_(p.size()), Qs_(p.size()),
solidDict_(), solidDict_(),
solidPtr_(nullptr), solidPtr_(nullptr),
QrPrevious_(p.size()), qrPrevious_(p.size()),
QrRelaxation_(1), qrRelaxation_(1),
QrName_("undefined-Qr") qrName_("undefined-qr")
{} {}
@ -77,9 +77,9 @@ thermalBaffle1DFvPatchScalarField
Qs_(ptf.Qs_, mapper), Qs_(ptf.Qs_, mapper),
solidDict_(ptf.solidDict_), solidDict_(ptf.solidDict_),
solidPtr_(ptf.solidPtr_), solidPtr_(ptf.solidPtr_),
QrPrevious_(ptf.QrPrevious_, mapper), qrPrevious_(ptf.qrPrevious_, mapper),
QrRelaxation_(ptf.QrRelaxation_), qrRelaxation_(ptf.qrRelaxation_),
QrName_(ptf.QrName_) qrName_(ptf.qrName_)
{} {}
@ -100,9 +100,9 @@ thermalBaffle1DFvPatchScalarField
Qs_(p.size(), 0), Qs_(p.size(), 0),
solidDict_(dict), solidDict_(dict),
solidPtr_(), solidPtr_(),
QrPrevious_(p.size(), 0.0), qrPrevious_(p.size(), 0.0),
QrRelaxation_(dict.lookupOrDefault<scalar>("relaxation", 1)), qrRelaxation_(dict.lookupOrDefault<scalar>("relaxation", 1)),
QrName_(dict.lookupOrDefault<word>("Qr", "none")) qrName_(dict.lookupOrDefault<word>("qr", "none"))
{ {
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
@ -116,9 +116,9 @@ thermalBaffle1DFvPatchScalarField
Qs_ = scalarField("Qs", dict, p.size()); Qs_ = scalarField("Qs", dict, p.size());
} }
if (dict.found("QrPrevious")) if (dict.found("qrPrevious"))
{ {
QrPrevious_ = scalarField("QrPrevious", dict, p.size()); qrPrevious_ = scalarField("qrPrevious", dict, p.size());
} }
if (dict.found("refValue") && baffleActivated_) if (dict.found("refValue") && baffleActivated_)
@ -154,9 +154,9 @@ thermalBaffle1DFvPatchScalarField
Qs_(ptf.Qs_), Qs_(ptf.Qs_),
solidDict_(ptf.solidDict_), solidDict_(ptf.solidDict_),
solidPtr_(ptf.solidPtr_), solidPtr_(ptf.solidPtr_),
QrPrevious_(ptf.QrPrevious_), qrPrevious_(ptf.qrPrevious_),
QrRelaxation_(ptf.QrRelaxation_), qrRelaxation_(ptf.qrRelaxation_),
QrName_(ptf.QrName_) qrName_(ptf.qrName_)
{} {}
@ -176,9 +176,9 @@ thermalBaffle1DFvPatchScalarField
Qs_(ptf.Qs_), Qs_(ptf.Qs_),
solidDict_(ptf.solidDict_), solidDict_(ptf.solidDict_),
solidPtr_(ptf.solidPtr_), solidPtr_(ptf.solidPtr_),
QrPrevious_(ptf.QrPrevious_), qrPrevious_(ptf.qrPrevious_),
QrRelaxation_(ptf.QrRelaxation_), qrRelaxation_(ptf.qrRelaxation_),
QrName_(ptf.QrName_) qrName_(ptf.qrName_)
{} {}
@ -364,15 +364,15 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
patch().template lookupPatchField<volScalarField, scalar>(TName_); patch().template lookupPatchField<volScalarField, scalar>(TName_);
scalarField Qr(Tp.size(), 0.0); scalarField qr(Tp.size(), 0.0);
if (QrName_ != "none") if (qrName_ != "none")
{ {
Qr = patch().template lookupPatchField<volScalarField, scalar> qr = patch().template lookupPatchField<volScalarField, scalar>
(QrName_); (qrName_);
Qr = QrRelaxation_*Qr + (1.0 - QrRelaxation_)*QrPrevious_; qr = qrRelaxation_*qr + (1.0 - qrRelaxation_)*qrPrevious_;
QrPrevious_ = Qr; qrPrevious_ = qr;
} }
tmp<scalarField> Ti = patchInternalField(); tmp<scalarField> Ti = patchInternalField();
@ -393,7 +393,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
scalarField KDeltaSolid(kappas/baffleThickness()); scalarField KDeltaSolid(kappas/baffleThickness());
scalarField alpha(KDeltaSolid - Qr/Tp); scalarField alpha(KDeltaSolid - qr/Tp);
valueFraction() = alpha/(alpha + myKDelta); valueFraction() = alpha/(alpha + myKDelta);
@ -435,9 +435,9 @@ void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
solid().write(os); solid().write(os);
} }
QrPrevious_.writeEntry("QrPrevious", os); qrPrevious_.writeEntry("qrPrevious", os);
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl; os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
os.writeKeyword("relaxation")<< QrRelaxation_ os.writeKeyword("relaxation")<< qrRelaxation_
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
} }

View File

@ -31,8 +31,8 @@ Description
This BC solves a steady 1D thermal baffle. This BC solves a steady 1D thermal baffle.
The solid properties are specify as dictionary. Optionaly radiative heat The solid properties are specify as dictionary. Optionaly radiative heat
flux (Qr) can be incorporated into the balance. Some under-relaxation might flux (qr) can be incorporated into the balance. Some under-relaxation might
be needed on Qr. Baffle and solid properties need to be specified on the be needed on qr. Baffle and solid properties need to be specified on the
master side of the baffle. master side of the baffle.
Usage Usage
@ -48,7 +48,7 @@ Usage
thickness uniform 0.005; // thickness [m] thickness uniform 0.005; // thickness [m]
Qs uniform 100; // heat flux [W/m2] Qs uniform 100; // heat flux [W/m2]
Qr none; qr none;
relaxation 1; relaxation 1;
// Solid thermo // Solid thermo
@ -78,7 +78,7 @@ Usage
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>; type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
samplePatch <masterPatchName>; samplePatch <masterPatchName>;
Qr none; qr none;
relaxation 1; relaxation 1;
} }
\endverbatim \endverbatim
@ -132,14 +132,14 @@ class thermalBaffle1DFvPatchScalarField
//- Solid thermo //- Solid thermo
mutable autoPtr<solidType> solidPtr_; mutable autoPtr<solidType> solidPtr_;
//- Cache Qr for relaxation //- Cache qr for relaxation
scalarField QrPrevious_; scalarField qrPrevious_;
//- Relaxation for Qr //- Relaxation for qr
scalar QrRelaxation_; scalar qrRelaxation_;
//- Name of the radiative heat flux in local region //- Name of the radiative heat flux in local region
const word QrName_; const word qrName_;
// Private members // Private members

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,8 +48,8 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
mixedFvPatchScalarField(p, iF), mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"), temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
TnbrName_("undefined-Tnbr"), TnbrName_("undefined-Tnbr"),
QrNbrName_("undefined-QrNbr"), qrNbrName_("undefined-qrNbr"),
QrName_("undefined-Qr"), qrName_("undefined-qr"),
thicknessLayers_(0), thicknessLayers_(0),
kappaLayers_(0), kappaLayers_(0),
contactRes_(0) contactRes_(0)
@ -72,8 +72,8 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
mixedFvPatchScalarField(psf, p, iF, mapper), mixedFvPatchScalarField(psf, p, iF, mapper),
temperatureCoupledBase(patch(), psf), temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_), TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_), qrNbrName_(psf.qrNbrName_),
QrName_(psf.QrName_), qrName_(psf.qrName_),
thicknessLayers_(psf.thicknessLayers_), thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_), kappaLayers_(psf.kappaLayers_),
contactRes_(psf.contactRes_) contactRes_(psf.contactRes_)
@ -91,8 +91,8 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
mixedFvPatchScalarField(p, iF), mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict), temperatureCoupledBase(patch(), dict),
TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")), TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")),
QrNbrName_(dict.lookupOrDefault<word>("QrNbr", "none")), qrNbrName_(dict.lookupOrDefault<word>("qrNbr", "none")),
QrName_(dict.lookupOrDefault<word>("Qr", "none")), qrName_(dict.lookupOrDefault<word>("qr", "none")),
thicknessLayers_(0), thicknessLayers_(0),
kappaLayers_(0), kappaLayers_(0),
contactRes_(0.0) contactRes_(0.0)
@ -152,8 +152,8 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
mixedFvPatchScalarField(psf, iF), mixedFvPatchScalarField(psf, iF),
temperatureCoupledBase(patch(), psf), temperatureCoupledBase(patch(), psf),
TnbrName_(psf.TnbrName_), TnbrName_(psf.TnbrName_),
QrNbrName_(psf.QrNbrName_), qrNbrName_(psf.qrNbrName_),
QrName_(psf.QrName_), qrName_(psf.qrName_),
thicknessLayers_(psf.thicknessLayers_), thicknessLayers_(psf.thicknessLayers_),
kappaLayers_(psf.kappaLayers_), kappaLayers_(psf.kappaLayers_),
contactRes_(psf.contactRes_) contactRes_(psf.contactRes_)
@ -212,22 +212,22 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
scalarField KDelta(kappa(Tp)*patch().deltaCoeffs()); scalarField KDelta(kappa(Tp)*patch().deltaCoeffs());
scalarField Qr(Tp.size(), 0.0); scalarField qr(Tp.size(), 0.0);
if (QrName_ != "none") if (qrName_ != "none")
{ {
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_); qr = patch().lookupPatchField<volScalarField, scalar>(qrName_);
} }
scalarField QrNbr(Tp.size(), 0.0); scalarField qrNbr(Tp.size(), 0.0);
if (QrNbrName_ != "none") if (qrNbrName_ != "none")
{ {
QrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_); qrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrNbrName_);
mpp.distribute(QrNbr); mpp.distribute(qrNbr);
} }
valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta); valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
refValue() = TcNbr; refValue() = TcNbr;
refGrad() = (Qr + QrNbr)/kappa(Tp); refGrad() = (qr + qrNbr)/kappa(Tp);
mixedFvPatchScalarField::updateCoeffs(); mixedFvPatchScalarField::updateCoeffs();
@ -261,8 +261,8 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::write
{ {
mixedFvPatchScalarField::write(os); mixedFvPatchScalarField::write(os);
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl; os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
os.writeKeyword("QrNbr")<< QrNbrName_ << token::END_STATEMENT << nl; os.writeKeyword("qrNbr")<< qrNbrName_ << token::END_STATEMENT << nl;
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl; os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
thicknessLayers_.writeEntry("thicknessLayers", os); thicknessLayers_.writeEntry("thicknessLayers", os);
kappaLayers_.writeEntry("kappaLayers", os); kappaLayers_.writeEntry("kappaLayers", os);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,8 +38,8 @@ Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
Tnbr | name of the field | no | T Tnbr | name of the field | no | T
QrNbr | name of the radiative flux in the nbr region | no | none qrNbr | name of the radiative flux in the nbr region | no | none
Qr | name of the radiative flux in this region | no | none qr | name of the radiative flux in this region | no | none
thicknessLayers | list of thicknesses per layer [m] | no | thicknessLayers | list of thicknesses per layer [m] | no |
kappaLayers | list of thermal conductivites per layer [W/m/K] | no | kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
kappaMethod | inherited from temperatureCoupledBase | inherited | kappaMethod | inherited from temperatureCoupledBase | inherited |
@ -52,8 +52,8 @@ Usage
{ {
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
QrNbr Qr; // or none. Name of Qr field on neighbour region qrNbr qr; // or none. Name of qr field on neighbour region
Qr Qr; // or none. Name of Qr field on local region qr qr; // or none. Name of qr field on local region
thicknessLayers (0.1 0.2 0.3 0.4); thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4); kappaLayers (1 2 3 4);
kappaMethod lookup; kappaMethod lookup;
@ -101,10 +101,10 @@ class turbulentTemperatureRadCoupledMixedFvPatchScalarField
const word TnbrName_; const word TnbrName_;
//- Name of the radiative heat flux in the neighbout region //- Name of the radiative heat flux in the neighbout region
const word QrNbrName_; const word qrNbrName_;
//- Name of the radiative heat flux in local region //- Name of the radiative heat flux in local region
const word QrName_; const word qrName_;
//- Thickness of layers //- Thickness of layers
scalarList thicknessLayers_; scalarList thicknessLayers_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -78,12 +78,12 @@ void Foam::functionObjects::wallHeatFlux::calcHeatFlux
wallHeatFluxBf[patchi] = heatFluxBf[patchi]; wallHeatFluxBf[patchi] = heatFluxBf[patchi];
} }
if (foundObject<volScalarField>("Qr")) if (foundObject<volScalarField>("qr"))
{ {
const volScalarField& Qr = lookupObject<volScalarField>("Qr"); const volScalarField& qr = lookupObject<volScalarField>("qr");
const volScalarField::Boundary& radHeatFluxBf = const volScalarField::Boundary& radHeatFluxBf =
Qr.boundaryField(); qr.boundaryField();
forAll(wallHeatFluxBf, patchi) forAll(wallHeatFluxBf, patchi)
{ {

View File

@ -58,7 +58,7 @@ void reactingOneDim::readReactingOneDimControls()
coeffs().lookup("minimumDelta") >> minimumDelta_; coeffs().lookup("minimumDelta") >> minimumDelta_;
coeffs().lookup("gasHSource") >> gasHSource_; coeffs().lookup("gasHSource") >> gasHSource_;
coeffs().lookup("QrHSource") >> QrHSource_; coeffs().lookup("qrHSource") >> qrHSource_;
useChemistrySolvers_ = useChemistrySolvers_ =
coeffs().lookupOrDefault<bool>("useChemistrySolvers", true); coeffs().lookupOrDefault<bool>("useChemistrySolvers", true);
} }
@ -92,41 +92,41 @@ bool reactingOneDim::read(const dictionary& dict)
} }
void reactingOneDim::updateQr() void reactingOneDim::updateqr()
{ {
// Update local Qr from coupled Qr field // Update local qr from coupled qr field
Qr_ == dimensionedScalar("zero", Qr_.dimensions(), 0.0); qr_ == dimensionedScalar("zero", qr_.dimensions(), 0.0);
// Retrieve field from coupled region using mapped boundary conditions // Retrieve field from coupled region using mapped boundary conditions
Qr_.correctBoundaryConditions(); qr_.correctBoundaryConditions();
volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef(); volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
forAll(intCoupledPatchIDs_, i) forAll(intCoupledPatchIDs_, i)
{ {
const label patchi = intCoupledPatchIDs_[i]; const label patchi = intCoupledPatchIDs_[i];
// Qr is positive going in the solid // qr is positive going in the solid
// If the surface is emitting the radiative flux is set to zero // If the surface is emitting the radiative flux is set to zero
QrBf[patchi] = max(QrBf[patchi], scalar(0.0)); qrBf[patchi] = max(qrBf[patchi], scalar(0.0));
} }
const vectorField& cellC = regionMesh().cellCentres(); const vectorField& cellC = regionMesh().cellCentres();
tmp<volScalarField> kappa = kappaRad(); tmp<volScalarField> kappa = kappaRad();
// Propagate Qr through 1-D regions // Propagate qr through 1-D regions
label localPyrolysisFacei = 0; label localPyrolysisFacei = 0;
forAll(intCoupledPatchIDs_, i) forAll(intCoupledPatchIDs_, i)
{ {
const label patchi = intCoupledPatchIDs_[i]; const label patchi = intCoupledPatchIDs_[i];
const scalarField& Qrp = Qr_.boundaryField()[patchi]; const scalarField& qrp = qr_.boundaryField()[patchi];
const vectorField& Cf = regionMesh().Cf().boundaryField()[patchi]; const vectorField& Cf = regionMesh().Cf().boundaryField()[patchi];
forAll(Qrp, facei) forAll(qrp, facei)
{ {
const scalar Qr0 = Qrp[facei]; const scalar qr0 = qrp[facei];
point Cf0 = Cf[facei]; point Cf0 = Cf[facei];
const labelList& cells = boundaryFaceCells_[localPyrolysisFacei++]; const labelList& cells = boundaryFaceCells_[localPyrolysisFacei++];
scalar kappaInt = 0.0; scalar kappaInt = 0.0;
@ -136,7 +136,7 @@ void reactingOneDim::updateQr()
const point& Cf1 = cellC[celli]; const point& Cf1 = cellC[celli];
const scalar delta = mag(Cf1 - Cf0); const scalar delta = mag(Cf1 - Cf0);
kappaInt += kappa()[celli]*delta; kappaInt += kappa()[celli]*delta;
Qr_[celli] = Qr0*exp(-kappaInt); qr_[celli] = qr0*exp(-kappaInt);
Cf0 = Cf1; Cf0 = Cf1;
} }
} }
@ -202,9 +202,9 @@ void reactingOneDim::updatePhiGas()
void reactingOneDim::updateFields() void reactingOneDim::updateFields()
{ {
if (QrHSource_) if (qrHSource_)
{ {
updateQr(); updateqr();
} }
updatePhiGas(); updatePhiGas();
@ -332,10 +332,10 @@ void reactingOneDim::solveEnergy()
hEqn += fvc::div(phiGas); hEqn += fvc::div(phiGas);
} }
if (QrHSource_) if (qrHSource_)
{ {
const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf()); const surfaceScalarField phiqr(fvc::interpolate(qr_)*nMagSf());
hEqn += fvc::div(phiQr); hEqn += fvc::div(phiqr);
} }
if (regionMesh().moving()) if (regionMesh().moving())
@ -447,11 +447,11 @@ reactingOneDim::reactingOneDim
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
time().timeName(), time().timeName(),
regionMesh(), regionMesh(),
IOobject::MUST_READ, IOobject::MUST_READ,
@ -465,7 +465,7 @@ reactingOneDim::reactingOneDim
totalGasMassFlux_(0.0), totalGasMassFlux_(0.0),
totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)),
gasHSource_(false), gasHSource_(false),
QrHSource_(false), qrHSource_(false),
useChemistrySolvers_(true) useChemistrySolvers_(true)
{ {
if (active_) if (active_)
@ -547,11 +547,11 @@ reactingOneDim::reactingOneDim
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
time().timeName(), time().timeName(),
regionMesh(), regionMesh(),
IOobject::MUST_READ, IOobject::MUST_READ,
@ -565,7 +565,7 @@ reactingOneDim::reactingOneDim
totalGasMassFlux_(0.0), totalGasMassFlux_(0.0),
totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)),
gasHSource_(false), gasHSource_(false),
QrHSource_(false), qrHSource_(false),
useChemistrySolvers_(true) useChemistrySolvers_(true)
{ {
if (active_) if (active_)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -125,10 +125,10 @@ protected:
//- Coupled region radiative heat flux [W/m2] //- Coupled region radiative heat flux [W/m2]
// Requires user to input mapping info for coupled patches // Requires user to input mapping info for coupled patches
//volScalarField QrCoupled_; //volScalarField qrCoupled_;
//- In depth radiative heat flux [W/m2] //- In depth radiative heat flux [W/m2]
volScalarField Qr_; volScalarField qr_;
// Checks // Checks
@ -152,7 +152,7 @@ protected:
bool gasHSource_; bool gasHSource_;
//- Add in depth radiation source term //- Add in depth radiation source term
bool QrHSource_; bool qrHSource_;
//- Use chemistry solvers (ode or sequential) //- Use chemistry solvers (ode or sequential)
bool useChemistrySolvers_; bool useChemistrySolvers_;
@ -173,7 +173,7 @@ protected:
void updateMesh(const scalarField& mass0); void updateMesh(const scalarField& mass0);
//- Update radiative flux in pyrolysis region //- Update radiative flux in pyrolysis region
void updateQr(); void updateqr();
//- Update enthalpy flux for pyrolysis gases //- Update enthalpy flux for pyrolysis gases
void updatePhiGas(); void updatePhiGas();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -110,7 +110,7 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
filmRegionName_("surfaceFilmProperties"), filmRegionName_("surfaceFilmProperties"),
pyrolysisRegionName_("pyrolysisProperties"), pyrolysisRegionName_("pyrolysisProperties"),
TnbrName_("undefined-Tnbr"), TnbrName_("undefined-Tnbr"),
QrName_("undefined-Qr"), qrName_("undefined-qr"),
convectiveScaling_(1.0), convectiveScaling_(1.0),
filmDeltaDry_(0.0), filmDeltaDry_(0.0),
filmDeltaWet_(0.0) filmDeltaWet_(0.0)
@ -135,7 +135,7 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
filmRegionName_(psf.filmRegionName_), filmRegionName_(psf.filmRegionName_),
pyrolysisRegionName_(psf.pyrolysisRegionName_), pyrolysisRegionName_(psf.pyrolysisRegionName_),
TnbrName_(psf.TnbrName_), TnbrName_(psf.TnbrName_),
QrName_(psf.QrName_), qrName_(psf.qrName_),
convectiveScaling_(psf.convectiveScaling_), convectiveScaling_(psf.convectiveScaling_),
filmDeltaDry_(psf.filmDeltaDry_), filmDeltaDry_(psf.filmDeltaDry_),
filmDeltaWet_(psf.filmDeltaWet_) filmDeltaWet_(psf.filmDeltaWet_)
@ -161,7 +161,7 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties") dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties")
), ),
TnbrName_(dict.lookup("Tnbr")), TnbrName_(dict.lookup("Tnbr")),
QrName_(dict.lookup("Qr")), qrName_(dict.lookup("qr")),
convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)), convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)),
filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))), filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))),
filmDeltaWet_(readScalar(dict.lookup("filmDeltaWet"))) filmDeltaWet_(readScalar(dict.lookup("filmDeltaWet")))
@ -207,7 +207,7 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
filmRegionName_(psf.filmRegionName_), filmRegionName_(psf.filmRegionName_),
pyrolysisRegionName_(psf.pyrolysisRegionName_), pyrolysisRegionName_(psf.pyrolysisRegionName_),
TnbrName_(psf.TnbrName_), TnbrName_(psf.TnbrName_),
QrName_(psf.QrName_), qrName_(psf.qrName_),
convectiveScaling_(psf.convectiveScaling_), convectiveScaling_(psf.convectiveScaling_),
filmDeltaDry_(psf.filmDeltaDry_), filmDeltaDry_(psf.filmDeltaDry_),
filmDeltaWet_(psf.filmDeltaWet_) filmDeltaWet_(psf.filmDeltaWet_)
@ -268,25 +268,25 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
const pyrolysisModelType& pyrolysis = pyrModel(); const pyrolysisModelType& pyrolysis = pyrModel();
const filmModelType& film = filmModel(); const filmModelType& film = filmModel();
// Obtain Rad heat (Qr) // Obtain Rad heat (qr)
scalarField Qr(patch().size(), 0.0); scalarField qr(patch().size(), 0.0);
label coupledPatchi = -1; label coupledPatchi = -1;
if (pyrolysisRegionName_ == mesh.name()) if (pyrolysisRegionName_ == mesh.name())
{ {
coupledPatchi = patchi; coupledPatchi = patchi;
if (QrName_ != "none") if (qrName_ != "none")
{ {
Qr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrName_); qr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrName_);
mpp.distribute(Qr); mpp.distribute(qr);
} }
} }
else if (pyrolysis.primaryMesh().name() == mesh.name()) else if (pyrolysis.primaryMesh().name() == mesh.name())
{ {
coupledPatchi = nbrPatch.index(); coupledPatchi = nbrPatch.index();
if (QrName_ != "none") if (qrName_ != "none")
{ {
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_); qr = patch().lookupPatchField<volScalarField, scalar>(qrName_);
} }
} }
else else
@ -344,7 +344,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_); scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_);
scalarField qRad((1.0 - ratio)*Qr); scalarField qRad((1.0 - ratio)*qr);
scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp); scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp);
@ -357,7 +357,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
if (debug) if (debug)
{ {
scalar Qc = gSum(qConv*patch().magSf()); scalar Qc = gSum(qConv*patch().magSf());
scalar Qr = gSum(qRad*patch().magSf()); scalar qr = gSum(qRad*patch().magSf());
scalar Qt = gSum((qConv + qRad)*patch().magSf()); scalar Qt = gSum((qConv + qRad)*patch().magSf());
Info<< mesh.name() << ':' Info<< mesh.name() << ':'
@ -367,7 +367,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
<< nbrPatch.name() << ':' << nbrPatch.name() << ':'
<< this->internalField().name() << " :" << nl << this->internalField().name() << " :" << nl
<< " convective heat[W] : " << Qc << nl << " convective heat[W] : " << Qc << nl
<< " radiative heat [W] : " << Qr << nl << " radiative heat [W] : " << qr << nl
<< " total heat [W] : " << Qt << nl << " total heat [W] : " << Qt << nl
<< " wall temperature " << " wall temperature "
<< " min:" << gMin(*this) << " min:" << gMin(*this)
@ -399,7 +399,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write
pyrolysisRegionName_ pyrolysisRegionName_
); );
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl; os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl; os.writeKeyword("qr")<< qrName_ << token::END_STATEMENT << nl;
os.writeKeyword("convectiveScaling") << convectiveScaling_ os.writeKeyword("convectiveScaling") << convectiveScaling_
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
os.writeKeyword("filmDeltaDry") << filmDeltaDry_ os.writeKeyword("filmDeltaDry") << filmDeltaDry_

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ Description
type filmPyrolysisRadiativeCoupledMixed; type filmPyrolysisRadiativeCoupledMixed;
Tnbr T; Tnbr T;
kappa fluidThermo; kappa fluidThermo;
Qr Qr; qr qr;
kappaName none; kappaName none;
filmDeltaDry 0.0; filmDeltaDry 0.0;
filmDeltaWet 3e-4; filmDeltaWet 3e-4;
@ -58,7 +58,7 @@ Description
\verbatim \verbatim
qConv = ratio*htcwfilm*(Tfilm - *this); qConv = ratio*htcwfilm*(Tfilm - *this);
qRad = (1.0 - ratio)*Qr; qRad = (1.0 - ratio)*qr;
\endverbatim \endverbatim
Then the solid can gain or loose energy through radiation or conduction Then the solid can gain or loose energy through radiation or conduction
@ -67,7 +67,7 @@ Description
Notes: Notes:
- kappa and \c kappaName are inherited from temperatureCoupledBase. - kappa and \c kappaName are inherited from temperatureCoupledBase.
- Qr is the radiative flux defined in the radiation model. - qr is the radiative flux defined in the radiation model.
See also See also
@ -124,7 +124,7 @@ private:
const word TnbrName_; const word TnbrName_;
//- Name of the radiative heat flux //- Name of the radiative heat flux
const word QrName_; const word qrName_;
//- Convective Scaling Factor (as determined by Prateep's tests) //- Convective Scaling Factor (as determined by Prateep's tests)
const scalar convectiveScaling_; const scalar convectiveScaling_;

View File

@ -56,11 +56,11 @@ constantRadiation::constantRadiation
) )
: :
filmRadiationModel(typeName, film, dict), filmRadiationModel(typeName, film, dict),
QrConst_ qrConst_
( (
IOobject IOobject
( (
typeName + ":QrConst", typeName + ":qrConst",
film.time().timeName(), film.time().timeName(),
film.regionMesh(), film.regionMesh(),
IOobject::MUST_READ, IOobject::MUST_READ,
@ -125,10 +125,10 @@ tmp<volScalarField> constantRadiation::Shs()
if ((time >= timeStart_) && (time <= timeStart_ + duration_)) if ((time >= timeStart_) && (time <= timeStart_ + duration_))
{ {
scalarField& Shs = tShs.ref(); scalarField& Shs = tShs.ref();
const scalarField& Qr = QrConst_; const scalarField& qr = qrConst_;
const scalarField& alpha = filmModel_.alpha(); const scalarField& alpha = filmModel_.alpha();
Shs = mask_*Qr*alpha*absorptivity_; Shs = mask_*qr*alpha*absorptivity_;
} }
return tShs; return tShs;

View File

@ -63,7 +63,7 @@ private:
// Private data // Private data
//- Constant radiative flux [kg/s3] //- Constant radiative flux [kg/s3]
volScalarField QrConst_; volScalarField qrConst_;
//- Radiation mask //- Radiation mask
volScalarField mask_; volScalarField mask_;
@ -115,7 +115,7 @@ public:
virtual void correct(); virtual void correct();
//- Return the radiation sensible enthalpy source //- Return the radiation sensible enthalpy source
// Also updates QrNet // Also updates qrNet
virtual tmp<volScalarField> Shs(); virtual tmp<volScalarField> Shs();
}; };

View File

@ -101,7 +101,7 @@ public:
virtual void correct(); virtual void correct();
//- Return the radiation sensible enthalpy source //- Return the radiation sensible enthalpy source
// Also updates QrNet // Also updates qrNet
virtual tmp<volScalarField> Shs(); virtual tmp<volScalarField> Shs();
}; };

View File

@ -71,11 +71,11 @@ standardRadiation::standardRadiation
dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
film.mappedPushedFieldPatchTypes<scalar>() film.mappedPushedFieldPatchTypes<scalar>()
), ),
QrNet_ qrNet_
( (
IOobject IOobject
( (
"QrNet", "qrNet",
film.time().timeName(), film.time().timeName(),
film.regionMesh(), film.regionMesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -100,7 +100,7 @@ standardRadiation::~standardRadiation()
void standardRadiation::correct() void standardRadiation::correct()
{ {
// Transfer Qr from primary region // Transfer qr from primary region
QinPrimary_.correctBoundaryConditions(); QinPrimary_.correctBoundaryConditions();
} }
@ -131,9 +131,9 @@ tmp<volScalarField> standardRadiation::Shs()
Shs = beta_*QinP*alpha*(1.0 - exp(-kappaBar_*delta)); Shs = beta_*QinP*alpha*(1.0 - exp(-kappaBar_*delta));
// Update net Qr on local region // Update net qr on local region
QrNet_.primitiveFieldRef() = QinP - Shs; qrNet_.primitiveFieldRef() = QinP - Shs;
QrNet_.correctBoundaryConditions(); qrNet_.correctBoundaryConditions();
return tShs; return tShs;
} }

View File

@ -63,7 +63,7 @@ private:
volScalarField QinPrimary_; volScalarField QinPrimary_;
//- Remaining radiative flux after removing local contribution //- Remaining radiative flux after removing local contribution
volScalarField QrNet_; volScalarField qrNet_;
// Model coefficients // Model coefficients
@ -112,7 +112,7 @@ public:
virtual void correct(); virtual void correct();
//- Return the radiation sensible enthalpy source //- Return the radiation sensible enthalpy source
// Also updates QrNet // Also updates qrNet
virtual tmp<volScalarField> Shs(); virtual tmp<volScalarField> Shs();
}; };

View File

@ -54,8 +54,8 @@ Usage
Tnbr T; Tnbr T;
kappa fluidThermo; // or solidThermo kappa fluidThermo; // or solidThermo
KappaName none; KappaName none;
QrNbr Qr;//or none.Name of Qr field on neighbourregion qrNbr qr;//or none.Name of qr field on neighbourregion
Qr none;// or none.Name of Qr field on localregion qr none;// or none.Name of qr field on localregion
value uniform 300; value uniform 300;
// Baffle region name // Baffle region name

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -185,7 +185,7 @@ updateCoeffs()
const scalarField nAve(n & ray.dAve()); const scalarField nAve(n & ray.dAve());
ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve; ray.qr().boundaryFieldRef()[patchi] += Iw*nAve;
const scalarField temissivity = emissivity(); const scalarField temissivity = emissivity();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,7 +40,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
: :
fixedValueFvPatchScalarField(p, iF), fixedValueFvPatchScalarField(p, iF),
radiationCoupledBase(patch(), "undefined", scalarField::null()), radiationCoupledBase(patch(), "undefined", scalarField::null()),
Qro_(p.size(), 0.0) qro_(p.size(), 0.0)
{} {}
@ -60,7 +60,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
ptf.emissivityMethod(), ptf.emissivityMethod(),
ptf.emissivity_ ptf.emissivity_
), ),
Qro_(ptf.Qro_) qro_(ptf.qro_)
{} {}
@ -74,7 +74,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
: :
fixedValueFvPatchScalarField(p, iF, dict, false), fixedValueFvPatchScalarField(p, iF, dict, false),
radiationCoupledBase(p, dict), radiationCoupledBase(p, dict),
Qro_("Qro", dict, p.size()) qro_("qro", dict, p.size())
{ {
if (dict.found("value")) if (dict.found("value"))
{ {
@ -104,7 +104,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
ptf.emissivityMethod(), ptf.emissivityMethod(),
ptf.emissivity_ ptf.emissivity_
), ),
Qro_(ptf.Qro_) qro_(ptf.qro_)
{} {}
@ -122,7 +122,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
ptf.emissivityMethod(), ptf.emissivityMethod(),
ptf.emissivity_ ptf.emissivity_
), ),
Qro_(ptf.Qro_) qro_(ptf.qro_)
{} {}
@ -163,7 +163,7 @@ write
{ {
fixedValueFvPatchScalarField::write(os); fixedValueFvPatchScalarField::write(os);
radiationCoupledBase::write(os); radiationCoupledBase::write(os);
Qro_.writeEntry("Qro", os); qro_.writeEntry("qro", os);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,12 +29,12 @@ Group
Description Description
This boundary condition provides a grey-diffuse condition for radiative This boundary condition provides a grey-diffuse condition for radiative
heat flux, \c Qr, for use with the view factor model heat flux, \c qr, for use with the view factor model
Usage Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
Qro | external radiative heat flux | yes | qro | external radiative heat flux | yes |
emissivityMode | emissivity mode: solidRadiation or lookup | yes | emissivityMode | emissivity mode: solidRadiation or lookup | yes |
\endtable \endtable
@ -43,7 +43,7 @@ Usage
<patchName> <patchName>
{ {
type greyDiffusiveRadiationViewFactor; type greyDiffusiveRadiationViewFactor;
Qro uniform 0; qro uniform 0;
emissivityMode solidRadiation; emissivityMode solidRadiation;
value uniform 0; value uniform 0;
} }
@ -85,7 +85,7 @@ class greyDiffusiveViewFactorFixedValueFvPatchScalarField
// Private data // Private data
//- External radiative heat flux //- External radiative heat flux
scalarField Qro_; scalarField qro_;
public: public:
@ -165,9 +165,9 @@ public:
// Access // Access
//- Return external radiative heat flux //- Return external radiative heat flux
const scalarList& Qro() const scalarList& qro()
{ {
return Qro_; return qro_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -186,7 +186,7 @@ updateCoeffs()
const scalarField nAve(n & ray.dAve()); const scalarField nAve(n & ray.dAve());
ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve; ray.qr().boundaryFieldRef()[patchi] += Iw*nAve;
const scalarField Eb const scalarField Eb
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,18 +62,18 @@ Foam::radiation::P1::P1(const volScalarField& T)
), ),
mesh_ mesh_
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0)
), ),
a_ a_
( (
@ -132,18 +132,18 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T)
), ),
mesh_ mesh_
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0)
), ),
a_ a_
( (
@ -242,14 +242,14 @@ void Foam::radiation::P1::calculate()
- 4.0*(e_*physicoChemical::sigma*pow4(T_) ) - E_ - 4.0*(e_*physicoChemical::sigma*pow4(T_) ) - E_
); );
volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef(); volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
// Calculate radiative heat flux on boundaries. // Calculate radiative heat flux on boundaries.
forAll(mesh_.boundaryMesh(), patchi) forAll(mesh_.boundaryMesh(), patchi)
{ {
if (!G_.boundaryField()[patchi].coupled()) if (!G_.boundaryField()[patchi].coupled())
{ {
QrBf[patchi] = qrBf[patchi] =
-gamma.boundaryField()[patchi] -gamma.boundaryField()[patchi]
*G_.boundaryField()[patchi].snGrad(); *G_.boundaryField()[patchi].snGrad();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ class P1
volScalarField G_; volScalarField G_;
//- Total radiative heat flux [W/m2] //- Total radiative heat flux [W/m2]
volScalarField Qr_; volScalarField qr_;
//- Absorption coefficient //- Absorption coefficient
volScalarField a_; volScalarField a_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -222,18 +222,18 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
mesh_, mesh_,
dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) dimensionedScalar("G", dimMass/pow3(dimTime), 0.0)
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::READ_IF_PRESENT, IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0)
), ),
Qem_ Qem_
( (
@ -309,18 +309,18 @@ Foam::radiation::fvDOM::fvDOM
mesh_, mesh_,
dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) dimensionedScalar("G", dimMass/pow3(dimTime), 0.0)
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::READ_IF_PRESENT, IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0)
), ),
Qem_ Qem_
( (
@ -490,7 +490,7 @@ void Foam::radiation::fvDOM::updateBlackBodyEmission()
void Foam::radiation::fvDOM::updateG() void Foam::radiation::fvDOM::updateG()
{ {
G_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); G_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0);
Qr_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); qr_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0);
Qem_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); Qem_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0);
Qin_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); Qin_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0);
@ -498,7 +498,7 @@ void Foam::radiation::fvDOM::updateG()
{ {
IRay_[rayI].addIntensity(); IRay_[rayI].addIntensity();
G_ += IRay_[rayI].I()*IRay_[rayI].omega(); G_ += IRay_[rayI].I()*IRay_[rayI].omega();
Qr_.boundaryFieldRef() += IRay_[rayI].Qr().boundaryField(); qr_.boundaryFieldRef() += IRay_[rayI].qr().boundaryField();
Qem_.boundaryFieldRef() += IRay_[rayI].Qem().boundaryField(); Qem_.boundaryFieldRef() += IRay_[rayI].Qem().boundaryField();
Qin_.boundaryFieldRef() += IRay_[rayI].Qin().boundaryField(); Qin_.boundaryFieldRef() += IRay_[rayI].Qin().boundaryField();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,7 +89,7 @@ class fvDOM
volScalarField G_; volScalarField G_;
//- Total radiative heat flux [W/m2] //- Total radiative heat flux [W/m2]
volScalarField Qr_; volScalarField qr_;
//- Emmited radiative heat flux [W/m2] //- Emmited radiative heat flux [W/m2]
volScalarField Qem_; volScalarField Qem_;
@ -228,7 +228,7 @@ public:
inline const volScalarField& G() const; inline const volScalarField& G() const;
//- Const access to total radiative heat flux field //- Const access to total radiative heat flux field
inline const volScalarField& Qr() const; inline const volScalarField& qr() const;
//- Const access to incident radiative heat flux field //- Const access to incident radiative heat flux field
inline const volScalarField& Qin() const; inline const volScalarField& Qin() const;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -86,9 +86,9 @@ inline const Foam::volScalarField& Foam::radiation::fvDOM::G() const
} }
inline const Foam::volScalarField& Foam::radiation::fvDOM::Qr() const inline const Foam::volScalarField& Foam::radiation::fvDOM::qr() const
{ {
return Qr_; return qr_;
} }
inline const Foam::volScalarField& Foam::radiation::fvDOM::Qin() const inline const Foam::volScalarField& Foam::radiation::fvDOM::Qin() const

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -69,18 +69,18 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
mesh_, mesh_,
dimensionedScalar("I", dimMass/pow3(dimTime), 0.0) dimensionedScalar("I", dimMass/pow3(dimTime), 0.0)
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr" + name(rayId), "qr" + name(rayId),
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0)
), ),
Qin_ Qin_
( (
@ -206,7 +206,7 @@ Foam::radiation::radiativeIntensityRay::~radiativeIntensityRay()
Foam::scalar Foam::radiation::radiativeIntensityRay::correct() Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
{ {
// Reset boundary heat flux to zero // Reset boundary heat flux to zero
Qr_.boundaryFieldRef() = 0.0; qr_.boundaryFieldRef() = 0.0;
scalar maxResidual = -GREAT; scalar maxResidual = -GREAT;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,7 +80,7 @@ private:
volScalarField I_; volScalarField I_;
//- Total radiative heat flux on boundary //- Total radiative heat flux on boundary
volScalarField Qr_; volScalarField qr_;
//- Incident radiative heat flux on boundary //- Incident radiative heat flux on boundary
volScalarField Qin_; volScalarField Qin_;
@ -176,10 +176,10 @@ public:
inline const volScalarField& I() const; inline const volScalarField& I() const;
//- Return const access to the boundary heat flux //- Return const access to the boundary heat flux
inline const volScalarField& Qr() const; inline const volScalarField& qr() const;
//- Return non-const access to the boundary heat flux //- Return non-const access to the boundary heat flux
inline volScalarField& Qr(); inline volScalarField& qr();
//- Return non-const access to the boundary incident heat flux //- Return non-const access to the boundary incident heat flux
inline volScalarField& Qin(); inline volScalarField& Qin();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,15 +31,15 @@ Foam::radiation::radiativeIntensityRay::I() const
inline const Foam::volScalarField& inline const Foam::volScalarField&
Foam::radiation::radiativeIntensityRay::Qr() const Foam::radiation::radiativeIntensityRay::qr() const
{ {
return Qr_; return qr_;
} }
inline Foam::volScalarField& Foam::radiation::radiativeIntensityRay::Qr() inline Foam::volScalarField& Foam::radiation::radiativeIntensityRay::qr()
{ {
return Qr_; return qr_;
} }
inline const Foam::volScalarField& Foam::radiation:: inline const Foam::volScalarField& Foam::radiation::

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,17 +49,17 @@ namespace Foam
void Foam::radiation::viewFactor::initialise() void Foam::radiation::viewFactor::initialise()
{ {
const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh(); const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh();
const volScalarField::Boundary& Qrp = Qr_.boundaryField(); const volScalarField::Boundary& qrp = qr_.boundaryField();
label count = 0; label count = 0;
forAll(Qrp, patchi) forAll(qrp, patchi)
{ {
//const polyPatch& pp = mesh_.boundaryMesh()[patchi]; //const polyPatch& pp = mesh_.boundaryMesh()[patchi];
const fvPatchScalarField& QrPatchi = Qrp[patchi]; const fvPatchScalarField& qrPatchi = qrp[patchi];
if ((isA<fixedValueFvPatchScalarField>(QrPatchi))) if ((isA<fixedValueFvPatchScalarField>(qrPatchi)))
{ {
selectedPatches_[count] = QrPatchi.patch().index(); selectedPatches_[count] = qrPatchi.patch().index();
nLocalCoarseFaces_ += coarsePatches[patchi].size(); nLocalCoarseFaces_ += coarsePatches[patchi].size();
count++; count++;
} }
@ -264,11 +264,11 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
mesh_, mesh_,
finalAgglom_ finalAgglom_
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -322,11 +322,11 @@ Foam::radiation::viewFactor::viewFactor
mesh_, mesh_,
finalAgglom_ finalAgglom_
), ),
Qr_ qr_
( (
IOobject IOobject
( (
"Qr", "qr",
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -394,7 +394,7 @@ void Foam::radiation::viewFactor::insertMatrixElements
void Foam::radiation::viewFactor::calculate() void Foam::radiation::viewFactor::calculate()
{ {
// Store previous iteration // Store previous iteration
Qr_.storePrevIter(); qr_.storePrevIter();
scalarField compactCoarseT(map_->constructSize(), 0.0); scalarField compactCoarseT(map_->constructSize(), 0.0);
scalarField compactCoarseE(map_->constructSize(), 0.0); scalarField compactCoarseE(map_->constructSize(), 0.0);
@ -407,7 +407,7 @@ void Foam::radiation::viewFactor::calculate()
DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_); DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_);
DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_); DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_);
volScalarField::Boundary& QrBf = Qr_.boundaryFieldRef(); volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
forAll(selectedPatches_, i) forAll(selectedPatches_, i)
{ {
@ -416,17 +416,17 @@ void Foam::radiation::viewFactor::calculate()
const scalarField& Tp = T_.boundaryField()[patchID]; const scalarField& Tp = T_.boundaryField()[patchID];
const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
fvPatchScalarField& QrPatch = QrBf[patchID]; fvPatchScalarField& qrPatch = qrBf[patchID];
greyDiffusiveViewFactorFixedValueFvPatchScalarField& Qrp = greyDiffusiveViewFactorFixedValueFvPatchScalarField& qrp =
refCast refCast
< <
greyDiffusiveViewFactorFixedValueFvPatchScalarField greyDiffusiveViewFactorFixedValueFvPatchScalarField
>(QrPatch); >(qrPatch);
const scalarList eb = Qrp.emissivity(); const scalarList eb = qrp.emissivity();
const scalarList& Hoi = Qrp.Qro(); const scalarList& Hoi = qrp.qro();
const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID]; const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID];
const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID]; const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID];
@ -499,23 +499,23 @@ void Foam::radiation::viewFactor::calculate()
// Create global size vectors // Create global size vectors
scalarField T(totalNCoarseFaces_, 0.0); scalarField T(totalNCoarseFaces_, 0.0);
scalarField E(totalNCoarseFaces_, 0.0); scalarField E(totalNCoarseFaces_, 0.0);
scalarField QrExt(totalNCoarseFaces_, 0.0); scalarField qrExt(totalNCoarseFaces_, 0.0);
// Fill lists from compact to global indexes. // Fill lists from compact to global indexes.
forAll(compactCoarseT, i) forAll(compactCoarseT, i)
{ {
T[compactGlobalIds[i]] = compactCoarseT[i]; T[compactGlobalIds[i]] = compactCoarseT[i];
E[compactGlobalIds[i]] = compactCoarseE[i]; E[compactGlobalIds[i]] = compactCoarseE[i];
QrExt[compactGlobalIds[i]] = compactCoarseHo[i]; qrExt[compactGlobalIds[i]] = compactCoarseHo[i];
} }
Pstream::listCombineGather(T, maxEqOp<scalar>()); Pstream::listCombineGather(T, maxEqOp<scalar>());
Pstream::listCombineGather(E, maxEqOp<scalar>()); Pstream::listCombineGather(E, maxEqOp<scalar>());
Pstream::listCombineGather(QrExt, maxEqOp<scalar>()); Pstream::listCombineGather(qrExt, maxEqOp<scalar>());
Pstream::listCombineScatter(T); Pstream::listCombineScatter(T);
Pstream::listCombineScatter(E); Pstream::listCombineScatter(E);
Pstream::listCombineScatter(QrExt); Pstream::listCombineScatter(qrExt);
// Net radiation // Net radiation
scalarField q(totalNCoarseFaces_, 0.0); scalarField q(totalNCoarseFaces_, 0.0);
@ -538,7 +538,7 @@ void Foam::radiation::viewFactor::calculate()
if (i==j) if (i==j)
{ {
C(i, j) = invEj - (invEj - 1.0)*Fmatrix_()(i, j); C(i, j) = invEj - (invEj - 1.0)*Fmatrix_()(i, j);
q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - QrExt[j]; q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - qrExt[j];
} }
else else
{ {
@ -594,7 +594,7 @@ void Foam::radiation::viewFactor::calculate()
if (i==j) if (i==j)
{ {
q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - QrExt[j]; q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - qrExt[j];
} }
else else
{ {
@ -614,7 +614,7 @@ void Foam::radiation::viewFactor::calculate()
} }
} }
// Scatter q and fill Qr // Scatter q and fill qr
Pstream::listCombineScatter(q); Pstream::listCombineScatter(q);
Pstream::listCombineGather(q, maxEqOp<scalar>()); Pstream::listCombineGather(q, maxEqOp<scalar>());
@ -625,7 +625,7 @@ void Foam::radiation::viewFactor::calculate()
const polyPatch& pp = mesh_.boundaryMesh()[patchID]; const polyPatch& pp = mesh_.boundaryMesh()[patchID];
if (pp.size() > 0) if (pp.size() > 0)
{ {
scalarField& Qrp = QrBf[patchID]; scalarField& qrp = qrBf[patchID];
const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
const labelList& agglom = finalAgglom_[patchID]; const labelList& agglom = finalAgglom_[patchID];
label nAgglom = max(agglom)+1; label nAgglom = max(agglom)+1;
@ -646,8 +646,8 @@ void Foam::radiation::viewFactor::calculate()
{ {
label facei = fineFaces[k]; label facei = fineFaces[k];
Qrp[facei] = q[globalCoarse]; qrp[facei] = q[globalCoarse];
heatFlux += Qrp[facei]*sf[facei]; heatFlux += qrp[facei]*sf[facei];
} }
globCoarseId ++; globCoarseId ++;
} }
@ -656,11 +656,11 @@ void Foam::radiation::viewFactor::calculate()
if (debug) if (debug)
{ {
forAll(QrBf, patchID) forAll(qrBf, patchID)
{ {
const scalarField& Qrp = QrBf[patchID]; const scalarField& qrp = qrBf[patchID];
const scalarField& magSf = mesh_.magSf().boundaryField()[patchID]; const scalarField& magSf = mesh_.magSf().boundaryField()[patchID];
scalar heatFlux = gSum(Qrp*magSf); scalar heatFlux = gSum(qrp*magSf);
InfoInFunction InfoInFunction
<< "Total heat transfer rate at patch: " << "Total heat transfer rate at patch: "
@ -669,8 +669,8 @@ void Foam::radiation::viewFactor::calculate()
} }
} }
// Relax Qr if necessary // Relax qr if necessary
Qr_.relax(); qr_.relax();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,7 +80,7 @@ class viewFactor
singleCellFvMesh coarseMesh_; singleCellFvMesh coarseMesh_;
//- Net radiative heat flux [W/m2] //- Net radiative heat flux [W/m2]
volScalarField Qr_; volScalarField qr_;
//- View factor matrix //- View factor matrix
autoPtr<scalarSquareMatrix> Fmatrix_; autoPtr<scalarSquareMatrix> Fmatrix_;
@ -168,7 +168,7 @@ public:
// Access // Access
//- Const access to total radiative heat flux field //- Const access to total radiative heat flux field
inline const volScalarField& Qr() const; inline const volScalarField& qr() const;
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,11 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
inline const Foam::volScalarField& Foam::radiation::viewFactor::Qr() const inline const Foam::volScalarField& Foam::radiation::viewFactor::qr() const
{ {
return Qr_; return qr_;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -53,8 +53,8 @@ boundaryField
filmRegion filmRegion; filmRegion filmRegion;
Tnbr T; Tnbr T;
kappaMethod fluidThermo; kappaMethod fluidThermo;
QrNbr none; qrNbr none;
Qr Qr; qr qr;
filmDeltaDry 0.0; filmDeltaDry 0.0;
filmDeltaWet 2e-4; filmDeltaWet 2e-4;
value $internalField; value $internalField;

View File

@ -38,8 +38,8 @@ boundaryField
filmRegion filmRegion; filmRegion filmRegion;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
filmDeltaDry 0.0; filmDeltaDry 0.0;
filmDeltaWet 2e-4; filmDeltaWet 2e-4;
value uniform 298; value uniform 298;

View File

@ -11,7 +11,7 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object Qr; object qr;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -38,7 +38,7 @@ boundaryField
sampleMode nearestPatchFace; sampleMode nearestPatchFace;
samplePatch region0_to_pyrolysisRegion_coupledWall; samplePatch region0_to_pyrolysisRegion_coupledWall;
offset (0 0 0); offset (0 0 0);
field Qr; // this is the name of Qr field in region0 field qr; // this is the name of qr field in region0
setAverage no; setAverage no;
average 0; average 0;
value uniform 0; value uniform 0;

View File

@ -28,9 +28,9 @@ pyrolysis
filmCoupled true; filmCoupled true;
gasHSource true; gasHSource true;
QrHSource false; qrHSource false;
radFluxName Qr; radFluxName qr;
moveMesh false; // true; moveMesh false; // true;
minimumDelta 1e-6; minimumDelta 1e-6;

View File

@ -51,8 +51,8 @@ boundaryField
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod fluidThermo; kappaMethod fluidThermo;
QrNbr none; qrNbr none;
Qr Qr; qr qr;
value $internalField; value $internalField;
} }
} }

View File

@ -42,8 +42,8 @@ boundaryField
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 298.15; value uniform 298.15;
} }

View File

@ -11,7 +11,7 @@ FoamFile
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0"; location "0";
object Qr; object qr;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -43,7 +43,7 @@ boundaryField
sampleMode nearestPatchFace; sampleMode nearestPatchFace;
samplePatch region0_to_panelRegion_fLeft_zone; samplePatch region0_to_panelRegion_fLeft_zone;
offset (0 0 0); offset (0 0 0);
field Qr; field qr;
setAverage no; setAverage no;
average 0; average 0;
value uniform 0; value uniform 0;
@ -56,7 +56,7 @@ boundaryField
sampleMode nearestPatchFace; sampleMode nearestPatchFace;
samplePatch region0_to_panelRegion_fRight_zone; samplePatch region0_to_panelRegion_fRight_zone;
offset (0 0 0); offset (0 0 0);
field Qr; field qr;
setAverage no; setAverage no;
average 0; average 0;
value uniform 0; value uniform 0;

View File

@ -26,7 +26,7 @@ pyrolysis
reactingOneDimCoeffs reactingOneDimCoeffs
{ {
gasHSource false; //Energy source term due to pyrolysis gas gasHSource false; //Energy source term due to pyrolysis gas
QrHSource false; //Energy source term due in depht radiation qrHSource false; //Energy source term due in depht radiation
minimumDelta 1e-12; minimumDelta 1e-12;
reactionDeltaMin 1e-12; reactionDeltaMin 1e-12;

View File

@ -25,7 +25,7 @@ pyrolysis
reactingOneDimCoeffs reactingOneDimCoeffs
{ {
radFluxName Qr; radFluxName qr;
minimumDelta 1e-8; minimumDelta 1e-8;

View File

@ -25,7 +25,7 @@ pyrolysis
reactingOneDimCoeffs reactingOneDimCoeffs
{ {
radFluxName Qr; radFluxName qr;
minimumDelta 1e-8; minimumDelta 1e-8;

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
object Qr; object qr;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -12,7 +12,7 @@ runApplication splitMeshRegions -cellZones -overwrite
# remove fluid fields from solid regions (important for post-processing) # remove fluid fields from solid regions (important for post-processing)
for i in heater leftSolid rightSolid for i in heater leftSolid rightSolid
do do
rm -f 0*/$i/{rho,nut,alphat,epsilon,k,U,p_rgh,Qr,G,IDefault} rm -f 0*/$i/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault}
done done
for i in bottomAir topAir heater leftSolid rightSolid for i in bottomAir topAir heater leftSolid rightSolid

View File

@ -54,8 +54,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod fluidThermo; kappaMethod fluidThermo;
QrNbr none; qrNbr none;
Qr Qr; qr qr;
value uniform 300; value uniform 300;
} }
} }
@ -113,7 +113,7 @@ p
} }
} }
Qr qr
{ {
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
@ -122,7 +122,7 @@ Qr
{ {
type greyDiffusiveRadiationViewFactor; type greyDiffusiveRadiationViewFactor;
emissivityMode lookup; emissivityMode lookup;
Qro uniform 0; qro uniform 0;
emissivity uniform 1.0; emissivity uniform 1.0;
value uniform 0; value uniform 0;
} }
@ -131,7 +131,7 @@ Qr
{ {
type greyDiffusiveRadiationViewFactor; type greyDiffusiveRadiationViewFactor;
emissivityMode solidRadiation; emissivityMode solidRadiation;
Qro uniform 0; qro uniform 0;
value uniform 0; value uniform 0;
} }
} }

View File

@ -74,7 +74,7 @@ relaxationFactors
"(k|epsilon|omega)" 0.7; "(k|epsilon|omega)" 0.7;
G 0.7; G 0.7;
"ILambda.*" 0.7; "ILambda.*" 0.7;
Qr 0.7; qr 0.7;
} }
} }

View File

@ -47,8 +47,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }
@ -57,8 +57,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }

View File

@ -43,8 +43,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }
@ -53,8 +53,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }

View File

@ -43,8 +43,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }
@ -53,8 +53,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; qrNbr qr;
Qr none; qr none;
value uniform 300; value uniform 300;
} }

View File

@ -65,8 +65,8 @@ T
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T; Tnbr T;
kappaMethod fluidThermo; kappaMethod fluidThermo;
QrNbr none; qrNbr none;
Qr Qr; qr qr;
value uniform 300; value uniform 300;
} }
} }
@ -160,7 +160,7 @@ p
} }
} }
Qr qr
{ {
internalField uniform 0; internalField uniform 0;
boundaryField boundaryField
@ -169,7 +169,7 @@ Qr
{ {
type greyDiffusiveRadiationViewFactor; type greyDiffusiveRadiationViewFactor;
emissivityMode lookup; emissivityMode lookup;
Qro uniform 0; qro uniform 0;
emissivity uniform 1.0; emissivity uniform 1.0;
value uniform 0; value uniform 0;
} }
@ -178,7 +178,7 @@ Qr
{ {
type greyDiffusiveRadiationViewFactor; type greyDiffusiveRadiationViewFactor;
emissivityMode solidRadiation; emissivityMode solidRadiation;
Qro uniform 0; qro uniform 0;
value uniform 0; value uniform 0;
} }
} }

View File

@ -74,7 +74,7 @@ relaxationFactors
"(k|epsilon|omega)" 0.7; "(k|epsilon|omega)" 0.7;
G 0.7; G 0.7;
"ILambda.*" 0.7; "ILambda.*" 0.7;
Qr 0.7; qr 0.7;
} }
} }