A python wrapper for ansys dpf composites
Project description
PyDPF Composites is a Python wrapper for Ansys DPF composites. It 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.
Clone the repository:
git clone https://github.com/ansys/pydpf-composites cd pydpf-composites
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.
Create a virtual environment and install the package with the development dependencies:
poetry install --all-extras
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.
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
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"
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansys_dpf_composites-0.3.0.tar.gz
.
File metadata
- Download URL: ansys_dpf_composites-0.3.0.tar.gz
- Upload date:
- Size: 62.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a818ce59abfb3ca841bb082b4d7c1cfc3ba370e3f883fd01cb61964f775938fa |
|
MD5 | c15cd8bc4648fd6084229b312fbdbe36 |
|
BLAKE2b-256 | d2611a5fcc247953de2ac6e87b4ba2ea75cd041d672a0b5ec133d1a3d10e41c7 |
File details
Details for the file ansys_dpf_composites-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: ansys_dpf_composites-0.3.0-py3-none-any.whl
- Upload date:
- Size: 89.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9581d2a628c8919ac3da5484a7aba4e4ddcdc6a7bbd2dec6feeac331faf2a80d |
|
MD5 | 6844c82c52248b5c92de32320dbae76c |
|
BLAKE2b-256 | 0607a59706422d555bbfcf24b85c02bb7aab9bda96e922dc41a8abde72eb9719 |