report.Delta#

class Delta#

Bases: Flow360BaseModel

Represents a delta calculation between a reference case and a target case based on specified data.

Attributes

data: DataItem | str#

Path to the data item used for delta calculation.

ref_index: int, optional#

Index of the reference case in the list of cases for comparison.

Default:

0

Properties

include#

Returns the include filter from the underlying DataItem, or None if data is not a DataItem.

exclude#

Returns the exclude filter from the underlying DataItem, or None if data is not a DataItem.

Additional Constructors

classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

calculate(case, cases)#

Calculates the delta between the specified case and the reference case.

Parameters:
  • case (Case) – The target case for which the delta is calculated.

  • cases (List[Case]) – A list of available cases, including the reference case.

Returns:

The computed delta value between the case and reference case data.

Return type:

float

Raises:

ValueError – If ref_index is out of bounds or None, indicating a missing reference.

help(methods=False)#

Print fields and methods of a Flow360BaseModel using rich.

Parameters:

methods (bool)

Return type:

None

to_file(filename, **kwargs)#

Export Flow360BaseModel instance to a .json file.

Parameters:
Return type:

None