coconut_tools.plot_convergence¶
Module for comparing convergence of COCONUT in-situ plasma quantities across different simulations.
This script reads convergence data from multiple COCONUT simulation cases, extracts key physical quantities (e.g., density, velocity components, magnetic field components), and plots their evolution with respect to the number of solver iterations.
- Usage:
Configure the input_dir, output_dir, filename, and label_dict directly in the __main__ block. Run the script to generate comparison plots saved to the specified output directory.
Functions
|
Compare convergence of quantities across COCONUT simulations. |
- coconut_tools.plot_convergence.compare_convergence(input_dir, output_dir, filename, label_dict, figsize=(10, 7))[source]¶
Compare convergence of quantities across COCONUT simulations.
- Parameters:
input_dir (Path) – Base directory containing simulation result folders.
output_dir (Path) – Directory where plots will be saved.
filename (str) – Name of the convergence data file.
label_dict (Dict[str, str]) – Mapping from subfolder names to legend labels.
figsize (Tuple[int, int], optional) – Size of the figure. Defaults to (10, 7).
- Return type:
None- Returns:
None