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