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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -159,7 +159,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
tE() += tc.Ep();
}
return tE;
return 4*tE;
}

View File

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

View File

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

View File

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

View File

@ -239,7 +239,7 @@ void Foam::radiation::P1::calculate()
fvm::laplacian(gamma, 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.

View File

@ -226,10 +226,7 @@ void Foam::radiation::fvDOM::initialise()
if (solarLoad_->nBands() > 1)
{
FatalErrorIn
(
"const Foam::radiation::fvDOM::initialise()"
)
FatalErrorInFunction
<< "Requested solar radiation with fvDOM. Using "
<< "more than one band for the solar load is not allowed"
<< abort(FatalError);

View File

@ -196,7 +196,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
IOobject::AUTO_WRITE
);
// check if field exists and can be read
// Check if field exists and can be read
if (IHeader.headerOk())
{
ILambda_.set
@ -251,7 +251,7 @@ Foam::radiation::radiativeIntensityRay::~radiativeIntensityRay()
Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
{
// reset boundary heat flux to zero
// Reset boundary heat flux to zero
Qr_.boundaryField() = 0.0;
scalar maxResidual = -GREAT;
@ -293,8 +293,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
(k - absorptionEmission_.aDisp(lambdaI))
*blackBody_.bLambda(lambdaI)
+ absorptionEmission_.ECont(lambdaI)
+ absorptionEmission_.EDisp(lambdaI)
+ absorptionEmission_.E(lambdaI)/4
)
);
}

View File

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

View File

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

View File

@ -211,10 +211,7 @@ void Foam::radiation::viewFactor::initialise()
if (solarLoad_->nBands() > 1)
{
FatalErrorIn
(
"const Foam::radiation::viewFactor::initialise()"
)
FatalErrorInFunction
<< "Requested solar radiation with fvDOM. Using "
<< "more thant one band for the solar load is not allowed"
<< abort(FatalError);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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