Code Monkey home page Code Monkey logo

fem_python's Introduction

2D-Finite Element Analysis with Python

Wrench under bending.

This repo contains a simple finite element analysis code for 2D elasticity problems. The code uses as input data simple-to-create text files containing nodal, element, material and load data.

The repo contains 3 main folders:

  1. main/ stores the python scripts divided in
  • solids_ISO.py (the main program),
  • preprocesor.py (model input subroutines),
  • assemutil.py (assembly subroutines),
  • femutil.py (general finite element method subroutines),
  • uelutil.py (local matrix subroutines for different elements), and
  • postprocesor.py (results handling subroutines);
  1. meshes/ contains input files and meshes in .msh format corresponding to different examples.

  2. template/ contains a simple Gmsh mesh and a python script to generate the model ready for solids_ISO.

Authors

Instructions

The code is written in Python and it depends on numpy, scipy and sympy. To use it clone the repo with

git clone https://github.com/jgomezc1/FEM_PYTHON.git

uncompress the zip folder an run the main file in the Python console of your preference.

If you want to run the examples with GUI input you will need to install easygui. And, you will need meshio to automatically read Gmsh mesh files. These two can be installed with

pip install easygui
pip install meshio

Run a simple model

After downloading run an analysis in 3 easy steps (see template):

  • Create the mesh using Gmsh.
  • Generate the model files (eles.txt, nodes.txt, mater.txt and loads.txt) using a python script with the aid of meshio.
  • Run solids_ISO.py

License

This project is licensed under the MIT license. The documents are licensed under Creative Commons Attribution License.

Since this project is used to teach Finite Element Methods and Computational Mechanics, we have included some examples and documents and code snippets developed by students. Their license is specified in each particular directory.

fem_python's People

Contributors

nicoguaro avatar jgomezc1 avatar

Watchers

James Cloos avatar saravanan 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.