Update: Changing FatalErrorInFunction. Changing Emission for P1 and fvDOM.

The absorptionEmission models should provide the 'total' emissivity.
This commit is contained in:
sergio
2015-12-10 13:57:51 -08:00
parent eedbd182d1
commit 8b285d42f2
20 changed files with 62 additions and 166 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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -159,7 +159,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
tE() += tc.Ep(); tE() += tc.Ep();
} }
return tE; return 4*tE;
} }

View File

@ -115,19 +115,11 @@ boundaryRadiationPropertiesFvPatchField
{ {
if (!isA<mappedPatchBase>(p.patch())) if (!isA<mappedPatchBase>(p.patch()))
{ {
FatalIOErrorIn FatalErrorInFunction
( << "\n patch type '" << p.type()
"boundaryRadiationPropertiesFvPatchField:"
":boundaryRadiationPropertiesFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const dictionary& dict\n"
")\n",
dict
) << "\n patch type '" << p.type()
<< "' not type '" << mappedPatchBase::typeName << "'" << "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name() << "\n for patch " << p.name()
<< exit(FatalIOError); << abort(FatalIOError);
} }
} }
break; break;
@ -301,13 +293,8 @@ emissivity(const label bandI) const
default: default:
{ {
FatalErrorIn FatalErrorInFunction
( << "Please set 'mode' to one of " << methodTypeNames_.toc()
"boundaryRadiationPropertiesFvPatchField::"
"emissivity(const scalarField&)"
) << "Unimplemented method " << method_ << endl
<< "Please set 'mode' to one of "
<< methodTypeNames_.toc()
<< exit(FatalError); << exit(FatalError);
} }
break; break;
@ -380,11 +367,8 @@ boundaryRadiationPropertiesFvPatchField::absorptivity
default: default:
{ {
FatalErrorIn FatalErrorInFunction
( << "Unimplemented method " << method_ << endl
"boundaryRadiationPropertiesFvPatchField::"
"absorptivity(const scalarField&)"
) << "Unimplemented method " << method_ << endl
<< "Please set 'mode' to one of " << "Please set 'mode' to one of "
<< methodTypeNames_.toc() << methodTypeNames_.toc()
<< exit(FatalError); << exit(FatalError);
@ -459,11 +443,8 @@ transmissivity(const label bandI) const
default: default:
{ {
FatalErrorIn FatalErrorInFunction
( << "Unimplemented method " << method_ << endl
"boundaryRadiationPropertiesFvPatchField::"
"transmissivity(const scalarField&)"
) << "Unimplemented method " << method_ << endl
<< "Please set 'mode' to one of " << "Please set 'mode' to one of "
<< methodTypeNames_.toc() << methodTypeNames_.toc()
<< exit(FatalError); << exit(FatalError);

View File

@ -158,11 +158,8 @@ updateCoeffs()
if (dom.nLambda() != 1) if (dom.nLambda() != 1)
{ {
FatalErrorIn FatalErrorInFunction
( << " a grey boundary condition is used with a non-grey "
"Foam::radiation::"
"greyDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs"
) << " a grey boundary condition is used with a non-grey "
<< "absorption model" << nl << exit(FatalError); << "absorption model" << nl << exit(FatalError);
} }

View File

@ -146,11 +146,8 @@ updateCoeffs()
if (dom.nLambda() == 0) if (dom.nLambda() == 0)
{ {
FatalErrorIn FatalErrorInFunction
( << " a non-grey boundary condition is used with a grey "
"Foam::radiation::"
"wideBandDiffusiveRadiationMixedFvPatchScalarField::updateCoeffs"
) << " a non-grey boundary condition is used with a grey "
<< "absorption model" << nl << exit(FatalError); << "absorption model" << nl << exit(FatalError);
} }

View File

@ -239,7 +239,7 @@ void Foam::radiation::P1::calculate()
fvm::laplacian(gamma, G_) fvm::laplacian(gamma, G_)
- fvm::Sp(a_, G_) - fvm::Sp(a_, G_)
== ==
- 4.0*(e_*physicoChemical::sigma*pow4(T_) + E_) - 4.0*(e_*physicoChemical::sigma*pow4(T_) ) - E_
); );
// Calculate radiative heat flux on boundaries. // Calculate radiative heat flux on boundaries.

View File

@ -226,14 +226,11 @@ void Foam::radiation::fvDOM::initialise()
if (solarLoad_->nBands() > 1) if (solarLoad_->nBands() > 1)
{ {
FatalErrorIn FatalErrorInFunction
(
"const Foam::radiation::fvDOM::initialise()"
)
<< "Requested solar radiation with fvDOM. Using " << "Requested solar radiation with fvDOM. Using "
<< "more than one band for the solar load is not allowed" << "more than one band for the solar load is not allowed"
<< abort(FatalError); << abort(FatalError);
} }
Info<< "Creating Solar Load Model " << nl; Info<< "Creating Solar Load Model " << nl;
} }

