add_thermal_event#

Lifecycle.add_thermal_event(project, phase_name, event_name, num_of_cycles, cycle_type, cycle_state, description='')#

Add a thermal event to a life cycle phase.

Available Since: 2021R1

Parameters:
project: str

Name of the Sherlock project.

phase_name: str

Name of the life cycle phase to add the thermal event to.

event_name: str

Name of the thermal event.

num_of_cycles: float

Number of cycles for the thermal event.

cycle_type: str

Cycle type. Options are "COUNT", "DUTY CYCLE", "PER YEAR", "PER DAY", "PER HOUR", "PER MIN", and "PER SEC".

cycle_state: str

Life cycle state. Options are "OPERATING" and "STORAGE".

description: str, optional

Description of the thermal event. The default is "".

Returns:
:
int

Status code of the response. 0 for success.

Return type:

int

Examples

>>> from ansys.sherlock.core import launcher
>>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua")
>>> sherlock.project.import_odb_archive(
>>>     "ODB++ Tutorial.tgz",
>>>     True,
>>>     True,
>>>     True,
>>>     True,
>>>     project="Test",
>>> )
>>> sherlock.lifecycle.create_life_phase(
>>>     "Test",
>>>     "Example",
>>>     1.5,
>>>     "year",
>>>     4.0,
>>>     "COUNT",
>>> )
>>> sherlock.lifecycle.add_thermal_event(
>>>     "Test",
>>>     "Example",
>>>     "Event1",
>>>     4.0,
>>>     "PER YEAR",
>>>     "STORAGE"
>>> )