ENH: Updated dQ handling - TEMPORARY MEASURE - NEEDS REVISITING

This commit is contained in:
andy
2013-01-10 11:03:57 +00:00
parent 94704b466e
commit 939a617414

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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -312,7 +312,30 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
{ {
const volScalarField& dQ = const volScalarField& dQ =
mesh_.lookupObject<volScalarField>("dQ"); mesh_.lookupObject<volScalarField>("dQ");
E().internalField() = EhrrCoeff_*dQ;
if (dQ.dimensions() == dimEnergy/dimTime)
{
E().internalField() = EhrrCoeff_*dQ/mesh_.V();
}
else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
{
E().internalField() = EhrrCoeff_*dQ;
}
else
{
if (debug)
{
WarningIn
(
"tmp<volScalarField>"
"radiation::greyMeanAbsorptionEmission::ECont"
"("
"const label"
") const"
)
<< "Incompatible dimensions for dQ field" << endl;
}
}
} }
return E; return E;