-
Notifications
You must be signed in to change notification settings - Fork 631
Working with VTK Files
The Visualization Toolkit (VTK) establishes a data format which is designed for use in high performance computing (HPC) applications. Detailed documentation of data format can be found on the website at VTK File Formats. This page provides a quick start guide to working with VTK files generated by FDS.
This section describes the process to compile FDS with HDF5 support with the Ubuntu linux distribution.
- Install prerequisites
sudo apt install zlib1g-dev cmake libhwloc-dev
- Download HDF5 library and extract to build directory
mkdir HDF5 && cd HDF5
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.4.3/hdf5-1.14.4-3.tar.gz
wget https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz
wget https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz
wget https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3/libaec-1.1.3.tar.gz
tar -zvxf hdf5-1.14.4-3.tar.gz
- Navigate to build directory
mkdir hdf5-1.14.4-3/build && cd hdf5-1.14.4-3/build
- Configure the HDF5 library with autotools
../configure --enable-fortran --enable-parallel CXX="$(which mpiicpc) -cc=$(which icpx)" CC="$(which mpiicc) -cc=$(which icx)" FC="$(which mpiifort) -fc=$(which ifort)" LDFLAGS="-L/opt/intel/oneapi/mpi/2021.11/lib -L/opt/intel/oneapi/mpi/2021.11/lib/release/" --prefix=/path/to/install/directory
- Build the library
make -j 8
- install library
make install
- set HDF5_HOME directory in your .bashrc
export HDF5_HOME=/path/to/install/directory
- add runtime library directory to LD_LIBRARY_PATH in your .bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HDF5_HOME/lib
- build FDS with supported target (impi_intel_linux*) target. The build should include the -DWITH_HDF5 flag similar to
mpiifort -c -m64 -fc=ifort -O2 -ipo -no-wrap-margin -fpp -DGITHASH_PP=\"FDS-6.9.1-1053-ga2ec224-vtkhdf\" -DGITDATE_PP=\""Sun Oct 13 17:33:39 2024 -0400\"" -DBUILDDATE_PP=\""Oct 14, 2024 11:56:22\"" -DWITH_MKL -I"/data/opt/intel/oneapi/mkl/2024.0/include" -DWITH_HDF5 -I"/raid/jhodges/HDF5/hdf5-1.14.4-3/build/install/mod/static" -I"/raid/jhodges/HDF5/hdf5-1.14.4-3/build/install/include" -L"/raid/jhodges/HDF5/hdf5-1.14.4-3/build/install/lib" -lhdf5_fortran -DUSE_IFPORT -diag-disable=10448 ../../Source/vtkf.f90
- Install prerequisites
sudo apt install zlib1g-dev cmake libhwloc-dev
- Download HDF5 library and extract to build directory
mkdir HDF5 && cd HDF5
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.4.3/hdf5-1.14.4-3.tar.gz
wget https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz
wget https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz
wget https://github.com/MathisRosenhauer/libaec/releases/download/v1.1.3/libaec-1.1.3.tar.gz
tar -zvxf hdf5-1.14.4-3.tar.gz
- Navigate to build directory
mkdir hdf5-1.14.4-3/build && cd hdf5-1.14.4-3/build
- Configure the HDF5 library with autotools
../configure --enable-fortran --enable-parallel CXX="$(which mpicxx)" CC="$(which mpicc)" FC="$(which mpifort)" LDFLAGS="-L$OMPI_HOME/lib" --prefix=/path/to/install/directory
- Build the library
make -j 8
- install library
make install
- set HDF5_HOME directory in your .bashrc
export HDF5_HOME=/path/to/install/directory
- add runtime library directory to LD_LIBRARY_PATH in your .bashrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HDF5_HOME/lib
- build FDS with supported target (ompi_gnu_linux*) target. The build should include the -DWITH_HDF5 flag similar to
mpifort -c -m64 -O2 -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics -cpp -DGITHASH_PP=\"FDS-6.9.1-1132-g766c7f6-vtkhdf\" -DGITDATE_PP=\""Wed Oct 16 20:09:09 2024 -0400\"" -DBUILDDATE_PP=\""Oct 17, 2024 11:10:52\"" -DWITH_HDF5 -I"/raid/jhodges/HDF5_ompi/hdf5-1.14.4-3/build/hdf5/mod/static" -I"/raid/jhodges/HDF5_ompi/hdf5-1.14.4-3/build/hdf5/include" -L"/raid/jhodges/HDF5_ompi/hdf5-1.14.4-3/build/hdf5/lib" -lhdf5_fortran ../../Source/vtkf.f90
This section will demonstrate a basic example to generate VTK data with FDS and visualize the results in Paraview.
- Installed FDS: Examples/VTK/storage.fds
- Source FDS: Verification/VTK/storage.fds
- Add "WRITE_VTK=T" to the &DUMP namelist. This tells FDS to generate VTK data.
- Add "RESULTS_DIR='storage_results'" to the &DUMP namelist. This tells FDS to locate all the VTK and binary data in the subdirectory, "storage_results".
- The namelist should now be:
&DUMP NFRAMES=100, DT_CTRL=1., DT_DEVC=10., DT_HRR=10., SIG_FIGS=4, WRITE_VTK=T, RESULTS_DIR='storage_results' /
- Navigate to the directory with the input file
- Run fds with the command:
mpiexec -np 8 fds storage.fds
- Open Paraview
- Click File->Load State
- Select the "storage_paraview.py" file and click ok
- Manipulate the viewport by using the preset views or clicking in the window and dragging the mouse.
- Click play to start the animation of the fire, smoke, and sprinkler droplets.
- After sprinklers activate, the view should be similar to the following.
- Hide the fire, smoke, and particles by clicking the open "eye" icon next to these two datasets in the pipeline browser
- Show the slice at a z-axis height of 7.4m by clicking the closed "eye" icon in the pipeline browser.
- Click on the z-axis slice in the pipeline browser and the properties window will appear.
- Click the drop down icon under "Coloring" and change it to "TEMPERATURE".
- Use a similar approach to activate the "3D Slice Extraction" in the pipeline browser. Click on "3D Slice Extraction" in the pipeline browser and a plane visualization will appear in the viewport which can be used to translate and rotate extracted plane from the 3D data.
- Move the plane to Origin: -3, 0, 4.5 with Normal 1, 0, 0 and click apply.
- Click on the drop-down icon under "Coloring" and change it to "TEMPERATURE".
- Deselect the "3D Slice Extraction" from the pipeline browser by clicking any of the other datasets or the "builtin" root tree at the top. This will hide the plane which was used to move the slice extraction plane.
- Click the run icon to see the animation of slice data.
- Hide the slice data from the previous step by clicking the "eye" icon for each of the slice datasets in the pipeline browser.
- Click the "eye" icon next to the boundary data and select coloring by "HRRPUA". You may see overlap between the geometry and boundary data. This can be removed by hiding the geometry data.
The python state file interface in Paraview has syntax changes over different releases of Paraview. This error typically occurs when the configuration file generated by FDS tries to modify a parameter that does not exist in the version of Paraview used. If this occurs you can comment out the line in the Paraview state file and reload it. Please report these observations in the issue tracker with the tag "Paraview compatibility" and provide your FDS input file and Paraview version.
Using Paraview on a remote system depends on how the server is configured. Oak Ridge provides information a typical configuration OLCF Paraview Guide. See the user guides for existing HPC configurations and discuss with the system administrator for configuration of new systems.
Add the flag VTK_BINARY=F to the &MISC to change from binary to ASCII output in VTK files.
See the Paraview User's Guide.
See the Paraview User's Guide.
The process flow for reporting issues with the VTK output are the following:
- Verify that the VTK data output by FDS is valid. Swap to ASCII output for the files and verify the crash still occurs.
- If the crash occurs for binary data but not ASCII data, report the issue in the FDS Issue Tracker with the tag "VTK ASCII/Binary Data" and include the FDS input file, FDS version, and Paraview version.
- If the crash occurs in both data types, open the ASCII data and manually inspect the data fields for unexpected outputs (e.g., missing data, underflow/overflows, precision erors, etc.). If the crash occurs for binary data but not ASCII data, report the issue in the FDS Issue Tracker with the tag "VTK ASCII/Binary Data" and include the FDS input file, FDS version, and Paraview version.
- If no abnormalities are observed in the VTK data, report the issue to the Paraview Issue Tracker.
Report the feature request to the Paraview Issue Tracker.