Skip to content
Snippets Groups Projects
Commit 0b2b7037 authored by andy's avatar andy
Browse files

ENH: yPlusLES function object - store result on mesh database

parent 500315b1
No related merge requests found
...@@ -215,6 +215,30 @@ Foam::yPlusLES::yPlusLES ...@@ -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,18 +291,11 @@ void Foam::yPlusLES::write() ...@@ -267,18 +291,11 @@ 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
( (
"yPlusLES", mesh.lookupObject<volScalarField>(type())
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() ...@@ -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;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment