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

L_iso

Provides the elastic stiffness tensor for an isotropic material. The two first arguments are a couple of elastic properties. The third argument specifies which couple has been provided and the nature and order of coefficients. Exhaustive list of possible third argument : ‘Enu’,’nuE,’Kmu’,’muK’, ‘KG’, ‘GK’, ‘lambdamu’, ‘mulambda’, ‘lambdaG’, ‘Glambda’. Return a numpy ndarray. Example :


In [2]:
E = 70000.0
nu = 0.3
L = sim.L_iso(E,nu,"Enu")
print np.array_str(L, precision=4, suppress_small=True)

d = sim.check_symetries(L)
print(d['umat_type'])
print(d['props'])

x = sim.L_iso_props(L)
print(x)


[[ 94230.7692  40384.6154  40384.6154      0.          0.          0.    ]
 [ 40384.6154  94230.7692  40384.6154      0.          0.          0.    ]
 [ 40384.6154  40384.6154  94230.7692      0.          0.          0.    ]
 [     0.          0.          0.      26923.0769      0.          0.    ]
 [     0.          0.          0.          0.      26923.0769      0.    ]
 [     0.          0.          0.          0.          0.      26923.0769]]
ELISO
[  7.00000000e+04   3.00000000e-01]
[  7.00000000e+04   3.00000000e-01]

M_iso

Provides the elastic compliance tensor for an isotropic material. The two first arguments are a couple of elastic properties. The third argument specify which couple has been provided and the nature and order of coefficients. Exhaustive list of possible third argument : ‘Enu’,’nuE,’Kmu’,’muK’, ‘KG’, ‘GK’, ‘lambdamu’, ‘mulambda’, ‘lambdaG’, ‘Glambda’.


In [3]:
E = 70000.0
nu = 0.3
M = sim.M_iso(E,nu,"Enu")
print np.array_str(M, precision=2)

L_inv = np.linalg.inv(M)
d = sim.check_symetries(L_inv)
print(d['umat_type'])
print(d['props'])

x = sim.M_iso_props(M)
print(x)


[[  1.43e-05  -4.29e-06  -4.29e-06   0.00e+00   0.00e+00   0.00e+00]
 [ -4.29e-06   1.43e-05  -4.29e-06   0.00e+00   0.00e+00   0.00e+00]
 [ -4.29e-06  -4.29e-06   1.43e-05   0.00e+00   0.00e+00   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   3.71e-05   0.00e+00   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   0.00e+00   3.71e-05   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   0.00e+00   0.00e+00   3.71e-05]]
ELISO
[  7.00000000e+04   3.00000000e-01]
[  7.00000000e+04   3.00000000e-01]

L_cubic

Provides the elastic stiffness tensor for a cubic material. Arguments are the stiffness coefficients C11, C12 and C44, or the elastic constants E, nu, G Exhaustive list of possible third argument : ‘Cii’,’EnuG, the by-default argument is 'Cii'


In [4]:
E = 70000.0
nu = 0.3
G = 23000.0
L = sim.L_cubic(E,nu,G,"EnuG")
print np.array_str(L, precision=2)

d = sim.check_symetries(L)
print(d['umat_type'])
print(d['props'])

x = sim.L_cubic_props(L)
print(x)


[[ 94230.77  40384.62  40384.62      0.        0.        0.  ]
 [ 40384.62  94230.77  40384.62      0.        0.        0.  ]
 [ 40384.62  40384.62  94230.77      0.        0.        0.  ]
 [     0.        0.        0.    23000.        0.        0.  ]
 [     0.        0.        0.        0.    23000.        0.  ]
 [     0.        0.        0.        0.        0.    23000.  ]]
ELCUB
[  7.00000000e+04   3.00000000e-01   2.30000000e+04]
[  7.00000000e+04   3.00000000e-01   2.30000000e+04]

M_cubic

Provides the elastic compliance tensor for a cubic material. Arguments are the stiffness coefficients C11, C12 and C44, or the elastic constants E, nu, G Exhaustive list of possible third argument : ‘Cii’,’EnuG, the by-default argument is 'Cii'


In [5]:
E = 70000.0
nu = 0.3
G = 23000.0
M = sim.M_cubic(E,nu,G,"EnuG")
print np.array_str(M, precision=2)

L = np.linalg.inv(M)
d = sim.check_symetries(L)
print(d['umat_type'])
print(d['props'])

x = sim.L_cubic_props(L)
print(x)


[[  1.43e-05  -4.29e-06  -4.29e-06   0.00e+00   0.00e+00   0.00e+00]
 [ -4.29e-06   1.43e-05  -4.29e-06   0.00e+00   0.00e+00   0.00e+00]
 [ -4.29e-06  -4.29e-06   1.43e-05   0.00e+00   0.00e+00   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   4.35e-05   0.00e+00   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   0.00e+00   4.35e-05   0.00e+00]
 [  0.00e+00   0.00e+00   0.00e+00   0.00e+00   0.00e+00   4.35e-05]]
ELCUB
[  7.00000000e+04   3.00000000e-01   2.30000000e+04]
[  7.00000000e+04   3.00000000e-01   2.30000000e+04]

L_isotrans

Provides the elastic stiffness tensor for an isotropic transverse material. Arguments are longitudinal Young modulus EL, transverse young modulus, Poisson’s ratio for loading along the longitudinal axis nuTL, Poisson’s ratio for loading along the transverse axis nuTT, shear modulus GLT and the axis of symmetry.


In [6]:
EL = 70000.0
ET = 20000.0
nuTL = 0.08
nuTT = 0.3
GLT = 12000.0
axis = 3
L = sim.L_isotrans(EL,ET,nuTL,nuTT,GLT,axis)
print np.array_str(L, precision=2)

d = sim.check_symetries(L)
print(d['umat_type'])
print(d['axis'])
print np.array_str(d['props'], precision=2)

x = sim.L_isotrans_props(L,axis)
print np.array_str(x, precision=2)


[[ 22954.82   7570.21   8547.01      0.        0.        0.  ]
 [  7570.21  22954.82   8547.01      0.        0.        0.  ]
 [  8547.01   8547.01  74786.32      0.        0.        0.  ]
 [     0.        0.        0.     7692.31      0.        0.  ]
 [     0.        0.        0.        0.    12000.        0.  ]
 [     0.        0.        0.        0.        0.    12000.  ]]
ELIST
3
[  7.00e+04   2.00e+04   8.00e-02   3.00e-01   1.20e+04]
[  7.00e+04   2.00e+04   8.00e-02   3.00e-01   1.20e+04]
bp::def("L_iso", L_iso);
bp::def("M_iso", M_iso);
bp::def("L_cubic", L_cubic);
bp::def("M_cubic", M_cubic);
bp::def("L_ortho", L_ortho);
bp::def("M_ortho", M_ortho);
bp::def("L_isotrans", L_isotrans);
bp::def("M_isotrans", M_isotrans);

bp::def("check_symetries", check_symetries);
bp::def("L_iso_props", L_iso_props);
bp::def("M_iso_props", M_iso_props);
bp::def("L_isotrans_props", L_isotrans_props);
bp::def("M_isotrans_props", M_isotrans_props);
bp::def("L_cubic_props", L_cubic_props);
bp::def("M_cubic_props", M_cubic_props);
bp::def("L_ortho_props", L_ortho_props);
bp::def("M_ortho_props", M_ortho_props);
bp::def("M_aniso_props", M_aniso_props);

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 [ ]: