Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 42 additions & 28 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,24 @@ finally postprocess the results.
In the PyDYNA installation, the ``docker`` directory has two child
directories:

- ``pre``: Provides the interface for creating DYNA input decks.
This service includes highly abstracted APIs for setting up
LS-DYNA input decks. Included are DynaMech, DynaIGA, DynaICFD,
DynaSALE, DynaEM, and DynaAirbag.
- ``solver``: Contains the code for interfacing directly with
the Ansys LS-DYNA solver. Because LS-DYNA is primarily a batch
solver with very limited interactive capabilities, the code in
this directory is similarly limited. The target use case is that
LS-DYNA is running in a container environment such as Docker or
Kubernetes. The code in the ``solver`` directory allows you to push
input files to the container, start LS-DYNA and monitor its progress,
and then retrieve results (RST) files.`
- ``pre``: Contains the package with the ``ls-pre`` Docker image for the
``pre`` service. This service provides highly abstracted APIs for creating and
setting up DYNA input decks for DynaMech, DynaIGA, DynaICFD, DynaSALE, DynaEM,
and DynaAirbag.
- ``solver``: Contains the package with the ``dynasolver`` Docker image
for the ``solver`` service. This service provides highly abstracted
APIs for interacting directly with the Ansys LS-DYNA solver. Because LS-DYNA
is primarily a batch solver with very limited interactive capabilities, the
``solver`` service is similarly limited. The target use case is that LS-DYNA is
running in a container environment such as Docker or Kubernetes. Using this
service, you can push input files to the container, start LS-DYNA
and monitor its progress, and then retrieve Ansys solver results (RST)
files.

Once you have results, you can use the Ansys Data Processing Framework (DPF),
which is designed to provide numerical simulation users and engineers
with a toolbox for accessing and transforming simulation data. DPF
can access data from Ansys solver result files and from several
can access data from Ansys solver RST files and from several
files with neutral formats, including CSV, HDF5, and VTK. Using DPF's
various operators, you can manipulate and transform this data.

Expand All @@ -64,22 +65,31 @@ a simplified Python interface to DPF, thus enabling rapid postprocessing
without ever leaving a Python environment. For more information on DPF-Post,
see the `DPF-Post documentation <https://post.docs.pyansys.com>`_.

Documentation
=============
For comprehesive information on PyDYNA, see the latest release
`documentation <https://dyna.docs.pyansys.com/>`_.
Documentation and issues
========================
Documentation for the latest stable release of PyDyna is hosted at `PyDYNA documentation
<https://dyna.docs.pyansys.com/version/stable//>`_.

On the `PyDyna Issues <https://github.com.mcas.ms/pyansys/pyDyna/issues>`_ page, you can create
issues to submit questions, report bugs, and request new features. To reach
the PyAnsys support team, email `pyansys.support@ansys.com <pyansys.support@ansys.com>`_.
In the upper right corner of the documentation's title bar, there is an option for switching from
viewing the documentation for the latest stable release to viewing the documentation for the
development version or previously released versions.

On the `PyDYNA Issues <https://github.com/ansys/pydyna/issues>`_ page, you can create issues to
report bugs and request new features. On the `PyDYNA Discussions <https://github.com/ansys/pydyna/discussions>`_
page or the `Discussions <https://discuss.ansys.com/>`_ page on the Ansys Developer portal,
you can post questions, share ideas, and get community feedback.

To reach the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>`_.

Usage
=====
Here is a basic preprocessing example:

Get the input file from (``<repository-root-folder>/src/ansys/dyna/core/pre/examples/explicit/ball_plate/ball_plate.k``)
The next few sections show how to preprocess, solve, and postprocess a ball plate example.

The follow example can be obtained from (``<repository-root-folder>/examples/Explicit/ball_plate.py``)
Preprocess
----------
The following code preprocesses a ball plate example. In the repository, you can get the
input file from ``src/ansys/dyna/core/pre/examples/explicit/ball_plate/ball_plate.k`` and
the Python file from ``examples/Explicit/ball_plate.py``.

.. code:: python

Expand Down Expand Up @@ -162,9 +172,10 @@ The follow example can be obtained from (``<repository-root-folder>/examples/Exp
downloadfile = os.path.join(downloadpath,"ball_plate.k")
solution.download(serveroutfile,downloadfile)

Here is a basic solving example:

The follow example can be obtained from (``<repository-root-folder>/examples/solver/ball_plate_solver.py``)
Solve
-----
The following code solves this basic ball plate example. In the repository,
you can get the Python file from ``examples/solver/ball_plate_solver.py``.

.. code:: python

Expand All @@ -177,7 +188,10 @@ The follow example can be obtained from (``<repository-root-folder>/examples/sol
dyna.start(4) # start 4 ranks of mppdyna
dyna.run("i=ball_plate.k memory=10m ncycle=20000") # begin execution

Here is a basic postprocessing example:

Postprocess
-----------
The following code postprocesses results from the solve of this basic ball plate example:

.. code:: python

Expand Down
20 changes: 12 additions & 8 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Contribute
==========

Overall guidance on contributing to a PyAnsys repository appears in the
`PyAnsys Developer's Guide <https://dev.docs.pyansys.com/>`_. Ensure that you
are thoroughly familiar with this guide before attempting to contribute to PyDYNA.
Overall guidance on contributing to a PyAnsys library appears in the
`Contributing <dev_guide_contributing_>`_ topic
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
with this guide before attempting to contribute to PyDYNA.

