Skip to content

Commit ee88e67

Browse files
committed
Push changes and create a draft PR to see what issues arise
1 parent 87aa258 commit ee88e67

File tree

5 files changed

+204
-175
lines changed

5 files changed

+204
-175
lines changed

README.rst

Lines changed: 96 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,61 @@
1-
PyDyna
1+
PyDYNA
22
######
33

4-
PyDyna is a pythonic dyna package that aims to provide user a more convenient and complete way to
5-
build up ansys-dyna input deck, submit to solver and finally post processing their results.
6-
7-
8-
Project Overview
9-
----------------
10-
There are 3 related packages here, pre and solver are all under the ansys/pydyna/ directory,
11-
while pyDPF is used for post-processing.
12-
13-
**pre** contains highly abstracted APIs for setting up a LS-DYNA input deck, so far,
14-
it includes DynaMech, DynaIGA, DynaICFD, DynaSALE, DynaEM, DynaAirbag and so on.
15-
16-
**solver** contains code for interfacing with the LS-DYNA solver directly.
17-
As LS-DYNA is primarily a batch solver with very limited interactive
18-
capabilities, the code here is similarly limited. The target
19-
use case is that LS-DYNA will be running in a container environment
20-
such as Docker or Kubernetes. The code here then allows for pushing
21-
input files to the container, starting LS-DYNA and monitoring its
22-
progress, and retrieving results files.
23-
24-
The **Data Processing Framework (DPF)** is designed to provide numerical
25-
simulation users/engineers with a toolbox for accessing and
26-
transforming simulation data. DPF can access data from solver result
27-
files as well as several neutral formats (csv, hdf5, vtk,
28-
etc.). Various operators are available allowing the manipulation and
29-
the transformation of this data.
30-
31-
The Python `ansys-dpf-post` package provides a simplified Python
32-
interface to DPF, thus enabling rapid postprocessing without ever
33-
leaving a Python environment.
34-
35-
Visit the `DPF-Post Documentation <https://postdocs.pyansys.com>`_ for a
36-
detailed description of the package.
37-
38-
Install PyDyna-Pre Docker
39-
-------------------------
40-
41-
Launching the PyDyna-Pre service locally, the only requirement is that:
42-
43-
* Docker is installed on your machine.
4+
PyDYNA is a Pythonic package for providing a more convenient and complete way to
5+
build an Ansys DYNA input deck, submit it to the Ansys LS-Dyna solver, and
6+
finally postprocess the results.
7+
8+
Overview
9+
--------
10+
In the PyDYNA installation, the ``docker`` directory has two child
11+
directories:
12+
13+
- ``pre``: Provides the interface for creating DYNA input decks.
14+
This service includes highly abstracted APIs for setting up
15+
LSN-DYNA input decks. Included are DynaMech, DynaIGA, DynaICFD,
16+
DynaSALE, DynaEM, and DynaAirbag.
17+
- ``solver``: Contains the code for interfacing directly with
18+
the Ansys LS-DYNA solver. Because LS-DYNA is primarily a batch
19+
solver with very limited interactive capabilities, the code in
20+
this directory is similarly limited. The target use case is that
21+
LS-DYNA is running in a container environment such as Docker or
22+
Kubernetes. The code in the ``solver`` directory allows you to push
23+
input files to the container, start LS-DYNA and monitor its progress,
24+
and then retrieve results (RST) files.
25+
26+
Once you have results, you can use the Data Processing Framework (DPF),
27+
which is designed to provide numerical simulation users and engineers
28+
with a toolbox for accessing and transforming simulation data. DPF
29+
can access data from Ansys solver result files and from several
30+
files with neutral formats, including CSV, HDF5, and VTK. Using DPF's
31+
various operators, you can manipulate and transform this data.
32+
33+
The `ansys-dpf-post package <https://github.com/ansys/pydpf-post>`_ provides
34+
a simplified Python interface to DPF, thus enabling rapid postprocessing
35+
without ever leaving a Python environment. For more information on DPF-Post,
36+
see the `DPF-Post documentation <https://post.docs.pyansys.com>`_.
37+
38+
Install Docker image for the ``pre`` service
39+
--------------------------------------------
40+
To launch the ``pre`` service locally, you must have Docker installed
41+
on your machine.
4442

