report.ReportTemplate#

class ReportTemplate#

Bases: Flow360BaseModel

A model representing a report containing various components such as summaries, inputs, tables, and charts in both 2D and 3D.

Attributes

title: str, optional#

Title of report, shown on the first page.

Default:

None

items: list[Summary | Inputs | Table | NonlinearResiduals | Chart2D | Chart3D]#

A list of report items, each of which can be a summary, input data, table, 2D chart, or 3D chart.

include_case_by_case: bool#

Flag indicating whether to include a case-by-case analysis in the report.

Default:

False

settings: Settings, optional#
Default:

Settings()

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

get_requirements()#

Collects and returns unique requirements from all items.

This method iterates over all items, retrieves each item’s requirements, and aggregates them into a unique list.

Returns:

A list of unique requirements aggregated from all items.

Return type:

list

create_in_cloud(name, cases, landscape=False, solver_version='release-25.8')#

Creates a report in the cloud for a specified set of cases.

Parameters:
  • name (str) – The name of the report to create.

  • cases (list[Case]) – A list of Case instances to include in the report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • solver_version (str, optional) – Version of the solver for report generation.

Returns:

The response from the Report API submission.

Return type:

Response

create_pdf(filename, cases, landscape=True, data_storage='.', shutter_url=None, shutter_access_token=None, shutter_screenshot_process_function=None, process_screenshot_in_parallel=True)#

Generates a PDF report for a specified set of cases.

Parameters:
  • filename (str) – The name of the output PDF file.

  • cases (list[Case]) – A list of Case instances to include in the PDF report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • data_storage (str, default=".") – Directory where the PDF file will be saved.

  • shutter_url (str)

  • shutter_access_token (str)

  • shutter_screenshot_process_function (Callable)

  • process_screenshot_in_parallel (bool)

Return type:

None

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')