Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Deriving the non-linear cylinder 3D kinematics

1Deriving the non-linear cylinder 3D kinematics

from sympy import Function, Symbol, sqrt, cos, sin
from sympy import init_printing, simplify

r = Symbol('r', constant=True)
x = Symbol('x')
theta = Symbol('theta')
z = Symbol('z')
u = Function('u')(x,theta,z)
v = Function('v')(x,theta,z)
w = Function('w')(x,theta,z)
R = Function('R')(z)

NL = 0 # NOTE set to 1 for full nonlinear relations, 0 for linear relations

# Global coordinates
X1 = R*cos(theta)
X2 = R*sin(theta)
X3 = -x

# Local coordinates
x1 = x
x2 = theta
x3 = z

H1 = sqrt(X1.diff(x1)**2 + X2.diff(x1)**2 + X3.diff(x1)**2)
H2 = sqrt(X1.diff(x2)**2 + X2.diff(x2)**2 + X3.diff(x2)**2)
H3 = sqrt(X1.diff(x3)**2 + X2.diff(x3)**2 + X3.diff(x3)**2)
                
w1 = ((H1*w).diff(x2) - (H2*v).diff(x3))/(2*H2*H3)
w2 = ((H1*u).diff(x3) - (H3*w).diff(x1))/(2*H1*H3)
w3 = ((H2*v).diff(x1) - (H1*u).diff(x2))/(2*H1*H2)

e11 = u.diff(x1)/H1 + v*H1.diff(x2)/(H1*H2) + w*H1.diff(x3)/(H1*H3)
e22 = u*H2.diff(x1)/(H1*H2) + v.diff(x2)/H2 + w*H2.diff(x3)/(H2*H3)
e33 = u*H3.diff(x1)/(H1*H3) + v*H3.diff(x2)/(H2*H3) + w.diff(x3)/H3
e12 = H1*(u/H1).diff(x2)/H2 + H2*(v/H2).diff(x1)/H1
e13 = H1*(u/H1).diff(x3)/H3 + H3*(w/H3).diff(x1)/H1
e23 = H2*(v/H2).diff(x3)/H3 + H3*(w/H3).diff(x2)/H2

ep11 = ((e13/2 - w2)**2 + (e12/2 + w3)**2 + e11**2)/2*NL + e11
ep22 = ((e23/2 + w1)**2 + (e12/2 - w3)**2 + e22**2)/2*NL + e22
ep33 = ((e23/2 - w1)**2 + (e13/2 + w2)**2 + e33**2)/2*NL + e33
ep12 = ((e23/2 + w1)*(e13/2 - w2) + e11*(e12/2 - w3) + e22*(e12/2 + w3))*NL + e12
ep13 = (e33*(e13/2 - w2) + e11*(e13/2 + w2) + (e23/2 - w1)*(e12/2 + w3))*NL + e13
ep23 = (e22*(e23/2 - w1) + e33*(e23/2 + w1) + (e13/2 + w2)*(e12/2 - w3))*NL + e23

exx = ep11
ett = ep22
ezz = ep33
gxt = ep12
gxz = ep13
gtz = ep23

Printing kinematic equations

The following order is printed next:

εxx\varepsilon_{xx} εθθ\varepsilon_{\theta\theta} εzz\varepsilon_{zz} γxθ\gamma_{x\theta} γxz\gamma_{xz} γθz\gamma_{\theta z}

init_printing()
simplify(exx)
Loading...
simplify(ett)
Loading...
simplify(ezz)
Loading...
simplify(gxt)
Loading...
simplify(gxz)
Loading...
simplify(gtz)
Loading...