mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- Default is a width of 8 characters, but this can be extended up to 31
characters via the '-width' command-line option.
- Now use a similar structure as foamToEnsightParts for the masking.
This reduces the clutter within the directory, makes it easier to
selectively delete some time steps (using shell commands).
- Added in a "time" information data in each sub-directory to
make it possible to reconstruct the case file with an external
script.
- Conversion of cloud data should now also work in parallel
(may need more testing).
- Support binary output for cloud data.
- Better avoidance of illegal ensight variable names.
But still partially incomplete (due to patch fields).
==================================================
Example of NEW file structure:
EnSight/verticalChannel.case # case name
EnSight/geometry # for non-moving geometry
EnSight/data/ # time-varying data
EnSight/data/00000000/
EnSight/data/00000001/
...
Fields are stored by name within the data/********/ directories:
EnSight/data/00000001/time # human-readable time info
EnSight/data/00000001/U
EnSight/data/00000001/p
...
EnSight/data/00000001/geometry # for moving geometry
Clouds are stored at the next sub-directory level:
EnSight/data/00000001/lagrangian/<cloudName>/positions
EnSight/data/00000001/lagrangian/<cloudName>/U
...
==================================================
The old structure was significantly more cluttered:
EnSight/verticalChannel.case
EnSight/verticalChannel.0000.mesh
EnSight/verticalChannel.0001.p
EnSight/verticalChannel.0001.<cloudName>
EnSight/verticalChannel.0001.<cloudName>.U
==================================================
34 lines
876 B
C
34 lines
876 B
C
if (Pstream::master())
|
|
{
|
|
ensightCaseFile.setf(ios_base::scientific, ios_base::floatfield);
|
|
ensightCaseFile.precision(5);
|
|
|
|
ensightCaseFile << nl << "TIME" << nl
|
|
<< "time set: " << 1 << nl
|
|
<< "number of steps: " << nTimeSteps << nl
|
|
<< "filename start number: " << 0 << nl
|
|
<< "filename increment: " << 1 << nl;
|
|
|
|
ensightCaseFile << "time values:" << nl;
|
|
|
|
label count = 0;
|
|
scalar Tcorr = 0.0;
|
|
if (timeDirs[0].value() < 0)
|
|
{
|
|
Tcorr = -timeDirs[0].value();
|
|
Info<< "Correcting time values. Adding " << Tcorr << endl;
|
|
}
|
|
|
|
forAll(timeDirs, n)
|
|
{
|
|
ensightCaseFile << setw(12) << timeDirs[n].value() + Tcorr << " ";
|
|
|
|
if (++count % 6 == 0)
|
|
{
|
|
ensightCaseFile << nl;
|
|
}
|
|
}
|
|
|
|
ensightCaseFile << nl;
|
|
}
|