ENH: functionObjects - updated writing to file

This commit is contained in:
andy
2013-11-25 10:52:20 +00:00
parent 18ae63051b
commit 636215a0ea
14 changed files with 267 additions and 145 deletions

View File

@ -42,9 +42,11 @@ defineTypeNameAndDebug(DESModelRegions, 0);
void Foam::DESModelRegions::writeFileHeader(const label i)
{
file() << "# DES model region coverage (% volume)" << nl
<< "# time " << token::TAB << "LES" << token::TAB << "RAS"
<< endl;
writeHeader(file(), "DES model region coverage (% volume)");
writeCommented(file(), "Time");
writeTabbed(file(), "LES");
writeTabbed(file(), "RAS");
}
@ -206,8 +208,10 @@ void Foam::DESModelRegions::write()
if (Pstream::master() && log_)
{
file() << obr_.time().timeName() << token::TAB
<< prc << token::TAB << 100.0 - prc << endl;
file() << obr_.time().value()
<< token::TAB << prc
<< token::TAB << 100.0 - prc
<< endl;
}
if (log_)

View File

@ -43,9 +43,11 @@ defineTypeNameAndDebug(wallShearStress, 0);
void Foam::wallShearStress::writeFileHeader(const label i)
{
// Add headers to output data
file() << "# Wall shear stress" << nl
<< "# time " << token::TAB << "patch" << token::TAB
<< "min" << token::TAB << "max" << endl;
writeHeader(file(), "Wall shear stress");
writeCommented(file(), "Time");
writeTabbed(file(), "patch");
writeTabbed(file(), "min");
writeTabbed(file(), "max");
}
@ -73,9 +75,11 @@ void Foam::wallShearStress::calcShearStress
if (Pstream::master())
{
file() << mesh.time().timeName() << token::TAB
<< pp.name() << token::TAB << minSsp
<< token::TAB << maxSsp << endl;
file() << mesh.time().value()
<< token::TAB << pp.name()
<< token::TAB << minSsp
<< token::TAB << maxSsp
<< endl;
}
if (log_)

View File

@ -44,10 +44,13 @@ defineTypeNameAndDebug(yPlusLES, 0);
void Foam::yPlusLES::writeFileHeader(const label i)
{
file() << "# y+ (LES)" << nl
<< "# time " << token::TAB << "patch" << token::TAB
<< "min" << token::TAB << "max" << token::TAB << "average"
<< endl;
writeHeader(file(), "y+ (LES)");
writeCommented(file(), "Time");
writeTabbed(file(), "patch");
writeTabbed(file(), "min");
writeTabbed(file(), "max");
writeTabbed(file(), "average");
}
@ -100,10 +103,12 @@ void Foam::yPlusLES::calcIncompressibleYPlus
if (Pstream::master())
{
file() << obr_.time().value() << token::TAB
<< currPatch.name() << token::TAB
<< minYp << token::TAB << maxYp << token::TAB
<< avgYp << endl;
file() << obr_.time().value()
<< token::TAB << currPatch.name()
<< token::TAB << minYp
<< token::TAB << maxYp
<< token::TAB << avgYp
<< endl;
}
}
}
@ -166,10 +171,12 @@ void Foam::yPlusLES::calcCompressibleYPlus
if (Pstream::master())
{
file() << obr_.time().value() << token::TAB
<< currPatch.name() << token::TAB
<< minYp << token::TAB << maxYp << token::TAB
<< avgYp << endl;
file() << obr_.time().value()
<< token::TAB << currPatch.name()
<< token::TAB << minYp
<< token::TAB << maxYp
<< token::TAB << avgYp
<< endl;
}
}
}

View File

@ -46,10 +46,13 @@ defineTypeNameAndDebug(yPlusRAS, 0);
void Foam::yPlusRAS::writeFileHeader(const label i)
{
file() << "# y+ (RAS)" << nl
<< "# time " << token::TAB << "patch" << token::TAB
<< "min" << token::TAB << "max" << token::TAB << "average"
<< endl;
writeHeader(file(), "y+ (RAS)");
writeCommented(file(), "Time");
writeTabbed(file(), "patch");
writeTabbed(file(), "min");
writeTabbed(file(), "max");
writeTabbed(file(), "average");
}
@ -95,10 +98,12 @@ void Foam::yPlusRAS::calcIncompressibleYPlus
if (Pstream::master())
{
file() << obr_.time().value() << token::TAB
<< nutPw.patch().name() << token::TAB
<< minYp << token::TAB << maxYp << token::TAB
<< avgYp << endl;
file() << obr_.time().value()
<< token::TAB << nutPw.patch().name()
<< token::TAB << minYp
<< token::TAB << maxYp
<< token::TAB << avgYp
<< endl;
}
}
}
@ -153,10 +158,12 @@ void Foam::yPlusRAS::calcCompressibleYPlus
if (Pstream::master())
{
file() << obr_.time().value() << token::TAB
<< mutPw.patch().name() << token::TAB
<< minYp << token::TAB << maxYp << token::TAB
<< avgYp << endl;
file() << obr_.time().value()
<< token::TAB << mutPw.patch().name()
<< token::TAB << minYp
<< token::TAB << maxYp
<< token::TAB << avgYp
<< endl;
}
}
}