The following contribution information is specific to PyDYNA.

Clone the repository
--------------------

To clone and install the latest PyDYNA release in development mode, run this code:
To clone and install the latest PyDYNA release in development mode, run these commands:

.. code::

Expand All @@ -24,13 +25,16 @@ Post issues
-----------

Use the `PyDYNA Issues <https://github.com/pyansys/pydyna/issues>`_
page to submit questions, report bugs, and request new features. When possible,
page to report bugs and request new features. When possible,
use these issue templates:

* Bug report template
* Feature request template
* Bug, problem, error: For filing a bug report
* Documentation issue: For requesting modifications to the documentation
* Adding an example: For proposing a new example
* New feature: For requesting enhancements to the code

If your issue does not fit into one of these template categories, create your own issue.
If your issue does not fit into one of these template categories, you can click
the link for opening a blank issue.

To reach the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>`_.

Expand Down
3 changes: 2 additions & 1 deletion doc/source/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ page on the Ansys website.
Installation
============
To use PyDYNA, you must install Docker images for the ``pre`` and ``solver``
services and the package.
services and the ``ansys.dyna.core`` package itself.


Install Docker image for the ``pre`` service
--------------------------------------------
Expand Down
30 changes: 17 additions & 13 deletions doc/source/user-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ User guide
In the PyDYNA installation, the ``docker`` directory has two child
directories:

- ``pre``: Provides the interface for creating DYNA input decks.
This service includes highly abstracted APIs for setting up
LSN-DYNA input decks. Included are DynaMech, DynaIGA, DynaICFD,
DynaSALE, DynaEM, and DynaAirbag.
- ``solver``: Contains the code for interfacing directly with
the Ansys LS-DYNA solver. Because LS-DYNA is primarily a batch
solver with very limited interactive capabilities, the code in
this directory is similarly limited. The target use case is that
LS-DYNA is running in a container environment such as Docker or
Kubernetes. The code in the ``solver`` directory allows you to push
input files to the container, start LS-DYNA and monitor its progress,
and then retrieve results (RST) files.
In the PyDYNA installation, the ``docker`` directory has two child
directories:

- ``pre``: Contains the package with the ``ls-pre`` Docker image for the
``pre`` service. This service provides highly abstracted APIs for creating and
setting up DYNA input decks for DynaMech, DynaIGA, DynaICFD, DynaSALE, DynaEM,
and DynaAirbag.
- ``solver``: Contains the package with the ``dynasolver`` Docker image
for the ``solver`` service. This service provides highly abstracted
APIs for interacting directly with the Ansys LS-DYNA solver. Because LS-DYNA
is primarily a batch solver with very limited interactive capabilities, the
``solver`` service is similarly limited. The target use case is that LS-DYNA is
running in a container environment such as Docker or Kubernetes. Using this
service, you can push input files to the container, start LS-DYNA
and monitor its progress, and then retrieve Ansys solver results (RST)
files.

Once you have results, you can use the Ansys Data Processing Framework (DPF),
which is designed to provide numerical simulation users and engineers
with a toolbox for accessing and transforming simulation data. DPF
can access data from Ansys solver result files and from several
can access data from Ansys solver RST files and from several
files with neutral formats, including CSV, HDF5, and VTK. Using DPF's
various operators, you can manipulate and transform this data.

Expand Down
45 changes: 27 additions & 18 deletions docker/pre/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ Prerequisites

The ``docker`` file in the ``docker/pre`` directory is used to build the
Linux-based Docker image.


* Ensure that Docker is installed on your machine. If you do not have Docker installed,
see the `Docker website <https://www.docker.com>`_ for more information.
* Ensure that Docker is installed on your machine. If you do not have Docker Desktop installed,
see `Overview of Docker Desktop <https://docs.docker.com/desktop/>`_ for installation links.

* If you are building the image on Windows, ensure that the Windows Subsystem for Linux (WSL)
is installed. For installation information, see Microsoft's
Expand All @@ -28,20 +27,29 @@ Prerequisites
* Download the latest Linux release artifacts for the Linux Docker container:
`linux-binaries.zip <https://github.com/ansys/pydyna/releases/download/v0.3.4/linux-binaries.zip>`_.

* Move this ZIP file to the current location (``<repository-root-folder>/docker/pre``).
* Move this ZIP file to the ``docker/pre`` directory and unzip it.


Once all prerequisites are met, you can start the Docker container for the ``pre`` service.

