Skip to main content

felupe-contact

Contact Extension-package for FElupe.

FElupe PyPI version shields.io PyPI - Python Version Documentation Status License: GPL v3 Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. codecov Ruff

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 Step and in a Job like a SolidBody
  • ✅ 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for felupe-contact 0.1.0
File Size Uploaded Provenance Actions
felupe_contact-0.1.0.tar.gz 94.8 kB With provenance Details for felupe_contact-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for felupe-contact 0.1.0
File Interpreter ABI Platform Actions
felupe_contact-0.1.0-py3-none-any.whl Python 3 none any Details for felupe_contact-0.1.0-py3-none-any.whl

Total release size: 161.6 kB

Release files / felupe_contact-0.1.0.tar.gz

Download URL felupe_contact-0.1.0.tar.gz
Size 94.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aad84c866b40fc7654744a24312c30b818b86bf3bc2e7ed50923cea9b12636cb
BLAKE2b-256 checksum
How to use checksums
809a9076fee4cdc6584219e1d71b20201c7244d342e4302942d6b167e56c6b02
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 26, 2026.

Transparency log

Release files / felupe_contact-0.1.0-py3-none-any.whl

Download URL felupe_contact-0.1.0-py3-none-any.whl
Size 66.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f85c1edb1bbd09b277e651361a6b57bfb2f86aab6c88d3715b1d73c82092501a
BLAKE2b-256 checksum
How to use checksums
c44e21ed994a78d7a932bdeb0dc17fb8e5530712eea052dd6259ea0b96fc848d
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 26, 2026.

Transparency log

Security for felupe-contact 0.1.0

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.

Select from 2 files

Attestation for felupe_contact-0.1.0.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 26, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page