mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: functionObjects - updated writing to file
This commit is contained in:
@ -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_)
|
||||
|
||||
@ -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_)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user