add_shock_event#
- Lifecycle.add_shock_event(project, phase_name, event_name, duration, duration_units, num_of_cycles, cycle_type, orientation, load_direction, description='')#
Add a shock life cycle event.
- Parameters:
project (str) – Name of the Sherlock project.
phase_name (str) – Name of the lifecycle phase to add this event to.
event_name (str) – Name of the shock event.
duration (double) – Event duration length.
duration_units (str) – Event duration units. Options are
"ms","sec","min","hr","day", and"year".num_of_cycles (double) – Number of cycles for the shock event.
cycle_type (str) – Cycle type. Options include
"COUNT","DUTY CYCLE","PER YEAR", and"PER HOUR".orientation (str) – PCB orientation in the format of
azimuth, elevation. For example,30,15.load_direction (str) – Load direction in the format of
x,y,z. For example,0,0,1.description (str, optional) – Description of the shock event.
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", ) >>> sherlock.lifecycle.add_shock_event( "Test", "Example", "Event1", 1.5, "sec", 4.0, "PER MIN", "45,45", "2,4,5", )