Post Processing
Vertex-CFD output post-processing utilities can be found under examples/post_processing in the code repository.
Residuals
residuals.py is found under the residual folder of post_processing and contains various methods which can be imported into a Python script for easy post-processing of Vertex-CFD log files. The module requires the non-standard numpy, pandas, and matplotlib libraries.
The below code shows an example of reading a Vertex-CFD log file and plotting results. You can use it as a starting point, and test, by copying it to a file in the Vertex-CFD home directory and executing it. You can then modify as needed for your simulation needs.
from pathlib import Path
import examples.post_processing.residual.residuals as res
# Reading data
log_file = Path("examples/post_processing/residual/tests/test_residuals.out")
info, data = res.get_responses(log_file)
print(f"The time step's CFL number is: {info['CFL'].iloc[-1]}")
print(f"The velocity at time step 10 is{data['Velocity-Z Inlet - velocity_2'][10]}")
# Plotting shortcut functions
res.plot_residual(log_file)
res.plot_responses(log_file)