ogstools.logparser.plots module#
- ogstools.logparser.plots.plot_convergence_order(df, n=3, x_metric='time_step', **kwargs)[source]#
Create a heatmap of the nonlinear solver convergence order.
see:
convergence_order_per_ts_iteration()
In order to estimate the convergence order we need to take into account multiple values and thus cannot assign each iteration a convergence order. Only for iterations i of i >= n an order is calculated and plotted. Per default the scale is limited to a range of 0 to 2 to limit the view to meaningful data. Set the keyword arguments vmin and vmax`to `None to see the entire scale.- Parameters:
df (DataFrame) – Dataframe of a simulation log.
n (Literal[3, 4]) – Number of error values to use to estimate the convergence order.
x_metric (Literal['time_step', 'model_time']) – x_axis can represent either “time_step” or “model_time”
- Return type:
Figure
- Keyword Arguments:
see:
heatmap()
)
- Returns:
A figure with a heatmap of the nonlinear solver convergence order.
- Return type:
Figure
- ogstools.logparser.plots.plot_convergence(df, metric='dx', x_metric='time_step', **kwargs)[source]#
Create a heatmap of the nonlinear solver convergence data.
The individual values in the heatmap correspond to the top right indices on the x- and y-axis. E.g. the very first entry which fills the space between timesteps 0-1 and iteration 0-1 belongs to the first iteration of the first timestep. Thus we immediately read on which iteration a timestep converged and on which timestep the simulation ended. Per default logarithmic scaling is used. Set log_scale to False to use linear scaling.
- Parameters:
df (DataFrame) – Dataframe of a simulation log.
metric (Literal['dx', 'dx_x', 'x']) – Which metric / column of the Dataframe to plot. dx (absolute error), dx_x (relative error), x (residual)
x_metric (Literal['time_step', 'model_time']) – x_axis can represent either “time_step” or “model_time”
- Return type:
Figure
- Keyword Arguments:
see:
heatmap()
)
- Returns:
A figure with a heatmap of the nonlinear solver convergence data.
- Return type:
Figure