mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updates to function objects
This commit is contained in:
@ -65,25 +65,13 @@ void Foam::regionSizeDistribution::writeGraph
|
||||
const scalarField& values
|
||||
) const
|
||||
{
|
||||
const fvMesh& mesh = refCast<const fvMesh>(obr_);
|
||||
|
||||
const wordList valNames(1, valueName);
|
||||
|
||||
fileName outputPath = baseFileDir()/name_;
|
||||
|
||||
if (mesh.name() != fvMesh::defaultRegion)
|
||||
{
|
||||
outputPath = outputPath/mesh.name();
|
||||
}
|
||||
|
||||
outputPath = outputPath/mesh.time().timeName();
|
||||
|
||||
fileName outputPath = baseTimeDir();
|
||||
mkDir(outputPath);
|
||||
OFstream str
|
||||
(
|
||||
outputPath
|
||||
/ formatterPtr_().getFileName(coords, valNames)
|
||||
);
|
||||
|
||||
OFstream str(outputPath/formatterPtr_().getFileName(coords, valNames));
|
||||
|
||||
Info<< "Writing distribution of " << valueName << " to " << str.name()
|
||||
<< endl;
|
||||
|
||||
|
||||
@ -166,8 +166,7 @@ void Foam::forceCoeffs::write()
|
||||
mag(binPoints_)
|
||||
);
|
||||
|
||||
fileName forcesDir =
|
||||
baseFileDir()/name_/obr_.time().timeName();
|
||||
fileName forcesDir = baseTimeDir();
|
||||
mkDir(forcesDir);
|
||||
|
||||
if (log_)
|
||||
|
||||
@ -228,7 +228,7 @@ void Foam::forces::writeBins() const
|
||||
autoPtr<writer<vector> > binWriterPtr(writer<vector>::New(binFormat_));
|
||||
coordSet axis("forces", "distance", binPoints_, mag(binPoints_));
|
||||
|
||||
fileName forcesDir = baseFileDir()/name_/obr_.time().timeName();
|
||||
fileName forcesDir = baseTimeDir();
|
||||
mkDir(forcesDir);
|
||||
|
||||
if (log_)
|
||||
|
||||
@ -66,12 +66,15 @@ void Foam::wallShearStress::calcShearStress
|
||||
|
||||
ssp = (-Sfp/magSfp) & Reffp;
|
||||
|
||||
vector minSsp = min(ssp);
|
||||
vector maxSsp = max(ssp);
|
||||
vector minSsp = gMin(ssp);
|
||||
vector maxSsp = gMax(ssp);
|
||||
|
||||
file() << mesh.time().timeName() << token::TAB
|
||||
<< pp.name() << token::TAB << minSsp
|
||||
<< token::TAB << maxSsp << endl;
|
||||
if (Pstream::master())
|
||||
{
|
||||
file() << mesh.time().timeName() << token::TAB
|
||||
<< pp.name() << token::TAB << minSsp
|
||||
<< token::TAB << maxSsp << endl;
|
||||
}
|
||||
|
||||
if (log_)
|
||||
{
|
||||
|
||||
@ -84,15 +84,15 @@ void Foam::yPlusLES::calcIncompressibleYPlus
|
||||
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
||||
|
||||
scalar minYp = min(Yp);
|
||||
scalar maxYp = max(Yp);
|
||||
scalar avgYp = average(Yp);
|
||||
scalar minYp = gMin(Yp);
|
||||
scalar maxYp = gMax(Yp);
|
||||
scalar avgYp = gAverage(Yp);
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< " patch " << currPatch.name()
|
||||
<< " y+ : min = " << min(Yp) << ", max = " << max(Yp)
|
||||
<< ", average = " << average(Yp) << nl;
|
||||
<< " y+ : min = " << minYp << ", max = " << maxYp
|
||||
<< ", average = " << avgYp << nl;
|
||||
}
|
||||
|
||||
if (Pstream::master())
|
||||
@ -150,15 +150,15 @@ void Foam::yPlusLES::calcCompressibleYPlus
|
||||
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
||||
|
||||
scalar minYp = min(Yp);
|
||||
scalar maxYp = max(Yp);
|
||||
scalar avgYp = average(Yp);
|
||||
scalar minYp = gMin(Yp);
|
||||
scalar maxYp = gMax(Yp);
|
||||
scalar avgYp = gAverage(Yp);
|
||||
|
||||
if (log_)
|
||||
{
|
||||
Info<< " patch " << currPatch.name()
|
||||
<< " y+ : min = " << min(Yp) << ", max = " << max(Yp)
|
||||
<< ", average = " << average(Yp) << nl;
|
||||
<< " y+ : min = " << minYp << ", max = " << maxYp
|
||||
<< ", average = " << avgYp << nl;
|
||||
}
|
||||
|
||||
if (Pstream::master())
|
||||
|
||||
@ -79,9 +79,9 @@ void Foam::yPlusRAS::calcIncompressibleYPlus
|
||||
yPlus.boundaryField()[patchI] = nutPw.yPlus();
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
||||
|
||||
scalar minYp = min(Yp);
|
||||
scalar maxYp = max(Yp);
|
||||
scalar avgYp = average(Yp);
|
||||
scalar minYp = gMin(Yp);
|
||||
scalar maxYp = gMax(Yp);
|
||||
scalar avgYp = gAverage(Yp);
|
||||
|
||||
if (log_)
|
||||
{
|
||||
@ -137,9 +137,9 @@ void Foam::yPlusRAS::calcCompressibleYPlus
|
||||
yPlus.boundaryField()[patchI] = mutPw.yPlus();
|
||||
const scalarField& Yp = yPlus.boundaryField()[patchI];
|
||||
|
||||
scalar minYp = min(Yp);
|
||||
scalar maxYp = max(Yp);
|
||||
scalar avgYp = average(Yp);
|
||||
scalar minYp = gMin(Yp);
|
||||
scalar maxYp = gMax(Yp);
|
||||
scalar avgYp = gAverage(Yp);
|
||||
|
||||
if (log_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user