A general transformation matrix of stresses can be obtained by multiplication of the transformation matrices about the individual axes. For example, $\mathbf{T}_{\sigma} = \mathbf{T}_{\sigma z}(\alpha_z) \mathbf{T}_{\sigma y}(\alpha_y) \mathbf{T}_{\sigma x}(\alpha_x)$ is one of six possible options.
Show that the order of transformation is important.
From Transformations:
import numpy as np
# Stress transformation
# About x-axis
def T3Dsx(angle):
a=np.radians(angle)
c,s=np.cos(a),np.sin(a)
return np.array([[ 1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ],
[ 0.0 , c*c , s*s , 2*c*s , 0.0 , 0.0 ],
[ 0.0 , s*s , c*c , -2*c*s , 0.0 , 0.0 ],
[ 0.0 , -c*s , c*s ,c*c-s*s , 0.0 , 0.0 ],
[ 0.0 , 0.0 , 0.0 , 0.0 , c , -s ],
[ 0.0 , 0.0 , 0.0 , 0.0 , s , c ]],
float)
# About y-axis
def T3Dsy(angle):
a=np.radians(angle)
c,s=np.cos(a),np.sin(a)
return np.array([[ c*c , 0.0 , s*s , 0.0 , -2*c*s , 0.0 ],
[ 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 0.0 ],
[ s*s , 0.0 , c*c , 0.0 , 2*c*s , 0.0 ],
[ 0.0 , 0.0 , 0.0 , c , 0.0 , s ],
[ c*s , 0.0 , -c*s , 0.0 ,c*c-s*s , 0.0 ],
[ 0.0 , 0.0 , 0.0 , -s , 0.0 , c ]],
float)
# About z-axis
def T3Dsz(angle):
a=np.radians(angle)
c,s=np.cos(a),np.sin(a)
return np.array([[ c*c , s*s , 0.0 , 0.0 , 0.0 , 2*c*s ],
[ s*s , c*c , 0.0 , 0.0 , 0.0 , -2*c*s ],
[ 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 ],
[ 0.0 , 0.0 , 0.0 , c , -s , 0.0 ],
[ 0.0 , 0.0 , 0.0 , s , c , 0.0 ],
[-c*s , c*s , 0.0 , 0.0 , 0.0 ,c*c-s*s ]],
float)
ax
: rotation about the x-axisay
: rotation about the y-axisaz
: rotation about the z-axis# Some 'random' angles:
ax,ay,az = 43,-15,64
# The possible combinations of order:
Ts_1 = np.dot( T3Dsz(az) , np.dot(T3Dsy(ay) , T3Dsx(ax)))
Ts_2= np.dot( T3Dsx(ax) , np.dot(T3Dsy(ay) , T3Dsz(az)))
Ts_3= np.dot( T3Dsx(ax) , np.dot(T3Dsz(az) , T3Dsy(ay)))
Ts_4= np.dot( T3Dsy(ay) , np.dot(T3Dsx(ax) , T3Dsz(az)))
Ts_5= np.dot( T3Dsy(ay) , np.dot(T3Dsz(az) , T3Dsx(ax)))
Ts_6= np.dot( T3Dsz(az) , np.dot(T3Dsx(ax) , T3Dsy(ay)))
# Some 'random' stress state:
sxyz=np.array([100, -40, 30, 10, -15, 25])
# Results:
print( np.round( np.dot(Ts_1,sxyz),2) )
print( np.round( np.dot(Ts_2,sxyz),2) )
print( np.round( np.dot(Ts_3,sxyz),2) )
print( np.round( np.dot(Ts_4,sxyz),2) )
print( np.round( np.dot(Ts_5,sxyz),2) )
print( np.round( np.dot(Ts_6,sxyz),2) )