mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
functionObjects: Format time according to the specification in controlDict
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1921
This commit is contained in:
@ -223,8 +223,9 @@ void Foam::forceCoeffs::write()
|
||||
scalar Clf = Cl/2.0 + Cm;
|
||||
scalar Clr = Cl/2.0 - Cm;
|
||||
|
||||
writeTime(file(0));
|
||||
file(0)
|
||||
<< obr_.time().value() << tab << Cm << tab << Cd
|
||||
<< tab << Cm << tab << Cd
|
||||
<< tab << Cl << tab << Clf << tab << Clr << endl;
|
||||
|
||||
if (log_) Info<< type() << " " << name_ << " output:" << nl
|
||||
@ -246,7 +247,7 @@ void Foam::forceCoeffs::write()
|
||||
}
|
||||
}
|
||||
|
||||
file(1)<< obr_.time().value();
|
||||
writeTime(file(1));
|
||||
|
||||
forAll(coeffs[0], i)
|
||||
{
|
||||
|
||||
@ -402,7 +402,8 @@ void Foam::forces::writeForces()
|
||||
<< " porous : " << sum(moment_[2])
|
||||
<< endl;
|
||||
|
||||
file(0) << obr_.time().value() << tab << setw(1) << '('
|
||||
writeTime(file(0));
|
||||
file(0) << tab << setw(1) << '('
|
||||
<< sum(force_[0]) << setw(1) << ' '
|
||||
<< sum(force_[1]) << setw(1) << ' '
|
||||
<< sum(force_[2]) << setw(3) << ") ("
|
||||
@ -420,7 +421,8 @@ void Foam::forces::writeForces()
|
||||
vectorField localMomentT(coordSys_.localVector(moment_[1]));
|
||||
vectorField localMomentP(coordSys_.localVector(moment_[2]));
|
||||
|
||||
file(0) << obr_.time().value() << tab << setw(1) << '('
|
||||
writeTime(file(0));
|
||||
file(0) << tab << setw(1) << '('
|
||||
<< sum(localForceN) << setw(1) << ' '
|
||||
<< sum(localForceT) << setw(1) << ' '
|
||||
<< sum(localForceP) << setw(3) << ") ("
|
||||
@ -456,7 +458,7 @@ void Foam::forces::writeBins()
|
||||
}
|
||||
}
|
||||
|
||||
file(1) << obr_.time().value();
|
||||
writeTime(file(1));
|
||||
|
||||
forAll(f[0], i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user