removed qr field - unnecessary

This commit is contained in:
andy
2009-03-23 09:50:44 +00:00
parent 62379add0d
commit 1c9390b59d
4 changed files with 21 additions and 138 deletions

View File

@ -47,13 +47,11 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_("undefinedT"), TName_("undefinedT"),
emissivity_(0.0), emissivity_(0.0),
rayId_(0), rayId_(0),
wavelengthId_(0), lambdaId_(0)
qr_(0)
{ {
refValue() = 0.0; refValue() = 0.0;
refGrad() = 0.0; refGrad() = 0.0;
valueFraction() = 1.0; valueFraction() = 1.0;
qr_.setSize(p.size());
} }
@ -70,8 +68,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
@ -87,17 +84,16 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_(dict.lookup("T")), TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity"))), emissivity_(readScalar(dict.lookup("emissivity"))),
rayId_(-1), rayId_(-1),
wavelengthId_(-1), lambdaId_(-1)
qr_(0)
{ {
const scalarField& Tp = const scalarField& Tp =
patch().lookupPatchField<volScalarField, scalar>(TName_); patch().lookupPatchField<volScalarField, scalar>(TName_);
refValue() = emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp) / refValue() =
Foam::mathematicalConstant::pi; emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp)
refGrad() = 0.0; /Foam::mathematicalConstant::pi;
qr_.setSize(p.size()); refGrad() = 0.0;
if (dict.found("value")) if (dict.found("value"))
{ {
@ -123,8 +119,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
@ -139,39 +134,12 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFvPatchScalarField::autoMap(m);
qr_.autoMap(m);
}
void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
const greyDiffusiveRadiationMixedFvPatchScalarField& gdrpsf =
refCast<const greyDiffusiveRadiationMixedFvPatchScalarField>(ptf);
qr_.rmap(gdrpsf.qr_, addr);
}
void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField:: void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::
updateCoeffs() updateCoeffs()
{ {
@ -204,7 +172,7 @@ updateCoeffs()
) )
{ {
rayId_ = rayI; rayId_ = rayI;
wavelengthId_ = lambdaI; lambdaId_ = lambdaI;
break; break;
} }
} }
@ -240,10 +208,7 @@ updateCoeffs()
const vector& d = dom.IRay(rayI).d(); const vector& d = dom.IRay(rayI).d();
const scalarField& Iface = const scalarField& Iface =
dom.IRay(rayI).ILambda dom.IRay(rayI).ILambda(lambdaId_).boundaryField()[patchI];
(
wavelengthId_
).boundaryField()[patchI];
if ((-n[faceI] & d) < 0.0) // qin into the wall if ((-n[faceI] & d) < 0.0) // qin into the wall
{ {

View File

@ -64,10 +64,7 @@ class greyDiffusiveRadiationMixedFvPatchScalarField
label rayId_; label rayId_;
//- Wavelength index //- Wavelength index
label wavelengthId_; label lambdaId_;
//- Radiative heat flux on walls
scalarField qr_;
public: public:
@ -167,28 +164,6 @@ public:
return emissivity_; return emissivity_;
} }
//- Return heat flux on the boundary
const scalarField& qr() const
{
return qr_;
}
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchScalarField&,
const labelList&
);
// Evaluation functions // Evaluation functions

View File

@ -47,13 +47,11 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_("undefinedT"), TName_("undefinedT"),
emissivity_(0.0), emissivity_(0.0),
rayId_(0), rayId_(0),
wavelengthId_(0), lambdaId_(0)
qr_(p.size(), 0.0)
{ {
refValue() = 0.0; refValue() = 0.0;
refGrad() = 0.0; refGrad() = 0.0;
valueFraction() = 1.0; valueFraction() = 1.0;
qr_.setSize(p.size());
} }
@ -70,8 +68,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
@ -87,8 +84,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_(dict.lookup("T")), TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity"))), emissivity_(readScalar(dict.lookup("emissivity"))),
rayId_(0), rayId_(0),
wavelengthId_(0), lambdaId_(0)
qr_(p.size(), 0.0)
{ {
const scalarField& Tp = const scalarField& Tp =
patch().lookupPatchField<volScalarField, scalar>(TName_); patch().lookupPatchField<volScalarField, scalar>(TName_);
@ -122,8 +118,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
@ -138,38 +133,12 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_(ptf.TName_), TName_(ptf.TName_),
emissivity_(ptf.emissivity_), emissivity_(ptf.emissivity_),
rayId_(ptf.rayId_), rayId_(ptf.rayId_),
wavelengthId_(ptf.wavelengthId_), lambdaId_(ptf.lambdaId_)
qr_(ptf.qr_)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFvPatchScalarField::autoMap(m);
qr_.autoMap(m);
}
void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::rmap
(
const fvPatchScalarField& ptf,
const labelList& addr
)
{
mixedFvPatchScalarField::rmap(ptf, addr);
const wideBandDiffusiveRadiationMixedFvPatchScalarField& wbdrpsf =
refCast<const wideBandDiffusiveRadiationMixedFvPatchScalarField>(ptf);
qr_.rmap(wbdrpsf.qr_, addr);
}
void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField:: void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
updateCoeffs() updateCoeffs()
{ {
@ -199,7 +168,7 @@ updateCoeffs()
) )
{ {
rayId_ = rayI; rayId_ = rayI;
wavelengthId_ = lambdaI; lambdaId_ = lambdaI;
break; break;
} }
} }
@ -226,7 +195,7 @@ updateCoeffs()
ray.Qr().boundaryField()[patchI] += Iw*(-n & ray.dAve()); ray.Qr().boundaryField()[patchI] += Iw*(-n & ray.dAve());
const scalarField Eb = const scalarField Eb =
dom.blackBody().bj(wavelengthId_).boundaryField()[patchI]; dom.blackBody().bj(lambdaId_).boundaryField()[patchI];
forAll(Iw, faceI) forAll(Iw, faceI)
{ {
@ -236,11 +205,7 @@ updateCoeffs()
const vector& d = dom.IRay(rayI).d(); const vector& d = dom.IRay(rayI).d();
const scalarField& Iface = const scalarField& Iface =
dom.IRay(rayI).ILambda dom.IRay(rayI).ILambda(lambdaId_).boundaryField()[patchI];
(
wavelengthId_
).boundaryField()[patchI];
if ((-n[faceI] & d) < 0.0) // qin into the wall if ((-n[faceI] & d) < 0.0) // qin into the wall
{ {

View File

@ -64,7 +64,7 @@ class wideBandDiffusiveRadiationMixedFvPatchScalarField
label rayId_; label rayId_;
//- Wavelength index //- Wavelength index
label wavelengthId_; label lambdaId_;
//- Radiative heat flux on walls. //- Radiative heat flux on walls.
scalarField qr_; scalarField qr_;
@ -167,28 +167,6 @@ public:
return emissivity_; return emissivity_;
} }
//- Return heat flux on the boundary
const scalarField& qr() const
{
return qr_;
}
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchScalarField&,
const labelList&
);
// Evaluation functions // Evaluation functions