mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated DESModelRegions function object
This commit is contained in:
@ -130,7 +130,7 @@ void Foam::DESModelRegions::write()
|
|||||||
Info<< type() << " output:" << nl;
|
Info<< type() << " output:" << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<volScalarField> result;
|
tmp<volScalarField> tresult;
|
||||||
|
|
||||||
label DESpresent = false;
|
label DESpresent = false;
|
||||||
if (mesh.foundObject<icoModel>("turbulenceModel"))
|
if (mesh.foundObject<icoModel>("turbulenceModel"))
|
||||||
@ -142,7 +142,7 @@ void Foam::DESModelRegions::write()
|
|||||||
{
|
{
|
||||||
const icoDESModel& des =
|
const icoDESModel& des =
|
||||||
dynamic_cast<const icoDESModel&>(model);
|
dynamic_cast<const icoDESModel&>(model);
|
||||||
result = des.LESRegion();
|
tresult = des.LESRegion();
|
||||||
DESpresent = true;
|
DESpresent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,15 +155,17 @@ void Foam::DESModelRegions::write()
|
|||||||
{
|
{
|
||||||
const cmpDESModel& des =
|
const cmpDESModel& des =
|
||||||
dynamic_cast<const cmpDESModel&>(model);
|
dynamic_cast<const cmpDESModel&>(model);
|
||||||
result = des.LESRegion();
|
tresult = des.LESRegion();
|
||||||
DESpresent = true;
|
DESpresent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DESpresent)
|
if (DESpresent)
|
||||||
{
|
{
|
||||||
|
const volScalarField& result = tresult();
|
||||||
|
|
||||||
scalar prc =
|
scalar prc =
|
||||||
gSum(result().internalField()*mesh.V())/gSum(mesh.V())*100.0;
|
gSum(result.internalField()*mesh.V())/gSum(mesh.V())*100.0;
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
@ -174,9 +176,11 @@ void Foam::DESModelRegions::write()
|
|||||||
if (log_)
|
if (log_)
|
||||||
{
|
{
|
||||||
Info<< " LES = " << prc << " % (volume)" << nl
|
Info<< " LES = " << prc << " % (volume)" << nl
|
||||||
<< " RES = " << 100.0 - prc << " % (volume)" << nl
|
<< " RAS = " << 100.0 - prc << " % (volume)" << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result.write();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user