constitutive : The Constitutive Library


In [1]:
%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt
from simmit import smartplus as sim
import os

Ireal()

Provides the fourth order identity tensor written in Voigt notation $I_{real}$, where : $$I_{real} = \left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0.5 \end{array} \right)$$ Return a mat. Example:


In [2]:
m = sim.Ireal()
print m


[[ 1.   0.   0.   0.   0.   0. ]
 [ 0.   1.   0.   0.   0.   0. ]
 [ 0.   0.   1.   0.   0.   0. ]
 [ 0.   0.   0.   0.5  0.   0. ]
 [ 0.   0.   0.   0.   0.5  0. ]
 [ 0.   0.   0.   0.   0.   0.5]]

Ivol()

Provides the volumic of the identity tensor $I_{vol}$ written in the SMART+ formalism. So : $$I_{vol} = \left( \begin{array}{ccc} 1/3 & 1/3 & 1/3 & 0 & 0 & 0 \\ 1/3 & 1/3 & 1/3 & 0 & 0 & 0 \\ 1/3 & 1/3 & 1/3 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right)$$ Return a mat. Example:


In [3]:
m = sim.Ivol()
print m


[[ 0.33333333  0.33333333  0.33333333  0.          0.          0.        ]
 [ 0.33333333  0.33333333  0.33333333  0.          0.          0.        ]
 [ 0.33333333  0.33333333  0.33333333  0.          0.          0.        ]
 [ 0.          0.          0.          0.          0.          0.        ]
 [ 0.          0.          0.          0.          0.          0.        ]
 [ 0.          0.          0.          0.          0.          0.        ]]

Idev()

Provides the deviatoric of the identity tensor $I_{dev}$ written in the SMART+ formalism. So : $$I_{dev} = \left( \begin{array}{ccc} 2/3 & -1/3 & -1/3 & 0 & 0 & 0 \\ -1/3 & 2/3 & -1/3 & 0 & 0 & 0 \\ -1/3 & -1/3 & 2/3 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0.5 \end{array} \right)$$ Return a mat. Example:


In [4]:
m1 = sim.Ireal()
m2 = sim.Ivol()
m = sim.Idev()
print m1 - m2
print m


[[ 0.66666667 -0.33333333 -0.33333333  0.          0.          0.        ]
 [-0.33333333  0.66666667 -0.33333333  0.          0.          0.        ]
 [-0.33333333 -0.33333333  0.66666667  0.          0.          0.        ]
 [ 0.          0.          0.          0.5         0.          0.        ]
 [ 0.          0.          0.          0.          0.5         0.        ]
 [ 0.          0.          0.          0.          0.          0.5       ]]
[[ 0.66666667 -0.33333333 -0.33333333  0.          0.          0.        ]
 [-0.33333333  0.66666667 -0.33333333  0.          0.          0.        ]
 [-0.33333333 -0.33333333  0.66666667  0.          0.          0.        ]
 [ 0.          0.          0.          0.5         0.          0.        ]
 [ 0.          0.          0.          0.          0.5         0.        ]
 [ 0.          0.          0.          0.          0.          0.5       ]]

Ireal2()

Provides the fourth order identity tensor $\widehat{I}$ written in the form. So : $$\widehat{I} = \left( \begin{array}{ccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 0 & 0 & 2 \end{array} \right)$$ For example, this tensor allows to obtain : $L*\widehat{M}=I$ or $\widehat{L}*M=I$, where a matrix $\widehat{A}$ is set by $\widehat{A}=\widehat{I}A\widehat{I}$ Return a mat. Example:


In [5]:
m = sim.Ireal2()
print m


[[ 1.  0.  0.  0.  0.  0.]
 [ 0.  1.  0.  0.  0.  0.]
 [ 0.  0.  1.  0.  0.  0.]
 [ 0.  0.  0.  2.  0.  0.]
 [ 0.  0.  0.  0.  2.  0.]
 [ 0.  0.  0.  0.  0.  2.]]

Idev2(vec)

Provides the deviatoric of the identity tensor $\widehat{I}$ written in the SMART+ formalism. So : $$I_{dev2} = \left( \begin{array}{ccc} 2/3 & -1/3 & -1/3 & 0 & 0 & 0 \\ -1/3 & 2/3 & -1/3 & 0 & 0 & 0 \\ -1/3 & -1/3 & 2/3 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 0 & 0 & 2 \end{array} \right)$$ Return a mat. Example:


In [6]:
m1 = sim.Ireal2()
m2 = sim.Ivol()
m = sim.Idev2()
print m1 - m2
print m


[[ 0.66666667 -0.33333333 -0.33333333  0.          0.          0.        ]
 [-0.33333333  0.66666667 -0.33333333  0.          0.          0.        ]
 [-0.33333333 -0.33333333  0.66666667  0.          0.          0.        ]
 [ 0.          0.          0.          2.          0.          0.        ]
 [ 0.          0.          0.          0.          2.          0.        ]
 [ 0.          0.          0.          0.          0.          2.        ]]
[[ 0.66666667 -0.33333333 -0.33333333  0.          0.          0.        ]
 [-0.33333333  0.66666667 -0.33333333  0.          0.          0.        ]
 [-0.33333333 -0.33333333  0.66666667  0.          0.          0.        ]
 [ 0.          0.          0.          2.          0.          0.        ]
 [ 0.          0.          0.          0.          2.          0.        ]
 [ 0.          0.          0.          0.          0.          2.        ]]

Ith()

Provides the vector $I_{th} = \left( \begin{array}{ccc} 1 \\ 1 \\ 1 \\ 0 \\ 0 \\ 0 \end{array} \right)$. Return a vec. Example:


In [7]:
v = sim.Ith()
print v


[ 1.  1.  1.  0.  0.  0.]

Ir2()

Provides the vector $I_{r2} = \left( \begin{array}{ccc} 1 \\ 1 \\ 1 \\ 2 \\ 2 \\ 2 \end{array} \right)$. Return a vec. This vector is usefull when transferring from "stress"-type Voigt conventions to "strain"-type. Example:


In [8]:
v = sim.Ir2()
print v


[ 1.  1.  1.  2.  2.  2.]

Ir05()

</h3> Provides the vector $I_{r05} = \left( \begin{array}{ccc} 1 \\ 1 \\ 1 \\ 0.5 \\ 0.5 \\ 0.5 \end{array} \right)$. Return a vec. Example:


In [9]:
v = sim.Ir05()
print v


[ 1.   1.   1.   0.5  0.5  0.5]

In [ ]: