mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: yPlusLES function object - store result on mesh database
This commit is contained in:
@ -215,6 +215,30 @@ Foam::yPlusLES::yPlusLES
|
|||||||
) << "No fvMesh available, deactivating." << nl
|
) << "No fvMesh available, deactivating." << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (active_)
|
||||||
|
{
|
||||||
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
|
|
||||||
|
volScalarField* yPlusLESPtr
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
type(),
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("0", dimless, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
mesh.objectRegistry::store(yPlusLESPtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -267,17 +291,10 @@ void Foam::yPlusLES::write()
|
|||||||
|
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||||
|
|
||||||
volScalarField yPlusLES
|
volScalarField& yPlusLES =
|
||||||
|
const_cast<volScalarField&>
|
||||||
(
|
(
|
||||||
IOobject
|
mesh.lookupObject<volScalarField>(type())
|
||||||
(
|
|
||||||
"yPlusLES",
|
|
||||||
mesh.time().timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("0", dimless, 0.0)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (log_)
|
if (log_)
|
||||||
@ -296,7 +313,8 @@ void Foam::yPlusLES::write()
|
|||||||
|
|
||||||
if (log_)
|
if (log_)
|
||||||
{
|
{
|
||||||
Info<< " writing field " << yPlusLES.name() << nl
|
Info<< type() << " " << name_ << " output:" << nl
|
||||||
|
<< " writing field " << yPlusLES.name() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user