create_life_phase#

Lifecycle.create_life_phase(project, phase_name, duration, duration_units, num_of_cycles, cycle_type, description=None)#

Add and define a life phase.

Parameters:
  • project (str) – Name of the Sherlock project.

  • phase_name (str) – Name of the new life phase.

  • duration (double) – Event duration length.

  • duration_units (str) – Units for the event duration length. Options include "ms", "sec", and "min".

  • num_of_cycles (double) – Number of cycles for the new life phase.

  • cycle_type (str) – Cycle type. Options include "COUNT", "DUTY CYCLE", "PER YEAR", and "PER HOUR".

  • description (str, optional) – Description of the new life phase.

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",
)