add_random_vibe_profiles#

Lifecycle.add_random_vibe_profiles(project, random_vibe_profiles)#

Add random vibe profiles to a life cycle phase.

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

  • random_vibe_profiles (list) –

    List of random vibe profiles consisting of these properties:

    • phase_namestr

      Name of the life cycle phase to add the random vibe profile to.

    • event_namestr

      Name of the random vibe event.

    • profile_namestr

      Name of the random vibe profile.

    • freq_unitsstr

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

    • ampl_unitsstr

      Amplitude units. Options are "G2/Hz", "m2/s4/Hz", "mm2/s4/Hz", "in2/s4/Hz", and "ft2/s4/Hz".

    • random_vibe_profile_entrieslist

      List of random vibe profile entries consisting of these properties:

      • frequencydouble

        Frequency of the profile entry expressed in frequency units.

      • amplitudedouble

        Amplitude of the profile entry expressed in amplitude units.

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_random_vibe_event(
    "Test",
    "Example",
    "Event1",
    1.5,
    "sec",
    4.0,
    "PER MIN",
    "45,45",
    "Uniaxial",
    "2,4,5",
)
>>> sherlock.lifecycle.add_random_vibe_profiles(
    "Test",
     [(
        "Example",
        "Event1",
        "Profile1",
        "HZ",
        "G2/Hz",
        [(4,8), (5, 50)],
    )]
)