Giter Club home page Giter Club logo

pylabfea's Introduction

DOI Binder License: GPL v3 License: CC BY-NC-SA 4.0

pyLabFEA

Python Laboratory for Finite Element Analysis

  • Authors: Alexander Hartmaier, Ronak Shoghi
  • Organization: ICAMS, Ruhr University Bochum, Germany
  • Contact: [email protected]

Finite Element Analysis (FEA) is a numerical method for studying mechanical behavior of fluids and solids. The pyLabFEA package introduces a simple version of FEA for solid mechanics and elastic-plastic materials, which is fully written in Python. Due to its simplicity, it is well-suited for teaching, and its flexibility in constitutive modeling of materials makes it a useful research tool.

Installation

The pyLabFEA package requires an Anaconda or Miniconda environment with a recent Python version. It can be installed directly from its GitHub repository with the following command

$ python -m pip install git+https://github.com/AHartmaier/pyLabFEA.git

Alternatively, the complete repository, including the source code, documentation and examples, can be cloned and installed locally. It is recommended to create a conda environment before installation. This can be done by the following the command line instructions

$ git clone https://github.com/AHartmaier/pyLabFEA.git ./pyLabFEA
$ cd pyLabFEA
$ conda env create -f environment.yml
$ conda activate pylabfea
$ python -m pip install . --user

The correct implementation can be tested with

$ pytest tests -v

After this, the package can be used within python, e.g. by importing the entire package with

import pylabfea as fea

Documentation

Online documentation for pyLabFEA can be found under https://ahartmaier.github.io/pyLabFEA/. For offline use, open docs/index.html in your local copy to browse through the contents. The documentation has been generated using Sphinx.

Jupyter notebooks

pyLabFEA is conveniently used with Jupyter notebooks. Available notebooks with tutorials on linear and non-linear FEA, homogenization of elastic and elastic-plastic material behavior, and constitutive models based on machine learning algorithms are contained in the subfolder 'notebooks' of this repository and can be accessed via index.ipynb. An overview on the contents of the notebooks is also available here.

The Jupyter notebooks of the pyLabFEA tutorials are directly accessible on Binder

Examples

Python routines contained in the subfolder 'examples' of this repository demonstrate how ML flow rules can be trained based on reference materials with significant plastic anisotropy, as Hill or Barlat reference materials, but also for isotropic J2 plasticity. The training data consists of different stress tensors that mark the onset of plastic yielding of the material. It is important that these stress tensors cover the onset of plastic yielding in the full 6-dimensional stress space, including normal and shear stresses. The trained ML flow rules can be used in form of a user material (UMAT) for the commercial FEA package Abaqus.

Contributions

Contributions to the pyLabFEA package are highly welcome, either in form of new notebooks with application examples or tutorials, or in form of new functionalities to the Python code. Furthermore, bug reports or any comments on possible improvements of the code or its documentation are greatly appreciated.

Dependencies

pyLabFEA requires the following packages as imports:

License

The pyLabFEA package comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GNU General Public License (GPLv3)

The contents of the examples and notebooks are published under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)

pylabfea's People

Contributors

ahartmaier avatar srmnitc avatar ronakshoghi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.