Skip to content

Commit

Permalink
feat: activate mathjax ext and add base rst
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Jan 10, 2025
1 parent 3df7801 commit 2cedfa8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"sphinxemoji.sphinxemoji",
"sphinx.ext.graphviz",
"ansys_sphinx_theme.extension.linkcode",
"sphinx.ext.mathjax",
]

# Intersphinx mapping
Expand Down
2 changes: 2 additions & 0 deletions doc/source/examples/extended_examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ with other programs, libraries, and features in development.
+------------------------------------------------------+--------------------------------------------------------------------------------------------+
| :ref:`hpc_ml_ga_example` | Demonstrates how to use PyMAPDL in a high-performance computing system managed by SLURM. |
+------------------------------------------------------+--------------------------------------------------------------------------------------------+
| :ref:`stochastic_fem_example` | Demonstrates using PyMAPDL for stochastic FEA via the Monte Carlo simulation. |
+------------------------------------------------------+--------------------------------------------------------------------------------------------+


.. toctree::
Expand Down
40 changes: 40 additions & 0 deletions doc/source/examples/extended_examples/sfem/stochastic_fem.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _stochastic_fem_example:

Stochastic finite element method with PyMAPDL
=============================================

This example leverages PyMAPDL for stochastic finite element analysis via the Monte Carlo simulation.
Numerous advantages / workflow possibilities that PyMAPDL affords users is demonstrated through this
extended example. Important concepts are first explained before the example is presented.

Introduction
------------
Often in a mechanical system, system parameters (geometry, materials, loads, etc.) and response parameters
(displacement, strain, stress, etc) are taken to be deterministic. This simplification, while sufficient for a
wide range of engineering applications, results in a crude approximation of actual system behaviour.

To obtain a more accurate representation of a physical system, it is essential to consider the randomness
in system parameters and loading conditions, along with the uncertainty in their estimation and their
spatial variability. The finite element method is undoubtedly the most widely used tool for solving deterministic
physical problems today and to account for randomness and uncertainty in the modeling of engineering systems,
the stochastic finite element method (SFEM) was introduced.

The stochastic finite element method (SFEM) extends the classical deterministic finite element approach
to a stochastic framework, offering various techniques for calculating response variability. Among these,
the Monte Carlo simulation (MCS) stands out as the most prominent method. Renowned for its versatility and
ease of implementation, MCS can be applied to virtually any type of problem in stochastic analysis.

Random variables vs stochastic processes
----------------------------------------
A distinction between random variables and stochastic processes (also called random fields) is attempted in this
section. Explaining these concepts is important since they are used for modelling the system randomness.
Random variables are easier to understand from elementary probability theory, the same cannot be said for stochastic
processes. Readers are advised to consult books on SFEM if the explanation here seems to brief.

Random variables
~~~~~~~~~~~~~~~~
Imagine a beam with a concentrated load :math:`P` applied at a specific point on the beam. The value of :math:`P`
is uncertain — it could vary due to manufacturing tolerances, loading conditions, or measurement errors. Mathematically,

Check failure on line 37 in doc/source/examples/extended_examples/sfem/stochastic_fem.rst

View workflow job for this annotation

GitHub Actions / Documentation style doc

[vale] reported by reviewdog 🐶 [Google.EmDash] Don't put a space before or after a dash. Raw Output: {"message": "[Google.EmDash] Don't put a space before or after a dash.", "location": {"path": "doc/source/examples/extended_examples/sfem/stochastic_fem.rst", "range": {"start": {"line": 37, "column": 13}}}, "severity": "ERROR"}
:math:`P` is a random variable:

.. math:: P : \Omega \longrightarrow \mathbb{R}

0 comments on commit 2cedfa8

Please sign in to comment.