GithubHelp home page GithubHelp logo

tlcfem / suanpan Goto Github PK

View Code? Open in Web Editor NEW
54.0 8.0 9.0 136.82 MB

🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework

Home Page: https://tlcfem.github.io/suanPan-manual/latest/

License: GNU General Public License v3.0

CMake 0.37% C++ 74.67% TeX 0.30% Batchfile 0.01% Shell 0.04% C 22.05% Fortran 2.14% Go 0.02% Forth 0.01% Inno Setup 0.02% Python 0.03% Dockerfile 0.03% PowerShell 0.01% CSS 0.33%
fem hpc iga contact dynamics phase-field couple-stress nonviscous structural-engineering seismic-engineering

suanpan's Introduction

suanPan

DOI license documentation release docker suanpan Chocolatey Chocolatey download dev codecov Codacy CodeFactor language language size issues chat FOSSA Status

gplv3-or-later

marketplace

Important

Check out the VS Code extension for syntax highlighting and autocompletion.

Important

Feature requests can be made via creating new issues.

Introduction

🧮 suanPan is a finite element method (FEM) simulation platform for applications in fields such as solid mechanics and civil/structural/seismic engineering. suanPan is written in modern high-quality C++ code and is targeted to provide an efficient, concise, flexible and reliable FEM simulation platform.

suanPan is partially influenced by popular (non-)commercial FEA packages, such as ABAQUS UNIFIED FEA, ANSYS and OpenSees.

Important

Please check the documentation here for command references. Please star ⭐ the project!

Features

The highlights of suanPan are

  • suanPan is fast, both memory and thread safe.
  • suanPan is designed based on the shared memory model and supports parallelism on heterogeneous architectures, for example, multithreaded CPU + optional GPU. The parallelism is available for both element state updating and global matrix assembling.
  • suanPan is open source and easy to be extended to incorporate user-defined elements, materials, etc.
  • suanPan separates the FEA model part from the linear algebra operation part, which significantly reduces the complexity and cost of development of new models.
  • suanPan utilizes the new language features shipped with the latest standards (C++11 to C++20), such as new STL containers, smart pointers, and many others.
  • suanPan supports simple visualization supported by VTK.

Quick Start

Execute the application out-of-the-box in terminal on Linux using one of the following commands depending on how the application is obtained. See details below.

# in folder bin/ for linux portable tarball
./suanPan.sh
# for linux packages and snap
suanPan
# for flatpak
flatpak run io.github.tlcfem.suanPan

Or on Windows,

# in the folder containing suanPan.exe
.\suanPan.exe

First time users can use overview command to go through a quick introduction.

+-----------------------------------------------------+
|   __        __            suanPan is an open source |
|  /  \      |  \              FEM framework (64-bit) |
|  \__       |__/  __   __         Betelgeuse (2.8.0) |
|     \ |  | |    |  \ |  |         by tlc @ 10fd6147 |
|  \__/ |__| |    |__X |  |       all rights reserved |
|                              10.5281/zenodo.1285221 |
+-----------------------------------------------------+
|  https://github.com/TLCFEM/suanPan                  |
|  https://tlcfem.github.io/suanPan-manual/latest     |
+-----------------------------------------------------+
|  https://gitter.im/suanPan-dev/community            |
+-----------------------------------------------------+

suanPan ~<> overview

Sample models are available for almost all models/commands. Please check the Example folder for details. Further details can be seen here regarding how to run model files.

Installation

Warning

Only the 64-bit version is compiled. It is assumed that AVX2 is available thus if the program fails, please check if your CPU supports AVX2. Alternatively, you can try the no-avx version.

Windows

Note

It may be necessary to install the VC++ redistributable package. If the application prompts that some file, such as msvcp140.dll, is missing, please install the redistributable package.

Binary Package

The archives of binaries are released under Release page.

  1. suanpan-win-mkl-vtk.zip is the portable archive.
  2. suanpan-win-mkl-vtk.exe is the installer.

Chocolatey

The binaries, which are compiled with Intel MKL and VTK, are available on Chocolatey, please use the following command to install the package.

  1. Follow the instructions to install Chocolatey.

  2. Use the following command to install suanPan.

    choco install suanpan
  3. It is recommended to use a modern terminal such as Windows Terminal for better output display.

The Chocolatey repo available to you may not be up-to-date. If the latest version is not available, please try alternatives, such as portable binaries or scoop.

asciicast

Scoop

