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:
Status code of the response. 0 for success.
- Return type:
int
Examples
>>> from ansys.sherlock.core.launcher import launch_sherlock >>> sherlock = launch_sherlock() >>> 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", )