https://github.com/jonasbreuling/pynonsmooth
https://github.com/jonasbreuling/pynonsmooth
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonasbreuling/pynonsmooth
- Owner: JonasBreuling
- Created: 2021-12-10T06:44:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T06:44:54.000Z (over 4 years ago)
- Last Synced: 2025-03-04T18:46:42.140Z (over 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nonsmooth_mech_benckmarks
## Table of Contents
- [nonsmooth_mech_benckmarks](#nonsmooth_mech_benckmarks)
- [Table of Contents](#table-of-contents)
- [Requirements](#requirements)
- [Simulate a benchmark](#simulate-a-benchmark)
- [Mechanics](#mechanics)
## Requirements
* Python 3.x (Tested on Python 3.9.9 for macOX)
* Python packages:
* numpy
* matplotlib
* tqdm (used to include progress bar)
## Simulate a benchmark
This benchmark collection is organized as follows:
The folder `solvers` contains a collection of solvers, which can be used to simulate the benchmarks. The folder `benchmarks` contains a folder for each benchmark examples, e.g. the folder `benchmarks/bouncingball` for the rotating bouncing ball example. Each benchmark folder contains the file defining the benchmark system, e.g. `bouncing_ball_system.py`. The 'system' file defines the class containing all system properties and providing the mass matrix, forces, contact kinematics, etc. as methods.
Finally the acutal simulation is done by running the 'scenario' files, e.g. `bouncing_ball_scenario1.py`, which sets the initial conditions, calls the solver and plots the results. For instance, a simulation of the bouncing ball can be performed by calling
```bash
python benchmarks/bouncing_ball/bouncing_ball_scenario1.py
```
## Mechanics
The most general structure of governing equations, which is able to describe any of our benchmarks is given by the following. This is also the nomenclature used in the code.
*Kinematic variables*: time $`t`$, gen. coordinates $`q`$, gen. velocitites $`u`$, gen. accelerations $`a`$.
*Kinetic equation*
```math
M(t,q)\ du = h(t, q, u)\ dt + W_g(t, q)\ dP_g + W_\gamma(t, q)\ dP_\gamma + W_N(t, q)\ dP_N + W_F(t, q)\ dP_F
```
*Kinematic equation*
```math
\dot{q}(t, q, u) = B(t, q)\ u + \beta(t, q)
```
*Bilateral constraints*
```math
g(t, q) = 0
```
```math
\gamma(t, q, u) = 0
```
*Contact laws*: Normal cone inclusions linking gaps $`g_N(t, q)`$ and friction velcities $`\gamma_F(t, q, u)`$ to percussion measures $`dP_N`$ and $`dP_F`$, respectively.
This nomenclature is based on
>**A nonsmooth generalized-alpha method for mechanical systems with frictional contact**
>
>Giuseppe Capobianco, Jonas Harsch, Simon R. Eugster and Remco I. Leine
>
>*Int J Numer Methods Eng. 2021; 122: 6497– 6526. https://doi.org/10.1002/nme.6801*