4543
.. caution::
4644

47-
The PyDyna-Pre service is currently available only as a Linux Docker image.
48-
make sure that your Docker engine is configured to run Linux Docker images.
45+
The ``pre`` service is available only as a Linux Docker image.
46+
Make sure that your Docker engine is configured to run Linux Docker images.
4947

50-
Please refer to ``docker/README.rst`` to install PyDyna-Pre service docker container
48+
For information on installing the Docker container for the ``pre`` service,
49+
see the ``README.rst`` file in the repository's ``docker/pre`` directory.
5150

52-
Install PyDyna-Solver Docker
53-
----------------------------
51+
Install Docker image for the ``solver`` service
52+
-----------------------------------------------
53+
Once you install the ``ansys.dyna.core`` package, you can find the
54+
``docker-compose.yml`` file in the repository's ``docker`` directory.
55+
This file is used to build and launch the ``solver`` service.
5456

55-
Once pydyna is installed, the docker-compose.yml file to build and launch the dyna solver docker can be located
56-
under ``docker``. The yml file can be copied locally. To run the docker the following command can be used
57+
You can copy this YML file locally and run the Docker image for the
58+
``solver`` service with this command:
5759

5860
.. code:: bash
5961
@@ -62,35 +64,41 @@ under ``docker``. The yml file can be copied locally. To run the docker the foll
6264
6365
Install the package
6466
-------------------
67+
The ``ansys.dyna.core`` package supports Python 3.8 through
68+
Python 3.11 on Windows, Linux, and MacOS.
6569

66-
PyDyna has three installation modes: user, developer, and offline.
70+
You should consider installing PyDYNA in a virtual environment.
71+
For more information, see Python's
72+
`venv -- Creation of virtual environments <https://docs.python.org/3/library/venv.html>`_.
73+
74+
PyDYNA has three installation modes: user, developer, and offline.
6775

6876
Install in user mode
6977
^^^^^^^^^^^^^^^^^^^^
7078

71-
Before installing PyDyna in user mode, make sure you have the latest version of
72-
`pip`_ with:
79+
Before installing PyDYNA in user mode, make sure you have the latest version of
80+
`pip`_ with this command:
7381

7482
.. code:: bash
7583
7684
python -m pip install -U pip
7785
78-
Then, install PyDyna with:
86+
Then, install PyDYNA with this command:
7987

8088
.. code:: bash
8189
8290
python -m pip install ansys-dyna-core
8391
8492
.. caution::
8593

86-
PyDyna is currently hosted in a private PyPI repository. You must provide the index
87-
URL to the private PyPI repository:
88-
89-
* Index URL: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``
94+
PyDYNA is currently hosted in a private PyPI repository. You must provide the index
95+
URL to the private PyPI repository: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``.
9096

91-
If access to this package registry is needed, email `[email protected] <mailto:[email protected]>`_
92-
to request access. The PyAnsys team can provide you a read-only token to be inserted in ``${PRIVATE_PYPI_ACCESS_TOKEN}``.
93-
Once you have it, run the following command:
97+
If access to this package registry is needed, email `[email protected] <mailto:[email protected]>`_
98+
to request access. The PyAnsys team can provide you with a read-only token.
99+
100+
Once you have the token, run this command, replacing ``${PRIVATE_PYPI_ACCESS_TOKEN}`` with the
101+
read-only token:
94102

95103
.. code:: bash
96104
@@ -99,14 +107,14 @@ Then, install PyDyna with:
99107
Install in developer mode
100108
^^^^^^^^^^^^^^^^^^^^^^^^^
101109

102-
Installing PyDyna in developer mode allows you to modify the source and enhance it.
110+
Installing PyDYNA in developer mode allows you to modify the source and enhance it.
103111

