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) – str: Name of the Sherlock project.phase_name (
str) – str: Name of the life cycle phase to add the thermal event to.event_name (
str) – str: Name of the thermal event.num_of_cycles (
float) – float: Number of cycles for the thermal event.cycle_type (
str) – str: Cycle type. Options are"COUNT","DUTY CYCLE","PER YEAR","PER DAY","PER HOUR","PER MIN", and"PER SEC".cycle_state (
str) – str: Life cycle state. Options are"OPERATING"and"STORAGE".description (
str) – str, optional: Description of the thermal event. The default is"".
- Return type:
- Returns:
- :
intStatus code of the response. 0 for success.
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" >>> )