create_life_phase#
- Lifecycle.create_life_phase(project, phase_name, duration, duration_units, num_of_cycles, cycle_type, description=None)#
Create a life phase.
Available Since: 2021R1
- Parameters:
project (str) – Name of the Sherlock project.
phase_name (str) – Name of the life phase.
duration (double) – Event duration length.
duration_units (str) – Units for the event duration length. Options are
"ms"
,"sec"
, and"min"
.num_of_cycles (double) – Number of cycles for the life phase.
cycle_type (str) – Cycle type. Options include
"COUNT"
,"DUTY CYCLE"
,"PER YEAR"
, and"PER HOUR"
.description (str, optional) – Description of the life phase. 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, "sec", 4.0, "COUNT", )