In [1]:
%pylab inline
In [2]:
from sg2lib import *
In [3]:
gamma = 1
Sx = 2
Fs = array([[1, gamma], [0, 1]])
Fp = array([[Sx, 0], [0, 1/Sx]])
To divide simple shear deformation with $\gamma$=1 to n
incremental steps
In [4]:
n = 10
Fsi = array([[1, gamma/n], [0, 1]])
print('Incremental deformation gradient:')
print(Fsi)
To check that supperposition of those increments give as total deformation, we can use allclose
numpy function
In [5]:
array_equal(matrix_power(Fsi, n), Fs)
Out[5]:
In [6]:
Fpi = array([[Sx**(1/n), 0], [0, Sx**(-1/n)]])
print('Incremental deformation gradient:')
print(Fpi)
In [7]:
allclose(matrix_power(Fpi, n), Fp)
Out[7]:
Knowing that deformation superposition is not cimmutative, we can check that axial ratio of finite strain resulting from simple shear superposed on pure shear and vice-versa is really different:
In [8]:
u,s,v = svd(Fs @ Fp)
print('Axial ratio of finite strain resulting from simple shear superposed on pure shear: {}'.format(s[0]/s[1]))
u,s,v = svd(Fp @ Fs)
print('Axial ratio of finite strain resulting from pure shear superposed on simple shear: {}'.format(s[0]/s[1]))
Lets try to split those deformation to two increments and mutually mix them:
In [9]:
Fsi = array([[1, gamma/2], [0, 1]])
Fpi = array([[Sx**(1/2), 0], [0, Sx**(-1/2)]])
u,s,v = svd(Fsi @ Fpi @ Fsi @ Fpi)
print('Axial ratio of finite strain of superposed increments starting with pure shear: {}'.format(s[0]/s[1]))
u,s,v = svd(Fpi @ Fsi @ Fpi @ Fsi)
print('Axial ratio of finite strain of superposed increments starting with simple shear: {}'.format(s[0]/s[1]))
It is now close to each other, but still quite different. So let's split it to much more increments....
In [10]:
n = 100
Fsi = array([[1, gamma/n], [0, 1]])
Fpi = array([[Sx**(1/n), 0], [0, Sx**(-1/n)]])
u,s,v = svd(matrix_power(Fsi @ Fpi, n))
print('Axial ratio of finite strain of superposed increments starting with pure shear: {}'.format(s[0]/s[1]))
u,s,v = svd(matrix_power(Fpi @ Fsi, n))
print('Axial ratio of finite strain of superposed increments starting with simple shear: {}'.format(s[0]/s[1]))
Now it is very close. Let's visualize how finite strain converge with increasing number of increments:
In [11]:
arp = []
ars = []
ninc = range(1, 201)
for n in ninc:
Fsi = array([[1, gamma/n], [0, 1]])
Fpi = array([[Sx**(1/n), 0], [0, Sx**(-1/n)]])
u,s,v = svd(matrix_power(Fsi @ Fpi, n))
arp.append(s[0]/s[1])
u,s,v = svd(matrix_power(Fpi @ Fsi, n))
ars.append(s[0]/s[1])
figure(figsize=(16, 4))
semilogy(ninc, arp, 'r', label='Pure shear first')
semilogy(ninc, ars, 'g', label='Simple shear first')
legend()
xlim(1, 200)
xlabel('Number of increments')
ylabel('Finite strain axial ratio');
In [12]:
from scipy.linalg import expm, logm
Spatial velocity gradient could be obtained as matrix logarithm of deformation gradient
In [13]:
Lp = logm(Fp)
Ls = logm(Fs)
Total spatial velocity gradient of simulatanous deformation could be calculated by summation of individual ones
In [14]:
L = Lp + Ls
Resulting deformation gradient could be calculated as matrix exponential of total spatial velocity gradient
In [15]:
F = expm(L)
u,s,v = svd(F)
sar = s[0]/s[1]
print('Axial| ratio of finite strain of simultaneous pure shear and simple shear: {}'.format(sar))
Lets overlay it on previous diagram
In [16]:
arp = []
ars = []
ninc = range(1, 201)
for n in ninc:
Fsi = array([[1, gamma/n], [0, 1]])
Fpi = array([[Sx**(1/n), 0], [0, Sx**(-1/n)]])
u,s,v = svd(matrix_power(Fsi @ Fpi, n))
arp.append(s[0]/s[1])
u,s,v = svd(matrix_power(Fpi @ Fsi, n))
ars.append(s[0]/s[1])
figure(figsize=(16, 4))
semilogy(ninc, arp, 'r', label='Pure shear first')
semilogy(ninc, ars, 'g', label='Simple shear first')
legend()
xlim(1, 200)
axhline(sar)
xlabel('Number of increments')
ylabel('Finite strain axial ratio');
In [17]:
L = logm(Fs)
In [18]:
D = (L + L.T)/2
W = (L - L.T)/2
Check that decomposition give total spatial velocity gradient
In [19]:
allclose(D + W, L)
Out[19]:
Visualize spatial velocity gradients for rate of deformation tensor
In [20]:
vel_field(D)
Visualize spatial velocity gradients for spin tensor
In [21]:
vel_field(W)