Code Monkey home page Code Monkey logo

mimi's Introduction

mimi

mimi is IGA solid mechanics solver leveraging MFEM's NURBS discritization techniques. It implements implicit nonlinear structural dynamics and contact mechanics with a rigid body, with an option for shared memory parallelization. Python integration was part of a design to support seamless integration to existing scientific python piplines; through a thin python wrapper, it also enables easy data exchange and dynamic runtime controls. The main use-case involves investigating and prototyping solid models in multiphysics scenarios, emphasizing fluid-structure-contact interaction.

Install

First, dependencies. Starting with splinepy

cd third_party/splinepy
pip install . -v --config-settings=cmake.args="-DSPLINEPY_MORE=OFF;"

For SuiteSparse, you can use conda:

conda install -c conda-forge suitesparse

or you can get it from any package distribution. For example:

# brew (mac)
brew install suite-sparse

# ubuntu
sudo apt-get install libsuitesparse-dev

Now, mimi

git submodule update --init --recursive
python3 setup.py develop

You can pass build variables with your command. For example:

# 1. for debug build
DEBUG=1 python3 setup.py develop
# 2. cmake arguments
CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/path/to/mydir;/usr/dir2 -DMIMI_USE_OMP=False" python3 setup.py develop

Finally, try examples - currently those need to be called at mimi's root

python3 examples/nonlinear_solid.py

Acknowledgement

Some of the functions and implementations are motivated/adapted/extracted from the following amazing open-source projects. Please check them out!

mimi's People

Contributors

j042 avatar obergue avatar markriegler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar Florian Zwicke avatar  avatar

mimi's Issues

Line search for ScalarSolve

Currently, we do one bisection. We can extend this using line search (similar to LineSearchNewton) or series of bisections.

Time dependent Dirichlet / Neumann BC

Currently, I've only implemented dirichlet BC where the values shouldn't be altered (mfem supports this out of the box).
However, we need some BC control, so that we can move the solid with a constant velocity

Material Models

Material Models

The aim of this issue is to guide a path through different material models. Thereby, the start is made with a "simpler" model for plastic material behaviour which should be extended incrementally in order to reach the material model of Johnson-Cook.

1. Linear Elastic - Linear Plastic

Until the yield point, linear elastic material behaviour is assumed. After this point, linear isotropic strain-hardening takes place, using the von-Mises-Criterion and assuming "associated" flow.

This constitutive law is the most commonly used model of inelastic deformation. It has the following properties:

  • It will correctly predict the conditions necessary to initiate yield under multiaxial loading
  • It will correctly predict the plastic strain rate under an arbitrary multiaxial stress state
  • It can model accurately any uniaxial stress-strain curve

It has the following limitations:

  • It is valid only for modest plastic strains (<10%)
  • It will not predict creep behavior or strain rate sensitivity
  • It does not predict behavior under cyclic loading correctly
  • It will not predict plastic strains accurately if the principal axes of stress rotate significantly (more than about 30 degrees) during inelastic deformation

Ref.: Bower, Allan F. (2010) "Applied Mechanics of Solids", CRC Press, p. 128

For modelling plastic material behaviour, we assume to split the strain into an elastic and a plastic part. In a uniaxial case, this would be represented by
$$\varepsilon=\varepsilon^{(el)}+\varepsilon^{(p l)}. \tag{1}$$

The introduction of the von-Mises-Equivalent-Stress enables the further application of this stress in the yield criterion. Firstly, the equivalent stress:
$$\sigma_{eqv, M}=\sqrt{\sigma_x^2+\sigma_y^2+\sigma_z^2-\sigma_x \sigma_y-\sigma_x \sigma_z-\sigma_y \sigma_z+3\left(\tau_{x y}^2+\tau_{x z}^2+\tau_{y z}^2\right)} \tag{2}$$

The stress deviator is responsible for the plastic deformation of the solid. Therefore, we consider the hydrostatic pressure $\sigma_m$ and subtract it from the stress tensor. The result is the 2. invariant of the stress tensor, the so-called stress deviator $S$:
$$\sigma_m=\frac{\sigma_x+\sigma_y+\sigma_z}{3} \tag{3}$$

$$\underline{\underline{S}}=\left[\begin{array}{ccc} \sigma_x & \tau_{x y} & \tau_{x z} \\\ \tau_{y x} & \sigma_y & \tau_{y z} \\\ \tau_{z x} & \tau_{z y} & \sigma_z \end{array}\right]-\left[\begin{array}{ccc} \sigma_m & 0 & 0 \\\ 0 & \sigma_m & 0 \\\ 0 & 0 & \sigma_m \end{array}\right]=\left[\begin{array}{ccc} \sigma_x-\sigma_m & \tau_{x y} & \tau_{x z} \\\ \tau_{y x} & \sigma_y-\sigma_m & \tau_{y z} \\\ \tau_{z x} & \tau_{z y} & \sigma_z-\sigma_m \end{array}\right] \tag{4}$$

In another formulation, the von-Mises-Equivalent-Stress can be written as in the following equation:
$$\sigma_{eqv, M}=\sqrt{\frac{3}{2}S_{ij}S_{ij}} \tag{5}$$