View File

@ -196,7 +196,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
); );
// check if field exists and can be read // Check if field exists and can be read
if (IHeader.headerOk()) if (IHeader.headerOk())
{ {
ILambda_.set ILambda_.set
@ -251,7 +251,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_.boundaryField() = 0.0; Qr_.boundaryField() = 0.0;
scalar maxResidual = -GREAT; scalar maxResidual = -GREAT;
@ -293,8 +293,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
(k - absorptionEmission_.aDisp(lambdaI)) (k - absorptionEmission_.aDisp(lambdaI))
*blackBody_.bLambda(lambdaI) *blackBody_.bLambda(lambdaI)
+ absorptionEmission_.ECont(lambdaI) + absorptionEmission_.E(lambdaI)/4
+ absorptionEmission_.EDisp(lambdaI)
) )
); );
} }

View File

@ -270,11 +270,7 @@ Foam::radiation::radiationModel::absorptionEmission() const
{ {
if (!absorptionEmission_.valid()) if (!absorptionEmission_.valid())
{ {
FatalErrorIn FatalErrorInFunction
(
"const Foam::radiation::absorptionEmissionModel&"
"Foam::radiation::radiationModel::absorptionEmission() const"
)
<< "Requested radiation absorptionEmission model, but model is " << "Requested radiation absorptionEmission model, but model is "
<< "not activate" << abort(FatalError); << "not activate" << abort(FatalError);
} }
@ -288,11 +284,7 @@ Foam::radiation::radiationModel::soot() const
{ {
if (!soot_.valid()) if (!soot_.valid())
{ {
FatalErrorIn FatalErrorInFunction
(
"const Foam::radiation::sootModel&"
"Foam::radiation::radiationModel::soot() const"
)
<< "Requested radiation sootModel model, but model is " << "Requested radiation sootModel model, but model is "
<< "not activate" << abort(FatalError); << "not activate" << abort(FatalError);
} }
@ -306,12 +298,8 @@ Foam::radiation::radiationModel::transmissivity() const
{ {
if (!transmissivity_.valid()) if (!transmissivity_.valid())
{ {
FatalErrorIn FatalErrorInFunction
( << "Requested radiation sootModel model, but model is "
"const Foam::radiation::transmissivityModel&"
"Foam::radiation::radiationModel::transmissivity() const"
)
<< "Requested radiation transmissivity model, but model is "
<< "not activate" << abort(FatalError); << "not activate" << abort(FatalError);
} }

View File

@ -62,10 +62,8 @@ Foam::radiation::radiationModel::New
if (cstrIter == TConstructorTablePtr_->end()) if (cstrIter == TConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown radiationModel type "
"radiationModel::New(const volScalarField&)"
) << "Unknown radiationModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid radiationModel types are:" << nl << "Valid radiationModel types are:" << nl
<< TConstructorTablePtr_->sortedToc() << TConstructorTablePtr_->sortedToc()
@ -92,10 +90,8 @@ Foam::radiation::radiationModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown radiationModel type "
"radiationModel::New(const dictionary&, const volScalarField&)"
) << "Unknown radiationModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid radiationModel types are:" << nl << "Valid radiationModel types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()

View File

@ -211,14 +211,11 @@ void Foam::radiation::viewFactor::initialise()
if (solarLoad_->nBands() > 1) if (solarLoad_->nBands() > 1)
{ {
FatalErrorIn FatalErrorInFunction
(
"const Foam::radiation::viewFactor::initialise()"
)
<< "Requested solar radiation with fvDOM. Using " << "Requested solar radiation with fvDOM. Using "
<< "more thant one band for the solar load is not allowed" << "more thant one band for the solar load is not allowed"
<< abort(FatalError); << abort(FatalError);
} }
Info<< "Creating Solar Load Model " << nl; Info<< "Creating Solar Load Model " << nl;
} }

View File

@ -44,10 +44,8 @@ Foam::radiation::absorptionEmissionModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown absorptionEmissionModel type "
"absorptionEmissionModel::New(const dictionary&, const fvMesh&)"
) << "Unknown absorptionEmissionModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid absorptionEmissionModel types are :" << nl << "Valid absorptionEmissionModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);

View File

@ -66,14 +66,8 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
{ {
if (!isA<basicSpecieMixture>(thermo_)) if (!isA<basicSpecieMixture>(thermo_))
{ {
FatalErrorIn FatalErrorInFunction
( << "Model requires a multi-component thermo package"
"radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission"
"("
"const dictionary&, "
"const fvMesh&"
")"
) << "Model requires a multi-component thermo package"
<< abort(FatalError); << abort(FatalError);
} }
@ -112,11 +106,8 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
if (!mesh.foundObject<volScalarField>("ft")) if (!mesh.foundObject<volScalarField>("ft"))
{ {
FatalErrorIn FatalErrorInFunction
( << "specie ft is not present to use with "
"Foam::radiation::greyMeanAbsorptionEmission(const"
"dictionary& dict, const fvMesh& mesh)"
) << "specie ft is not present to use with "
<< "lookUpTableFileName " << nl << "lookUpTableFileName " << nl
<< exit(FatalError); << exit(FatalError);
} }
@ -154,11 +145,8 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "specie: " << iter.key()
"Foam::radiation::greyMeanAbsorptionEmission(const"
"dictionary& dict, const fvMesh& mesh)"
) << "specie: " << iter.key()
<< " is neither in look-up table: " << " is neither in look-up table: "
<< lookUpTablePtr_().tableName() << lookUpTablePtr_().tableName()
<< " nor is being solved" << nl << " nor is being solved" << nl
@ -179,15 +167,11 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << " there is not lookup table and the specie" << nl
"Foam::radiation::greyMeanAbsorptionEmission(const"
"dictionary& dict, const fvMesh& mesh)"
) << " there is not lookup table and the specie" << nl
<< iter.key() << nl << iter.key() << nl
<< " is not found " << nl << " is not found " << nl
<< exit(FatalError); << exit(FatalError);
} }
} }
} }

