Skip to main content

Post-processing of composite structures based on Ansys DPF

Project description

PyAnsys Python PyPI GH-CI Codecov MIT Black

PyDPF Composites enables the post-processing of composite structures based on Ansys DPF and the DPF Composites plugin. So it is a Python wrapper which implements classes on top of DPF Composites operators and data accessors for short fiber and layered composites (layered shell and solid elements). This module can be used to postprocess fiber reinforced plastics and layered composites, and to implement custom failure criteria and computation. For information demonstrating the behavior and usage of PyDPF Composites, see Examples in the DPF Composite documentation.

Contribute

Install in development mode

Installing PyDPF Composites in development mode allows you to modify the source and enhance it.

Before attempting to contribute to PyDPF Composites, ensure that you are thoroughly familiar with the PyAnsys Developer’s Guide.

  1. Clone the repository:

    git clone https://github.com/ansys/pydpf-composites
    cd pydpf-composites
  2. Install dependencies:

    python -m pip install pipx
    pipx ensurepath
    # Minimum required poetry version is 1.2.0
    pipx install poetry
    pipx install pip
    pipx install tox

    PyDPF Composites uses Poetry to manage the development environment.

  3. Create a virtual environment and install the package with the development dependencies:

    poetry install --all-extras
  4. Activate the virtual environment:

    poetry shell

Test

There are different ways to run the PyDPF Composites tests, depending on how the DPF server is started.

  1. Run tests with a Docker container:

    Follow the steps in Getting the DPF server Docker image to get and run the DPF docker image. Run the tests with the following command

    pytest . --port 50052
  2. Run tests with a DPF server started from the Ansys installer. The Ansys version must be 2023 R2 or later.

    pytest . --ansys-path "C:\Program Files\Ansys Inc\v232"
  3. Run tests with a Docker container from Github (Ansys Internal only):

    docker pull ghcr.io/ansys/pydpf-composites:latest
    pytest .

Build documentation

Follow the description in Getting the DPF server Docker image image to get and run the dpf docker image.

On Windows, build the documentation with:

tox -e doc-windows

On Linux, build the documentation with:

tox -e doc-linux

Ansys internal only: Build the docs with the latest container from Github:

docker pull ghcr.io/ansys/pydpf-composites:latest
docker run -d -p 50052:50052 -e ANSYSLMD_LICENSE_FILE=1055@mylicserver -e ANSYS_DPF_ACCEPT_LA=Y ghcr.io/ansys/pydpf-composites:latest
tox -e doc-windows

Run style checks

The style checks use pre-commit and can be run through tox:

tox -e style

The style checks can also be configured to run automatically before each git commit:

pre-commit install

View documentation

Documentation for the latest stable release of PyDPF Composites is hosted at PyDPF Composites Documentation.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_dpf_composites-0.6.1.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

ansys_dpf_composites-0.6.1-py3-none-any.whl (131.9 kB view details)

Uploaded Python 3

File details

Details for the file ansys_dpf_composites-0.6.1.tar.gz.

File metadata

  • Download URL: ansys_dpf_composites-0.6.1.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for ansys_dpf_composites-0.6.1.tar.gz
Algorithm Hash digest
SHA256 a3feb7813ea7a2fd92c1a1bd1425b57de8d248e18f98b33d2abe883d1f95bbbe
MD5 4d22e1c4a5bc6b3e33c6f90e28a5eb82
BLAKE2b-256 45636ebecbcece8aa007c51b0a1c0a011a707432e7853259b6e4a9441e8a51a4

See more details on using hashes here.

File details

Details for the file ansys_dpf_composites-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_dpf_composites-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d78dd9e1974c1b241c57a98c9a25ec138cf8ad5e997c803ab464ce38e118b64
MD5 2cf8e30cbacda9a49f7edd2eee3817eb
BLAKE2b-256 1142c196de3fc168ab0bf40759bdd68722ce627e21e90607eb51fec7ea6d7512

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page