felupe-contact
Contact Extension-package for FElupe.
felupe-contact is an extension package for FElupe with contact formulations between the surfaces of (hyperelastic) solid bodies, which undergo large deformations and large relative displacements.
✨ Highlights
- ✅ a contact between the surfaces of solid bodies (surface-to-surface, penalty-based) with optional Coulomb friction
- ✅ a frictionless Nitsche contact between solid bodies, whose penetration doesn't grow with the contact pressure, also for bodies of very different stiffness (rubber-to-metal)
- ✅ three-dimensional, plane strain and axisymmetric problems
- ✅ all boundary regions of FElupe, i.e. faces with linear or quadratic shape functions
- ✅ an item of FElupe, i.e. it is used in a
Stepand in aJoblike aSolidBody - ✅ created directly on solid bodies with all faces on the outline of their meshes, i.e. no boundary regions are required
- ✅ an efficient and robust contact search for contact surfaces with all faces, e.g. of many bodies
📦 Installation
Install Python, open a terminal and run
pip install felupe-contact
The optional dependencies of FElupe, e.g. PyVista for the plots, are installed by pip install felupe-contact[all]. The development version is installed by pip install git+https://github.com/adtzlr/felupe-contact.git@main.
The documentation covers more details, like the required and optional dependencies.
🚀 Getting Started
This minimal code-block demonstrates a rubber block, which is pressed on a (stiffer) block. Both blocks are meshed individually and are combined to a single mesh.
import felupe as fem
from felupe_contact import SolidBodyContact
bottom = fem.Cube(a=(0, 0, 0), b=(1, 1, 1), n=(4, 4, 3))
top = fem.Cube(a=(0.15, 0.15, 1.02), b=(0.85, 0.85, 1.62), n=(3, 3, 3))
mesh = fem.MeshContainer([bottom, top], merge=True).stack()
region = fem.RegionHexahedron(mesh)
field = fem.FieldContainer([fem.Field(region, dim=3)])
solid = fem.SolidBody(umat=fem.NeoHooke(mu=1.0, bulk=50.0), field=field)
# the contact surfaces are created on the outline of the mesh of the solid body
contact = SolidBodyContact(solid)
boundaries = {
"fixed": fem.Boundary(field[0], fz=0.0),
"clamped": fem.Boundary(field[0], fz=mesh.z.max(), skip=(0, 0, 1)),
"move": fem.Boundary(field[0], fz=mesh.z.max(), skip=(1, 1, 0)),
}
step = fem.Step(
items=[solid, contact],
ramp={boundaries["move"]: fem.math.linsteps([0, -0.3], num=3)},
boundaries=boundaries,
)
job = fem.Job(steps=[step]).evaluate()
solid.plot("Principal Values of Cauchy Stress").show()
📖 Documentation
The documentation is located here. It contains a Getting Started guide, which adds a contact to a FElupe-script step by step, How-To guides, a gallery of examples and the API reference.
🛠️ Testing
To run the unit tests, check out this repository and type
tox
The tests are run with the latest release of FElupe. The development version of FElupe (its main branch) is tested by
tox -e main
📄 Changelog
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
🔓 License
felupe-contact - Contact Extension-package for FElupe (C) 2026 Andreas Dutzler, Graz (Austria).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Metadata
Release files for felupe-contact 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| felupe_contact-0.1.1.tar.gz | 95.9 kB | With provenance | Details for felupe_contact-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| felupe_contact-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for felupe_contact-0.1.1-py3-none-any.whl |
Total release size: 162.8 kB
Release files / felupe_contact-0.1.1.tar.gz
| Download URL | felupe_contact-0.1.1.tar.gz |
|---|---|
| Size | 95.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd8e899f7568b106265756c79599bb32c887f6ab61ad8eb0793c48b8d31e80ff
|
|
BLAKE2b-256 checksum How to use checksums |
bcb2778cc43742b9857fbc98c61aefdf4f14cc3ae5ea2ffdcaba1e33425d484a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / felupe_contact-0.1.1-py3-none-any.whl
| Download URL | felupe_contact-0.1.1-py3-none-any.whl |
|---|---|
| Size | 66.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bbab45180dc65038a8e2b31cfd93d954197d3e9f00c1a3c62178b008b09504d
|
|
BLAKE2b-256 checksum How to use checksums |
9707baf75288d1eeff2c6cea4d7604c63ceda8dccbf541fcc6eff14480ce3793
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for felupe-contact 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for felupe_contact-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.