.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\gallery_examples\04-analyses\get_random_vibe_inputs_fields.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_examples_04-analyses_get_random_vibe_inputs_fields.py: .. _ref_sherlock_run_analysis: ==================================== 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. .. GENERATED FROM PYTHON SOURCE LINES 41-46 .. code-block:: Python from ansys.sherlock.core import launcher .. GENERATED FROM PYTHON SOURCE LINES 48-51 Connect to Sherlock =================== Connect to the Sherlock service and ensure proper initialization. .. GENERATED FROM PYTHON SOURCE LINES 51-54 .. code-block:: Python sherlock = launcher.connect(port=9092, timeout=10) .. GENERATED FROM PYTHON SOURCE LINES 55-58 Get Random Vibration Input Fields ================================= Retrieve the list of input fields for the random vibration analysis. .. GENERATED FROM PYTHON SOURCE LINES 58-65 .. code-block:: Python 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}") .. _sphx_glr_download_examples_gallery_examples_04-analyses_get_random_vibe_inputs_fields.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: get_random_vibe_inputs_fields.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: get_random_vibe_inputs_fields.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: get_random_vibe_inputs_fields.zip `