add_harmonic_event#

Lifecycle.add_harmonic_event(project, phase_name, event_name, duration, duration_units, num_of_cycles, cycle_type, sweep_rate, orientation, profile_type, load_direction, description='')#

Add a harmonic 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 harmonic event to.

  • event_name (str) – str: Name of the harmonic event.

  • duration (float) – float: Event duration length.

  • duration_units (str) – str: Event duration units. Options are "ms", "sec", "min", "hr", "day", and "year".

  • num_of_cycles (float) – float: Number of cycles for the harmonic event.

  • cycle_type (str) – str: Cycle type. Options are "COUNT", "DUTY_CYCLE", "PER_YEAR", "PER_DAY", "PER_HOUR", "PER_MIN", and "PER_SEC".

  • sweep_rate (float) – float: Sweep rate for the harmonic event.

  • orientation (str) – str: PCB orientation in the format of "azimuth, elevation". For example, "30,15".

  • profile_type (str) – str: Profile type of the harmonic load. Options are "Uniaxial" and "Triaxial".

  • load_direction (str) – str: Load direction in the format of "x,y,z". For example, "0,0,1".

  • description (str) – str, optional: Description of the harmonic event. The default is "".

Return type:

int

Returns:

:
int

Status 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_harmonic_event(
>>>     "Test",
>>>     "Example",
>>>     "Event1",
>>>     1.5,
>>>     "sec",
>>>     4.0,
>>>     "PER MIN",
>>>     5,
>>>     "45,45",
>>>     "Uniaxial",
>>>     "2,4,5"
>>> )