-
Notifications
You must be signed in to change notification settings - Fork 12
Rewrite PyDPF-Post doc to PyAnsys library style guidelines #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a6d3523
Rewriting PyDPF-Post doc to PyAnsys library style guidelines
PipKat 42e2c3c
Add Sphinx-Design extension for support of cards
PipKat 8b6059c
Add sphinx_design to conf.py file
PipKat ad673b8
Run pre-commit to fix code style issue
PipKat 6525246
Fix error in doc requirements file
PipKat f1b8c23
Adjust sphinx-design version in doc requirements file
PipKat 7986b7c
Remove bad formatting
PipKat a66cf97
Edits based on HTML artifact and updates to User guide section
PipKat e84d5b6
Minor edits based on HTML artifact reveiw
PipKat 4330b5e
Mostly edits to example files
PipKat c17d255
Fix icon and change figure to image directive
PipKat 13f1454
Edits to contribute and cleanup based on HTML artifact
PipKat 959ce4d
Update doc/source/getting_started/demo.rst
RobPasMue 273543a
Merge branch 'master' of https://github.com/ansys/pydpf-post into doc…
PipKat 819dce8
Set image alignment to center for now
PipKat 95881a8
Fix footnote confusion and add example link
PipKat bc0ba61
Format fixes to previous commit
PipKat ad5522f
Fix typo
PipKat e36adfa
Merge branch 'master' into doc/reditorial_review
PipKat e67a210
Merge branch 'master' of https://github.com/ansys/pydpf-post into doc…
PipKat d143b57
Add key differenences between Core and Post to README and doc landing…
PipKat fe93178
Apply suggestions from code review
PipKat d061763
Add additional Ansys solver result file support info
PipKat 02b874b
Merge branch 'master' into doc/reditorial_review
PipKat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| ========== | ||
| Brief demo | ||
| ========== | ||
|
|
||
| This brief demo shows how to load an Ansys Mechanical APDL (MAPDL) result file to extract | ||
| and postprocess results. The code to use depends on which Ansys version you have installed. | ||
| For comprehensive examples of how to use PyDPF-Post, see :ref:`gallery`. | ||
|
|
||
| 2023 R1 and later | ||
| ----------------- | ||
|
|
||
| If Ansys 2023 R1 or later is installed, a DPF server automatically starts | ||
| once you start using PyDPF-Post. Use this code to load an MAPDL result file | ||
| to extract and postprocess results: | ||
|
|
||
| .. code:: python | ||
|
|
||
| >>> from ansys.dpf import post | ||
| >>> from ansys.dpf.post import examples | ||
| >>> simulation = post.load_simulation(examples.download_crankshaft()) | ||
| >>> displacement = simulation.displacement() | ||
| >>> print(displacement) | ||
|
|
||
|
|
||
| .. rst-class:: sphx-glr-script-out | ||
|
|
||
| .. code-block:: none | ||
|
|
||
| results U | ||
| set_id 3 | ||
| node comp | ||
| 4872 X -3.41e-05 | ||
| Y 1.54e-03 | ||
| Z -2.64e-06 | ||
| 9005 X -5.56e-05 | ||
| Y 1.44e-03 | ||
| Z 5.31e-06 | ||
| ... | ||
|
|
||
| .. code:: python | ||
|
|
||
| >>> displacement.plot() | ||
|
|
||
|
|
||
| .. image:: ./../images/crankshaft_disp.png | ||
| :align: center | ||
| :width: 300pt | ||
|
|
||
|
|
||
| .. code:: python | ||
|
|
||
| >>> stress_eqv = simulation.stress_eqv_von_mises_nodal() | ||
| >>> stress_eqv.plot() | ||
|
|
||
| .. image:: ./../images/crankshaft_stress.png | ||
| :align: center | ||
| :figwidth: 300pt | ||
|
|
||
|
|
||
| 2021 R1 through 2022 R2 | ||
| ----------------------- | ||
|
|
||
| If an Ansys release of 2021 R1 through 2022 R2 is installed, use this code to | ||
| start the legacy PyDPF-Post tools and then load an MAPDL result file | ||
| to extract and postprocess results: | ||
|
|
||
| .. code:: python | ||
|
|
||
| >>> from ansys.dpf import post | ||
| >>> from ansys.dpf.post import examples | ||
| >>> solution = post.load_solution(examples.download_crankshaft()) | ||
| >>> stress = solution.stress() | ||
| >>> stress.eqv.plot_contour(show_edges=False) | ||
|
|
||
| .. image:: ./../images/crankshaft_stress.png | ||
| :align: center | ||
| :width: 300pt | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.