Skip to main content

Finite Element Analysis

Project description

Finite element analysis for continuum mechanics of solid bodies.

FElupe PyPI version shields.io Documentation Status License: GPL v3 Made with love in Graz (Austria) codecov DOI Codestyle black PyPI - Downloads Binder lite-badge Open In Colab

FElupe is a Python 3.8+ 🐍 finite element analysis package 📦 focussing on the formulation and numerical solution of nonlinear problems in continuum mechanics 🔧 of solid bodies 🚂. Its name is a combination of FE (finite element) and the german word Lupe 🔍 (magnifying glass) as a synonym for getting an insight 📖 how a finite element analysis code 🧮 looks like under the hood 🕳️.

Installation

Install Python, fire up 🔥 a terminal and run 🏃

pip install felupe[all]

where [all] is a combination of [io,parallel,plot,progress,view] and installs all optional dependencies. FElupe has minimal requirements, all available at PyPI supporting all platforms.

In order to make use of all features of FElupe 💎💰💍👑💎, it is suggested to install all optional dependencies.

  • einsumt for parallel (threaded) assembly
  • h5py for writing XDMF result files
  • matplotlib for plotting graphs
  • meshio for mesh-related I/O
  • pyvista for interactive visualizations
  • tqdm for showing progress bars during job evaluations

Getting Started

This tutorial covers the essential high-level parts of creating and solving problems with FElupe. As an introductory example 👨‍🏫, a quarter model of a solid cube with hyperelastic material behaviour is subjected to a uniaxial elongation applied at a clamped end-face.

First, let’s import FElupe and create a meshed cube out of hexahedron cells with a given number of points per axis. A numeric region, pre-defined for hexahedrons, is created on the mesh. A vector-valued displacement field is initiated on the region. Next, a field container is created on top of this field.

A uniaxial load case is applied on the displacement field stored inside the field container. This involves setting up symmetry planes as well as the absolute value of the prescribed displacement at the mesh-points on the right-end face of the cube. The right-end face is clamped 🛠️: only displacements in direction x are allowed. The dict of boundary conditions for this pre-defined load case are returned as boundaries and the partitioned degrees of freedom as well as the external displacements are stored within the returned dict loadcase.

An isotropic pseudo-elastic Ogden-Roxburgh Mullins-softening model formulation in combination with an isotropic hyperelastic Neo-Hookean material formulation is applied on the displacement field of a nearly-incompressible solid body.

A step generates the consecutive substep-movements of a given boundary condition. The step is further added to a list of steps of a job 👩‍💻 (here, a characteristic-curve 📈 job is used). During evaluation ⏳, each substep of each step is solved by an iterative Newton-Rhapson procedure ⚖️. The solution is exported after each completed substep as a time-series ⌚ XDMF file. Finally, the result of the last completed substep is plotted.

For more details beside this high-level code snippet, please have a look at the 📝 documentation.

import felupe as fem

mesh = fem.Cube(n=6)
region = fem.RegionHexahedron(mesh)
field = fem.FieldContainer([fem.Field(region, dim=3)])

boundaries, loadcase = fem.dof.uniaxial(field, clamped=True)

umat = fem.OgdenRoxburgh(material=fem.NeoHooke(mu=1), r=3, m=1, beta=0)
solid = fem.SolidBodyNearlyIncompressible(umat, field, bulk=5000)

move = fem.math.linsteps([0, 1, 0, 1, 2, 1], num=5)
step = fem.Step(items=[solid], ramp={boundaries["move"]: move}, boundaries=boundaries)

job = fem.CharacteristicCurve(steps=[step], boundary=boundaries["move"])
job.evaluate(filename="result.xdmf")
fig, ax = job.plot(
    xlabel="Displacement $u$ in mm $\longrightarrow$",
    ylabel="Normal Force $F$ in N $\longrightarrow$",
)

solid.plot("Principal Values of Cauchy Stress").show()

curve

Solid Body

Documentation

The documentation is located here.

Extension Packages

The capabilities of FElupe may be enhanced with extension packages created by the community.

Package Description
hyperelastic Constitutive hyperelastic material formulations
matadi Material Definition with Automatic Differentiation (AD)
tensortrax Math on (Hyper-Dual) Tensors with Trailing Axes
feplot A visualization tool for FElupe

Testing

To run the FElupe unit tests, check out this repository and type

tox

Scientific Publications

A list of articles in which FElupe is involved. If you use FElupe in your scientific work, please star this repository, cite it DOI and add your publication to this list.

  1. A. Dutzler, C. Buzzi, and M. Leitner, "Nondimensional translational characteristics of elastomer components", Journal of Applied Engineering Design and Simulation, vol. 1, no. 1. UiTM Press, Universiti Teknologi MARA, Sep. 21, 2021. doi: 10.24191/jaeds.v1i1.20. medium-story

  2. C. Buzzi, A. Dutzler, T. Faethe, J. Lassacher, M. Leitner, and F.-J. Weber, "Development of a tool for estimating the characteristic curves of rubber-metal parts", in Proceedings of the 12th International Conference on Railway Bogies and Running Gears, 2022 (ISBN 978-963-9058-46-0).

  3. J. Torggler, A. Dutzler, B. Oberdorfer, T. Faethe, H. Müller, C. Buzzi, and M. Leitner, "Investigating Damage Mechanisms in Cord-Rubber Composite Air Spring Bellows of Rail Vehicles and Representative Specimen Design", Applied Composite Materials. Springer Science and Business Media LLC, Aug. 22, 2023. doi: 10.1007/s10443-023-10157-1. Simulation-related Python scripts are available on GitHub at adtzlr/fiberreinforcedrubber. Open In Colab

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 - finite element analysis (C) 2021-2024 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/.

Project details


Release history Release notifications | RSS feed

This version

8.3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

felupe-8.3.0.tar.gz (208.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

felupe-8.3.0-py3-none-any.whl (246.1 kB view details)

Uploaded Python 3

File details

Details for the file felupe-8.3.0.tar.gz.

File metadata

  • Download URL: felupe-8.3.0.tar.gz
  • Upload date:
  • Size: 208.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for felupe-8.3.0.tar.gz
Algorithm Hash digest
SHA256 e89b7cfb2d622937f17f99c3a8efb4470df71b51d53ffc10b3a221934e3097d2
MD5 900a12a84d215c7a4484709e93a4f807
BLAKE2b-256 77b17d2fba6d5dbb73091732a5a6ccca9093ff39d5e25fc3056fdfe79f5d3969

See more details on using hashes here.

File details

Details for the file felupe-8.3.0-py3-none-any.whl.

File metadata

  • Download URL: felupe-8.3.0-py3-none-any.whl
  • Upload date:
  • Size: 246.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for felupe-8.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74927bf2f2c46d466845aa87ae49c36857938719ce65be68e50184a47fc3df13
MD5 bd1a4380605e313af92039d90c06d41f
BLAKE2b-256 046dd3255bd88fa0d495dc89f7ac5ecc064b2bcb61a9e9944fe18c5f437c35b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page