add_shock_profiles#
- Lifecycle.add_shock_profiles(project, shock_profiles)#
Add shock profiles to a life cycle phase.
Available Since: 2023R2
- Parameters:
- project: str
Name of the Sherlock project
- shock_profiles: list
Shock profiles consisting of these properties:
- phase_name: str
Name of the life cycle phase to add the shock profile to.
- event_name: str
Name of the shock event.
- profile_name: str
Name of the shock profile.
- duration: float
Pulse duration.
- duration_units: str
Pulse duration units. Options are
"ms","sec","min","hr","day", and"year".
- sample_rate: float
Sample rate.
- sample_rate_units: str
Sample rate units. Options are
"ms","sec","min","hr","day", and"year".
- load_units: str
Load units. Options are:
"G","m/s2","mm/s2","in/s2", and"ft/s2".
- freq_units: str
Frequency units. Options are
"HZ","KHZ","MHZ", and"GHZ".
- shock_profile_entries: list
Shock profile entries consisting of these properties:
- shape: str
Shape of the shock profile entry. Options are
"FullSine","HalfSine","Haversine","Triangle","Sawtooth","FullSquare", and"HalfSquare".
- load: float
Load of the profile entry expressed in load units.
- freq: float
Frequency of the profile entry expressed in frequency units.
- decay: float
Decay value of the profile entry.
- Returns:
- :
intStatus code of the response. 0 for success.
- Return type:
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", ) >>> sherlock.lifecycle.add_shock_profiles( "Test", [( "Example", "Event1", "Profile1", 10.0, "ms", 0.1, "ms", "G", "HZ", [("HalfSine", 100.0, 100.0, 0)], )] )