View File

@ -96,15 +96,8 @@ greyMeanSolidAbsorptionEmission
{ {
if (!isA<basicSpecieMixture>(thermo_)) if (!isA<basicSpecieMixture>(thermo_))
{ {
FatalErrorIn FatalErrorInFunction
( << "Model requires a multi-component thermo package"
"radiation::greyMeanSolidAbsorptionEmission::"
"greyMeanSolidAbsorptionEmission"
"("
"const dictionary&, "
"const fvMesh&"
")"
) << "Model requires a multi-component thermo package"
<< abort(FatalError); << abort(FatalError);
} }

View File

@ -94,11 +94,8 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission
{ {
if (!speciesNames_.found(key)) if (!speciesNames_.found(key))
{ {
FatalErrorIn FatalErrorInFunction
( << "specie: " << key << "is not in all the bands"
"Foam::radiation::wideBandAbsorptionEmission(const"
"dictionary& dict, const fvMesh& mesh)"
) << "specie: " << key << "is not in all the bands"
<< nl << exit(FatalError); << nl << exit(FatalError);
} }
} }

View File

@ -118,11 +118,8 @@ emissivity(const label index, const label bandI) const
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Field 'boundaryRadiationProperties'"
"Foam::radiation::boundaryRadiationProperties::"
"emissivity(const label, const label)"
) << "Field 'boundaryRadiationProperties'"
<< "is not found in the constant directory." << "is not found in the constant directory."
<< "Please add it " << "Please add it "
<< exit(FatalError); << exit(FatalError);
@ -144,11 +141,8 @@ absorptivity(const label index, const label bandI) const
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Field 'boundaryRadiationProperties'"
"Foam::radiation::boundaryRadiationProperties::"
"absorptivity(const label, const label)"
) << "Field 'boundaryRadiationProperties'"
<< "is not found in the constant directory." << "is not found in the constant directory."
<< "Please add it " << "Please add it "
<< exit(FatalError); << exit(FatalError);
@ -170,11 +164,8 @@ transmissivity(const label index, const label bandI) const
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Field 'boundaryRadiationProperties'"
"Foam::radiation::boundaryRadiationProperties::"
"transmissivity(const label, const label)"
) << "Field 'boundaryRadiationProperties'"
<< "is not found in the constant directory." << "is not found in the constant directory."
<< "Please add it " << "Please add it "
<< exit(FatalError); << exit(FatalError);
@ -196,11 +187,8 @@ reflectivity(const label index, const label bandI) const
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Field 'boundaryRadiationProperties'"
"Foam::radiation::boundaryRadiationProperties::"
"reflectivity(const label, const label)"
) << "Field 'boundaryRadiationProperties'"
<< "is not found in the constant directory." << "is not found in the constant directory."
<< "Please add it " << "Please add it "
<< exit(FatalError); << exit(FatalError);

