Editing Results Files for Easier Sharing

Dramatically reduce file size, while providing the necessary information.

The results files of a completed Netfabb Simulation can be immense: from tens to even hundreds of gigabytes. This often makes sharing of completed results difficult, as it can take large spans of time to zip, upload, redownload, and unzip these files.

For cases where users are only concerned with post-process results, they are encouraged to only output those files they need. From the graphical interface this option is available as Write only pre and post-process results in the Solver Settings, Results Tab. From the command line, the inclusion of the *OOPP card achieves the same effect. However in instances where the simulation has already been run and recorded results at all time steps, a process to package up the final results for archiving or ease of sharing is explained below.

This tutorial uses the results files from the command line example 03. Consult the Examples manual or follow this link to run the example.

  1. In the 03 directory, make a copy of the 03_mechanical.case file, and rename it condensed.case.
  2. Open the condensed.case file with any notepad or word processing software. Note the three parts to this document:
    1. A header section, which controls the case file formatting. It sets up a second time step variable which is used to correlate the correct geometry file to the correct result files, as the same mesh body may be used for two or more successive time steps. The file also indicates which result type files need to be read and what directory they can be found in.
      FORMAT
      type: ensight gold
      GEOMETRY
      model: 2 results/03_mechanical_*.geo
      VARIABLE
      vector per node: 1 Displacement results/03_mechanical00_*.dis.ens
      scalar per node: 1 Temperature results/03_mechanical00_*.tmp.ens
      scalar per element: 1 Structure_type results/03_mechanical00_*.typ.ens
      scalar per node: 1 Recoater_clearance_% results/03_mechanical00_*.rct.ens
      scalar per node: 1 Recoater_status results/03_mechanical00_*.rcd.ens
    2. Time set 1, which is used to step through the result file. Note that it starts at step 1, ends at step 49, and reads through increments by 1.
      TIME
      time set:    1
      number of steps:           49
      filename start number: 1
      filename increment:     1
      time values:
        1.0000000000000000E-02
        5.0001000631553131E+02
        6.0256774635882778E+02
        6.0266774635882780E+02
        1.2062933707265522E+03
      ....
    3. Time set 2, which is used for the geometry files. This set only has 25 total steps as there are more results than differing geometries.
      TIME
      time set: 2
      number of steps: 25
      filename start number: 1
      filename increment: 1
      time values:
        1.0000000000000000E-02
        6.0266774635882780E+02
        1.2063933707265521E+03
        1.8125873771150352E+03
        2.4187813835035186E+03
      ....
  3. For this example, assume we want only the last two time steps, which correlates to the post-cooldown step, and the final step where the part is released from the build plate. For these post process increments, Temperature and Recoater results are not informative, so eliminate those three lines, and the header is shortened to the following:
    FORMAT
    type: ensight gold
    GEOMETRY
    model: 2 results/03_mechanical_*.geo
    VARIABLE
    vector per node: 1 Displacement results/03_mechanical00_*.dis.ens
    scalar per element: 1 Structure_type results/03_mechanical00_*.typ.ens
  4. This is still pointing at the results subdirectory. As we will need to copy the results into a new directory, edit the GEOMETRY and two VARIABLE pointers to go to the subdirectory "condensed", which will be created later in this tutorial. The header should look like this now:
    FORMAT
    type: ensight gold
    GEOMETRY
    model: 2 condensed/03_mechanical_*.geo
    VARIABLE
    vector per node: 1 Displacement condensed/03_mechanical00_*.dis.ens
    scalar per element: 1 Structure_type condensed/03_mechanical00_*.typ.ens
  5. Next, edit time set 1. As we only want the last 2 increments, set the number of steps to 2, and filename start number to 48. Then clear all but the final two time value from time set 1.
    TIME
    time set:    1
    number of steps:           2
    filename start number: 48
    filename increment:     1
    time values:
      1.9725276919873191E+04
      2.4725276919873191E+04
  6. Finally, edit time set 2, similarly setting the number of steps to 2, as the results will use just the last two geometry states, and set the filename start number to 24. Then clear all but the final two time steps. You can use the time values as a check, showing that you have correlated the correct set of results and geometry files, as both sets are identical for the truncated case file:
    TIME
    time set: 2
    number of steps: 2
    filename start number: 24
    filename increment: 1
    time values:
      1.9725276919873191E+04
      2.4725276919873191E+04
  7. Save the file.
  8. Now we need to create and copy the correct results files:
    1. Create a subdirectory named "condensed".
    2. Open up or navigate to the results folder for the 03 example. Copy from the results folder to the condensed folder
      1. The two geometry files, which as the case file indicates, should be numbers 24 & 25, and have the .geo extension:
        • 03_mechanical_24.geo
        • 04_mechanical_25.geo
      2. The two displacement vector files, which the .case file states should be numbers 48 & 49, and have the .dis extension. However all results files have the double extension .ens to mark them as ensight gold files, so we have
        • 03_mechanical00_48.dis.ens
        • 03_mechanical00_49.dis.ens
      3. And by logical extension the structure type files:
        • 03_mechanical00_48.typ.ens
        • 03_mechanical00_49.typ.ens
  9. With the copied geometry and results files, and a .case file correctly formatted to read them, we should have a functioning, condensed set of results which can be used for archiving or sharing. It is always good practice to open up the edited case file to ensure it is working properly before sharing the file and deleting the source results.

    Import the condensed.case file into Simulation Utility for Netfabb via the Import Results Function, by simply dragging and dropping into the software. Look at the results to confirm they are correctly formatted and identical to the source results.

    For this small example, we were able to reduce the shared file size from 105 MB to 3.17 MB, a reduction of 97%, which indicates how useful this technique can be when applied to large and complex models.