ansys / pydpf-composites

A Python wrapper for Ansys DPF for the post-processing of composite structures.

Home Page:https://composites.dpf.docs.pyansys.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyDPF Composites

PyAnsys 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:

  2. Install dependencies:

    PyDPF Composites uses Poetry to manage the development environment.

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

  4. Activate the virtual environment:

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

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

  3. Run tests with a Docker container from Github (Ansys Internal only):

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:

On Linux, build the documentation with:

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

Run style checks

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

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

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.

About

A Python wrapper for Ansys DPF for the post-processing of composite structures.

https://composites.dpf.docs.pyansys.com

License:MIT License


Languages

Language:Python 99.7%Language:Faust 0.3%