mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: mapDistribute on radiation BC and changes on
reactingParcelFilPyrolysisFoam
This commit is contained in:
@ -189,6 +189,8 @@ updateCoeffs()
|
||||
|
||||
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
|
||||
|
||||
scalarList temissivity = emissivity();
|
||||
|
||||
forAll(Iw, faceI)
|
||||
{
|
||||
scalar Ir = 0.0;
|
||||
@ -217,8 +219,8 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 1.0;
|
||||
refValue()[faceI] =
|
||||
(
|
||||
Ir*(scalar(1.0) - emissivity()()[faceI])
|
||||
+ emissivity()()[faceI]*physicoChemical::sigma.value()
|
||||
Ir*(scalar(1.0) - temissivity[faceI])
|
||||
+ temissivity[faceI]*physicoChemical::sigma.value()
|
||||
* pow4(Tp[faceI])
|
||||
)/pi;
|
||||
|
||||
@ -238,7 +240,6 @@ updateCoeffs()
|
||||
Iw[faceI]*(n[faceI] & ray.dAve());
|
||||
}
|
||||
}
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ Foam::radiationCoupledBase::radiationCoupledBase
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::radiationCoupledBase::emissivity() const
|
||||
Foam::scalarField Foam::radiationCoupledBase::emissivity() const
|
||||
{
|
||||
switch (method_)
|
||||
{
|
||||
@ -142,6 +142,9 @@ Foam::tmp<Foam::scalarField> Foam::radiationCoupledBase::emissivity() const
|
||||
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
|
||||
// Force recalculation of mapping and schedule
|
||||
const mapDistribute& distMap = mpp.map();
|
||||
|
||||
const fvPatch& nbrPatch = refCast<const fvMesh>
|
||||
(
|
||||
nbrMesh
|
||||
@ -160,12 +163,11 @@ Foam::tmp<Foam::scalarField> Foam::radiationCoupledBase::emissivity() const
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& emissivity = temissivity();
|
||||
|
||||
scalarField emissivity(temissivity);
|
||||
// Use direct map mapping to exchange data
|
||||
mpp.map().distribute(emissivity);
|
||||
|
||||
return temissivity;
|
||||
distMap.distribute(emissivity);
|
||||
//Pout << emissivity << endl;
|
||||
return emissivity;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
|
||||
|
||||
//- Calculate corresponding emissivity field
|
||||
tmp<scalarField> emissivity() const;
|
||||
scalarField emissivity() const;
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
|
||||
@ -189,6 +189,8 @@ updateCoeffs()
|
||||
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
|
||||
);
|
||||
|
||||
scalarList temissivity = emissivity();
|
||||
|
||||
forAll(Iw, faceI)
|
||||
{
|
||||
scalar Ir = 0.0;
|
||||
@ -215,8 +217,8 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 1.0;
|
||||
refValue()[faceI] =
|
||||
(
|
||||
Ir*(1.0 - emissivity()()[faceI])
|
||||
+ emissivity()()[faceI]*Eb[faceI]
|
||||
Ir*(1.0 - temissivity[faceI])
|
||||
+ temissivity[faceI]*Eb[faceI]
|
||||
)/pi;
|
||||
}
|
||||
else
|
||||
|
||||
@ -158,6 +158,9 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
const fvPatch& nbrPatch =
|
||||
refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI];
|
||||
|
||||
// Force recalculation of mapping and schedule
|
||||
const mapDistribute& distMap = mpp.map();
|
||||
|
||||
scalarField Tc(patchInternalField());
|
||||
scalarField& Tp = *this;
|
||||
|
||||
@ -170,13 +173,13 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
|
||||
// Swap to obtain full local values of neighbour internal field
|
||||
scalarField TcNbr(nbrField.patchInternalField());
|
||||
distMap.distribute(TcNbr);
|
||||
|
||||
mpp.map().distribute(TcNbr);
|
||||
|
||||
// Swap to obtain full local values of neighbour K*delta
|
||||
scalarField KDeltaNbr(nbrField.K(TcNbr)*nbrPatch.deltaCoeffs());
|
||||
scalarField KDeltaNbr(nbrField.K(nbrField)*nbrPatch.deltaCoeffs());
|
||||
distMap.distribute(KDeltaNbr);
|
||||
|
||||
mpp.map().distribute(KDeltaNbr);
|
||||
|
||||
scalarField KDelta(K(*this)*patch().deltaCoeffs());
|
||||
|
||||
@ -190,7 +193,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
if (QrNbrName_ != "none")
|
||||
{
|
||||
QrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_);
|
||||
mpp.map().distribute(QrNbr);
|
||||
distMap.distribute(QrNbr);
|
||||
}
|
||||
|
||||
scalarField alpha(KDeltaNbr - (Qr + QrNbr)/Tp);
|
||||
|
||||
Reference in New Issue
Block a user