flow360.report.NonlinearResiduals#
- class NonlinearResiduals#
Bases:
BaseChart2D
Residuals is an object for showing the solution history of nonlinear residuals.
- separate_plots: bool | None = True#
If
True
, each residual component is plotted in a separate subplot.
- xlim: ManualLimit | Tuple[float, float] | None = None#
Limits for the x-axis. Can be a tuple
(xmin, xmax)
or a ManualLimit.
- section_title: Literal['Nonlinear residuals'] = 'Nonlinear residuals'#
- x: Literal['nonlinear_residuals/pseudo_step'] = 'nonlinear_residuals/pseudo_step'#
- y_log: Literal[True] = True#
- type_name: Literal['NonlinearResiduals'] = 'NonlinearResiduals'#
- get_requirements()#
Returns requirements for this item.
- get_data(cases, context)#
Loads and processes data for creating a 2D plot model.
- Parameters:
cases (List[Case]) – A list of simulation cases to extract data from.
context (ReportContext) – The report context providing additional configuration and case-specific data.
- Returns:
A PlotModel instance containing the processed x and y data, axis labels, legend, and optional background image for plotting.
- Return type:
PlotModel
Notes
Handles data with physical units and ensures dimensional consistency.
Supports optional background images for geometry-related plots.
Automatically determines y-axis limits if focus_x is specified.
Examples
>>> chart = Chart2D( ... x="x_slicing_force_distribution/X", ... y="x_slicing_force_distribution/totalCumulative_CD_Curve", ... background="geometry" ... ) >>> plot_model = chart.get_data(cases, context) >>> fig = plot_model.get_plot() >>> fig.show()
- get_doc_item(context, settings=None)#
Returns doc item for chart.
- Parameters:
context (ReportContext)
settings (Settings | None)
- Return type:
None
- operations: List[OperationTypes] | OperationTypes | None = None#
List of operations to perform on the data.
- focus_x: Optional[Annotated[Tuple[float, float], Field(deprecated='focus_x is deprecated, your input was converted to a corresponding SubsetLimit. ' + 'Please use ylim=SubsetLimit instead in the future.')]] = None#
- ylim: ManualLimit | SubsetLimit | FixedRangeLimit | Tuple[float, float] | None = None#
Defines the range of y values that will be displayed on the chart. This helps with highlighting a desired portion of the chart.
- fig_name: FileNameStr | None = None#
Name of the figure file or identifier for the chart (). Only ‘^[a-zA-Z0-9._-]+$’ allowed.
- caption: str | List[str] | PatternCaption | None = ''#
Caption to be shown for figures.