The yield criterion describes that the stress within a plastically deformed solid cannot surpass a certain yield stress $Y$. Either, the occurring stress (represented by the von-Mises-Equivalent-Stress) is lower than the yield stress, or the occurring stress is exactly the yield stress. If we consider a stress lower than the yield stress, we have exclusively elastic strain. However, if we assume having a stress laying on the so-called yield surface, we see plastic deformation of the solid. In order to describe this phenomenon mathematically, we transform the von-Mises-Equivalent-Stress into the principal-normal-stress-form with $\sigma_1$, $\sigma_2$ and $\sigma_3$ and insert it in the yield criterion.
$$f\left(\sigma_{i j}, \bar{\varepsilon}^p\right)=\sqrt{\frac{1}{2}\left[\left(\sigma_1-\sigma_2\right)^2+\left(\sigma_1-\sigma_3\right)^2+\left(\sigma_2-\sigma_3\right)^2\right]}-Y\left(\bar{\varepsilon}^p\right)=0 \tag{6}$$
The accumulated plastic strain magnitude is defined in the following way, can, however, be computed in another way too, as we'll see in equation 11:
$$\bar{\varepsilon}^p=\int \sqrt{\frac{2}{3} d \varepsilon_{i j}^p d \varepsilon_{i j}^p} \tag{7}$$
The yield stress is dependent of the accumulated plastic strain magnitude. As we assume a linear strain hardening solid, we have to take the following equation into consideration when talking about the current yield stress of the solid. With $h$ representing the gradient of the yield stress dependent of the accumulated plastic strain, we receive:
$$Y(\bar{\varepsilon}^p)=Y_0+h \cdot \bar{\varepsilon}^p \tag{8}$$

In order to receive the plastic strain, the derivation of $f$ in respect to $\sigma_{ij}$ is neccessary. After applying some maths, the following term results:
$$\frac{\partial f}{\partial \sigma_{i j}}=\frac{3}{2} \frac{S_{i j}}{\sqrt{\frac{3}{2} S_{k l} S_{k l}}}=\frac{3}{2} \frac{S_{i j}}{Y} \tag{9}$$
Since we assume an associated flow (the flow potential equals the yield function $f$) and isotropic hardening, this is the equation we get for plastic strain:
$$d \varepsilon_{i j}^p=d \bar{\varepsilon}^p \frac{\partial f}{\partial \sigma_{i j}}=d \bar{\varepsilon}^p \frac{3}{2} \frac{S_{i j}}{Y} \tag{10}$$

As we remain on the yield surface during deformation, the yield criterion demands the following equation:

$$\begin{gathered} \dot{f}=0 \\\ \frac{\partial f}{\partial \sigma_{i j}} d \sigma_{i j}-\frac{\partial Y}{\partial \bar{\varepsilon}^p} d \bar{\varepsilon}^p=0 \\\ d \bar{\varepsilon}^p=\frac{1}{h} \frac{\partial f}{\partial \sigma_{i j}} d \sigma_{i j}=\frac{1}{h} \frac{3}{2} \frac{S_{i j} d \sigma_{i j}}{Y} \quad \text{with } h=\frac{d Y}{d \bar{\varepsilon}^p} \end{gathered} \tag{11}$$

Insert this into equation 10 and we get:

$$d \varepsilon_{i j}= \begin{cases}0\\ \frac{1}{h} \frac{3}{2} \frac{\left\langle S_{k l} d \sigma_{k l}\right\rangle}{Y} \frac{3}{2} \frac{S_{i j}}{Y} & \sqrt{\frac{3}{2} S_{i j} S_{i j}}-Y\left(\bar{\varepsilon}^p\right)=0\end{cases} \tag{12}$$ $$\text { where }\langle x\rangle= \begin{cases}x & x \geq 0 \\ 0 & x \leq 0\end{cases}$$

The total strain is assembled by an elastic and a plastic part of the strain. Therefore, we need to consider the elastic strain as well:
$$d \varepsilon_{i j}^e=\frac{1+\nu}{E}\left(d \sigma_{i j}-\frac{\nu}{1+\nu} d \sigma_{k k} \delta_{i j}\right) \tag{13}$$

Now, let's combine the elastic and the plastic part of the strain:

$$d \varepsilon_{i j}= \begin{cases}\frac{1+\nu}{E}\left(d \sigma_{i j}-\frac{\nu}{1+\nu} d \sigma_{k k} \delta_{i j}\right) & \sqrt{\frac{3}{2} S_{i j} S_{i j}}-Y\left(\bar{\varepsilon}^p\right)<0 \\ \frac{1+\nu}{E}\left(d \sigma_{i j}-\frac{\nu}{1+\nu} d \sigma_{k k} \delta_{i j}\right)+\frac{1}{h} \frac{3}{2} \frac{\left\langle S_{k l} d \sigma_{k l}\right\rangle}{Y} \frac{3}{2} \frac{S_{i j}}{Y} & \sqrt{\frac{3}{2} S_{i j} S_{i j}}-Y\left(\bar{\varepsilon}^p\right)=0\end{cases} \tag{14}$$

In order to receive the stress increment, the previous equation (14) needs to be inverted and as a result, the following equation remains:

$$d \sigma_{i j}= \begin{cases}\frac{E}{1+\nu}\left\{d \varepsilon_{i j}+\frac{\nu}{1-2 \nu} d \varepsilon_{k k} \delta_{i j}\right\} & \sqrt{\frac{3}{2} S_{i j} S_{i j}}-Y\left(\bar{\varepsilon}^p\right)<0 \\ \frac{E}{1+\nu}\left\{d \varepsilon_{i j}+\frac{\nu}{1-2 \nu} d \varepsilon_{k k} \delta_{i j}-\frac{3 E}{3 E+2(1+\nu) h} \frac{3}{2} \frac{\left\langle S_{k l} d \varepsilon_{k l}\right\rangle}{Y} \frac{3}{2} \frac{S_{i j}}{Y}\right\} & \sqrt{\frac{3}{2} S_{i j} S_{i j}}-Y\left(\bar{\varepsilon}^p\right)=0\end{cases} \tag{15}$$

Sources:

  • Bower, Allan F. (2010) "Applied Mechanics of Solids", CRC Press
  • Krabbenhoft, Kristian (2002) "Basic Computational Plasticity", Department of Civil Engineering
    Technical University of Denmark

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.