{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Please run the code cell below to correctly initialize the notebook\n", "\n", "If a bug is found an issue can be created on the [Github](https://github.com/saullocastro/tuduam/issues) page" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: tuduam in c:\\users\\damie\\anaconda3\\envs\\tuduam_notebook\\lib\\site-packages (2024.15)\n", "Requirement already satisfied: numpy in c:\\users\\damie\\anaconda3\\envs\\tuduam_notebook\\lib\\site-packages (from tuduam) (1.26.4)\n", "Requirement already satisfied: scipy in c:\\users\\damie\\anaconda3\\envs\\tuduam_notebook\\lib\\site-packages (from tuduam) (1.12.0)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "fatal: destination path 'tuduam' already exists and is not an empty directory.\n" ] } ], "source": [ "!pip install tuduam\n", "!git clone https://github.com/saullocastro/tuduam.git\n", "# If the following error occurs \"fatal: destination path 'tuduam' already exists and is not an empty directory.\" please continue as your environment is already set up correctly" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Structural analysis of a wing section\n", "\n", "Performing a stress analysis of the complex geometry of the multicell wingbox shown in [figure 1](#figure1) can be complicated and tedious. Additionally, for a preliminary investigation often speed and simplicity are of greater importance, on the other hand a final solution must be as exact as circumstances allow. In order to meet these standard we idealize the wingbox into a simpler mechanical model which under given loading conditions behaves in nearly the same manner as the original structure.\n", "\n", "
\n", "

\n", " \n", "
\n", "

\n", "

\n", "Figure 2: Idealization of a wingbox\n", "

\n", "
\n", "\n", "To get to this mechical model we replace the stringers and spar flanges with concentrations of areas called booms over which the direct stress is constant and which are located along the midline of the skin. Furthermore we assume that all shear stresses are carried by the skin and all direct stresses by these booms. An important consideration here is that the direct stress carrying capacity of the skin may be allowed for by increasing each boom area by an area equivalent to the direct stress carrying capacity of the adjacent skin panels. Using this assumption the shearflow through the skin section between the booms will be constant and will only change when encountering a boom. If you want more details on this idealization please refer to source 1. \n", "\n", "## The skin addition to the boom areas\n", "\n", "As previously mentioned in order to make the assumption that the skin thickness is zero we first have to incorportate the direct stress carrying capacity of the skin into the booms. To find this addition we can perform a moment equivalence for the two panels shown [figure 2](#figure2). This wil result in the equation 1.\n", "\n", "
\n", "\n", "$$\n", "\\begin{equation}\n", "\\tag{1}\n", "B_2 = \\frac{t_D b}{6}(2 + \\frac{\\sigma_1}{\\sigma_2})\n", "\\end{equation}\n", "$$\n", "\n", "Where $\\sigma_1$, $\\sigma_2$ are the direct stresses at boom 1 and 2, respectively. As seen from equation 1, the idealization is dependent on the loading case as the direct stresses would change for different loadings. However, you might correctly see the chicken and egg problem here. Therefore, we have to rewrite equation 1, we can do this by assuming that the direct stress is mostly related to the lift and therefore using $\\sigma = \\frac{M \\cdot y}{Ixx}$ we can rewrite equation 1 to equation 2.\n", "\n", "$$\n", "\\begin{equation}\n", "\\tag{2}\n", "B_2 = \\frac{t_D b}{6}(2 + \\frac{y_1}{y_2})\n", "\\end{equation}\n", "$$\n", " \n", "
\n", "

\n", " \n", "
\n", "

\n", "

\n", "Figure 3: Idealization of a panel\n", "

\n", "
\n", "\n", "## Sources\n", "\n", "1. Megson T. H. G. 1972. Aircraft Structures for Engineering Students. London: Edward Arnold. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Discretizing an airfoil\n", "\n", "In the code cell below we discretize an airfoil using the methods explained above. Here we make use of the repository `tuduam` which you have seen before for the preliminary sizing of the propeller. In this notebook however we will be working with the `structures` module of the repository. More specifically in the following code cell we'll utilize `discretize_airfoil`. We'll also plot the result using `plotly`. You can see information on each boom by hovering over it with your mouse." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\damie\\anaconda3\\envs\\tuduam_notebook\\Lib\\site-packages\\tuduam\\structures\\wingbox.py:1389: UserWarning:\n", "\n", "7 was not an even number and will be floored for conservative reasons\n", "\n", "c:\\Users\\damie\\anaconda3\\envs\\tuduam_notebook\\Lib\\site-packages\\tuduam\\structures\\wingbox.py:635: UserWarning:\n", "\n", "Negative boom areas encountered this is currently a bug, temporary fix takes the absolute value\n", "\n" ] }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertext": [ "Boom : 0, Area: 101.53 mm^2", "Boom : 1, Area: 325.69 mm^2" ], "line": { "color": "#FB0D0D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0, 0.15 ], "y": [ 0.029309684500079244, 0.15354256979503877 ] }, { "hovertext": [ "Boom : 1, Area: 325.69 mm^2", "Boom : 2, Area: 320.1 mm^2" ], "line": { "color": "#222A2A", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.15, 0.3 ], "y": [ 0.15354256979503877, 0.20464678862572355 ] }, { "hovertext": [ "Boom : 2, Area: 320.1 mm^2", "Boom : 3, Area: 315.91 mm^2" ], "line": { "color": "#2E91E5", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.3, 0.44999999999999996 ], "y": [ 0.20464678862572355, 0.22602463274806459 ] }, { "hovertext": [ "Boom : 3, Area: 315.91 mm^2", "Boom : 4, Area: 895.28 mm^2" ], "line": { "color": "#750D86", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.44999999999999996, 0.6 ], "y": [ 0.22602463274806459, 0.2268386392490801 ] }, { "hovertext": [ "Boom : 4, Area: 895.28 mm^2", "Boom : 5, Area: 420.38 mm^2" ], "line": { "color": "#FC0080", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.6, 0.7 ], "y": [ 0.2268386392490801, 0.21900740247813294 ] }, { "hovertext": [ "Boom : 5, Area: 420.38 mm^2", "Boom : 6, Area: 422.75 mm^2" ], "line": { "color": "#00A08B", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.7, 0.8 ], "y": [ 0.21900740247813294, 0.20640765133420702 ] }, { "hovertext": [ "Boom : 6, Area: 422.75 mm^2", "Boom : 7, Area: 424.67 mm^2" ], "line": { "color": "#778AAE", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.8, 0.9 ], "y": [ 0.20640765133420702, 0.1907249140481298 ] }, { "hovertext": [ "Boom : 7, Area: 424.67 mm^2", "Boom : 8, Area: 862.64 mm^2" ], "line": { "color": "#AF0038", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.9, 1 ], "y": [ 0.1907249140481298, 0.17345474321258494 ] }, { "hovertext": [ "Boom : 8, Area: 862.64 mm^2", "Boom : 9, Area: 561.81 mm^2" ], "line": { "color": "#222A2A", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1, 1.1333333333333333 ], "y": [ 0.17345474321258494, 0.14905100455550918 ] }, { "hovertext": [ "Boom : 9, Area: 561.81 mm^2", "Boom : 10, Area: 562.77 mm^2" ], "line": { "color": "#862A16", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.1333333333333333, 1.2666666666666666 ], "y": [ 0.14905100455550918, 0.12386673203031567 ] }, { "hovertext": [ "Boom : 10, Area: 562.77 mm^2", "Boom : 11, Area: 658.59 mm^2" ], "line": { "color": "#222A2A", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.2666666666666666, 1.4 ], "y": [ 0.12386673203031567, 0.0986905415696286 ] }, { "hovertext": [ "Boom : 11, Area: 658.59 mm^2", "Boom : 12, Area: 635.43 mm^2" ], "line": { "color": "#B2828D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.4, 1.5499999999999998 ], "y": [ 0.0986905415696286, 0.07125272289974874 ] }, { "hovertext": [ "Boom : 12, Area: 635.43 mm^2", "Boom : 13, Area: 681.32 mm^2" ], "line": { "color": "#B2828D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.5499999999999998, 1.7 ], "y": [ 0.07125272289974874, 0.04559742459594489 ] }, { "hovertext": [ "Boom : 13, Area: 681.32 mm^2", "Boom : 14, Area: 608.28 mm^2" ], "line": { "color": "#FC0080", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.7, 1.85 ], "y": [ 0.04559742459594489, 0.022474831927334432 ] }, { "hovertext": [ "Boom : 14, Area: 608.28 mm^2", "Boom : 15, Area: 641.41 mm^2" ], "line": { "color": "#DA60CA", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.85, 2 ], "y": [ 0.022474831927334432, 0.0025141610184362937 ] }, { "hovertext": [ "Boom : 15, Area: 641.41 mm^2", "Boom : 16, Area: 606.86 mm^2" ], "line": { "color": "#B68100", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 2, 1.85 ], "y": [ 0.0025141610184362937, -0.022805011042578132 ] }, { "hovertext": [ "Boom : 16, Area: 606.86 mm^2", "Boom : 17, Area: 614.53 mm^2" ], "line": { "color": "#620042", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.85, 1.7 ], "y": [ -0.022805011042578132, -0.0365902247755024 ] }, { "hovertext": [ "Boom : 17, Area: 614.53 mm^2", "Boom : 18, Area: 615.04 mm^2" ], "line": { "color": "#A777F1", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.7, 1.5499999999999998 ], "y": [ -0.0365902247755024, -0.04486321937278809 ] }, { "hovertext": [ "Boom : 18, Area: 615.04 mm^2", "Boom : 19, Area: 827.15 mm^2" ], "line": { "color": "#B68100", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.5499999999999998, 1.4 ], "y": [ -0.04486321937278809, -0.0484418213073111 ] }, { "hovertext": [ "Boom : 19, Area: 827.15 mm^2", "Boom : 20, Area: 550.6 mm^2" ], "line": { "color": "#6C4516", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.4, 1.2666666666666666 ], "y": [ -0.0484418213073111, -0.04823215123321561 ] }, { "hovertext": [ "Boom : 20, Area: 550.6 mm^2", "Boom : 21, Area: 551.02 mm^2" ], "line": { "color": "#00A08B", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.2666666666666666, 1.1333333333333333 ], "y": [ -0.04823215123321561, -0.04522523749055654 ] }, { "hovertext": [ "Boom : 21, Area: 551.02 mm^2", "Boom : 22, Area: 567.44 mm^2" ], "line": { "color": "#6C4516", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.1333333333333333, 1 ], "y": [ -0.04522523749055654, -0.03969632559294687 ] }, { "hovertext": [ "Boom : 22, Area: 567.44 mm^2", "Boom : 23, Area: 419.72 mm^2" ], "line": { "color": "#B68100", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1, 0.9 ], "y": [ -0.03969632559294687, -0.03400183959560957 ] }, { "hovertext": [ "Boom : 23, Area: 419.72 mm^2", "Boom : 24, Area: 420.66 mm^2" ], "line": { "color": "#E15F99", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.9, 0.8 ], "y": [ -0.03400183959560957, -0.027104400288423817 ] }, { "hovertext": [ "Boom : 24, Area: 420.66 mm^2", "Boom : 25, Area: 421.96 mm^2" ], "line": { "color": "#B68100", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.8, 0.7 ], "y": [ -0.027104400288423817, -0.01986343189149967 ] }, { "hovertext": [ "Boom : 25, Area: 421.96 mm^2", "Boom : 26, Area: 105.79 mm^2" ], "line": { "color": "#B2828D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.7, 0.6 ], "y": [ -0.01986343189149967, -0.013558823788774203 ] }, { "hovertext": [ "Boom : 26, Area: 105.79 mm^2", "Boom : 27, Area: 328.18 mm^2" ], "line": { "color": "#DA60CA", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.6, 0.44999999999999996 ], "y": [ -0.013558823788774203, -0.008456863977985873 ] }, { "hovertext": [ "Boom : 27, Area: 328.18 mm^2", "Boom : 28, Area: 327.36 mm^2" ], "line": { "color": "#6C4516", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.44999999999999996, 0.3 ], "y": [ -0.008456863977985873, -0.011280282682942247 ] }, { "hovertext": [ "Boom : 28, Area: 327.36 mm^2", "Boom : 29, Area: 277.42 mm^2" ], "line": { "color": "#EB663B", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.3, 0.15 ], "y": [ -0.011280282682942247, -0.021353654117750257 ] }, { "hovertext": [ "Boom : 29, Area: 277.42 mm^2", "Boom : 0, Area: 101.53 mm^2" ], "line": { "color": "#750D86", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.15, 0 ], "y": [ -0.021353654117750257, 0.029309684500079244 ] }, { "hovertext": [ "Boom : 4, Area: 895.28 mm^2", "Boom : 26, Area: 105.79 mm^2" ], "line": { "color": "#A777F1", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 0.6, 0.6 ], "y": [ 0.2268386392490801, -0.013558823788774203 ] }, { "hovertext": [ "Boom : 8, Area: 862.64 mm^2", "Boom : 22, Area: 567.44 mm^2" ], "line": { "color": "#B2828D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1, 1 ], "y": [ 0.17345474321258494, -0.03969632559294687 ] }, { "hovertext": [ "Boom : 11, Area: 658.59 mm^2", "Boom : 19, Area: 827.15 mm^2" ], "line": { "color": "#B2828D", "width": 4 }, "marker": { "color": "red", "size": 12, "symbol": "circle" }, "mode": "lines+markers", "opacity": 0.7, "showlegend": false, "type": "scatter", "x": [ 1.4, 1.4 ], "y": [ 0.0986905415696286, -0.0484418213073111 ] } ], "layout": { "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Discretization of airfoil" }, "xaxis": { "title": { "text": "X-axis" } }, "yaxis": { "title": { "text": "Y-axis" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import tuduam as tud\n", "from tuduam.structures.wingbox import discretize_airfoil\n", "import os \n", "import numpy as np\n", "\n", "\n", "data_path = os.path.join(\".\",'tuduam/tests/naca45112.txt')\n", "chord = 2 # meters\n", "attr_dict = {\n", " \"n_cell\":4,\n", " \"spar_loc_nondim\":[0.3, 0.5, 0.7],\n", " \"t_sk_cell\":[0.002,0.004,0.004, 0.004],\n", " \"area_str\":20e-6,\n", " \"t_sp\":0.008,\n", " \"str_cell\":[8,8,7,8],\n", "}\n", "\n", "\n", "# \n", "wingbox_struct = tud.Wingbox(**attr_dict)\n", "wingbox = discretize_airfoil(data_path, chord, wingbox_struct)\n", "wingbox.plot_geometry()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Direct Stress Analysis\n", "\n", "Direct stress in the cross section of a wingbox are caused by the bending moments caused by the lift and drag. However because the lift forces are significantly larger than the drag forces involved we have chosen to for now ignore the stresses caused by the drag in our model. Additionally, we can generally say the contribution $I_{xy}$ of neglible hence it also left out. In future works this could also be taken into account however. Using these assume leaves us with equation 3.\n", "\n", "$$\n", "\\begin{equation}\n", "\\tag{3}\n", "\\sigma_z = \\frac{M_y \\cdot y}{I_{xx}}\n", "\\end{equation}\n", "$$\n", "\n", "Getting the values of $I_{xx}$ is very much so simplified due to the definition of our booms. It can simply be found by using equation 4.\n", "\n", "$$\n", "\\begin{equation}\n", "\\tag{4}\n", "I_{xx} = \\sum^n_{n =0} B_n y_n^2 \n", "\\end{equation}\n", "$$\n", "\n", "It is then straightforward to get the stress at each boom. See the code cell below. More information on each boom can be seen by hovering over the boom. In this case `color` is a reference to the stress level at that boom." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "x=%{x}
y=%{y}
color=%{marker.color}", "legendgroup": "", "marker": { "color": [ 8.23441935478897, 46.33533457990884, 63.8910915478082, 73.09536198757951, 76.52231802066308, 76.45434498784773, 75.04668005059243, 72.77286451525039, 70.05306691742172, 66.03985215205418, 61.807350031659695, 57.57711852964726, 53.066855859653145, 49.057383984683874, 45.75946396222134, 43.34987113196837, 33.03830296397705, 25.96714667056248, 20.444622670962534, 16.240966426528217, 13.456970303793362, 11.458846761993943, 10.169266855995563, 9.636929710565024, 9.442556694959789, 9.344696577180777, 8.983770395705834, 7.218877545187924, 3.2273865119464697, -2.800944975167289 ], "coloraxis": "coloraxis", "line": { "color": "DarkSlateGrey", "width": 2 }, "size": 12, "symbol": "circle" }, "mode": "markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 0, 0.15, 0.3, 0.44999999999999996, 0.6, 0.7, 0.8, 0.9, 1, 1.1333333333333333, 1.2666666666666666, 1.4, 1.5499999999999998, 1.7, 1.85, 2, 1.85, 1.7, 1.5499999999999998, 1.4, 1.2666666666666666, 1.1333333333333333, 1, 0.9, 0.8, 0.7, 0.6, 0.44999999999999996, 0.3, 0.15 ], "xaxis": "x", "y": [ 0.029309684500079244, 0.15354256979503877, 0.20464678862572355, 0.22602463274806459, 0.2268386392490801, 0.21900740247813294, 0.20640765133420702, 0.1907249140481298, 0.17345474321258494, 0.14905100455550918, 0.12386673203031567, 0.0986905415696286, 0.07125272289974874, 0.04559742459594489, 0.022474831927334432, 0.0025141610184362937, -0.022805011042578132, -0.0365902247755024, -0.04486321937278809, -0.0484418213073111, -0.04823215123321561, -0.04522523749055654, -0.03969632559294687, -0.03400183959560957, -0.027104400288423817, -0.01986343189149967, -0.013558823788774203, -0.008456863977985873, -0.011280282682942247, -0.021353654117750257 ], "yaxis": "y" } ], "layout": { "coloraxis": { "colorbar": { "title": { "text": "color" } }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "legend": { "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Direct stress" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "x" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "y" } } } } }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", "\n" ] }, { "data": { "text/html": [ "
Maximum stress is 76.52231802066308 MPa\n",
       "
