{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ressort hélicoïdal - formules Bresse - visu 3D"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Paramètrisation"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"theta_A ' ' theta_B"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Ressort à ' 3 ' spires, theta_B = ' 6*pi"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Données géométriques fixes\n",
"var('R r theta_A theta_B beta n S S_1 I J'); \n",
"# Variables géométriques\n",
"var('rho theta phi alpha')\n",
"assume(theta>0); assume(alpha>0); assume(phi>0)\n",
"S_1 = S_1.subs(S_1=S)\n",
"# Intervalle de l'abscisse curviligne\n",
"var('theta_A theta_B'); show(theta_A, ' ',theta_B); theta_A = 0;\n",
"# combien de spires\n",
"n = 3; theta_B = 2*n*pi; show('Ressort à ', n, ' spires, theta_B = ',theta_B)\n",
"#beta = pi/8; show('Pas hélicoïdal: beta =',beta)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Force résultante axiale, F =' (0, 0, F_z)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Moment résultant M =' (0, 0, 0)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Données sthéniques et matériau\n",
"var('E G F_x F_y F_z M_x M_y M_z'); #show(E,G,F_x, F_y, F_z, M_x, M_y, M_z)\n",
"#G = E/2;\n",
"F_x = 0; F_y = 0; M_x = 0; M_y = 0; M_z = 0;\n",
"F = vector(SR,3,[F_x, F_y, F_z]); show('Force résultante axiale, F =', F)\n",
"M = vector(SR,3,[M_x, M_y, M_z]); show('Moment résultant M =', M)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Base cylindrique: '"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'e_R =' (cos(theta), sin(theta), 0) ' e_t =' (-sin(theta), cos(theta), 0) ' e_Z =' (0, 0, 1)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Base locale en G: '"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'e_R =' (cos(theta), sin(theta), 0) ' e_tau =' (-cos(beta)*sin(theta), cos(beta)*cos(theta), sin(beta)) ' e_n =' (sin(beta)*sin(theta), -cos(theta)*sin(beta), cos(beta))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Base cylindrique en G (d'abscisse theta): e_R, e_t, e_Z\n",
"e_R = vector(SR,3,[cos(theta),sin(theta),0]); e_t = vector(SR,3,[-sin(theta),cos(theta),0]);\n",
"e_Z = vector(SR,3,[0,0,1]); \n",
"show('Base cylindrique: ')\n",
"show('e_R =',e_R,' e_t =', e_t,' e_Z =',e_Z); \n",
"# base locale en G (theta): e_R, e_tau, e_n\n",
"e_tau = cos(beta)*e_t + sin(beta)*e_Z; e_n = -sin(beta)*e_t + cos(beta)*e_Z;\n",
"show('Base locale en G: ')\n",
"show('e_R =',e_R,' e_tau =', e_tau, ' e_n =',e_n);"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Couple induit en B: M =' (0, F_z*R, 0)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Couple induit par la force axiale à l'extrémité B\n",
"M = -R*e_R.cross_product(F); M = M.subs(theta=theta_B); show('Couple induit en B: M =',M)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'Coordonées de G, X =' (R*cos(theta), R*sin(theta), R*theta*sin(beta))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Positions des points G\n",
"X = vector(SR,3,[R*cos(theta),R*sin(theta),R*theta*sin(beta)]); show('Coordonées de G, X =',X);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Visualisation 3D"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"# Valeurs numériques (pour affichage)\n",
"RR = 1; rr = RR/5; bbeta = pi/32; EE = 1000; GG = EE/2;\n",
"SS = pi*rr^2; SS_1 = SS; II = pi*rr^4/4; JJ = pi*rr^4/2; \n",
"FF_x = 0; FF_y = 0; FF_z = 1/20; MM_x = 0; MM_y = 0; MM_z = 0;# ....."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'XX = ' (cos(theta), sin(theta), theta*sin(1/32*pi))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Ligne neutre initiale\n",
"XX = X.subs(R=RR,beta=bbeta); show('XX = ',XX)\n",
"Init = parametric_plot3d((XX[0],XX[1],XX[2]), (theta,0,theta_B),color='black')\n",
"show(Init)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'e_r = ' (sin(beta)*sin(phi)*sin(theta) + cos(phi)*cos(theta), -cos(theta)*sin(beta)*sin(phi) + cos(phi)*sin(theta), cos(beta)*sin(phi))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'e_r = ' (sin(1/32*pi)*sin(phi)*sin(theta) + cos(phi)*cos(theta), -cos(theta)*sin(1/32*pi)*sin(phi) + cos(phi)*sin(theta), cos(1/32*pi)*sin(phi))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'e_z = ' (cos(phi)*sin(beta)*sin(theta) - cos(theta)*sin(phi), -cos(phi)*cos(theta)*sin(beta) - sin(phi)*sin(theta), cos(beta)*cos(phi))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Bases en M, point du domaine 3D\n",
"e_r = cos(phi)*e_R + sin(phi)*e_n; show('e_r = ',e_r)\n",
"e_r = e_r.subs(beta=bbeta); show('e_r = ',e_r)\n",
"e_z = -sin(phi)*e_R + cos(phi)*e_n; show('e_z = ',e_z)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'X_A =' (rho*cos(phi) + 1, -rho*sin(1/32*pi)*sin(phi), rho*cos(1/32*pi)*sin(phi))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
""
],
"text/plain": [
"'X_B =' (rho*cos(phi) + 1, -rho*sin(1/32*pi)*sin(phi), rho*cos(1/32*pi)*sin(phi) + 6*pi*sin(1/32*pi))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Sections extrémales\n",
"var('rho z'); OPA = 0.5;\n",
"X_A = (XX + rho*e_r).subs(theta=theta_A); show('X_A =',X_A)\n",
"S_A = parametric_plot3d((X_A[0],X_A[1],X_A[2]),(rho,0,rr),(phi,0,2*pi),opacity=OPA,color='orange');\n",
"X_B = (XX + rho*e_r).subs(theta=theta_B); show('X_B =',X_B)\n",
"S_B = parametric_plot3d((X_B[0],X_B[1],X_B[2]),(rho,0,rr),(phi,0,2*pi),opacity=OPA,color='orange');\n",
"#show(Init + S_A + S_B)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
""
],
"text/plain": [
"'X_lat = ' (1/5*sin(1/32*pi)*sin(phi)*sin(theta) + 1/5*cos(phi)*cos(theta) + cos(theta), -1/5*cos(theta)*sin(1/32*pi)*sin(phi) + 1/5*cos(phi)*sin(theta) + sin(theta), theta*sin(1/32*pi) + 1/5*cos(1/32*pi)*sin(phi))"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Visualisation de la configuration initiale\n",
"X_lat = XX + rr*e_r; show('X_lat = ',X_lat)\n",
"S_lat = parametric_plot3d((X_lat[0],X_lat[1],X_lat[2]),(theta,theta_A,theta_B),(phi,0,2*pi),opacity=OPA,color='green',\n",
" plot_points=[100,100]);\n",
"INIT = Init + S_A + S_B + S_lat; show(INIT)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Efforts généralisés"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Raideur par Castigliano"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Formules de Bresse"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Visualisation 3D"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 9.1",
"language": "sage",
"name": "sagemath"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}