athena module
Module for Athena++ specific plotting.
- sapphireppplot.athena.load_solution(plot_properties, path_prefix='', base_file_name='solution', results_folder='', t_start=0.0, t_end=1.0, animation_time=None)
Load athena++ solution.
This function performs the following steps:
Retrieves the folder containing simulation results.
Loads the solution data from the files in the results folder.
Adds time step information if necessary.
Updates the animation scene to the specified animation time.
- Parameters:
plot_properties (
PlotPropertiesAthena) – Properties of the solution to load.path_prefix (
str) – Prefix for relative path.results_folder (
str) – The path to the results folder.base_file_name (
str) – Base name of the solutions files.t_start (
float) – Simulation start time.t_end (
float) – Simulation end time.animation_time (
Optional[float]) – Set the time at which the animation scene is displayed. Defaults to the last time step.
- Return type:
tuple[str,Dict[str,Any],SourceProxy,Proxy]- Returns:
results_folder (str) – The path to the results folder.
prm (ParamDict) – Dictionary of the parameters.
solution (SourceProxy) – A ParaView reader object with selected point arrays enabled.
animation_scene (Proxy) – The ParaView AnimationScene.
- Raises:
ValueError – If no matching files are found.
See also
sapphireppplot.pvloadModule to load ParaView files.
sapphireppplot.utils.get_results_folderPrompt for results folder.
- sapphireppplot.athena.compute_magnetic_divergence(solution, plot_properties_in)
Compute magnetic divergence of the solution.
- Parameters:
solution (
SourceProxy) – The data to calculate the magnetic_convergence on.plot_properties_in (
PlotPropertiesAthena) – Properties of the source.
- Return type:
tuple[SourceProxy,PlotPropertiesAthena]- Returns:
gradient (SourceProxy) – The solution with magnetic divergence.
plot_properties (PlotPropertiesVFP) – Solution properties for the new solution.
See also
- paraview.simple.Gradient
ParaView Gradient filter.