PyMaterials Manager is a Python package for unifying material management across the Ansys portfolio.
PyMaterials Manager is currently a proof of concept, expect things to break. It currently provides the following features:
- It defines a Material Object that can have different material models
- The supported material models can be read from a running PyMAPDL instance
- The supported material models can written to a running PyMAPDL / pyFluent instance
- Some supported material models can be read from a MatML XML file
- Some supported material models can be written to a MatML XML file
The following material models are supported:
- pyMAPDL
- Simple constant material properties
- Piecewise linear material properties
- Polynomial material properties
- Anisotropic Elasticity
- pyFluent
- Simple constant material properties
- Ideal Gas properties
Install the ansys-materials-manager package with this code:
pip install ansys-materials-manager
Alternatively, clone and install this package with this code:
git clone https://github.com/ansys/pymaterials-manager cd pymaterials-manager pip install .
This project uses uv for dependency management and pytest for testing.
Install development dependencies and run the unit test suite with:
uv sync
uv run pytest ./testsTo run only the MAPDL integration tests (requires a running MAPDL instance):
uv run pytest ./tests -m mapdl_integration -o addopts="--cov=ansys.materials --cov-report=term --cov-report=xml:.cov/xml"The style checks take advantage of pre-commit. Developers are not forced but encouraged to install this tool by running this command:
python -m pip install pre-commit && pre-commit installEvery time you stage some changes and try to commit them,
pre-commit only allows them to be committed if all defined hooks succeed.
For comprehensive information on PyMaterials Manager, see the latest release documentation. On the PyMaterials Manager Issues page, you can create issues to submit questions, report bugs, and request new features. This is the best place to post questions and code.
To build source and wheel distributions:
uv build
uv run twine check dist/*