str_label_stress_state1 = "Fixed element \n(\N{GREEK SMALL LETTER SIGMA}\N{LATIN SUBSCRIPT SMALL LETTER X}\N{SUBSCRIPT ZERO}, \N{GREEK SMALL LETTER TAU}\N{SUBSCRIPT ZERO})"
# NB: no subscript of latin y, so use gamma (very similar in the display)
str_label_stress_state2 = "Fixed element \n(\N{GREEK SMALL LETTER SIGMA}\N{Greek Subscript Small Letter Gamma}\N{SUBSCRIPT ZERO}, -\N{GREEK SMALL LETTER TAU}\N{SUBSCRIPT ZERO})"
"In this first notebook, the geometry and some mechanical parameters of a simple beam with constant rectangular section are explored. The main idea of this DEMO and the following ones is to actively learn the Structural Mechanics by thinking and playing with an interactive visualisation tool. Considering the complexity of the code to generate this tool (that uses Python for the initialisation and Javascript for the dynamic interactiy), the code is hidden but can be easily accessed in the folder \"HiddenCode\" for the most curious ones."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **Goals**\n",
"\n",
- "* Introduce the structure and the main concepts of this set of DEMOs, that will be incrementally enriched step-by-step with more information, theories, diagrams, etc with each notebook\n",
- "* Gain familiarity with the subject of our following analysis (form, section, static scheme)"
+ "* Identify the structure and the main concepts of this set of DEMOs, that will be incrementally enriched step-by-step with more information, theories, diagrams, etc with each notebook\n",
+ "* Gain familiarity with the subject (form, section, static scheme) of our analysis in the next DEMOs"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## **Tasks and exercises**\n",
"\n",
"Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
" The beam is supported by a roller (right) and pinned (left), thus the static system is simply supported.\n",
" </details>\n",
"\n",
"<br>\n",
"\n",
"2. If our objective is to increase the area to 30'000 mm², which geometric parameters (height, width, length) can we change to achieve the desired configuration? The configuration found is the only one? \n",
" By using the slider for the length (L), it is possible to note that the length has no impact in any mechanical parameter, because the cross-section is constant along the beam, thus the getmetric paraemter has no impact in the area. On the other hand, by changing the value of b and h with the correlated slider, we note the direct correlation with the area, thus by manipulating just the width, the configuration b=150 mm and h=200 mm has an area of 30'000 mm².\n",
" \n",
" No, it is not the only configuration possible because there the width and the height of the section have the same influence in the area and without any other condition, there is an infinite number of combination to achieve the desired configuration. For example by swapping the value of b and h, we can have the same area.\n",
" </details>\n",
" \n",
"<br>\n",
"\n",
"3. If our objective is to have the inertia with respect to the strong axis (y) equals to 9.0x10⁸ mm⁴ by keeping the area equals to 30'000 mm², which combination of parameters achieves the desired configuration? The configuration found is the only one? \n",
" By playing with the sliders of height and width, the combinationation found b=50 mm and h=600 mm.\n",
" \n",
" Yes, because only this combination satisfy both the area and inertia conditions. In this case, swapping the value of b and h has a major impact on the inertia y, thus this combination is not possible.\n",
" const docs_json = {\"92c2f2f8-9928-41ef-8c17-faf92aab2e85\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1142\"},{\"id\":\"1143\"}]},\"id\":\"1144\",\"type\":\"Column\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1082\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1170\"},\"selection_policy\":{\"id\":\"1169\"}},\"id\":\"1153\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"children\":[{\"id\":\"1038\"},{\"id\":\"1138\"},{\"id\":\"1141\"}]},\"id\":\"1143\",\"type\":\"Row\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1151\"},\"group\":null,\"major_label_policy\":{\"id\":\"1152\"},\"ticker\":{\"id\":\"1017\"}},\"id\":\"1016\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"DataRange1d\"},{\"attributes\":{\"start\":-1},\"id\":\"1010\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1081\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1083\"},\"nonselection_glyph\":{\"id\":\"1082\"},\"view\":{\"id\":\"1085\"}},\"id\":\"1084\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1012\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1016\"}],\"center\":[{\"id\":\"1019\"},{\"id\":\"1023\"},{\"id\":\"1109\"}],\"height\":200,\"left\":[{\"id\":\"1020\"}],\"renderers\":[{\"id\":\"1084\"},{\"id\":\"1090\"},{\"id\":\"1096\"},{\"id\":\"1115\"}],\"title\":{\"id\":\"1006\"},\"toolbar\":{\"id\":\"1031\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1008\"},\"x_scale\":{\"id\":\"1012\"},\"y_range\":{\"id\":\"1010\"},\"y_scale\":{\"id\":\"1014\"}},\"id\":\"1005\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1020\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1023\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1161\"},\"selection_policy\":{\"id\":\"1160\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1156\"},\"group\":null,\"major_label_policy\":{\"id\":\"1157\"},\"ticker\":{\"id\":\"1077\"}},\"id\":\"1049\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"A\":[20000],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"b\":[100],\"h\":[200],\"x\":[6],\"y\":[0]},\"selected\":{\"id\":\"1185\"},\"selection_policy\":{\"id\":\"1184\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1049\"}],\"center\":[{\"id\":\"1052\"},{\"id\":\"1056\"},{\"id\":\"1118\"},{\"id\":\"1127\"}],\"height\":540,\"left\":[{\"id\":\"1053\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1075\"},{\"id\":\"1102\"},{\"id\":\"1124\"},{\"id\":\"1133\"}],\"title\":{\"id\":\"1039\"},\"toolbar\":{\"id\":\"1064\"},\"toolbar_location\":null,\"width\":300,\"x_range\":{\"id\":\"1041\"},\"x_scale\":{\"id\":\"1045\"},\"y_range\":{\"id\":\"1043\"},\"y_scale\":{\"id\":\"1047\"}},\"id\":\"1038\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1169\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1025\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1016\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1019\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1170\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1081\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1171\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1172\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1154\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1006\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1047\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"BasicTicker\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1008\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"1155\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1148\"},\"group\":null,\"major_label_policy\":{\"id\":\"1149\"},\"ticker\":{\"id\":\"1021\"},\"visible\":false},\"id\":\"1020\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1021\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1156\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1041\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1157\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"1030\"}},\"id\":\"1026\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"ResetTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1030\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1058\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1173\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1181\"},\"selection_policy\":{\"id\":\"1180\"}},\"id\":\"1158\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1174\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1183\"},\"selection_policy\":{\"id\":\"1182\"}},\"id\":\"1159\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1172\"},\"selection_policy\":{\"id\":\"1171\"}},\"id\":\"1071\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1057\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":600},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1072\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"1053\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1056\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1152\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1175\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1024\"},{\"id\":\"1025\"},{\"id\":\"1026\"},{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"}]},\"id\":\"1031\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1176\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1160\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1092\"}},\"id\":\"1097\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1161\",\"type\":\"Selection\"},{\"attributes\":{\"interval\":50},\"id\":\"1077\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1063\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1177\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1071\"},\"glyph\":{\"id\":\"1072\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1074\"},\"nonselection_glyph\":{\"id\":\"1073\"},\"view\":{\"id\":\"1076\"}},\"id\":\"1075\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":600},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1074\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":600},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1073\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1178\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1071\"}},\"id\":\"1076\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1083\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1088\",\"type\":\"Patch\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1112\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1162\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1039\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"1111\"}},\"id\":\"1116\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1085\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":200},\"line_width\":{\"value\":3},\"width\":{\"value\":100},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1099\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1163\",\"type\":\"Selection\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1123\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1086\"},\"glyph\":{\"id\":\"1087\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1089\"},\"nonselection_glyph\":{\"id\":\"1088\"},\"view\":{\"id\":\"1091\"}},\"id\":\"1090\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1087\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.25980762113533157,-0.25980762113533157]},\"selected\":{\"id\":\"1163\"},\"selection_policy\":{\"id\":\"1162\"}},\"id\":\"1086\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.15]},\"selected\":{\"id\":\"1165\"},\"selection_policy\":{\"id\":\"1164\"}},\"id\":\"1092\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1093\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1089\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1174\"},\"selection_policy\":{\"id\":\"1173\"}},\"id\":\"1098\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1086\"}},\"id\":\"1091\",\"type\":\"CDSView\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1114\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1094\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1095\",\"type\":\"Circle\"},{\"attributes\":{\"tools\":[{\"id\":\"1057\"},{\"id\":\"1058\"},{\"id\":\"1059\"},{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"}]},\"id\":\"1064\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1092\"},\"glyph\":{\"id\":\"1093\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1095\"},\"nonselection_glyph\":{\"id\":\"1094\"},\"view\":{\"id\":\"1097\"}},\"id\":\"1096\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":200},\"line_alpha\":{\"value\":0.1},\"line_width\":{\"value\":3},\"width\":{\"value\":100},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1100\",\"type\":\"Rect\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1136\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1105\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1098\"},\"glyph\":{\"id\":\"1099\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1101\"},\"nonselection_glyph\":{\"id\":\"1100\"},\"view\":{\"id\":\"1103\"}},\"id\":\"1102\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1108\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1164\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"height\":300,\"text\":\"<p style='font-size:16px'><b>Geometrical and mechanical parameters</b></p>\\n h = 200 mm<br>\\n b = 100 mm<br>\\n L = 6 m<br>\\n A = 2.00e+04 mm<sup>2</sup><br>\\n Iy = 6.67e+07 mm<sup>4</sup><br>\\n Iz = 1.67e+07 mm<sup>4</sup>\",\"width\":300},\"id\":\"1104\",\"type\":\"Div\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":200},\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":3},\"width\":{\"value\":100},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1101\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"1098\"}},\"id\":\"1103\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1165\",\"type\":\"Selection\"},{\"attributes\":{\"end\":7,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1135\"}]},\"start\":1,\"step\":0.1,\"title\":\"Change the length L [m]\",\"value\":6},\"id\":\"1107\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1108\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":0.5877866649021191},\"source\":{\"id\":\"1153\"},\"start\":null,\"x_end\":{\"value\":6.8},\"x_start\":{\"value\":6},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1109\",\"type\":\"Arrow\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1137\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1106\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1180\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"text\":[\"y axis\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"1176\"},\"selection_policy\":{\"id\":\"1175\"}},\"id\":\"1120\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1129\"}},\"id\":\"1134\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1120\"},\"glyph\":{\"id\":\"1121\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1123\"},\"nonselection_glyph\":{\"id\":\"1122\"},\"view\":{\"id\":\"1125\"}},\"id\":\"1124\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1181\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1111\"},\"glyph\":{\"id\":\"1112\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1114\"},\"nonselection_glyph\":{\"id\":\"1113\"},\"view\":{\"id\":\"1116\"}},\"id\":\"1115\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1120\"}},\"id\":\"1125\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"x axis\"],\"x\":[6.4],\"y\":[0.1]},\"selected\":{\"id\":\"1167\"},\"selection_policy\":{\"id\":\"1166\"}},\"id\":\"1111\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1122\",\"type\":\"Text\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1121\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1182\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1117\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1158\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1118\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1126\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1126\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1159\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1127\",\"type\":\"Arrow\"},{\"attributes\":{\"overlay\":{\"id\":\"1063\"}},\"id\":\"1059\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1183\",\"type\":\"Selection\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1130\",\"type\":\"Text\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1132\",\"type\":\"Text\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1131\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1166\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1005\"}]},\"id\":\"1142\",\"type\":\"Row\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1154\"},\"group\":null,\"major_label_policy\":{\"id\":\"1155\"},\"ticker\":{\"id\":\"1077\"}},\"id\":\"1053\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1113\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"z axis\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"1178\"},\"selection_policy\":{\"id\":\"1177\"}},\"id\":\"1129\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1062\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1184\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1129\"},\"glyph\":{\"id\":\"1130\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1132\"},\"nonselection_glyph\":{\"id\":\"1131\"},\"view\":{\"id\":\"1134\"}},\"id\":\"1133\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1167\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1104\"},\"s_b\":{\"id\":\"1003\"},\"s_s\":{\"id\":\"1004\"},\"section\":{\"id\":\"1102\"},\"support_r\":{\"id\":\"1096\"},\"x_axis_arrow\":{\"id\":\"1109\"},\"x_axis_label\":{\"id\":\"1115\"}},\"code\":\"\\n // retrieve data used\\n const data_b = s_b.data\\n const data_s = s_s.data\\n // retrieve the var from the object that uses callback\\n const f = cb_obj.value // value of the slider\\n // compute the parameters and dimensions\\n const L = Math.round(f*10)/10\\n const b = Math.round(data_s['b'])\\n const h = Math.round(data_s['h'])\\n const A = b*h\\n const Iy = Math.round(Math.pow(h, 3)*b/12)\\n const Iz = Math.round(Math.pow(b, 3)*h/12)\\n div.text = \\\"<p style='font-size:16px'><b>Geometrical and mechanical parameters:</b></p> h = \\\"+h+\\n \\\" mm<br> b = \\\"+b+\\n \\\" mm<br> L = \\\"+L+\\n \\\" m<br> A = \\\"+A.toExponential()+\\n \\\" mm<sup>2</sup><br> Iy = \\\"+Iy.toExponential()+\\n \\\" mm<sup>4</sup><br> Iz = \\\"+Iz.toExponential()+\\n \\\" mm<sup>4</sup>\\\"\\n // change the plot of the section\\n section.glyph.width = b\\n section.glyph.height = h\\n // change the plot of the beam\\n data_b['x'][1] = L\\n support_r.glyph.x = L\\n \\n // change the position of the x axis arrow and text\\n x_axis_arrow.x_start = L\\n x_axis_arrow.x_end = L+0.8\\n x_axis_label.glyph.x = L+0.8/2\\n \\n // apply the changes\\n data_s['L'] = f\\n data_s['A'] = A\\n data_s['Iy'] = Iy\\n data_s['Iz'] = Iz\\n s_s.change.emit()\\n s_b.change.emit()\\n \"},\"id\":\"1135\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1185\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1104\"},\"s_b\":{\"id\":\"1003\"},\"s_s\":{\"id\":\"1004\"},\"section\":{\"id\":\"1102\"},\"support_r\":{\"id\":\"1096\"}},\"code\":\"\\n // retrieve data used\\n const data_b = s_b.data\\n const data_s = s_s.data\\n // retrieve the var from the object that uses callback\\n const f = cb_obj.value // value of the slider\\n // compute the parameters and dimensions\\n const L = Math.round(data_s['L']*10)/10\\n const b = Math.round(f)\\n const h = Math.round(data_s['h'])\\n const A = b*h\\n const Iy = Math.round(Math.pow(h, 3)*b/12)\\n const Iz = Math.round(Math.pow(b, 3)*h/12)\\n div.text = \\\"<p style='font-size:16px'><b>Geometrical and mechanical parameters:</b></p> h = \\\"+h+\\n \\\" mm<br> b = \\\"+b+\\n \\\" mm<br> L = \\\"+L+\\n \\\" m<br> A = \\\"+A.toExponential()+\\n \\\" mm<sup>2</sup><br> Iy = \\\"+Iy.toExponential()+\\n \\\" mm<sup>4</sup><br> Iz = \\\"+Iz.toExponential()+\\n \\\" mm<sup>4</sup>\\\"\\n // change the plot of the section\\n section.glyph.width = b\\n section.glyph.height = h\\n // change the plot of the beam\\n data_b['x'][1] = L\\n support_r.glyph.x = L\\n \\n // apply the changes\\n data_s['b'] = f\\n data_s['A'] = A\\n data_s['Iy'] = Iy\\n data_s['Iz'] = Iz\\n s_s.change.emit()\\n s_b.change.emit()\\n \"},\"id\":\"1136\",\"type\":\"CustomJS\"},{\"attributes\":{\"axis\":{\"id\":\"1049\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1052\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1117\",\"type\":\"VeeHead\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1104\"},\"s_b\":{\"id\":\"1003\"},\"s_s\":{\"id\":\"1004\"},\"section\":{\"id\":\"1102\"},\"support_r\":{\"id\":\"1096\"}},\"code\":\"\\n // retrieve data used\\n const data_b = s_b.data\\n const data_s = s_s.data\\n // retrieve the var from the object that uses callback\\n const f = cb_obj.value // value of the slider\\n // compute the parameters and dimensions\\n const L = Math.round(data_s['L']*10)/10\\n const b = Math.round(data_s['b'])\\n const h = Math.round(f)\\n const A = b*h\\n const Iy = Math.round(Math.pow(h, 3)*b/12)\\n const Iz = Math.round(Math.pow(b, 3)*h/12)\\n div.text = \\\"<p style='font-size:16px'><b>Geometrical and mechanical parameters:</b></p> h = \\\"+h+\\n \\\" mm<br> b = \\\"+b+\\n \\\" mm<br> L = \\\"+L+\\n \\\" m<br> A = \\\"+A.toExponential()+\\n \\\" mm<sup>2</sup><br> Iy = \\\"+Iy.toExponential()+\\n \\\" mm<sup>4</sup><br> Iz = \\\"+Iz.toExponential()+\\n \\\" mm<sup>4</sup>\\\"\\n // change the plot of the section\\n section.glyph.width = b\\n section.glyph.height = h\\n // change the plot of the beam\\n data_b['x'][1] = L\\n support_r.glyph.x = L\\n \\n // apply the changes\\n data_s['h'] = f\\n data_s['A'] = A\\n data_s['Iy'] = Iy\\n data_s['Iz'] = Iz\\n s_s.change.emit()\\n s_b.change.emit()\\n \"},\"id\":\"1137\",\"type\":\"CustomJS\"},{\"attributes\":{\"width\":20},\"id\":\"1138\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":50},\"id\":\"1139\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":50},\"id\":\"1140\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"1139\"},{\"id\":\"1107\"},{\"id\":\"1105\"},{\"id\":\"1106\"},{\"id\":\"1140\"},{\"id\":\"1104\"}]},\"id\":\"1141\",\"type\":\"Column\"}],\"root_ids\":[\"1144\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
" }\n",
" }\n",
" }, 10, root)\n",
" }\n",
"})(window);"
],
"application/vnd.bokehjs_exec.v0+json": ""
},
"metadata": {
"application/vnd.bokehjs_exec.v0+json": {
"id": "1144"
}
},
"output_type": "display_data"
}
],
"source": [
"hidden_code_nb_geo.main_code(L, h, b, A, Iy, Iz)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **Legend**\n",
"\n",
"Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder. \n",
"\n",
"* **Slider of the length L:** move the slider to change the length L of the beam.\n",
"* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
"* **Slider of the height h:** move the slider to change the height h of the cross-section of the beam.\n",
"* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
"* **Figure \"Simple supported beam\":** in this figure, the static scheme, the length and x axis are presented. This figure serves to have a dynamic representation of the studied case.\n",
"* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
"\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
"### Recommendations\n",
"\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
"Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
- "In this second notebook, different actions are applied on the simple supported beam presented in the previous DEMO called \"sb_geo\". The internal forces and moments can be visuallized along the beam. "
+ "In this second notebook, different actions are applied on the simple supported beam presented in the previous DEMO called \"01-sb_geo\". The internal forces and moments can be visuallized along the beam. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **Goals**\n",
"\n",
- "* Learn the effect of different actions inside an element\n",
- "* Note how some parameters impact the internal forces\n",
- "* Improve the understanding of how the free-body diagram is used and the (frequently) unclear sign convention"
+ "* Describe the effect of different actions inside an element\n",
+ "* Identify which parameters impact the internal forces\n",
+ "* Explain how the free-body diagram is used and the (frequently) unclear sign convention"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## **Tasks and exercises**\n",
"\n",
"Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
"\n",
"1. Which consequences does the applied force P have on the internal and external forces?\n",
" The external force P has direct influence on the horizontal reaction force R and the axial force N. There is no correlation with the shear force V and the bending moment M. Note that this affirmation does not hold for more complex cases.\n",
" </details>\n",
"\n",
"<br>\n",
"\n",
"2. Is there a position along the beam where the norm of the internal forces changes between right-hand and left-hand free-body diagram? What can you note about the sign?\n",
" No, because the equilibrium must be met in every position and the magnitude of the internal forces in each point should be the same independently of the side chosen for the equilibrium.\n",
" \n",
" The sign for the axial and shear forces flip between the two equilibrium. Instead, the sign of the moment remains the same.\n",
" </details>\n",
" \n",
"<br>\n",
"\n",
"3. Does the cross-section influence the internal forces? By changing the length of the beam to 8 m, do you ascertain any changes?\n",
" No, the cross-section has no impact on the internal forces in this case. This is true because the system is isostatic; if the system was hyperstatic, the cross-section could have an impact on the internal forces.\n",
" \n",
" By increasing the length of the beam, the shear force and bending moment increase; on the other hand the axial force remains the same.\n",
" console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
" }\n",
" }\n",
" }, 10, root)\n",
" }\n",
"})(window);"
],
"application/vnd.bokehjs_exec.v0+json": ""
},
"metadata": {
"application/vnd.bokehjs_exec.v0+json": {
"id": "2052"
}
},
"output_type": "display_data"
}
],
"source": [
"hidden_code_nb_actions.main_code(L, h, b, A, Iy, Iz, q, P, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## **Legend**\n",
"\n",
"Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder. \n",
"\n",
"* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
"* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
"* **Slider of the position x:** move the slider to change the position x along the beam.\n",
"* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
"* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
"* **Textbox \"Forces and Moments:** small summary with the value of the magnitude of the reaction forces and the internal forces at the position x.\n",
"* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
"* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
"* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
"* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
"* **Button of the force P:** apply or remove the external force P.\n",
"\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
"### Recommendations\n",
"\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
"Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ "In this third notebook, the internal axial force N, shear force V and bending moment M diagrams are studied on the same system, external force P and the uniform load q introduced in the DEMO \"02-sb_actions\"."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Goals**\n",
+ "\n",
+ "* Analyze the N V M diagrams\n",
+ "* Describe the relations between the three diagrams\n",
+ "* Identify the direct correlation of the diagrams with the internal forces"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Tasks and exercises**\n",
+ "\n",
+ "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
+ "\n",
+ "1. In which position the bending moment M is the highest? Does the shear force V have correlation with the behaviour of the bending moment M?\n",
+ " The bending moment is the highest in the middle of the beam, at x = 3 m.\n",
+ " \n",
+ " Yes, in fact we can note that the shear force V is 0 when the moment is maximum and that the slope of the moment is directily correlated with the shear force V. The relation between V and M is the following $\\frac{dM}{dx} = V$.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "2. In this case, does changing the uniform load q have any impact on the internal force N? What else do you note?\n",
+ " No, q has no influece with the axial force N, but it has direct impact with the shear force V, the bending moment M and the left and right vertical reaction.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "3. Which impact has the chosen free-body diagram on the N V M diagrams?\n",
+ " None, beacuse the N V M diagrams are independent on the free-body diagram used to compute the equilibium. The signs of the diagrams are computed by following a sign conention, presented below:\n",
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "1430"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_diagrams.main_code(L, h, b, A, Iy, Iz, q, P, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
+ "* **Textbox \"Forces and Moments:** small summary with the value of the magnitude of the reaction forces and the internal forces at the position x.\n",
+ "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ "In this fourth notebook, the stresses and strains inside the element are studied. For any civil engineer, the deep understanding of the behaviour of stress and strain inside an element is essential. For this reason, after completing this DEMO, you'll be equipped with the preliminary and fundamental knowledge to be able to tackle the next important concepts and theories. \n",
+ "The system, geometry and actions are the same presented in the previous DEMO \"03-sb_diagrams\"."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Goals**\n",
+ "\n",
+ "* Describe the differences between the various strains and stresses\n",
+ "* Explain the relations between them\n",
+ "* Identify which parameters influence their behaviour"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Tasks and exercises**\n",
+ "\n",
+ "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
+ "\n",
+ "1. What are the differences between the centroid and the neutral axis? Is there a way to superimpose them in this studied case?\n",
+ " The centroid is dependent only on the geometry of the section; on the other hand, the neutral axis is function of the centroid and the internal forces.\n",
+ " \n",
+ " Yes, if the external horizontal force P is removed and the axial force N becomes zero, the neutral axis is in the same position of the centroid.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "2. Does the cross-section influence the maximal stresses and strains? By changing the length of the beam to 8 m, do you ascertain any changes?\n",
+ " Yes; the internal forces do not change, but the resistance of the section (area and inertia) is directly influenced by h and b. Note that increasing h has a bigger impact only on the bending strain and bending stress (power of 2); on the other hand b and h have the same influence, because the axial stress and strain is dependent only on the area: $\\sigma_N = N/A$ and $\\epsilon_N = \\sigma_N/E$ and the shear stress is also only dependent on the area: $\\tau_{max} = \\frac{V S}{I_y b} = \\frac{V\\frac{bh^2}{8}}{\\frac{bh^3}{12}b} = \\frac{3V}{2bh} = \\frac{3V}{2A}$.\n",
+ " \n",
+ " Yes; the parameters responsible for the resistance of the section (area and inertia) do not change, but the amplitude of the shear and the bending moment increase, thus the stress and strain inside the section increase, except for the axial strain and stress, that are independent of the length of the beam and they remain the same.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "3. Consider the starting configuration; assume that the beam is composed of a material with a yield strength of 27.2 MPa.\n",
+ " 1. Will the beam remain elastic everywhere?\n",
+ " No, at the position where the bending moment is maximum, the stress in the top compressed fiber is equal to 27.5 MPa, that is bigger than 27.2 MPa.\n",
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "1924"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_stress.main_code(L, h, b, A, Iy, Iz, yG, y_n_axis, q, P, E, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
+ "* **Textbox \"Forces and Moments:** small summary with the value of the magnitude of the reaction forces and the internal forces at the position x.\n",
+ "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "* **9 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V and M). By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully.\n",
+ "\n",
+ "### EXTRA: Note on the slow reactivity of the tool\n",
+ "\n",
+ "The slow reactivity of the tool is given by the two textboxes (called Div Widgets) which automatically call a specific funtion every time they are modified. This function redraws everything in the tool (figures, plots, diagrams, textboxes, sliders, ...), generating this problem. Considering that a real solution does not exist in the current version of the lib used (Bokeh 2.4.2), these textboxes will be removed in the next DEMOs."
+ "In this fifth notebook, the torsion is analysed. The system and part of the geometry and actions are taken from the previous DEMO \"04-sb_stress\", with the following changes:\n",
+ "\n",
+ "* the cross-section is now an hollow rectangular section\n",
+ "* in the middle of the beam, a torsional moment Mt is applied\n",
+ "* both supports are fixed with respect to the torsion\n",
+ "\n",
+ "To analyse correctly the interaction of the torsional stress and strain with the other ones, the left/right webs and the top/bottom flanges should be inspected individually, but considering the complexity of the problem (new cross-section geometry and the introduction of the torsion), the focus of this notebook is placed only on the left web."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Goals**\n",
+ "\n",
+ "* Explain the influence of the introduction of a torsional moment on the analysis of the beam\n",
+ "* Identify the differences that arise with this new cross-section\n",
+ "* Describe the tau stress and its origin"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Tasks and exercises**\n",
+ "\n",
+ "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
+ "\n",
+ "1. Consider the starting configuration, but with q = 1 kN/m and h = 100 mm. In the \"Total stress $\\tau$\" figure, try to explain the cause of the two couple of jumps in stress by computing by hand the equation that describes the total stress $\\tau$.\n",
+ " The first jump is due to the constant torsional stress $\\tau_T$ applied on the left web; the second jump is caused in the calculation of the shear stress $\\tau_V$ by the immediate shape change at height equals to h-t and t. The equations are:\n",
+ " <br>\n",
+ " $$ \\tau = \\tau_T + \\tau_V $$\n",
+ " <br>\n",
+ " $$ \\tau_T = \\frac{T}{2t(b-t)(h-t)} $$\n",
+ " <br>\n",
+ " $$\\tau_V=\\begin{cases}\n",
+ " \\frac{VS}{I_y2t}, S = \\frac{b}{2}(\\frac{h^2}{4}-(y-y_G)^2), & \\text{if $y\\in[t;h-t]$}.\\\\\n",
+ " \\frac{VS}{I_yb}, S = \\frac{b}{2}(h-t)^t + t(\\frac{(h-2t)^2}{4}-(y-y_G)^2), & \\text{otherwise}.\n",
+ " \\end{cases}$$\n",
+ " With $y_G$ the position of the centroid from below, that is equal to h/2.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ "\n",
+ "2. Why is $\\tau_T$ (stress generated by the torsion T) combinated with $\\tau_V$ (stress generated by shear force V) and not with $\\sigma_N$ (axial stress) or $\\sigma_M$ (bending stress)?\n",
+ " The shear force and the torsion produce shear stress (called $\\tau$), on the other hand the axial force and the bending moment produce normal stress (called $\\sigma$). For this reason, the $\\tau_T$ is superimposed with $\\tau_V$. You will see how to visualize and combine togheter normal and shear stresses using the Mohr circle in the next DEMO.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "3. For what reasons the left web is the chosen one to be analysed?\n",
+ " The web was chosen instead of the flange beacause given the direction in which the beam is bent, analysing the flange would have been less interesting. Secondly, the left web is critical considering that the superposition between the torsional stress and the shear stress results in a higher maximal stress.\n",
+ " </details>\n",
+ "\n",
+ "<br>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Build the interactive visualisation tool**"
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "2087"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_torsion.main_code(L, h, b, t, A, Iy, Iz, yG, y_n_axis, q, P, Mt, E, N, V, M, T, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr, T_discr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of thickness t:** move the slider to change the thickness t of the cross-section of the beam.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Button of the torsional moment Mt:** apply or remove the external torsional moment Mt.\n",
+ "* **Figures \"N V M T Diagrams\":** plots that show the axial force N, shear force V, bending moment M and the torsion T diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "* **10 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V, M and T) only of the left web. By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ " $\\theta_p$ is the principal angle, that characterises the plane that experiences zero shear stress; $\\theta$ is the angle of the rotating stress element with respect to the fixed stress element. It is defined with the reference position set horizontally and the positive direction set counter-clockwise.\n",
+ " \n",
+ " <br>\n",
+ " \n",
+ " Yes, because in the representation of the stress element in a 2D cartesian graph with $\\sigma$ vs. $\\tau$, the angle in the plot is the double of the real inclination of the stress element studied.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "2. Consider the starting configuration and the stress element in the point at y = 150 mm and x = 5.30 m.\n",
+ "\n",
+ " 1. Are the stresses in the fixed stress element principal?\n",
+ " No, because the principal stresses corresponds to the stress state with zero shear stress and in the fixed stress element the $\\tau$ stress is not zero.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 2. Which angle $\\theta$ corresponds to a rotating stress element with stresses approximately equal to the principal ones?\n",
+ " By rotating the stress element counter-clockwise by 85.0 degrees, the shear stress are approximately zero, thus the element has stresses approximately equal to the principal ones. The same result could be obtained by rotating the element clockwise by $90-85 = 5$ degrees.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 3. Compute the principal stresses $\\sigma_1$ and $\\sigma_2$ and the principal angle. Can you formulate a relation between the angle of the rotating element $\\theta$ and the principal angle $\\theta_p$ when the stresses inside the rotating element are equal to the principal ones? \n",
+ " With $\\tau_0 = -0.518 MPa$, $\\sigma_{x0} = -6.065 MPa$ and $\\sigma_{y0} = 0 MPa$, the principal stresses are $\\sigma_1 = 0.044 MPa$ and $\\sigma_2 = -6.109 MPa$ and the principal angle is $\\theta_p = -4.84$ degrees.\n",
+ " It's possible to check the results with the stresses inside the rotating element with theta = 85 degrees.\n",
+ " \n",
+ " <br>\n",
+ " <br>\n",
+ " \n",
+ " To formulate the relation between $\\theta$ and $\\theta_p$, let's define the angle $\\theta'$ with the reference position set vertically and the positive direction set counter-clockwise. The relation with the principal angle $\\theta_p$ would be:\n",
+ " $$ \\theta_p = \\theta'$$\n",
+ " The relation between the angle $\\theta'$ and $\\theta$ is the following:\n",
+ " $$\\theta' = \\theta + \\pi/2$$\n",
+ " Thus, the relation between the angle theta and the principal angle theta p is the following:\n",
+ " $$ \\theta_p = \\pi/2 + \\theta $$\n",
+ " This can also be observed in the Mohr circle plot by multiplying the equation above by 2:\n",
+ " $$ 2\\theta_p = \\pi + 2\\theta $$\n",
+ " \n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ "\n",
+ "3. Consider the starting configuration but with q = 5 kN/m and a cross-section with b = 30 mm and h = 300 mm; analyse the welds presented in the figures below.\n",
+ "\n",
+ " 1. Assume a vertical weld positioned at $L_1 = 5 m$ illustrated in red in the figure below.\n",
+ " By analysing the stresses along the weld, the critical point is positioned at an height of 0 mm; here the tensile stress is maximum.\n",
+ " <br>\n",
+ " The minimal normal yield strength of the weld material needs to be bigger that the maxiaml tensile stress that is equal to 26.67 MPa, thus a metal with 30 MPa normal yield strength works.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 2. Consider the new weld with an angle $\\beta$ = 55 degrees presented in red the green dot positioned at $L_2 = 0.5 m$ and $h_2 = 80 mm$.\n",
+ " To define the material characteristics, the critical stress state needs to be studied. The coordinates are defined as x = 0.5 m and y = 80 mm, but in this case, the default stress element ($\\theta$ = 0) is not the correct one, because the plane of the weld is oblique. By rotating the element by 55 degrees, the critical stresses are exposed: tensile stress of 5.57 MPa and shear stress of 2.27 MPa. The weld can be designed by using a metal with 6 MPa normal yield strength and 2.5 MPa shear yield strength.\n",
+ " </details>\n",
+ "\n",
+ " <br>"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Build the interactive visualisation tool**"
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "2164"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_mohr.main_code(L, h, b, A, Iy, Iz, yG, y_n_axis, q, P, E, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr, initial_y, initial_theta_element, sigma_axial, sigma_bending, sigma_tau, sigma_x0, sigma_y0, tau_0, sigma_average_mohr, r_circle_mohr, theta_principal, initial_theta, new_state)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the hight y:** move the slider to change the height y along h starting from the bottom.\n",
+ "* **Slider of the angle $\\theta$:** move the slider to change the angle of the rotating stress element.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "* **9 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V and M). By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
+ "* **Figure \"Mohr circle\":** plot that shows the Mohr circle of the stress element in the position x, y. By hovering with the cursor over the desired position, a small window will show the shear and normal stress.\n",
+ "* **Figures \"Stress state\":** figure that shows the stress element with an angle fixed of 0 (characterized by the stresses $\\sigma_{x0}$ = total stress, $\\sigma_{y0}$ = 0 and $\\tau_{0}$ = total shear) and the stress element rotated by the angle $\\theta$. $\\theta_p$ is the principal stress.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ " No, because the section and material chosen are enough resistant for the beam to remain elastic (no collapse), but the beam is clearly oversized.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 2. By changing only one parameter, is there a configuration with the critical stress slightly below the yield strength (maxiaml elastic resistant)?\n",
+ " <li>Increase L to 9 m (50.0 % increase)</li>\n",
+ " </ul>\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 3. By changing only the same parameter of the previous question, is it possible to reduce costs even more by yielding the section? What is the limit?\n",
+ " <li>Decrease b from 40 mm to 30 mm (25.0 % reduction)</li>\n",
+ " <li>Decrease h from 80 mm to 60 mm (25.0 % reduction)</li>\n",
+ " <li>Decrease yield strength $f_y$ from 152 MPa to 101 MPa (33.6 % reduction)</li>\n",
+ " <li>Increase L from 9 m to 11 m (22.2 % increase)</li>\n",
+ " </ul>\n",
+ " The beam collapses if a plastic hinge is formed, considering that the system is isostatic. Thus, the limit is achieved when the plastic strain becomes infinite and the section is completely yielded.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 4. Find which parameter does not influence the critical stress and explain the reasons.\n",
+ " It's easy to observe that the elastic modulus E does not influence the stress distribution inside the section. Considering that the system is isostaic, the parameter E is directly proportional to the strain.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ "\n",
+ "2. Explore different configurations and observe the position of the elastic neutral axis.\n",
+ "\n",
+ " 1. Does it coincide with the position of the plastic neautral axis (not shown explicitly in the plots)?\n",
+ " By analysing a configuration with very slender section (20 mm x 160 mm), x=L/2, yield strength = 16 MPa and q = 5 kN/m, the position of the elastic neutral axis is clearly not the same of the plastic neutral axis.\n",
+ " \n",
+ " If the section remains elastic, the two neutral axis overlap; when the section yields, the plastic neutral axis can move, due to the redistribution of stresses inside the section, resulting in a differnet position of the two neutral axis.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n",
+ " 2. Show elastic and plastic neutral axis are computed differently (formulas).\n",
+ " This equations show that changing the width of the section influences only the position of the plastic neutral axis (when the section is completely yielded). Thus by using the configuration of the previous answer, it is possible to see hot the plastic neutral axis moves inside the section by changing only b.\n",
+ " <br>\n",
+ " Note that the position of the plastic neutral axis depends on the yield status of the section: if the section is not in a elastic or completely yielded status, it is in a transitory status that has a different position of the plastic neutral axis.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ " \n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Build the interactive visualisation tool**"
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "1995"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_plastic.main_code(L, h, b, A, Iy, Iz, yG, y_n_axis, q, P, E, E_steel, fy, fy_steel, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Slider of the elastic modulus E:** move the slider to change the elastic modulus of the section.\n",
+ "* **Slider of the yield strength $f_y$:** move the slider to change the yield strength of the section.\n",
+ "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "* **10 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V and M). By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ "In this eigth notebook, the deflection of a simple supported beam is studied. The system, geometry and actions are taken from the previous DEMO \"04-sb_stress\"."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Goals**\n",
+ "\n",
+ "* Explain how the deflection of a simple beam works\n",
+ "* Identify the parameters directly influencing to the rigidity of the system\n",
+ "* Describe the effect of the Young modulus E and it's importance for the design of an element"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Tasks and exercises**\n",
+ "\n",
+ "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
+ "\n",
+ "1. Is it possible for the neutral axis to be located outside of the section?\n",
+ " Yes, in the graphical tool it's possible to observe that when the bending stress are of the same magnitude of the axial stress (at the extremes with the starting configuration), the neautral axis is outside. This is possible only if an axial load is applied.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "2. Consider the starting configuration but with a square section (200 mm x 200 mm); change the height h and the width b and observe the deflection, axial, bending and shear stresses. How do these geometric parameters influence these values? \n",
+ " First we note down the results with the square section. Secondly we change the width to 100 mm, then to 50 mm, we note the results and we reset the width to 200 mm. Then we change the height to 100 mm, to 400 mm and we note the results. By analysing the trends of the results with the changes of h and b we can conclude that:\n",
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "1933"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_deflection.main_code(L, h, b, A, Iy, Iz, yG, y_n_axis, q, P, E, E_steel, fy, fy_steel, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
+ "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
+ "* **Slider of the elastic modulus E:** move the slider to change the elastic modulus of the section.\n",
+ "* **Figure \"Simple supported beam with deflection under uniform load\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q. In addition the beam can deform, showing the deflection graphically and quantitatively (by hoving over the beam with the cursor).\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
+ "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
+ "* **Button of the force P:** apply or remove the external force P.\n",
+ "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
+ "* **9 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V and M). By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
+ "In this last notebook, the instability of a simple beam under constant axial load is studied. The system, geometry and actions are taken from the previous DEMO \"02-sb_actions\" except for the uniform load that is removed."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Goals**\n",
+ "\n",
+ "* Explore the concept of instability of an element\n",
+ "* Identify the major aspects of the buckling phenomena\n",
+ "* Describe the consequences of the instability in the design of an element"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Tasks and exercises**\n",
+ "\n",
+ "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
+ "\n",
+ "1. Why do the interactive visualization tool emphasizes on analysing the beam in the two planes x-y and x-z?\n",
+ " In the analysis of an element under axial load that can buckle, it's essential to study individually the strong and weak axis instability, because one is independent of the other one.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n",
+ "\n",
+ "2. Consider the starting configuration with an axial force of 200 kN; the section is composed of a material with a yield strength $f_y$ = 50 MPa.\n",
+ "\n",
+ " 1. Does the section yield under the axial load?\n",
+ " As seen in the previous question, the section does not yield under axial load, but it's possible to observe in the tool that in the x-z plane, the beam buckles under the force P. The beam is unstable and will collapse under the slightest out-of-plane perturbation. It's essential to underline that the real elements that engineers design always have imprecisions (during constructions, during production, etc), thus the beam is not designed correctly.\n",
+ " <br>\n",
+ " There are different solutions to avoid the collapse:\n",
+ " <ul>\n",
+ " <li> Increase the height of the section beyond 300 mm (at least 440 mm) </li>\n",
+ " <li> Increase the width of the section to 80 mm </li>\n",
+ " <li> Decrease the length of the beam to 3.2 m </li>\n",
+ " <li> Add one brace in the middle of the beam </li>\n",
+ " </ul>\n",
+ " Note that increasing the resistance of the material has <strong>no positive impact</strong> in the instability.\n",
+ " </details>\n",
+ "\n",
+ " <br>\n",
+ "\n",
+ "3. Is it possible to compute analytically the amount of out-of-plane deflection due to buckling?\n",
+ " No, because the analitic shape of a buckled element is based on the following differential equation:\n",
+ " $$ \\frac{d^2v}{dx^2} + k^2v = 0 $$\n",
+ " With $v$ the deflection out-of-plane, $x$ the position across the element and $k = \\frac{N}{EI}$. The general solution of this equation is:\n",
+ " $$ y = C_1sinkx + C_2coskx $$\n",
+ " With $C_1$ and $C_2$ the constants of integration. It is not possible to compute the value of these constants; even so, this equation is important to extrapolate the mode shape of buckling.\n",
+ " </details>\n",
+ "\n",
+ "<br>\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## **Build the interactive visualisation tool**"
+ " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
+ " }\n",
+ " }\n",
+ " }, 10, root)\n",
+ " }\n",
+ "})(window);"
+ ],
+ "application/vnd.bokehjs_exec.v0+json": ""
+ },
+ "metadata": {
+ "application/vnd.bokehjs_exec.v0+json": {
+ "id": "1356"
+ }
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "hidden_code_nb_buckling.main_code(L, h, b, A, Iy, Iz, P, E, N, Rx, discr_NVM, x_discr, n_bracey, n_bracez, Ncrity, Ncritz)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "## **Legend**\n",
+ "\n",
+ "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
+ "\n",
+ "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
+ "* **Slider of the height h:** move the slider to change the height h of the cross-section of the beam.\n",
+ "* **Slider of the axial force P:** move the slider to change the axial force P applied on the beam.\n",
+ "* **Slider of the length L:** move the slider to change the length L of the beam.\n",
+ "* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
+ "* **Textbox \"Forces and Instability:** small summary with the value of the reaction forces, the internal forces, external forces, critical buckling loads and the information on the instability of the element.\n",
+ "* **Radio buttons of the number of braces:** choose between zero, one and two braces (equally spaced) in the y or z direction.\n",
+ "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
+ "* **2 Figures \"Simple supported beam\":** in this figures, the initial system is presented with the static scheme, the length of the beam, the horizontal force P and the x and y/z axis.\n",
+ "* **2 Figures \"Beam instability\":** in this figures, if buckling occurs, the shape of the beam is presented. The red dots represent the position of the braces.\n",
+ "\n",
+ "### Help and Information on the functions\n",
+ "\n",
+ "In Jupyter Notebooks the user can learn more about a function by using the question mark after the target function. One question mark shows some useful information on the function and two question marks show in addition also the code of the function, revealing it's content.\n",
+ "For example, by creating a Code cell and pasting \"beam_section.compute_area?\" or \"beam_section.compute_area??\", it's possible to see how this feature works.\n",
+ "\n",
+ "### Recommendations\n",
+ "\n",
+ "If you have problem visualizing the entirety of the tool, you can maximize the window size by using Ctrl+B or Cmd+B to hide/show the left explorer panel and by using F11 to go to the full-page mode and back in the browser (NB: it could not work in the tab with NOTO; just use F11 in another tab and come back in the NOTO tab). If you're using a very sall display and it's not enough, you can zoom out the browser tab.\n",
+ "\n",
+ "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
- " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
- " run_inline_js();\n",
- " } else {\n",
- " load_libs(css_urls, js_urls, function() {\n",
- " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
- " run_inline_js();\n",
- " });\n",
- " }\n",
- "}(window));"
- ],
- "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1002\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n const css_urls = [];\n \n\n const inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));"
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "# Import the packages needed\n",
- "import sys\n",
- "sys.path.append('../HiddenCode')\n",
- "import hidden_code_nb_buckling\n",
- "import numpy as np\n",
- "import math\n",
- "from cienpy import simplebeam as sb\n",
- "from cienpy import rectangular_section as beam_section\n",
- "from cienpy import buckling"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Define the geometry and uniform load. Note that given the graphical nature of the notebook, extreme cases can cause the figures to not be displayed."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Choose the dimensions\n",
- "L = 6 # [m]\n",
- "h = 100 # [mm]\n",
- "b = 50 # [mm]\n",
- "P = 10; # [kN]\n",
- "\n",
- "# Material parameter\n",
- "E = 200e3 # MPa\n",
- "\n",
- "# compute the internal forces (at x=L)\n",
- "discr_NVM = 100\n",
- "x_discr = np.linspace(0, L, discr_NVM)\n",
- "N = sb.compute_N(L, P)\n",
- "\n",
- "# compute the parameters\n",
- "A = beam_section.compute_area(b, h) # [mm2]\n",
- " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
- " run_inline_js();\n",
- " } else {\n",
- " load_libs(css_urls, js_urls, function() {\n",
- " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
- " run_inline_js();\n",
- " });\n",
- " }\n",
- "}(window));"
- ],
- "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1002\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n const css_urls = [];\n \n\n const inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));"
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "# Import the packages needed\n",
- "import sys\n",
- "sys.path.append('../HiddenCode')\n",
- "import hidden_code_nb_deflection\n",
- "import math\n",
- "import numpy as np\n",
- "from cienpy import simplebeam as sb\n",
- "from cienpy import rectangular_section as beam_section\n",
- "from cienpy import stress_strain_elastic as stst"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Define the geometry and uniform load. Note that given the graphical nature of the notebook, extreme cases can cause the figures to not be displayed."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Choose the dimensions\n",
- "L = 6 # [m]\n",
- "h = 200 # [mm]\n",
- "b = 100 # [mm]\n",
- "q = 4; # [kN/m]\n",
- "P = 10; # [kN]\n",
- "\n",
- "# Choose the material parameters\n",
- "E_steel = 200e3 # [MPa] steel\n",
- "fy_steel = 355 # [MPa] steel\n",
- "E = E_steel\n",
- "fy = fy_steel\n",
- "\n",
- "# compute the internal forces (at x=L)\n",
- "discr_NVM = 100\n",
- "x_discr = np.linspace(0, L, discr_NVM)\n",
- "N_discr = sb.compute_N(x_discr, P)\n",
- "V_discr = sb.compute_V(x_discr, q, L)\n",
- "M_discr = sb.compute_M(x_discr, q, L)\n",
- "N = N_discr[-1]\n",
- "V = V_discr[-1]\n",
- "M = M_discr[-1]\n",
- "\n",
- "# compute the parameters\n",
- "A = beam_section.compute_area(b, h) # [mm2]\n",
- "In this third notebook, the internal axial force N, shear force V and bending moment M diagrams are studied on the same system, external force P and the uniform load q introduced in the DEMO \"sb_actions\"."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## **Goals**\n",
- "\n",
- "* Gain familiarity with the N V M diagrams\n",
- "* Learn the relations between the three diagrams\n",
- "* Note the direct correlation of the diagrams with the internal forces"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "tags": []
- },
- "source": [
- "## **Tasks and exercises**\n",
- "\n",
- "Answer to the following questions by using and playing with the interactive visualisation tool (bottom of the notebook).\n",
- "\n",
- "1. In which position the bending moment M is the highest? Does the shear force V have correlation with the behaviour of the bending moment M?\n",
- " The bending moment is the highest in the middle of the beam, at x = 3 m.\n",
- " \n",
- " Yes, in fact we can note that the shear force V is 0 when the moment is maximum and that the slope of the moment is directily correlated with the shear force V. The relation between V and M is the following $\\frac{dM}{dx} = V$.\n",
- " </details>\n",
- "\n",
- "<br>\n",
- "\n",
- "2. In this case, does changing the uniform load q have any impact on the internal force N? What else do you note?\n",
- " No, q has no influece with the axial force N, but it has direct impact with the shear force V, the bending moment M and the left and right vertical reaction.\n",
- " </details>\n",
- "\n",
- "<br>\n",
- "\n",
- "3. Which impact has the chosen free-body diagram on the N V M diagrams?\n",
- " None, beacuse the N V M diagrams are independent on the free-body diagram used to compute the equilibium. The signs of the diagrams are computed by following a sign conention, presented below:\n",
- " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
- " }\n",
- " }\n",
- " }, 10, root)\n",
- " }\n",
- "})(window);"
- ],
- "application/vnd.bokehjs_exec.v0+json": ""
- },
- "metadata": {
- "application/vnd.bokehjs_exec.v0+json": {
- "id": "1430"
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "hidden_code_nb_diagrams.main_code(L, h, b, A, Iy, Iz, q, P, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "tags": []
- },
- "source": [
- "## **Legend**\n",
- "\n",
- "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
- "\n",
- "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
- "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
- "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
- "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
- "* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
- "* **Textbox \"Forces and Moments:** small summary with the value of the magnitude of the reaction forces and the internal forces at the position x.\n",
- "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
- "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
- "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
- "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
- "* **Button of the force P:** apply or remove the external force P.\n",
- "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
- "\n",
- "### Recommendations\n",
- "\n",
- "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully."
- " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
- " run_inline_js();\n",
- " } else {\n",
- " load_libs(css_urls, js_urls, function() {\n",
- " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
- " run_inline_js();\n",
- " });\n",
- " }\n",
- "}(window));"
- ],
- "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1002\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n const css_urls = [];\n \n\n const inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));"
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "# Import the packages needed\n",
- "import sys\n",
- "sys.path.append('../HiddenCode')\n",
- "import hidden_code_nb_mohr\n",
- "import math\n",
- "import numpy as np\n",
- "from cienpy import simplebeam as sb\n",
- "from cienpy import rectangular_section as beam_section\n",
- "from cienpy import stress_strain_elastic as stst\n",
- "from cienpy import mohrcircle"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Define the geometry and uniform load. Note that given the graphical nature of the notebook, extreme cases can cause the figures to not be displayed."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Choose the dimensions\n",
- "L = 6 # [m]\n",
- "h = 200 # [mm]\n",
- "b = 100 # [mm]\n",
- "q = 4; # [kN/m]\n",
- "P = 10; # [kN]\n",
- "\n",
- "# Choose the material parameters\n",
- "E = 200e3 # [MPa]\n",
- "\n",
- "# compute the internal forces (at x=L)\n",
- "discr_NVM = 100\n",
- "x_discr = np.linspace(0, L, discr_NVM)\n",
- "N_discr = sb.compute_N(x_discr, P)\n",
- "V_discr = sb.compute_V(x_discr, q, L)\n",
- "M_discr = sb.compute_M(x_discr, q, L)\n",
- "N = N_discr[-1]\n",
- "V = V_discr[-1]\n",
- "M = M_discr[-1]\n",
- "\n",
- "# compute the parameters\n",
- "A = beam_section.compute_area(b, h) # [mm2]\n",
- " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
- " run_inline_js();\n",
- " } else {\n",
- " load_libs(css_urls, js_urls, function() {\n",
- " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
- " run_inline_js();\n",
- " });\n",
- " }\n",
- "}(window));"
- ],
- "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n const el = document.getElementById(\"1002\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n const css_urls = [];\n \n\n const inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(\"1002\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));"
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "# Import the packages needed\n",
- "import sys\n",
- "sys.path.append('../HiddenCode')\n",
- "import hidden_code_nb_plastic\n",
- "import math\n",
- "import numpy as np \n",
- "from cienpy import simplebeam as sb\n",
- "from cienpy import rectangular_section as beam_section\n",
- "from cienpy import stress_strain_elastic as ststel\n",
- "from cienpy import stress_strain_plastic as ststpl"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Define the geometry and uniform load. Note that given the graphical nature of the notebook, extreme cases can cause the figures to not be displayed."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Choose the dimensions\n",
- "L = 6 # [m]\n",
- "h = 200 # [mm]\n",
- "b = 100 # [mm]\n",
- "q = 4; # [kN/m]\n",
- "P = 10; # [kN]\n",
- "\n",
- "# Choose the material parameters\n",
- "E_steel = 200e3 # [MPa] steel\n",
- "fy_steel = 355 # [MPa] steel\n",
- "E = E_steel\n",
- "fy = fy_steel\n",
- "\n",
- "# compute the internal forces (at x=L)\n",
- "discr_NVM = 100\n",
- "x_discr = np.linspace(0, L, discr_NVM)\n",
- "N_discr = sb.compute_N(x_discr, P)\n",
- "V_discr = sb.compute_V(x_discr, q, L)\n",
- "M_discr = sb.compute_M(x_discr, q, L)\n",
- "N = N_discr[-1]\n",
- "V = V_discr[-1]\n",
- "M = M_discr[-1]\n",
- "\n",
- "# compute the parameters\n",
- "A = beam_section.compute_area(b, h) # [mm2]\n",
- " The centroid is dependent only on the geometry of the section; on the other hand, the neutral axis is function of the centroid and the internal forces.\n",
- " \n",
- " Yes, if the external horizontal force P is removed and the axial force N becomes zero, the neutral axis is in the same position of the centroid.\n",
- " </details>\n",
- "\n",
- "<br>\n",
- "\n",
- "2. Does the cross-section influence the maximal stresses and strains? By changing the length of the beam to 8 m, do you ascertain any changes?\n",
- " Yes; the internal forces do not change, but the resistance of the section (area and inertia) is directly influenced by h and b. Note that increasing h has a bigger impact only on the bending strain and bending stress (power of 2); on the other hand b and h have the same influence, because the axial stress and strain is dependent only on the area: $\\sigma_N = N/A$ and $\\epsilon_N = \\sigma_N/E$ and the shear stress is also only dependent on the area: $\\tau_{max} = \\frac{V S}{I_y b} = \\frac{V\\frac{bh^2}{8}}{\\frac{bh^3}{12}b} = \\frac{3V}{2bh} = \\frac{3V}{2A}$.\n",
- " \n",
- " Yes; the parameters responsible for the resistance of the section (area and inertia) do not change, but the amplitude of the shear and the bending moment increase, thus the stress and strain inside the section increase, except for the axial strain and stress, that are independent of the length of the beam and they remain the same.\n",
- " </details>\n",
- "\n",
- "<br>\n",
- "\n",
- "3. Consider the starting configuration; assume that the beam is composed of a material with a yield strength of 27.2 MPa.\n",
- " 1. Will the beam remain elastic everywhere?\n",
- " No, at the position where the bending moment is maximum, the stress in the top compressed fiber is equal to 27.5 MPa, that is bigger than 27.2 MPa.\n",
- " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
- " }\n",
- " }\n",
- " }, 10, root)\n",
- " }\n",
- "})(window);"
- ],
- "application/vnd.bokehjs_exec.v0+json": ""
- },
- "metadata": {
- "application/vnd.bokehjs_exec.v0+json": {
- "id": "1924"
- }
- },
- "output_type": "display_data"
- }
- ],
- "source": [
- "hidden_code_nb_stress.main_code(L, h, b, A, Iy, Iz, yG, y_n_axis, q, P, E, N, V, M, Rx, Ry_l, Ry_r, discr_NVM, x_discr, N_discr, V_discr, M_discr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "tags": []
- },
- "source": [
- "## **Legend**\n",
- "\n",
- "Brief description on how to use the interactive visualization tool. For more information on specific features, check the comments in the desired file in the HiddenCode folder.\n",
- "\n",
- "* **Slider of the width b:** move the slider to change the width b of the cross-section of the beam.\n",
- "* **Slider of height h:** move the slider to change the height h of the cross-section of the beam.\n",
- "* **Slider of the position x:** move the slider to change the position x along the beam.\n",
- "* **Slider of the uniform load q:** move the slider to change the uniform load q.\n",
- "* **Textbox \"Geometrical and mechanical parameters:** small summary with the value of h, b, L, A (area), Iy (inertia with respect to the strong axis) and Iz (inertia with respect to the weak axis).\n",
- "* **Textbox \"Forces and Moments:** small summary with the value of the magnitude of the reaction forces and the internal forces at the position x.\n",
- "* **Figure \"Simple supported beam\":** in this figure, the initial state is presented with the static scheme, the length of the beam, the horizontal force P and the uniform load q.\n",
- "* **Figure \"Cross-section of the beam\":** in this figure, the cross section (constant along the beam) and the remaining two axis (y and z) are depicted.\n",
- "* **Figure \"Forces and Moments Scheme\":** this figure has a dynamic representation of the studied case with the position x indicated by a magenta dot, the internal forces shown in with red arrows, the reaction forces with yellow arrows, the external force P with a green arrow and the uniform load q in blue.\n",
- "* **Radio buttons of the FBD:** choose between right-hand or left-hand free-body diagram.\n",
- "* **Button of the force P:** apply or remove the external force P.\n",
- "* **Figures \"N V M Diagrams\":** plots that show the axial force N, shear force V and bending moment M diagrams, with a magenta dot that represents the x position. By hovering with the cursor over the desired position, a small window will show the position and the value of the internal force.\n",
- "* **9 small bottom figures:** plots that show the strains, stresses and right-hand free-body diagram section (with N, V and M). By hovering with the cursor over the desired position, a small window will show the height and the value of the stress or strain.\n",
- "\n",
- "### Recommendations\n",
- "\n",
- "Considering the innate graphical nature of the interactive visualization tool, the input in the definition of the variables with extreme configuration can lead to small glitches or unclear plots; it's recommended to change these values carefully.\n",
- "\n",
- "### EXTRA: Note on the slow reactivity of the tool\n",
- "\n",
- "The slow reactivity of the tool is given by the two textboxes (called Div Widgets) which automatically call a specific funtion every time they are modified. This function redraws everything in the tool (figures, plots, diagrams, textboxes, sliders, ...), generating this problem. Considering that a real solution does not exist in the current version of the lib used (Bokeh 2.4.2), these textboxes will be removed in the next DEMOs."
- "In this first notebook, the torsion is presented. Considering the complexity of the problem with this new cross-section geometry and the introduction of the torsion, the focus of the notebook in the stress and strain analysis is placed on the left web."