It is also possible to use Scoop to install the package.

  1. Install Scoop.

    Set-ExecutionPolicy RemoteSigned -scope CurrentUser
    iwr -useb get.scoop.sh | iex
  2. Install suanPan.

    scoop install suanpan

Linux

Linux users are recommended to obtain the binaries via snap or flatpak.

Snap

The snap supports visualisation via VTK and uses Intel MKL for linear algebra. The edge channel is in sync with the dev branch. The stable channel is in sync with the master branch.

Get it from the Snap Store

asciicast

Flatpak

Flatpak is also available if preferred. The beta channel is in sync with the dev branch. The stable channel is in sync with the master branch.

Download on Flathub

# add repo
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# or the beta channel
# flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
# install
flatpak install suanPan
# define alias
echo "alias suanpan=\"flatpak run io.github.tlcfem.suanPan\"" >> ~/.bashrc

Docker

It is also possible to compile the package via docker, check the dockerfiles under the Script folder, for any questions please open an issue.

One can directly pull the image.

docker pull tlcfem/suanpan

Other Platforms

Precompiled binaries are provided via CI/CD on macOS, Windows, and Ubuntu. Please download the file from the release page.

A few flavors are available:

  1. vtk --- visualisation support is enabled, with this you can record VTK files for postprocessing, however, OpenGL may be missing on server systems
  2. mkl --- linear algebra operations are offloaded to MKL, which gives the optimal performance on Intel chips
  3. openblas --- linear algebra operations are offloaded to OpenBLAS, which may outperform MKL on AMD platforms
  4. no-avx --- AVX2 support is disabled, useful for older CPUs which do not support AVX2 instructions

Advanced users can compile the program from source by themselves to enable GPU based solvers which require an available CUDA and/or MAGMA library.

Since CI/CD uses GCC 11 (on Linux) and Clang 13.0.1 (on macOS), it may be required to update/install proper libstdc++ (or libc++) version. The easiest way is to install the same compiler. For example, on Ubuntu 22.04,

# Ubuntu
sudo apt install gcc g++ gfortran libomp5

For VTK enabled versions, it may be necessary to install OpenGL.

# Ubuntu
sudo apt install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglvnd-dev

Automation Related

VS Code

The VS Code extension is available here.

Sublime Text

On Windows, a batch file named AddAssociation.bat is provided in the archive. It provides file associations and prepares a proper working environment (build system, autocompletion, highlighting) with Sublime Text. It also adds file associations with .sp and .supan files, please run the AddAssociation.bat file with administrator privilege. Sublime Text autocompletion and syntax highlighting files are also provided. Please install Sublime Text first and execute the batch file with the administrator privilege.

On Linux, a script file named as suanPan.sh is provided. By executing

./suanPan.sh --create-link

It adds Sublime Text autocompletion and syntax highlighting files to proper location if Sublime Text configuration folder is found. It also adds a command alias suanpan to ~/.local/bin and a desktop file to ~/.local/share/applications.

Dependency

Additional libraries used in suanPan are listed as follows.

Those libraries may depend on other libraries such as zlib and Szip. Additional tools may be used by suanPan, they are

How To Compile

Please refer to the corresponding page in the manual for details.

Happy Modelling

an example simulation of particle collision

Licence

FOSSA Status

suanpan's People

Contributors

dependabot[bot] avatar tlcfem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

suanpan's Issues

Duncan-Selig hyperbolic soil model

Feature
Hello, excited about trying out this library for structural analysis.

The geotechnical analysis capability is great, but it is limited by the number of soil models. A great addition would be the Duncan-Selig hyperbolic soil model (modified somewhat recently by Katona, to take into account residual deformation during unloading).

The Duncan-Selig model is the gold standard for analysis of structural problems in which soil is the dominant load carrying component in a soil-structure system, such as in buried flexible culverts. In fact the AASHTO LRFD design code requires FEA to be performed for some classes of buried culverts, such as corrugated metal structures with deep corrugations. The only free FEA program available for this kind of FEA using the Duncan-Selig model is CANDE, and although it is still being actively updated, it is not open source and long periods of time pass between updates. It is also 2D only, the preprocessor and postprocessor are woefully out of date, and it is just dad-blamed tough to use. A more modern open source option like suanPan would be most welcome by the geotechnical engineering community.

References
Modified Duncan-Selig model by Katona

Document about case file format

Hi,

Just wondering where is the document located, so I can prepare a case file.

I have run one case. How do I get an VTK output?

Cheers,

Cean

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.