add_harmonic_vibe_profiles#

Lifecycle.add_harmonic_vibe_profiles(project: str, harmonic_vibe_profiles: list[tuple[str, str, str, str, str, list[tuple[float, float, str]]]]) int#

Add harmonic vibe profiles to a life cycle phase.

Available Since: 2023R2

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

  • harmonic_vibe_profiles (list) –

    Harmonic vibe profiles consisting of these properties:

    • phase_name: str

      Name of the life cycle phase to add this harmonic vibe profile to.

    • event_name: str

      Name of the event.

    • profile_name: str

      Name of the harmonic vibe profile.

    • freq_units: str

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

    • load_units: str

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

    • harmonic_profile_entries: list[tuple[float, float, str]]

      Harmonic profile entries consisting of these properties:

      • frequency: float

        Frequency of the harmonic profile expressed in frequency units.

      • load: float

        Load of the harmonic profile expressed in load units.

      • triaxial_axis: str

        Axis that this profile should be assigned to if the harmonic profile type is "Triaxial". Options are: "x", "y", and "z".

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_harmonic_event(
    "Test",
    "Example",
    "Event1",
    1.5,
    "sec",
    4.0,
    "PER MIN",
    5,
    "45,45",
    "Uniaxial",
    "2,4,5",
)
>>> sherlock.lifecycle.add_harmonic_vibe_profiles(
    "Test",
    [(
        "Example",
        "Event1",
        "Profile1",
        "HZ",
        "G",
        [
            (10, 1),
            (1000, 1),
        ],
        "",
    )]
)