mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: force/Coeffs - added writing of bin co-ordinates to output
This commit is contained in:
@ -72,6 +72,30 @@ void Foam::forceCoeffs::writeFileHeader(const label i)
|
|||||||
writeHeaderValue(file(i), "start", binMin_);
|
writeHeaderValue(file(i), "start", binMin_);
|
||||||
writeHeaderValue(file(i), "delta", binDx_);
|
writeHeaderValue(file(i), "delta", binDx_);
|
||||||
writeHeaderValue(file(i), "direction", binDir_);
|
writeHeaderValue(file(i), "direction", binDir_);
|
||||||
|
|
||||||
|
vectorField binPoints(nBin_);
|
||||||
|
writeCommented(file(i), "x co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
|
||||||
|
file(i) << tab << binPoints[pointI].x();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
|
writeCommented(file(i), "y co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
file(i) << tab << binPoints[pointI].y();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
|
writeCommented(file(i), "z co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
file(i) << tab << binPoints[pointI].z();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
writeCommented(file(i), "Time");
|
writeCommented(file(i), "Time");
|
||||||
|
|
||||||
for (label j = 0; j < nBin_; j++)
|
for (label j = 0; j < nBin_; j++)
|
||||||
|
|||||||
@ -98,6 +98,30 @@ void Foam::forces::writeFileHeader(const label i)
|
|||||||
writeHeaderValue(file(i), "start", binMin_);
|
writeHeaderValue(file(i), "start", binMin_);
|
||||||
writeHeaderValue(file(i), "delta", binDx_);
|
writeHeaderValue(file(i), "delta", binDx_);
|
||||||
writeHeaderValue(file(i), "direction", binDir_);
|
writeHeaderValue(file(i), "direction", binDir_);
|
||||||
|
|
||||||
|
vectorField binPoints(nBin_);
|
||||||
|
writeCommented(file(i), "x co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
|
||||||
|
file(i) << tab << binPoints[pointI].x();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
|
writeCommented(file(i), "y co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
file(i) << tab << binPoints[pointI].y();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
|
writeCommented(file(i), "z co-ords :");
|
||||||
|
forAll(binPoints, pointI)
|
||||||
|
{
|
||||||
|
file(i) << tab << binPoints[pointI].z();
|
||||||
|
}
|
||||||
|
file(i) << nl;
|
||||||
|
|
||||||
writeCommented(file(i), "Time");
|
writeCommented(file(i), "Time");
|
||||||
|
|
||||||
for (label j = 0; j < nBin_; j++)
|
for (label j = 0; j < nBin_; j++)
|
||||||
|
|||||||
Reference in New Issue
Block a user