Get Random Vibration Analysis inputs#

This example demonstrates how to connect to the Sherlock gRPC service, import a project, and retrieve the analysis input fields.

Description#

Sherlock provides the ability to run a random vibration analysis using its gRPC interface. This script demonstrates how to: - Connect to the Sherlock service. - Retrieve the input fields required for random vibration analysis.

This example assumes you have already set up Sherlock and the necessary environment.

For more details on vibration analysis in Sherlock, refer to the official documentation.

from ansys.sherlock.core import launcher

Connect to Sherlock#

Connect to the Sherlock service and ensure proper initialization.

sherlock = launcher.connect(port=9092, timeout=10)

Get Random Vibration Input Fields#

Retrieve the list of input fields for the random vibration analysis.

try:
    random_vibe_input_fields = sherlock.analysis.get_random_vibe_input_fields()
    print("Random vibration analysis input fields:")
    print(random_vibe_input_fields)
except Exception as e:
    print(f"Error retrieving random vibration input fields: {e}")