[Core][IO] Implement EnSight 6/Gold output for simulation results#13787
[Core][IO] Implement EnSight 6/Gold output for simulation results#13787loumalouomega wants to merge 60 commits intoKratosMultiphysics:masterfrom
Conversation
…metry type checks
…ilities::SkippableEntity for improved geometry handling
- Introduced a new header file `ensight_output.h` containing the EnSightOutput class for exporting simulation results in EnSight 6/Gold format. - Implemented the EnSightOutput class with methods for writing case, geometry, and variable files, supporting both ASCII and binary formats. - Added Python bindings for the EnSightOutput class in `add_io_to_python.cpp` to enable usage in Python scripts. - Created a new Python script `ensight_output_process.py` to manage the output process, including folder handling and output frequency control. - Enhanced the overall I/O capabilities of Kratos for better integration with EnSight visualization software.
…tput default parameters
…WriteCaseFile method
…treamline data writing
…ableToFile methods to improve data writing logic and enhance clarity
…ableToFile methods to improve counter initialization and add new line handling
… from "per condition" to "per element" for clarity
…y and consistency
…s "Conditional" in output messages
…WriteGeometricalGaussVariableToFile methods
…rt for case and geo file types
…th fewer decimal places for improved readability and consistency across node vectors and scalars. Updated files include Main.0001.geo, Main.0002.geo, Main.DISPLACEMENT.0000.node.vec, Main.DISPLACEMENT.0001.node.vec, Main.DISPLACEMENT.0002.node.vec, Main.PRESSURE.0000.node.scl, Main.PRESSURE.0001.node.scl, Main.PRESSURE.0002.node.scl, Main.VELOCITY.0000.node.vec, Main.VELOCITY.0001.node.vec, and Main.VELOCITY.0002.node.vec.
…s and include the main model part in the output list.
- Introduced new reference files for QuadraticPrism3D and ascii3D geometries. - Updated existing geo files to include submodel parts and corrected part indices. - Added scalar and vector output files for BOUNDARY, DISPLACEMENT, PRESSURE, and VELOCITY variables in ascii3D. - Enhanced the test suite to include tests for ascii output in 3D and specific geometries like QuadraticPrism3D and QuadraticHexahedra3D. - Adjusted output precision in the test configuration for better accuracy.
…ega/Kratos into core/io/encas-support
|
NOTE: Deploy will never work because these chanegs come from my fork, and I am not going to cherry-pick to a branch in Kratos because is to many commits. |
|
this is cool ... is it fast? |
Well, it is more or less like legacy VTK, not particularly fast. |
|
@sunethwarna @matekelemen you have a lot of experience with vtk output, can you take a look here in particularly to see if there can be some reuse of the vtu stuff? |
|
Thanks for this nice feature @loumalouomega . I have the following concerns before doing a thorough review.
The cpp itself is 3k+ lines, I would reduce the number of lines by doing the above mentioned things. |
|
Another small question, does this support mpi ? |
No, sorry |
The problem is that there are different formats in here, the gold (7) and classic (6), and to actually implement without become crazy I think is relevant to have it there.
Which code duplications? (the data is written in a different manner depending of the data type, I cannot reuse code there)
|
|
Any advance on this? |
|
What is the status of this? |
📝 Description
Introduction
After what was discussed in last Kratos workshop, this PR introduces
EnSightOutput, a new class for exporting simulation results to the EnSight 6/Gold file format. This implementation allows users to generate a complete EnSight dataset, including case, geometry, and variable files, enabling advanced post-processing and visualization with the EnSight software or other compatible tools like ParaView or Hyperview (reason why this format was chosen).Source: https://fr.scribd.com/document/156786965/Ensight-File-Format-Manual
The generated output files have been successfully loaded and visualized in ParaView and Hyperview to confirm the correctness of the mesh geometry and the plotted nodal/elemental data.
The
EnSightOutputclass provides a comprehensive solution for writing mesh geometry, along with both nodal and elemental results. It is designed to handle transient simulations by tracking and outputting data at different time steps. The input is very simiar and compatible with the one used in theVtkOutput.Key features
.scl,.vec,.ten, etc.).Parametersobject.EnSightOutputclass, providing a clean interface for integration into the simulation workflow. The core logic is initiated by calling thePrintOutput()method at each desired step.This feature significantly enhances the post-processing capabilities of the application by interfacing with a powerful, industry-standard visualization tool.
TODO
🆕 Changelog
SkippableEntitymethod toInputOutputUtilitiesfor geometry type checks #13716VTKOutputProcessdocumentation #13850kratos/python_scripts/compare_two_files_check_process.pyto support EnSight 6 files.