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

View File

@ -64,10 +64,7 @@ class greyDiffusiveRadiationMixedFvPatchScalarField
label rayId_;
//- Wavelength index
label wavelengthId_;
//- Radiative heat flux on walls
scalarField qr_;
label lambdaId_;
public:
@ -167,28 +164,6 @@ public:
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

View File

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

View File

@ -64,7 +64,7 @@ class wideBandDiffusiveRadiationMixedFvPatchScalarField
label rayId_;
//- Wavelength index
label wavelengthId_;
label lambdaId_;
//- Radiative heat flux on walls.
scalarField qr_;
@ -167,28 +167,6 @@ public:
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