mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Function object updates
This commit is contained in:
@ -154,24 +154,6 @@ void Foam::CourantNo::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::CourantNo::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -197,6 +179,28 @@ void Foam::CourantNo::write()
|
||||
iField = 0.5*sumPhi/mesh.V().field()*mesh.time().deltaTValue();
|
||||
|
||||
CourantNo.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::CourantNo::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
const volScalarField& CourantNo =
|
||||
obr_.lookupObject<volScalarField>(type());
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << CourantNo.name() << nl
|
||||
|
||||
@ -129,24 +129,6 @@ void Foam::DESModelRegions::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::DESModelRegions::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::write()
|
||||
{
|
||||
typedef incompressible::turbulenceModel icoModel;
|
||||
typedef incompressible::DESModel icoDESModel;
|
||||
@ -217,12 +199,8 @@ void Foam::DESModelRegions::write()
|
||||
if (log_)
|
||||
{
|
||||
Info<< " LES = " << prc << " % (volume)" << nl
|
||||
<< " RAS = " << 100.0 - prc << " % (volume)" << nl
|
||||
<< " writing field " << DESModelRegions.name() << nl
|
||||
<< endl;
|
||||
<< " RAS = " << 100.0 - prc << " % (volume)" << endl;
|
||||
}
|
||||
|
||||
DESModelRegions.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -236,4 +214,33 @@ void Foam::DESModelRegions::write()
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::DESModelRegions::write()
|
||||
{
|
||||
if (log_)
|
||||
{
|
||||
const volScalarField& DESModelRegions =
|
||||
obr_.lookupObject<volScalarField>(type());
|
||||
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl;
|
||||
<< " writing field " << DESModelRegions.name() << nl
|
||||
<< endl;
|
||||
|
||||
DESModelRegions.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -115,24 +115,6 @@ void Foam::Lambda2::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::Lambda2::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -156,6 +138,28 @@ void Foam::Lambda2::write()
|
||||
);
|
||||
|
||||
Lambda2 = -eigenValues(SSplusWW)().component(vector::Y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::Lambda2::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
const volScalarField& Lambda2 =
|
||||
obr_.lookupObject<volScalarField>(type())
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Lambda2.name() << nl
|
||||
|
||||
@ -119,23 +119,6 @@ void Foam::Peclet::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::Peclet::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Peclet::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
void Foam::Peclet::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Peclet::write()
|
||||
{
|
||||
typedef compressible::turbulenceModel cmpTurbModel;
|
||||
typedef incompressible::turbulenceModel icoTurbModel;
|
||||
@ -208,6 +191,27 @@ void Foam::Peclet::write()
|
||||
*mesh.surfaceInterpolation::deltaCoeffs()
|
||||
*fvc::interpolate(nuEff)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::Peclet::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
void Foam::Peclet::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Peclet::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
const surfaceScalarField& Peclet =
|
||||
mesh.lookupObject<surfaceScalarField>(type());
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Peclet.name() << nl
|
||||
|
||||
@ -114,24 +114,6 @@ void Foam::Q::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::Q::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -149,6 +131,28 @@ void Foam::Q::write()
|
||||
);
|
||||
|
||||
Q = 0.5*(sqr(tr(gradU)) - tr(((gradU) & (gradU))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::Q::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
const volScalarField& Q =
|
||||
mesh.lookupObject<volScalarField>(type())
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << Q.name() << nl
|
||||
|
||||
@ -291,24 +291,6 @@ void Foam::pressureTools::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::pressureTools::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -321,6 +303,28 @@ void Foam::pressureTools::write()
|
||||
);
|
||||
|
||||
pResult == convertToCoeff(rhoScale(p)*p + pDyn(p) + pRef());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::pressureTools::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
const volScalarField& pResult =
|
||||
obr_.lookupObject<volScalarField>(pName())
|
||||
|
||||
Info<< type() << " " << name_ << " output:" << nl
|
||||
<< " writing field " << pResult.name() << nl
|
||||
|
||||
@ -224,24 +224,6 @@ void Foam::wallShearStress::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::wallShearStress::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::write()
|
||||
{
|
||||
typedef compressible::turbulenceModel cmpModel;
|
||||
typedef incompressible::turbulenceModel icoModel;
|
||||
@ -286,8 +268,31 @@ void Foam::wallShearStress::write()
|
||||
<< "database" << exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
calcShearStress(mesh, Reff(), wallShearStress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallShearStress::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
functionObjectFile::write();
|
||||
|
||||
const volVectorField& wallShearStress =
|
||||
obr_.lookupObject<volVectorField>(type());
|
||||
|
||||
if (log_)
|
||||
{
|
||||
|
||||
@ -268,24 +268,6 @@ void Foam::yPlusLES::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::yPlusLES::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -317,6 +299,30 @@ void Foam::yPlusLES::write()
|
||||
{
|
||||
calcIncompressibleYPlus(mesh, U, yPlusLES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusLES::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
functionObjectFile::write();
|
||||
|
||||
const volScalarField& yPlusLES =
|
||||
obr_.lookupObject<volScalarField>(type())
|
||||
|
||||
if (log_)
|
||||
{
|
||||
|
||||
@ -255,24 +255,6 @@ void Foam::yPlusRAS::read(const dictionary& dict)
|
||||
|
||||
|
||||
void Foam::yPlusRAS::execute()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::end()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::timeSet()
|
||||
{
|
||||
// Do nothing - only valid on write
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
@ -302,6 +284,30 @@ void Foam::yPlusRAS::write()
|
||||
{
|
||||
calcIncompressibleYPlus(mesh, yPlusRAS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::end()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::timeSet()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
void Foam::yPlusRAS::write()
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
functionObjectFile::write();
|
||||
|
||||
const volScalarField& yPlusRAS =
|
||||
mesh.lookupObject<volScalarField>(type())
|
||||
|
||||
if (log_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user