Data
- class pymiso.Data(data_dir: str)[source]
Bases:
objectClass for handling the simulation data
Methods Summary
load(n_output)Load snapshot at a specified time index
write_scalar_vtk(n_output, var, output_path)Write a scalar variable to a VTK file for visualization using PyVista.
write_vector_vtk(n_output, var, output_path)Write a vector variable to a VTK file for visualization using PyVista.
Methods Documentation
- load(n_output: int)[source]
Load snapshot at a specified time index
- Parameters:
n_output (int) – The output number to load the data from
- write_scalar_vtk(n_output: int, var: str, output_path: str)[source]
Write a scalar variable to a VTK file for visualization using PyVista.
- Parameters:
n_output (int) – The output number to load the data from.
var (str) – The variable name to write (e.g., ‘ro’, ‘vx’, ‘vy’, ‘vz’, ‘bx’, ‘by’, ‘bz’, ‘ei’, ‘ph’).
output_path (str) – The path to save the VTK file.
Notes
In this version, uniform grid is assumed.
- write_vector_vtk(n_output: int, var: str, output_path: str)[source]
Write a vector variable to a VTK file for visualization using PyVista.
- Parameters:
n_output (int) – The output number to load the data from.
var (str) – The variable name to write (‘v’ for velocity, ‘b’ for magnetic field).
output_path (str) – The path to save the VTK file.
Notes
In this version, uniform grid is assumed.