\n" ], "text/plain": [ "Maximum stress is \u001b[1;36m76.52231802066308\u001b[0m MPa\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
$Ixx = 157000455.47923973 mm^4\n",
       "
\n" ], "text/plain": [ "$Ixx = \u001b[1;36m157000455.47923973\u001b[0m mm^\u001b[1;36m4\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import rich\n", "\n", "wingbox.stress_analysis(4e3, 2e3, 8e3, 38e3, 0.3, 24e9)\n", "wingbox.plot_direct_stresses()\n", "\n", "print(\"\\n \\n\")\n", "rich.print(f\"Maximum stress is {max([i.sigma for i in wingbox.boom_dict.values()])/1e6} MPa\")\n", "rich.print(f\"$Ixx = {wingbox.Ixx*1e12} mm^4\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Shear Stress analysis\n", "\n", "The direct stresses were straight forward however computing the shear stresses is quite more involved. As mentioned earlier, the shear flow over a panel is constant and only jumps at the one of the booms. When we have an open sections this gives us an easy point to start from as we know that at the outer edge of the structure the shear flow has to be zero. However, a wingbox is a closed structure so we have to cut the structure in each cell to give us a starting point. This is as shown in [figure 3](#figure3) indicated by the two small parrallel lines. \n", "\n", "
\n", "

\n", " \n", "
\n", "

\n", "

\n", "Figure 4: Starting point of the wingbox analysis\n", "

\n", "
\n", "\n", "However, these cut's have to be \"mended\", we do this by applying a complementary shear flow in each cell. We can solve for these complementary shear flows by assuming no warping will occur and hence the amount of twist per unit length should be the same in each cell. This would give us n + 1 unknowns however with n equations. Thus, the final equation can be found from moment equivalence of all the shear flows and the internal shear itself. A complete description of this process is described in source 1 which has been previously shown. Now let us apply it. See the code cell below." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertext": "Panel: 0, Stress: 1.5289195292498683 MPa", "line": { "color": "rgb(0.987621, 0.815978, 0.144363)", "width": 4 }, "marker": { "color": "rgb(0.987621, 0.815978, 0.144363)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0, 0.15 ], "y": [ 0.029309684500079244, 0.15354256979503877 ] }, { "hovertext": "Panel: 1, Stress: 1.529304853181467 MPa", "line": { "color": "rgb(0.987621, 0.815978, 0.144363)", "width": 4 }, "marker": { "color": "rgb(0.987621, 0.815978, 0.144363)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.15, 0.3 ], "y": [ 0.15354256979503877, 0.20464678862572355 ] }, { "hovertext": "Panel: 2, Stress: 1.5302948259404419 MPa", "line": { "color": "rgb(0.986509, 0.822401, 0.143557)", "width": 4 }, "marker": { "color": "rgb(0.986509, 0.822401, 0.143557)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.3, 0.44999999999999996 ], "y": [ 0.20464678862572355, 0.22602463274806459 ] }, { "hovertext": "Panel: 3, Stress: 1.5315942615362816 MPa", "line": { "color": "rgb(0.986509, 0.822401, 0.143557)", "width": 4 }, "marker": { "color": "rgb(0.986509, 0.822401, 0.143557)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.44999999999999996, 0.6 ], "y": [ 0.22602463274806459, 0.2268386392490801 ] }, { "hovertext": "Panel: 4, Stress: 1.6667776728700354 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.6, 0.7 ], "y": [ 0.2268386392490801, 0.21900740247813294 ] }, { "hovertext": "Panel: 5, Stress: 1.6677317291900535 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.7, 0.8 ], "y": [ 0.21900740247813294, 0.20640765133420702 ] }, { "hovertext": "Panel: 6, Stress: 1.6686652483151543 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.8, 0.9 ], "y": [ 0.20640765133420702, 0.1907249140481298 ] }, { "hovertext": "Panel: 7, Stress: 1.6695574128918829 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.9, 1 ], "y": [ 0.1907249140481298, 0.17345474321258494 ] }, { "hovertext": "Panel: 8, Stress: 1.323807333672778 MPa", "line": { "color": "rgb(0.979233, 0.607532, 0.238013)", "width": 4 }, "marker": { "color": "rgb(0.979233, 0.607532, 0.238013)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1, 1.1333333333333333 ], "y": [ 0.17345474321258494, 0.14905100455550918 ] }, { "hovertext": "Panel: 9, Stress: 1.3248041535197295 MPa", "line": { "color": "rgb(0.979233, 0.607532, 0.238013)", "width": 4 }, "marker": { "color": "rgb(0.979233, 0.607532, 0.238013)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.1333333333333333, 1.2666666666666666 ], "y": [ 0.14905100455550918, 0.12386673203031567 ] }, { "hovertext": "Panel: 10, Stress: 1.3256861484253846 MPa", "line": { "color": "rgb(0.980556, 0.613039, 0.234646)", "width": 4 }, "marker": { "color": "rgb(0.980556, 0.613039, 0.234646)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.2666666666666666, 1.4 ], "y": [ 0.12386673203031567, 0.0986905415696286 ] }, { "hovertext": "Panel: 11, Stress: 0.6023182924873112 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.4, 1.5499999999999998 ], "y": [ 0.0986905415696286, 0.07125272289974874 ] }, { "hovertext": "Panel: 12, Stress: 0.6010185210912949 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.5499999999999998, 1.7 ], "y": [ 0.07125272289974874, 0.04559742459594489 ] }, { "hovertext": "Panel: 13, Stress: 0.6016642479461568 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.7, 1.85 ], "y": [ 0.04559742459594489, 0.022474831927334432 ] }, { "hovertext": "Panel: 14, Stress: 0.6021464286610909 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.85, 2 ], "y": [ 0.022474831927334432, 0.0025141610184362937 ] }, { "hovertext": "Panel: 15, Stress: 0.6025857388499408 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 2, 1.85 ], "y": [ 0.0025141610184362937, -0.022805011042578132 ] }, { "hovertext": "Panel: 16, Stress: 0.6026559361508854 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.85, 1.7 ], "y": [ -0.022805011042578132, -0.0365902247755024 ] }, { "hovertext": "Panel: 17, Stress: 0.6024831850239778 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.7, 1.5499999999999998 ], "y": [ -0.0365902247755024, -0.04486321937278809 ] }, { "hovertext": "Panel: 18, Stress: 0.6021169425955124 MPa", "line": { "color": "rgb(0.546157, 0.038954, 0.64701)", "width": 4 }, "marker": { "color": "rgb(0.546157, 0.038954, 0.64701)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.5499999999999998, 1.4 ], "y": [ -0.04486321937278809, -0.0484418213073111 ] }, { "hovertext": "Panel: 19, Stress: 1.3239757749145342 MPa", "line": { "color": "rgb(0.979233, 0.607532, 0.238013)", "width": 4 }, "marker": { "color": "rgb(0.979233, 0.607532, 0.238013)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.4, 1.2666666666666666 ], "y": [ -0.0484418213073111, -0.04823215123321561 ] }, { "hovertext": "Panel: 20, Stress: 1.3234218678869163 MPa", "line": { "color": "rgb(0.979233, 0.607532, 0.238013)", "width": 4 }, "marker": { "color": "rgb(0.979233, 0.607532, 0.238013)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.2666666666666666, 1.1333333333333333 ], "y": [ -0.04823215123321561, -0.04522523749055654 ] }, { "hovertext": "Panel: 21, Stress: 1.3227989323137166 MPa", "line": { "color": "rgb(0.979233, 0.607532, 0.238013)", "width": 4 }, "marker": { "color": "rgb(0.979233, 0.607532, 0.238013)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.1333333333333333, 1 ], "y": [ -0.04522523749055654, -0.03969632559294687 ] }, { "hovertext": "Panel: 22, Stress: 1.6665138592975177 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1, 0.9 ], "y": [ -0.03969632559294687, -0.03400183959560957 ] }, { "hovertext": "Panel: 23, Stress: 1.6659853070568842 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.9, 0.8 ], "y": [ -0.03400183959560957, -0.027104400288423817 ] }, { "hovertext": "Panel: 24, Stress: 1.6654454841861086 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.8, 0.7 ], "y": [ -0.027104400288423817, -0.01986343189149967 ] }, { "hovertext": "Panel: 25, Stress: 1.6648960409412847 MPa", "line": { "color": "rgb(0.940015, 0.975158, 0.131326)", "width": 4 }, "marker": { "color": "rgb(0.940015, 0.975158, 0.131326)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.7, 0.6 ], "y": [ -0.01986343189149967, -0.013558823788774203 ] }, { "hovertext": "Panel: 26, Stress: 1.5323907253306703 MPa", "line": { "color": "rgb(0.986509, 0.822401, 0.143557)", "width": 4 }, "marker": { "color": "rgb(0.986509, 0.822401, 0.143557)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.6, 0.44999999999999996 ], "y": [ -0.013558823788774203, -0.008456863977985873 ] }, { "hovertext": "Panel: 27, Stress: 1.531439420550604 MPa", "line": { "color": "rgb(0.986509, 0.822401, 0.143557)", "width": 4 }, "marker": { "color": "rgb(0.986509, 0.822401, 0.143557)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.44999999999999996, 0.3 ], "y": [ -0.008456863977985873, -0.011280282682942247 ] }, { "hovertext": "Panel: 28, Stress: 1.530338016477295 MPa", "line": { "color": "rgb(0.986509, 0.822401, 0.143557)", "width": 4 }, "marker": { "color": "rgb(0.986509, 0.822401, 0.143557)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.3, 0.15 ], "y": [ -0.011280282682942247, -0.021353654117750257 ] }, { "hovertext": "Panel: 29, Stress: 1.5292153075365593 MPa", "line": { "color": "rgb(0.987621, 0.815978, 0.144363)", "width": 4 }, "marker": { "color": "rgb(0.987621, 0.815978, 0.144363)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.15, 0 ], "y": [ -0.021353654117750257, 0.029309684500079244 ] }, { "hovertext": "Panel: 30, Stress: 0.44947884282292655 MPa", "line": { "color": "rgb(0.393304, 0.001114, 0.655199)", "width": 4 }, "marker": { "color": "rgb(0.393304, 0.001114, 0.655199)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 0.6, 0.6 ], "y": [ 0.2268386392490801, -0.013558823788774203 ] }, { "hovertext": "Panel: 31, Stress: 0.17372462212857112 MPa", "line": { "color": "rgb(0.050383, 0.029803, 0.527975)", "width": 4 }, "marker": { "color": "rgb(0.050383, 0.029803, 0.527975)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1, 1 ], "y": [ 0.17345474321258494, -0.03969632559294687 ] }, { "hovertext": "Panel: 32, Stress: 0.36213186144350135 MPa", "line": { "color": "rgb(0.299855, 0.009561, 0.631624)", "width": 4 }, "marker": { "color": "rgb(0.299855, 0.009561, 0.631624)", "symbol": "circle" }, "mode": "lines+markers", "showlegend": false, "type": "scatter", "x": [ 1.4, 1.4 ], "y": [ 0.0986905415696286, -0.0484418213073111 ] } ], "layout": { "coloraxis": { "colorbar": { "title": { "text": "Stress Value" } }, "colorscale": [ [ 0, "#440154" ], [ 0.1111111111111111, "#482878" ], [ 0.2222222222222222, "#3e4989" ], [ 0.3333333333333333, "#31688e" ], [ 0.4444444444444444, "#26828e" ], [ 0.5555555555555556, "#1f9e89" ], [ 0.6666666666666666, "#35b779" ], [ 0.7777777777777778, "#6ece58" ], [ 0.8888888888888888, "#b5de2b" ], [ 1, "#fde725" ] ] }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Panel Stress Visualization" }, "xaxis": { "title": { "text": "X-axis" } }, "yaxis": { "range": [ -0.1484418213073111, 0.3268386392490801 ], "title": { "text": "Y-axis" } } } } }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", " \n", "\n" ] }, { "data": { "text/html": [ "
Maximum shear stress is 1.6695574128918829 MPa\n",
       "
\n" ], "text/plain": [ "Maximum shear stress is \u001b[1;36m1.6695574128918829\u001b[0m MPa\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import rich\n", "import plotly.graph_objs as go\n", "\n", "wingbox.stress_analysis(4e3, 2e3, 8e3, 38e3, 0.3, 24e9)\n", "wingbox.plot_shear_stress()\n", "\n", "\n", "print(\"\\n \\n\")\n", "rich.print(f\"Maximum shear stress is {max([i.tau for i in wingbox.panel_dict.values()])/1e6} MPa\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Visualizing the direction of the shear stresses\n", "\n", "In the next code cell we'll also visualize the direction of all the shear stresses in the wingbox." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "line": { "color": "red", "width": 1 }, "mode": "lines", "name": "Direction of shear flows", "type": "scatter", "x": [ 0.075, 0.04804458190986051, null, 0.22499999999999998, 0.19186997566893985, null, 0.375, 0.34035012910991747, null, 0.5249999999999999, 0.4900005153492937, null, 0.6499999999999999, 0.6151068333290145, null, 0.75, 0.7152745543270264, null, 0.8500000000000001, 0.8154226293489065, null, 0.95, 0.9155105599473836, null, 1.0666666666666667, 1.032238574365268, null, 1.2, 1.1656081135080283, null, 1.3333333333333333, 1.2989410667012782, null, 1.4749999999999999, 1.4405712417816963, null, 1.625, 1.590500964271366, null, 1.775, 1.7404085749323017, null, 1.925, 1.890305832933014, null, 1.925, 1.9595118050694917, null, 1.775, 1.8098531269430331, null, 1.625, 1.6599468881309445, null, 1.4749999999999999, 1.5099900437229712, null, 1.3333333333333333, 1.3683332900587726, null, 1.2, 1.2349911031371261, null, 1.0666666666666667, 1.101636614189288, null, 0.95, 0.9849433900914397, null, 0.8500000000000001, 0.8849170402209825, null, 0.75, 0.784908603905975, null, 0.6499999999999999, 0.6849306475329014, null, 0.5249999999999999, 0.5599797719986477, null, 0.375, 0.40999380144124226, null, 0.22499999999999998, 0.2599213426546977, null, 0.075, 0.10815966097808137, null, 0.6, 0.6, null, 1, 1, null, 1.4, 1.4, null, 0.055122265598130674, 0.04804458190986051, 0.061230744197192793, null, 0.20277860786005628, 0.19186997566893985, 0.20586697499010728, null, 0.3526986260559971, 0.34035012910991747, 0.35404981455311385, null, 0.5031300340970492, 0.4900005153492937, 0.5031820025676008, null, 0.628596210937884, 0.6151068333290145, 0.6278485367094072, null, 0.7289256313415956, 0.7152745543270264, 0.7277284733543733, null, 0.8291613354377317, 0.8154226293489065, 0.8276776032976908, null, 0.9292892303626671, 0.9155105599473836, 0.9276594673820854, null, 1.0460413735456444, 1.032238574365268, 1.0443172346115799, null, 1.179423940771853, 1.1656081135080283, 1.1776465278053336, null, 1.3127567614697895, 1.2989410667012782, 1.3109798992657618, null, 1.4543737933631236, 1.4405712417816963, 1.4526506502327186, null, 1.6042756032776107, 1.590500964271366, 1.6026611167038625, null, 1.754140197857434, 1.7404085749323017, 1.7526811975100371, null, 1.9039781884352684, 1.890305832933014, 1.902714959652488, null, 1.9473365716067499, 1.9595118050694917, 1.9457426476891913, null, 1.7971908397886116, 1.8098531269430331, 1.7963144331377086, null, 1.6470748437625318, 1.6599468881309445, 1.6465474661824937, null, 1.4969522925736027, 1.5099900437229712, 1.4967238861623775, null, 1.3551700799471706, 1.3683332900587726, 1.3551851393201975, null, 1.2217307933896808, 1.2349911031371261, 1.2219467077556787, null, 1.0882938291022486, 1.101636614189288, 1.0886905979673052, null, 0.9715367447377751, 0.9849433900914397, 0.9720811987937689, null, 0.8714630401910269, 0.8849170402209825, 0.8721220122226645, null, 0.771441448312735, 0.784908603905975, 0.7721330735053089, null, 0.6714997346068804, 0.6849306475329014, 0.6721023030781696, null, 0.5466689085261965, 0.5599797719986477, 0.5469944485719765, null, 0.3969305475174544, 0.40999380144124226, 0.39675032177496405, null, 0.24711604974816645, 0.2599213426546977, 0.2464743731607844, null, 0.0941634742766396, 0.10815966097808137, 0.09722793669643075, null, 0.5952117179934406, 0.6, 0.6047882820065593, null, 1.0047882820065595, 1, 0.9952117179934407, null, 1.4047882820065594, 1.4, 1.3952117179934405, null ], "y": [ 0.09142612714755902, 0.06910113138975918, null, 0.17909467921038116, 0.16780745245517845, null, 0.21533571068689406, 0.21039744709524455, null, 0.22643163599857236, 0.22624170394498658, null, 0.22292302086360652, 0.2256555873624926, null, 0.21270752690616998, 0.21708284664458385, null, 0.1985662826911684, 0.2039889608908126, null, 0.1820898286303574, 0.18804621384766707, null, 0.16125287388404708, 0.16755418013643467, null, 0.13645886829291243, 0.14295487810843246, null, 0.11127863679997213, 0.11777263371324728, null, 0.08497163223468868, 0.091269299068175, null, 0.05842507374784681, 0.06432562743325812, null, 0.03403612826163966, 0.03936841780608729, null, 0.012494496472885364, 0.017111288814768286, null, -0.010145425012070918, -0.004320022807466585, null, -0.02969761790904027, -0.026494565881237244, null, -0.040726722074145245, -0.038799285962816905, null, -0.046652520340049596, -0.045817750752342463, null, -0.04833698627026335, -0.048392024596663065, null, -0.04672869436188608, -0.04751780857858977, null, -0.0424607815417517, -0.043910874733626246, null, -0.036849082594278215, -0.0388389290500302, null, -0.03055311994201669, -0.032961501599124594, null, -0.023483916089961743, -0.026011637066600826, null, -0.01671112784013694, -0.01891336827483072, null, -0.011007843883380039, -0.01219761315623097, null, -0.009868573330464061, -0.009209892306819175, null, -0.01631696840034625, -0.013971797363259753, null, 0.003978015191164494, -0.007221845692735264, null, 0.10663990773015294, 0.07163990773015294, null, 0.06687920880981904, 0.10187920880981904, null, 0.02512436013115875, 0.06012436013115875, null, 0.0811803032822688, 0.06910113138975918, 0.07380486651539453, null, 0.1765825161996158, 0.16780745245517845, 0.16751760766354212, null, 0.21699400856108883, 0.21039744709524455, 0.20751324551465528, null, 0.23110130654729233, 0.22624170394498658, 0.22152488354204505, null, 0.22940214467892733, 0.2256555873624926, 0.21985481198620985, null, 0.22018898513832455, 0.21708284664458385, 0.21068754361343, null, 0.2066811635215364, 0.2039889608908126, 0.19722023770880698, null, 0.19052577864556855, 0.18804621384766707, 0.18108891206155422, null, 0.16989570416710387, 0.16755418013643467, 0.1604756233164209, null, 0.14521826429204338, 0.14295487810843246, 0.13580808993426394, null, 0.12003682850683887, 0.11777263371324728, 0.1106265501366068, null, 0.09361228217567649, 0.091269299068175, 0.0841920191193973, null, 0.0668274907883672, 0.06432562743325812, 0.057387998672763355, null, 0.04209651821516008, 0.03936841780608729, 0.03263174688756547, null, 0.020122384133747083, 0.017111288814768286, 0.010629500939494874, null, -0.011231150799895282, -0.004320022807466585, -0.0017881647868592107, null, -0.03246670821200676, -0.026494565881237244, -0.022930331034083602, null, -0.044304780834090216, -0.038799285962816905, -0.03474274908422482, null, -0.050918441388633245, -0.045817750752342463, -0.04134460157335159, null, -0.05315961303924256, -0.048392024596663065, -0.04358306086674099, null, -0.052008263500065544, -0.04751780857858977, -0.04243413381199902, null, -0.0481499885703949, -0.043910874733626246, -0.03858164739937247, null, -0.04287152875258694, -0.0388389290500302, -0.033310454122699756, null, -0.03683317865099184, -0.032961501599124594, -0.027279313770281, null, -0.029837303051427663, -0.026011637066600826, -0.02028574648245119, null, -0.02286439067082404, -0.01891336827483072, -0.01330680261029492, null, -0.016535920846767325, -0.01219761315623097, -0.006964891540785947, null, -0.014244909379544965, -0.009209892306819175, -0.004670041391990031, null, -0.01963081437842596, -0.013971797363259753, -0.010075772282518361, null, -0.0075485838423051165, -0.007221845692735264, 0.0015244337579780626, null, 0.08479560442115566, 0.07163990773015294, 0.08479560442115566, null, 0.08872351211881632, 0.10187920880981904, 0.08872351211881632, null, 0.04696866344015603, 0.06012436013115875, 0.04696866344015603, null ] } ], "layout": { "hovermode": "closest", "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "wingbox.plot_quiver_shear_stress(scale= 0.035, arrow_scale= 0.4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "tuduam_notebook", "language": "python", "name": "python3" }, "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.11.7" } }, "nbformat": 4, "nbformat_minor": 2 }