Skip to content

Commit 54639d2

Browse files
rs-bh-ngerma89
andauthored
Adding a webApp example using Dash (#1497)
* Adding a webApp example using Dash * Fixing style. * Reformatting example to just add the zip. * Fix doc build issues. * Resetting cache Co-authored-by: German <[email protected]>
1 parent bc997e7 commit 54639d2

File tree

6 files changed

+49
-6
lines changed

6 files changed

+49
-6
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ env:
2626
# You should go up in number, if you go down (or repeat a previous value)
2727
# you might end up reusing a previous cache if it haven't been deleted already.
2828
# It applies 7 days retention policy by default.
29-
RESET_PIP_CACHE: 2
30-
RESET_EXAMPLES_CACHE: 2
31-
RESET_DOC_BUILD_CACHE: 2
32-
RESET_AUTOSUMMARY_CACHE: 2
29+
RESET_PIP_CACHE: 3
30+
RESET_EXAMPLES_CACHE: 3
31+
RESET_DOC_BUILD_CACHE: 3
32+
RESET_AUTOSUMMARY_CACHE: 3
3333

3434
concurrency:
3535
group: ${{ github.workflow }}-${{ github.ref }}
Binary file not shown.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. _dash_example:
2+
3+
Use Dash to build a PyMAPDL web app
4+
===================================
5+
6+
This example shows how to use Dash to build a web app for a simple FEA problem.
7+
8+
Dash is a low-code framework for building data apps which are rendered in a web browser.
9+
For Dash documentation, refer to: https://dash.plotly.com/
10+
11+
12+
Required modules
13+
----------------
14+
15+
For this example, install modules as needed:
16+
17+
* ``dash``
18+
* ``dash_bootstrap_components``
19+
* ``plotly.express``
20+
* ``webbrowser``
21+
* ``pandas``
22+
23+
Structure
24+
---------
25+
26+
* Description page. Read the problem statement
27+
* Simulation Page.
28+
Allow to change the input values, solve the problem and plot the results.
29+
* Data Page :
30+
Allow to plot data in a table and graph
31+
32+
33+
Usage
34+
-----
35+
36+
Download the zip file from the link below and unzip it to a folder.
37+
Run the Python file ``BimetallicStrip.py`` which launches the app in your default browser.
38+
39+
:download:`ANSYS Licensing Guide <dash-vm35.zip>`

doc/source/examples/extended_examples/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ with other programs, libraries, and features in development.
1818
+----------------------------+---------------------------------------------------------------------------------------------------------+
1919
| :ref:`krylov_example` | Demonstrates the usage of the Krylov method for solving a customized harmonic analysis. |
2020
+----------------------------+---------------------------------------------------------------------------------------------------------+
21+
| :ref:`dash_example` | Demonstrates the use of PyMAPDL with Dash. |
22+
+----------------------------+---------------------------------------------------------------------------------------------------------+
23+
2124

2225
.. _Cart-Pole Simulation: https://pyansys.github.io/ml-rl-cartpole/ml-rl-notebook.html

doc/source/examples/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The documentation to the exposed examples can be found in the
4646
extended_examples/ex_01-gmsh_example/ex_01-gmsh_example
4747
extended_examples/Python_UPF/python_upf_examples
4848
extended_examples/Krylov/krylov_example
49+
extended_examples/dash/dash_example
4950

5051
.. include:: extended_examples/index.rst
5152
:start-line: 2

doc/source/learning/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Resources
1414
These are versions valid during a year and with limited capabilities
1515
regarding number of nodes, elements, etc.
1616

17-
- View and download `PyMAPDL cheatsheet <pymapdl_cheatsheet_>`_.
17+
- View and download `PyMAPDL cheatsheet <pymapdl_cheatsheet_>`.
1818

1919

2020
Courses
21-
=======
21+
===============
2222

2323
Ansys has prepared high quality courses to guide you through the learning process.
2424

0 commit comments

Comments
 (0)