add_shock_profiles#

Lifecycle.add_shock_profiles(project, shock_profiles)#

Add shock profiles to a life cycle phase.

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

  • shock_profiles (list) –

    List of shock profiles consisting of these properties:

    • phase_namestr

      Name of the life cycle phase to add the shock profile to.

    • event_namestr

      Name of the shock event.

    • profile_namestr

      Name of the shock profile.

    • durationfloat

      Pulse duration.

    • duration_unitsstr

      Pulse duration units. Options are "ms", "sec", "min", "hr", "day", and "year".

    • sample_ratefloat

      Sample rate.

    • sample_rate_unitsstr

      Sample rate units. Options are "ms", "sec", "min", "hr", "day", and "year".

    • load_unitsstr

      Load units. Options are: "G", "m/s2", "mm/s2", "in/s2", and "ft/s2".

    • freq_unitsstr

      Frequency units. Options are "HZ", "KHZ", "MHZ", and "GHZ".

    • shock_profile_entrieslist

      List of shock profile entries consisting of these properties:

      • shapestr

        Shape of the shock profile entry. Options are "FullSine", "HalfSine", "Haversine", "Triangle", "Sawtooth", "FullSquare", and "HalfSquare".

      • loadfloat

        Load of the profile entry expressed in load units.

      • freqfloat

        Frequency of the profile entry expressed in frequency units.

      • decayfloat

        Decay value of the profile entry.

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