104112
.. note::
105113

106114
Before contributing to the project, ensure that you are thoroughly familiar
107115
with the `PyAnsys Developer's Guide`_.
108116

109-
Start by cloning the repository
117+
Start by cloning and installing the repository with these commands:
110118

111119
.. code::
112120
@@ -116,31 +124,29 @@ Start by cloning the repository
116124
117125
Install in offline mode
118126
^^^^^^^^^^^^^^^^^^^^^^^
127+
If you lack an internet connection on your installation machine (or you do not have access
128+
to the private Ansys PyPI packages repository), you should install PyDYNA by downloading
129+
the wheelhouse archive for your corresponding machine architecture from the
130+
`Releases Page <https://github.com/pyansys/pydyna/releases>`_ .
119131

120-
If you lack an internet connection on your installation machine (or you do not have access to the
121-
private Ansys PyPI packages repository), you should install PyDyna by downloading the wheelhouse
122-
archive from the `Releases Page <https://github.com/pyansys/pydyna/releases>`_ for your
123-
corresponding machine architecture.
132+
Each wheelhouse archive contains all the Python wheels necessary to install
133+
PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install
134+
PyDYNA on an isolated system with a fresh Python installation or on a virtual environment.
124135

125-
Each wheelhouse archive contains all the Python wheels necessary to install PyDyna from scratch on Windows
126-
and Linux, from Python 3.7 to 3.10. You can install this on an isolated system with a fresh Python
127-
installation or on a virtual environment.
128-
129-
For example, on Linux with Python 3.8, unzip the wheelhouse archive and install it with:
136+
For example, on Linux with Python 3.8, unzip the wheelhouse archive and install PyDYNA
137+
with these commands:
130138

131139
.. code:: bash
132140
133141
unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.8.zip -d wheelhouse
134142
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
135143
136-
If you are on Windows with Python 3.8, unzip the corresponding wheelhouse to a wheelhouse directory
137-
and install using the preceding command.
138-
139-
Consider installing using a `virtual environment <https://docs.python.org/3/library/venv.html>`_.
144+
If you're on Windows with Python 3.8, unzip thw wheelhouse archive to a ``wheelhouse``
145+
directory and install PyDYNA using the preceding command.
140146

141147
Documentation
142148
-------------
143-
For comprehesive information on PyDyna, see the latest release
149+
For comprehesive information on PyDYNA, see the latest release
144150
`documentation <https://dyna.docs.pyansys.com/>`_.
145151

146152
On the `PyDyna Issues <https://github.com.mcas.ms/pyansys/pyDyna/issues>`_ page, you can create
@@ -149,7 +155,7 @@ the PyAnsys support team, email `[email protected] <pyansys.support@ansy
149155

150156
Usage
151157
-----
152-
Here is a basic pre-processing example:
158+
Here is a basic preprocessing example:
153159

154160
.. code:: python
155161
@@ -232,8 +238,6 @@ Here is a basic pre-processing example:
232238
downloadfile = os.path.join(downloadpath,"cylinder_flow.k")
233239
icfd_solution.download(serveroutfile,downloadfile)
234240
235-
For more examples, visit https://dyna.docs.pyansys.com/version/stable/examples/index.html
236-
237241
Here is a basic solving example:
238242

239243
.. code:: python
@@ -244,9 +248,7 @@ Here is a basic solving example:
244248
>>> dyna.start(4) # start 4 ranks of mppdyna
245249
>>> dyna.run("i=input.k memory=10m ncycle=20000") # begin execution
246250
247-
Here is a basic post-processing example:
248-
249-
lsdyna::d3plot::stress_von_mises
251+
Here is a basic postprocessing example:
250252

251253
.. code:: python
252254
@@ -261,10 +263,21 @@ lsdyna::d3plot::stress_von_mises
261263
resultOp.inputs.time_scoping.connect([3])
262264
result = resultOp.outputs.stress_von_mises()
263265
266+
For more examples, see `Examples <https://dyna.docs.pyansys.com/version/stable/examples/index.html>`_
267+
in the PyDYNA documentation.
268+
264269
License
265270
-------
266-
Distributed under the MIT license. See LICENSE in the root directory
267-
of the repository for details.
271+
PyDYNA is licensed under the MIT license.
272+
273+
PyDYNA makes no commercial claim over Ansys whatsoever. This libray extends the functionality of
274+
Ansys LS-DYNA by adding a Python interface to LS-DYNA without changing the core behavior or
275+
license of the original software. The use of the interactive control of PyDYNA requires a legally
276+
licensed local copy of LS-DYNA.
277+
278+
For more information on LS-DYNA, see the
279+
`Ansys LS-DYNA <https://www.ansys.com/products/structures/ansys-ls-dyna>`_
280+
page on the Ansys website.
268281