Starting the docker container
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Start the Docker container for the ``pre`` service
--------------------------------------------------

There are two ways to start docker container.
There are two methods for starting a Docker container for the ``pre`` service:

1.build image and run container
- Method 1: Build the Docker image and run the image as a container
- Method 2: Start the container from a ``docker-compose.yml`` file


Method 1: Build the Docker image and run the image as a container
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To use this first method, you first build the Docker image of the ``pre`` service
and then run the image as a container.

Build the Docker image
::::::::::::::::::::::

Once all prerequisites are met, perform these steps to build the Docker image:
To build the Docker image, perform these steps:

#. In your terminal, go to the ``docker`` directory.
#. Run the following Docker command, replacing ``<DOCKERFILE_NAME>``
Expand Down Expand Up @@ -70,7 +78,8 @@ Once all prerequisites are met, perform these steps to build the Docker image:
Run the image as a container
::::::::::::::::::::::::::::

Perform these steps to run the image as a container:
Once the Docker image of the ``pre`` service is built successfully, perform these steps to
run this image as a container:

#. Run this Docker command:

Expand All @@ -92,16 +101,16 @@ Perform these steps to run the image as a container:
>>> c77ffd67f9fa ghcr.io/ansys/ls-pre "python3 ./linux-bin…" 7 seconds ago Up 7 seconds 0.0.0.0:50051->50051/tcp, :::50051->50051/tcp hardcore_margulis


2.Start the container from docker-compose.yml file

Method 2: Start the container from a ``docker-compose.yml`` file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To use this second method, you start the container for the ``pre`` service from a
``docker-compose.yml`` file.

Make sure the docker compose have been installed on your computer.
For more information: https://docs.docker.com/compose/install/
Ensure that Docker compose is installed on your machine. If you do not have Docker compose installed,
see the `Docker website <https://docs.docker.com/compose/install/>`_ for more information.
#. Ensure that Docker Compose has been installed on your computer. If Docker Compose is not
installed, see `Overview of installing Docker Compose <https://docs.docker.com/compose/install/>`_
in the Docker documentation.

* Locate yourself at ``<repository-root-folder>/docker/pre`` in your terminal.
* Run this Docker command:
#. In your terminal, go to the ``docker/pre`` directory and run this Docker command:

.. code:: bash

Expand Down
24 changes: 13 additions & 11 deletions docker/solver/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Build the Docker image for the ``solver`` service
=================================================

You must build the Docker image for the PyDNA ``solver`` service and then
You must build the Docker image for the PyDYNA ``solver`` service and then
run the image as a container.

Prerequisites
Expand All @@ -17,8 +17,8 @@ Prerequisites
The ``docker`` file in the the ``docker/solver`` directory is used to build the
Linux-based Docker image.

* Ensure that Docker is installed on your machine. If you do not have Docker installed,
see the `Docker website <https://www.docker.com>`_ for more information.
* Ensure that Docker is installed on your machine. If you do not have Docker Desktop installed,
see `Overview of Docker Desktop <https://docs.docker.com/desktop/>`_ for installation links.

* If you are building the image on Windows, ensure that the Windows Subsystem for Linux (WSL)
is installed. For installation information, see Microsoft's
Expand All @@ -27,20 +27,23 @@ Prerequisites
* Download the latest Linux release artifacts for the Linux Docker container:
`mppdyna_docker_centos7.zip <https://github.com/ansys/pydyna/releases/download/v0.3.4/mppdyna_docker_centos7.zip>`_.

* Move this ZIP file to the current location (``<repository-root-folder>/docker/solver``) and unzip the mppdyna_docker_centos7.zip file.
* Move this ZIP file to the ``docker/solver`` directory and unzip it.

The files in this folder should look similar to this:
The files in this folder should look similar to this:

.. code:: bash
.. code:: bash

>>> Dockerfile README.rst do_build docker-compose.yml docker_dir mpi mppdyna_docker_centos7.zip

>>> Dockerfile README.rst do_build docker-compose.yml docker_dir mpi mppdyna_docker_centos7.zip
Once all prerequisites are met, you can build the Docker image for the ``solver`` service.

Build the Docker image
----------------------

Once all prerequisites are met, perform these steps to build the Docker image:
To build the Docker image for the ``solver`` service, perform these steps:

#. In your terminal, go to the ``pydyna/docker/solver`` directory.

#. Run this Docker command:

.. code:: bash
Expand All @@ -66,11 +69,10 @@ Once all prerequisites are met, perform these steps to build the Docker image:
Run the image as a container
----------------------------

Perform these steps to run the image as a container:
Perform these steps to run the image for the ``solver`` service as a container:

#. In the ``docker-compose.yml`` file, replace ``<license_server_name>`` with the correct
license server hosting the DYNA license.
If you are using Ansy Flexlm license
license server hosting the DYNA license if you are using an Ansy FLEXlm license.

#. Run this Docker command:

Expand Down
Loading