<jupyter_start><jupyter_text>Shell geometry  Init symbols for *sympy*<jupyter_code>from sympy import *
from geom_util import *
from sympy.vector import CoordSys3D
import matplotlib.pyplot as plt
import sys
sys.path.append("../")

%matplotlib inline

%reload_ext autoreload
%autoreload 2
%aimport geom_util
# Any tweaks that normally go in .matplotlibrc, etc., should explicitly go here
%config InlineBackend.figure_format='retina'
plt.rcParams['figure.figsize'] = (12, 12)

    
plt.rc('text', usetex=True)
    
plt.rc('font', family='serif')
# SMALL_SIZE = 42
# MEDIUM_SIZE = 42
# BIGGER_SIZE = 42
    
# plt.rc('font', size=SMALL_SIZE)          # controls default text sizes
# plt.rc('axes', titlesize=SMALL_SIZE)     # fontsize of the axes title
# plt.rc('axes', labelsize=MEDIUM_SIZE)    # fontsize of the x and y labels
# plt.rc('xtick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
# plt.rc('ytick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
# plt.rc('legend', fontsize=SMALL_SIZE)    # legend fontsize
# plt.rc('figure', titlesize=BIGGER_SIZE)  # fontsize of the figure title

init_printing()
N = CoordSys3D('N')
alpha1, alpha2, alpha3 = symbols("alpha_1 alpha_2 alpha_3", real = True, positive=True)<jupyter_output><empty_output><jupyter_text>Cylindrical coordinates<jupyter_code>R, L = symbols("R L", real = True, positive=True)
a1 = pi / 2 + (L / 2 - alpha1)/R

x = (R + alpha3)* cos(a1)
y = alpha2
z = (R + alpha3) * sin(a1)

r = x*N.i + y*N.j + z*N.k
R1=r.diff(alpha1)
R2=r.diff(alpha2)
R3=r.diff(alpha3)
R1
R2
R3<jupyter_output><empty_output><jupyter_text>Draw<jupyter_code>import plot

%aimport plot

alpha1_x = lambdify([R, L, alpha1, alpha3], x, "numpy")
alpha3_z = lambdify([R, L, alpha1, alpha3], z, "numpy")

R_num = 1/0.8
L_num = 2
h_num = 0.1

x1_start = 0
x1_end = L_num
x3_start = -h_num/2
x3_end = h_num/2

def alpha_to_x(a1, a2, a3):
    x=alpha1_x(R_num, L_num, a1, a3)
    z=alpha3_z(R_num, L_num, a1, a3)
    return x, 0, z
    

plot.plot_init_geometry_2(x1_start, x1_end, x3_start, x3_end, alpha_to_x)
%aimport plot

R3_1=R3.dot(N.i)
R3_3=R3.dot(N.k)

R3_1_x = lambdify([R, L, alpha1, alpha3], R3_1, "numpy")
R3_3_z = lambdify([R, L, alpha1, alpha3], R3_3, "numpy")

def R3_to_x(a1, a2, a3):
    x=R3_1_x(R_num, L_num, a1, a3)
    z=R3_3_z(R_num, L_num, a1, a3)
    return x, 0, z

plot.plot_vectors(x1_start, x1_end, 0, alpha_to_x, R3_to_x)
%aimport plot

R1_1=R1.dot(N.i)
R1_3=R1.dot(N.k)

R1_1_x = lambdify([R, L, alpha1, alpha3], R1_1, "numpy")
R1_3_z = lambdify([R, L, alpha1, alpha3], R1_3, "numpy")

def R1_to_x(a1, a2, a3):
    x=R1_1_x(R_num, L_num, a1, a3)
    z=R1_3_z(R_num, L_num, a1, a3)
    return x, 0, z

plot.plot_vectors(x1_start, x1_end, 0, alpha_to_x, R1_to_x)<jupyter_output><empty_output><jupyter_text>Lame params<jupyter_code>H1 = 1+alpha3/R
H2=S(1)
H3=S(1)

H=[H1, H2, H3]
DIM=3
dH = zeros(DIM,DIM)
for i in range(DIM):
    dH[i,0]=H[i].diff(alpha1)
    dH[i,1]=H[i].diff(alpha2)
    dH[i,2]=H[i].diff(alpha3)

dH<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15392254220456802, 'fraction_numerical': 0.05230056272757365, 'mean_word_length': 4.767175572519084, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '507069', 'license': 'MIT', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1447, 'n_words': 297, 'path': 'py/notebooks/.ipynb_checkpoints/MatricesForPlaneShells-checkpoint.ipynb', 'repo_name': 'tarashor/vibrations', 'size': '3021'}