269282
.. LINKS AND REFERENCES
270283
.. _pip: https://pypi.org/project/pip/

doc/source/getting-started/index.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Getting started
33
To run PyDYNA, you must have an installation of Ansys LS-DYNA.
44
PyDYNA supports LS-DYNA 2023 R2 and later.
55

6-
For more information on getting a licensed copy of LS-DYNA, visit
7-
the `LS-DYNA <https://www.ansys.com/products/structures/ansys-ls-dyna>`_
6+
For information on getting a licensed copy of LS-DYNA, see
7+
the `Ansys LS-DYNA <https://www.ansys.com/products/structures/ansys-ls-dyna>`_
88
page on the Ansys website.
99

1010
Installation
@@ -41,16 +41,16 @@ commands:
4141
cd pydyna
4242
pip install -e .
4343
44-
The preceding commands install the package and allow you to modify it locally,
45-
with your changes reflected in your Python setup after restarting the
46-
Python kernel.
44+
The preceding commands clone and install the package, allowing you to modify it
45+
locally. After restarting the Python kernel, your changes are reflected in your
46+
Python setup.
4747

4848
Offline installation
4949
~~~~~~~~~~~~~~~~~~~~
50-
If you lack an internet connection on your installation machine, the
51-
recommended way of installing PyDYNA is to download the wheelhouse archive
52-
for your corresponding machine architecture from the GitHub repository's
53-
`Releases <pydyna_releases_>`_ page.
50+
If you lack an internet connection on your installation machine (or you do not have access
51+
to the private Ansys PyPI packages repository), you should install PyDYNA by downloading
52+
the wheelhouse archive for your corresponding machine architecture from the
53+
`Releases Page <https://github.com/pyansys/pydyna/releases>`_ .
5454

5555
Each wheelhouse archive contains all the Python wheels necessary to install
5656
PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install
@@ -67,8 +67,6 @@ with these commands:
6767
If you're on Windows with Python 3.8, unzip thw wheelhouse archive to a ``wheelhouse``
6868
directory and install PyDYNA using the preceding command.
6969

70-
Consider installing using a `virtual environment <using_venv_>`_.
71-
7270
.. include:: ../../../docker/pre/README.rst
7371
.. include:: ../../../docker/solver/README.rst
7472

doc/source/user-guide/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ In the PyDYNA installation, the ``docker`` directory has two child
55
directories:
66

77
- ``pre``: Provides the interface for creating DYNA input decks.
8+
This service includes highly abstracted APIs for setting up
9+
LSN-DYNA input decks. Included are DynaMech, DynaIGA, DynaICFD,
10+
DynaSALE, DynaEM, and DynaAirbag.
811
- ``solver``: Contains the code for interfacing directly with
912
the Ansys LS-DYNA solver. Because LS-DYNA is primarily a batch
10-
solver with very limited interactive capabilities, the code here in
13+
solver with very limited interactive capabilities, the code in
1114
this directory is similarly limited. The target use case is that
1215
LS-DYNA is running in a container environment such as Docker or
1316
Kubernetes. The code in the ``solver`` directory allows you to push

0 commit comments

Comments
 (0)