.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/reliability/form/FORM_linear_function_2d.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 or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_reliability_form_FORM_linear_function_2d.py: 1. FORM - Linear function - Two Random variables =================================================== In the second example we have the limit state to be a linear function of two (:math:`d=2`) independent Gaussian random variables .. GENERATED FROM PYTHON SOURCE LINES 12-17 :math:`g(U) = -\frac{1}{\sqrt{d}}\sum_{i=1}^{d} u_i + \beta` The probability of failure in this case is :math:`P(F) ≈ 10^{−3}` for :math:`β = 3.0902` Initially we have to import the necessary modules. .. GENERATED FROM PYTHON SOURCE LINES 20-42 .. code-block:: default from UQpy.distributions import Normal from UQpy.reliability import FORM from UQpy.run_model.RunModel import RunModel from UQpy.run_model.model_execution.PythonModel import PythonModel dist1 = Normal(loc=0., scale=1.) dist2 = Normal(loc=0., scale=1.) model = PythonModel(model_script='local_pfn.py', model_object_name="example2") RunModelObject2 = RunModel(model=model) Z = FORM(distributions=[dist1, dist2], runmodel_object=RunModelObject2) Z.run() # print results print('Design point in standard normal space: %s' % Z.design_point_u) print('Design point in original space: %s' % Z.design_point_x) print('Hasofer-Lind reliability index: %s' % Z.beta) print('FORM probability of failure: %s' % Z.failure_probability) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_reliability_form_FORM_linear_function_2d.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/SURGroup/UQpy/master?urlpath=lab/tree/notebooks/auto_examples/reliability/form/FORM_linear_function_2d.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: FORM_linear_function_2d.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: FORM_linear_function_2d.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_