View File

@ -43,10 +43,8 @@ Foam::autoPtr<Foam::radiation::scatterModel> Foam::radiation::scatterModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown scatterModel type "
"scatterModel::New(const dictionary&, const fvMesh&)"
) << "Unknown scatterModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid scatterModel types are :" << nl << "Valid scatterModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()

View File

@ -169,10 +169,8 @@ void Foam::solarCalculator::init()
{ {
if (word(mesh_.ddtScheme("default")) == "steadyState") if (word(mesh_.ddtScheme("default")) == "steadyState")
{ {
FatalErrorIn FatalErrorInFunction
( << " Sun direction model can not be sunDirtracking if the "
"Foam::solarCalculator::init()"
) << " Sun direction model can not be sunDirtracking if the "
<< " case is steady " << nl << exit(FatalError); << " case is steady " << nl << exit(FatalError);
} }

View File

@ -45,15 +45,7 @@ Foam::radiation::mixtureFractionSoot<ThermoType>::checkThermo
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
(
"template<class ThermoType> "
"Foam::radiation::mixtureFractionSoot "
"("
"const dictionary&, "
"const fvMesh&"
")"
)
<< "Inconsistent thermo package for " << thermo.type() << "Inconsistent thermo package for " << thermo.type()
<< "Please select a thermo package based on " << "Please select a thermo package based on "
<< "singleStepReactingMixture" << exit(FatalError); << "singleStepReactingMixture" << exit(FatalError);

View File

@ -49,10 +49,8 @@ Foam::radiation::sootModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown sootModel type "
"sootModel::New(const dictionary&, const fvMesh&)"
) << "Unknown sootModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid sootModel types are :" << nl << "Valid sootModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);

View File

@ -44,10 +44,8 @@ transmissivityModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (cstrIter == dictionaryConstructorTablePtr_->end())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown transmissivityModel type "
"transmissivityModel::New(const dictionary&, const fvMesh&)"
) << "Unknown transmissivityModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid transmissivityModel types are :" << nl << "Valid transmissivityModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()