diff --git a/HiddenCode/hidden_code_nb_actions.py b/HiddenCode/hidden_code_nb_actions.py new file mode 100644 index 0000000..d85c148 --- /dev/null +++ b/HiddenCode/hidden_code_nb_actions.py @@ -0,0 +1,546 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_Q = q/4*5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + A=[A], + Iy=[Iy], + Iz=[Iz], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {models.implement_check_stateJS()} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b_h = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + + // update + update_div_geo(db, div) + update_section(db, section) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + """ + update_b = CustomJS(args=args_slider_b_h, code=code_change_b) + + + code_change_h = f""" + // retrieve data used + const db = source.data + const b = db['b'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + + // update + update_div_geo(db, div) + update_section(db, section) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + """ + update_h = CustomJS(args=args_slider_b_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_arrow_growthJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_arrow_growthJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_beam, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout), + slider_b, + slider_h, + div_geo, + Spacer(height=padding_layout), + slider_position, + slider_q, + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_scheme, + Spacer(height=padding_layout), + div_forces)) + )], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_buckling.py b/HiddenCode/hidden_code_nb_buckling.py new file mode 100644 index 0000000..591444f --- /dev/null +++ b/HiddenCode/hidden_code_nb_buckling.py @@ -0,0 +1,508 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models import Div, CustomJS, Slider, Spacer +from bokeh.models.widgets import RadioButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import models +from cienpy import javascriptcodes as js +from cienpy import buckling + +output_notebook() + + +def main_code(L, h, b, A, Iy, Iz, P, E, N, Rx, discr_NVM, x_discr, n_bracey, n_bracez, Ncrity, Ncritz): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + MAX_B = 3*b + MAX_H = 3*h + MAX_P = 100*P + MAX_L = 10 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + E=[E], + A=[A], + Iy=[Iy], + Iz=[Iz], + P=[P], + x=[initial_position], + y=[0], + Rx=[Rx], + N=[N], + Ncrity=[Ncrity], + Ncritz=[Ncritz], + n_bracey=[n_bracey], + n_bracez=[n_bracez], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + + options = dict( + toolbar_location=None + ) + + # figure for the beam + MAX_Q = 5 + OFFSET_Q = 4 + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # change title in beam (y direction) + fig_beam.title.text = "Simple supported beam: x-y plane" + + + # beam in z direction + fig_beam_z = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + fig_beam_z.title.text = "Simple supported beam: x-z plane" + (beam_z, support_l_z, support_r_z) = sb.draw_beam(fig_beam_z, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + fig_beam_z.x_range = fig_beam.x_range + + + # axial force (beam z direction) + axial_force_z = models.force_vector(fig_beam_z, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force_z = fig_beam_z.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # reference system (x-y plane) + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_beam, axis_arrow_length, -axis_arrow_length-0.1, -0.1, 0, 0, 'gray') + fig_beam.text(x=[-axis_arrow_length], y=[0.1], text=["x axis"], text_color='gray', text_baseline='bottom') + models.force_vector(fig_beam, axis_arrow_length, 0, 0, 0, axis_arrow_length, 'gray') + fig_beam.text(x=[0.1], y=[0.2], text=["y axis"], text_color='gray', text_baseline='bottom') + + + # reference system (x-z plane) + models.force_vector(fig_beam_z, axis_arrow_length, -axis_arrow_length-0.1, -0.1, 0, 0, 'gray') + fig_beam_z.text(x=[-axis_arrow_length], y=[0.1], text=["x axis"], text_color='gray', text_baseline='bottom') + models.force_vector(fig_beam_z, axis_arrow_length, 0, 0, 0, axis_arrow_length, 'gray') + fig_beam_z.text(x=[0.1], y=[0.2], text=["z axis"], text_color='gray', text_baseline='bottom') + + + # slider P + slider_P = Slider( + title="Change the axial force P [kN]", + start=1, + end=MAX_P, + step=1, + value=P + ) + + + # slider L + slider_L = Slider( + title="Change the length of the beam [m]", + start=1, + end=L, + step=0.1, + value=L + ) + + + # bracing options + div_rg_brace_y = Div(text="Number of braces in y direction:") + radiogroup_brace_y = RadioButtonGroup(labels=['No brace', 'One middle brace', 'Two equally spaced braces'], active=n_bracey) + div_rg_brace_z = Div(text="Number of braces in z direction:") + radiogroup_brace_z = RadioButtonGroup(labels=['No brace', 'One middle brace', 'Two equally spaced braces'], active=n_bracez) + + + # figure for buckling + fig_buckling_y = figure(toolbar_location=None, + plot_height=FIG_H_S, + plot_width=FIG_B_S, + title="Beam instability in y direction", + x_axis_label="Position [m]", + x_range = fig_beam.x_range + ) + fig_buckling_y.ygrid.grid_line_alpha = 0 + fig_buckling_y.yaxis.visible = False + fig_buckling_y.line('x', 'y', source=source_beam, line_width=1, color='gray') + mode_shape_y = fig_buckling_y.line(x=[0, L], y=[0, 0], line_width=2, color='black') + + fig_buckling_z = figure(toolbar_location=None, + plot_height=FIG_H_S, + plot_width=FIG_B_S, + title="Beam instability in z direction", + x_axis_label="Position [m]", + x_range = fig_beam.x_range + ) + fig_buckling_z.ygrid.grid_line_alpha = 0 + fig_buckling_z.yaxis.visible = False + fig_buckling_z.line('x', 'y', source=source_beam, line_width=1, color='gray') + mode_shape_z = fig_buckling_z.line(x=[0, L], y=[0, 0], line_width=2, color='black') + + + # show values of forces + div_buckling = Div(width=DIV_B_FORCES, + text=buckling.div_text_buckling(P, Rx, N, "{:.2f}".format(Ncrity), "{:.2f}".format(Ncritz), "No")) + + + # show brace position + point_brace_y = fig_buckling_y.circle(x=[], y=[], size=10, fill_alpha=0.5, fill_color="red", color="red", alpha=0.5) + point_brace_z = fig_buckling_z.circle(x=[], y=[], size=10, fill_alpha=0.5, fill_color="red", color="red", alpha=0.5) + + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_b_h = dict(source=source, + mode_shape_y=mode_shape_y, + mode_shape_z=mode_shape_z, + div=div_geo, + div_buckling=div_buckling, + section=section) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const L = db['L'][0] + const E = db['E'][0] + const n_bracey = db['n_bracey'][0] + const n_bracez = db['n_bracez'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const Iz = compute_inertia_z(b, h) + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = Iz + db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey) + db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez) + + // update + update_div_geo(db, div) + update_section(db, section) + update_div_buckling(db, div_buckling) + update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {buckling.implement_update_div_bucklingJS()} + {buckling.implement_compute_N_buckling_yJS()} + {buckling.implement_compute_N_buckling_zJS()} + {buckling.implement_compute_mode_shape_N_bucklingJS()} + {js.implement_linspaceJS()} + {buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)} + """ + update_b = CustomJS(args=args_slider_b_h, code=code_change_b) + + + code_change_h = f""" + // retrieve data used + const db = source.data + const h = cb_obj.value // value of the slider + const b = db['b'][0] + const L = db['L'][0] + const E = db['E'][0] + const n_bracey = db['n_bracey'][0] + const n_bracez = db['n_bracez'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const Iz = compute_inertia_z(b, h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = Iz + db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey) + db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez) + + // update + update_div_geo(db, div) + update_section(db, section) + update_div_buckling(db, div_buckling) + update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {buckling.implement_update_div_bucklingJS()} + {buckling.implement_compute_N_buckling_yJS()} + {buckling.implement_compute_N_buckling_zJS()} + {buckling.implement_compute_mode_shape_N_bucklingJS()} + {js.implement_linspaceJS()} + {buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)} + """ + update_h = CustomJS(args=args_slider_b_h, code=code_change_h) + + + args_slider_L = dict(source=source, + s_b=source_beam, + support_r_y=support_r, + support_r_z=support_r_z, + axial_force_y=axial_force, + axial_force_z=axial_force_z, + label_P_force_y=label_P_force, + label_P_force_z=label_P_force_z, + point_brace_y=point_brace_y, + point_brace_z=point_brace_z, + mode_shape_y=mode_shape_y, + mode_shape_z=mode_shape_z, + div=div_geo, + div_buckling=div_buckling) + code_change_L = f""" + // retrieve data used + const db = source.data + const data_b = s_b.data + const L = cb_obj.value // value of the slider + const E = db['E'][0] + const Iy = db['Iy'][0] + const Iz = db['Iz'][0] + const n_bracey = db['n_bracey'][0] + const n_bracez = db['n_bracez'][0] + + // apply the changes + data_b['x'][1] = L + db['L'][0] = L + db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey) + db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez) + + // update + update_div_geo(db, div) + update_div_buckling(db, div_buckling) + support_r_y.glyph.x = L + support_r_z.glyph.x = L + axial_force_y.x_start = L+{P/SCALE} + axial_force_y.x_end = L + label_P_force_y.glyph.x = L+{P/SCALE}/2 + axial_force_z.x_start = L+{P/SCALE} + axial_force_z.x_end = L + label_P_force_z.glyph.x = L+{P/SCALE}/2 + update_point_brace(point_brace_y, n_bracey) + update_point_brace(point_brace_z, n_bracez) + update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z) + + // emit the changes + source.change.emit() + s_b.change.emit() + + {beam_section.implement_update_div_geoJS()} + {buckling.implement_update_div_bucklingJS()} + {buckling.implement_compute_N_buckling_yJS()} + {buckling.implement_compute_N_buckling_zJS()} + {buckling.implement_update_point_braceJS()} + {buckling.implement_compute_mode_shape_N_bucklingJS()} + {js.implement_linspaceJS()} + {buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)} + """ + update_L = CustomJS(args=args_slider_L, code=code_change_L) + + + args_slider_P = dict(source=source, + mode_shape_y=mode_shape_y, + mode_shape_z=mode_shape_z, + div_buckling=div_buckling) + code_slider_P = f""" + // retrieve var from the object that uses callback + const db = source.data + const P = cb_obj.value // value of the slider + + // apply the changes + db['P'][0] = P + db['N'][0] = compute_N(P) + db['Rx'][0] = compute_Rx(P) + + // update + update_div_buckling(db, div_buckling) + update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_compute_RxJS()} + {sb.implement_compute_NJS()} + {buckling.implement_update_div_bucklingJS()} + {buckling.implement_compute_mode_shape_N_bucklingJS()} + {js.implement_linspaceJS()} + {buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)} + """ + update_P = CustomJS(args=args_slider_P, code=code_slider_P) + + + args_radiogroup_brace_y = dict(source=source, + mode_shape_y=mode_shape_y, + mode_shape_z=mode_shape_z, + div_buckling=div_buckling, + point_brace=point_brace_y) + args_radiogroup_brace_z = dict(source=source, + mode_shape_y=mode_shape_y, + mode_shape_z=mode_shape_z, + div_buckling=div_buckling, + point_brace=point_brace_z) + code_radiogroup_brace = lambda which_axis : f""" + // retrieve data used + const db = source.data + const n_brace = cb_obj.active + const E = db['E'][0] + const L = db['L'][0] + const I = db['I{which_axis}'][0] + + // apply the changes + db['n_brace{which_axis}'][0] = n_brace + db['Ncrit{which_axis}'][0] = compute_N_buckling_{which_axis}(E, I, L, n_brace) + + // update + update_div_buckling(db, div_buckling) + update_point_brace(point_brace, n_brace) + update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z) + + // emit the changes + source.change.emit() + + {buckling.implement_update_div_bucklingJS()} + {buckling.implement_compute_N_buckling_yJS()} + {buckling.implement_compute_N_buckling_zJS()} + {buckling.implement_update_point_braceJS()} + {buckling.implement_compute_mode_shape_N_bucklingJS()} + {js.implement_linspaceJS()} + {buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)} + """ + update_brace_y = CustomJS(args=args_radiogroup_brace_y, code=code_radiogroup_brace('y')) + update_brace_z = CustomJS(args=args_radiogroup_brace_z, code=code_radiogroup_brace('z')) + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_P.js_on_change('value', update_P) + slider_L.js_on_change('value', update_L) + radiogroup_brace_y.js_on_click(update_brace_y) + radiogroup_brace_z.js_on_click(update_brace_z) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column( + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout), + slider_b, + slider_h, + slider_P, + slider_L, + row(div_geo, div_buckling), + Spacer(height=padding_layout), + div_rg_brace_y, + radiogroup_brace_y, + div_rg_brace_z, + radiogroup_brace_z))), + column(Spacer(width=padding_layout)), + column(fig_beam, + fig_beam_z, + fig_buckling_y, + fig_buckling_z)) + )], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_deflection.py b/HiddenCode/hidden_code_nb_deflection.py new file mode 100644 index 0000000..f9be657 --- /dev/null +++ b/HiddenCode/hidden_code_nb_deflection.py @@ -0,0 +1,1025 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import stress_strain_elastic as stst +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_Q = q/4*5 + SCALE_DEFL = 100 + + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + data_section_scheme = dict( + x=[0, 0], + y=[0, h] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + E=[E], + A=[A], + Iy=[Iy], + Iz=[Iz], + yG=[yG], + y_n_axis=[y_n_axis], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source_section_scheme = ColumnDataSource(data_section_scheme) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE*SCALE_DEFL, (MAX_Q+OFFSET_Q)/SCALE*SCALE_DEFL) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE*SCALE_DEFL], width=L, height=q/SCALE*SCALE_DEFL, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE*SCALE_DEFL], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2*SCALE_DEFL], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + # CHAGED: moved below for correct display order of glyphs + # beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(width=DIV_B_FORCES, + text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + # figures for the stresses and strains + FIG_B_ss = 200 + FIG_H_ss = 200 + options_stress_strain = dict( + toolbar_location=None, + y_axis_label="Height h [mm]", + plot_width=FIG_B_ss, + plot_height=FIG_H_ss + ) + fig_stress_N = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Axial stress", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2099 [MPa]") + fig_stress_N.yaxis.visible = False + fig_axial_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Axial strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2099 [%]", + y_range=fig_stress_N.y_range) + fig_axial_strain.yaxis.visible = False + fig_stress_M = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Bending stress and centroid", + y_range=fig_stress_N.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2098 [MPa]") + fig_stress_M.yaxis.visible = False + fig_bending_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Bending strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2098 [%]", + y_range=fig_stress_N.y_range) + fig_bending_strain.yaxis.visible = False + fig_stress_V = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Shear stress", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\u1d65 [MPa]") + fig_stress_V.yaxis.visible = False + fig_stress_sigma = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER SIGMA} and neutral axis", + y_range=fig_stress_N.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]") + fig_stress_tau = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER TAU}", + y_range=fig_stress_V.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]") + + # plot stress N V M + discr_stress_strain = 10 + scale_x = 25 + y_discr = np.linspace(0, h, discr_stress_strain) + sigma_N = stst.compute_sigma_axial(y_discr, 0, A) + N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h, + source_section_scheme, scale_x=scale_x/10) + sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG) + (M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h, + source_section_scheme, True, yG, scale_x=scale_x) + S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG) + tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b) + V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1) + + # plot stress sigma and tau + sigma_total = sigma_M + sigma_N + (sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h, + source_section_scheme,True, yG, scale_x=scale_x) + tau_total = tau_V + tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h, + source_section_scheme, scale_x=1) + + # plot strain N M + strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E) + axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme) + strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E) + bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme) + + + # figures for NVM + fig_NM_section = figure(**options_stress_strain, + title="N and M at position x", + match_aspect=True) + fig_NM_section.axis.visible = False + fig_NM_section.grid.grid_line_alpha = 0 + + fig_V_section = figure(**options_stress_strain, + title="V at position x", + match_aspect=True) + fig_V_section.axis.visible = False + fig_V_section.grid.grid_line_alpha = 0 + + # section with NVM + models.section_diagram(fig_NM_section) + models.section_diagram(fig_V_section) + + # NVM in section + section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red') + section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red') + (section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0) + + # NVM label in section + OFFSET_N = 1 + label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[""], text_color="red", text_baseline='bottom') + label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[""], text_color="red", text_baseline='top') + label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[""], text_color="red", text_baseline='middle') + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # deflection of the beam + fig_beam.title.text = "Simple supported beam with deflection under uniform load" + fig_beam.ygrid.grid_line_alpha = 1 + fig_beam.yaxis.visible = True + fig_beam.yaxis.axis_label = "Deflection [mm]" + + + # line 70-76 removed: uniform load (beam) and axial force (beam) in the simple beam + + + # Change the beam in the beam figure to gray and line width smaller and add new line + beam.glyph.line_width = 1 + beam.glyph.line_color = "gray" + beam_defl = fig_beam.line(x=x_discr, + y=sb.compute_deflection_uniform_load(x_discr, q, L, Iy, E), + line_width=6, color='black') + + # FROM ABOVE: position point + beam_position = fig_beam.circle('x', 'y', **pos_opt) + + + # choose different elastic modulus + E_wood = 8e3 # [MPa] + E_concrete = 26e3 # [MPa] + E_ceramic = 300e3 # [MPa] + slider_elastic = Slider( + title="Change the elastic modulus [MPa]", + start=E_wood, + end=E_ceramic, + step=1e3, + value=E, + margin=(5, 5, 0, 5) + ) + + + # show values of E + div_E = Div(margin=(0, 5, 0, 5), + text=f""" +

+ Ewood = {math.trunc(E_wood/1e3)} GPa; Econcrete = {math.trunc(E_concrete/1e3)} GPa
+ Esteel = {math.trunc(E_steel/1e3)} GPa; Eceramic = {math.trunc(E_ceramic/1e3)} GPa

+ """) + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {models.implement_check_stateJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_update_NVM_sectionJS()} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + beam_defl=beam_defl) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_deflection_beam(db, beam_defl) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_deflection_beamJS(discr_NVM)} + {sb.implement_compute_deflection_uniform_loadJS()} + """ + update_b = CustomJS(args=args_slider_b, code=code_change_b) + + + args_slider_h = dict(source=source, + s_b=source_beam, + s_ss=source_section_scheme, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + beam_defl=beam_defl) + code_change_h = f""" + // retrieve data used + const db = source.data + const data_ss = s_ss.data + const b = db['b'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const N = db['N'][0] + const M = db['M'][0] + const yG = compute_centroid_y(h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['yG'][0] = yG + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + data_ss['y'][1] = h // change the height of the section in the diagrams + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_deflection_beam(db, beam_defl) + + // emit the changes + source.change.emit() + s_ss.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {js.implement_update_deflection_beamJS(discr_NVM)} + {sb.implement_compute_deflection_uniform_loadJS()} + """ + update_h = CustomJS(args=args_slider_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag, + centroid=centroid, + neutral_axis=neutral_axis, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + beam_defl=beam_defl) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + update_deflection_beam(db, beam_defl) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_deflection_beamJS(discr_NVM)} + {sb.implement_compute_deflection_uniform_loadJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + args_slider_elastic = dict(source=source, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + centroid=centroid, + beam_defl=beam_defl) + # code_slider_elastic = "" + code_slider_elastic = f""" + // retrieve data + const db = source.data + const E = cb_obj.value + + // update E + db['E'][0] = E + + // update + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_deflection_beam(db, beam_defl) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_linspaceJS()} + {sb.implement_compute_NJS()} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {js.implement_update_deflection_beamJS(discr_NVM)} + {sb.implement_compute_deflection_uniform_loadJS()} + """ + update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic) + + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + slider_elastic.js_on_change('value', update_slider_elastic) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3), + slider_b, + slider_h, + slider_position, + slider_q, + slider_elastic, + div_E, + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M)), + row(column( + row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma), + row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau), + )) + ), + ], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_diagrams.py b/HiddenCode/hidden_code_nb_diagrams.py new file mode 100644 index 0000000..bf32433 --- /dev/null +++ b/HiddenCode/hidden_code_nb_diagrams.py @@ -0,0 +1,599 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_Q = q/4*5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + A=[A], + Iy=[Iy], + Iz=[Iz], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {models.implement_check_stateJS()} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b_h = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + + // update + update_div_geo(db, div) + update_section(db, section) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + """ + update_b = CustomJS(args=args_slider_b_h, code=code_change_b) + + + code_change_h = f""" + // retrieve data used + const db = source.data + const b = db['b'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + + // update + update_div_geo(db, div) + update_section(db, section) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + """ + update_h = CustomJS(args=args_slider_b_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_arrow_growthJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_arrow_growthJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout), + slider_b, + slider_h, + div_geo, + Spacer(height=padding_layout), + slider_position, + slider_q, + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M, + div_forces)) + )], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_geo.py b/HiddenCode/hidden_code_nb_geo.py new file mode 100644 index 0000000..ecd1d92 --- /dev/null +++ b/HiddenCode/hidden_code_nb_geo.py @@ -0,0 +1,223 @@ +import math +import numpy as np +from bokeh.layouts import layout, column +from bokeh.models import Div, CustomJS, Slider, Spacer +from bokeh.models.tickers import SingleIntervalTicker +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import models + +output_notebook() + + +def main_code(L, h, b, A, Iy, Iz): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + MAX_B = 3*b + MAX_H = 3*h + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + initial_position = L + data = dict( # stores every useful single variable + L=[L], + b=[b], + h=[h], + A=[A], + Iy=[Iy], + Iz=[Iz], + x=[initial_position], + y=[0] + ) + + source_beam = ColumnDataSource(data_beam) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_SEC = 600 # height figure section + + paddingx = 0.2*L + options = dict( + toolbar_location=None + ) + + fig_beam = figure(**options, + x_axis_label="Position [m]", + plot_height=200, + plot_width=700, + x_range=(0-paddingx, L+paddingx), + y_range=(-1, 1), + title="Simple supported beam" + ) + fig_beam.xgrid.grid_line_alpha = 0 + fig_beam.ygrid.grid_line_alpha = 0 + fig_beam.yaxis.visible = False + + fig_section = figure(**options, + x_axis_label="Width b [mm]", + y_axis_label="Height h [mm]", + plot_height=int(MAX_H*0.9), + plot_width=int(MAX_B), + match_aspect=True, + title="Cross-section of the beam" + ) + fig_section.rect([0], [0], width=MAX_B, height=MAX_H, alpha=0, fill_alpha=0) # transparent rect + fig_section.axis.ticker = SingleIntervalTicker(interval=50, num_minor_ticks=5) + + + # beam + beam = fig_beam.line('x', 'y', source=source_beam, line_width=6, color='black') + b_supp = 0.3 + supp_opt = dict( + fill_color='white', + line_color='black' + ) + support_l = fig_beam.patch([0, b_supp/2, -b_supp/2], + [0, -b_supp/2*math.sqrt(3), -b_supp/2*math.sqrt(3)], + **supp_opt) + support_r = fig_beam.circle([L], [-b_supp/2], radius=b_supp/2, **supp_opt) + + + # section + section = fig_section.rect([0], [0], width=b, height=h, fill_color='white', + color='black', line_width=3, hatch_pattern='/', hatch_color='black') + + + # show mechanical parameters + div_text = lambda h, b, L, A, Iy, Iz : f"""

Geometrical and mechanical parameters

+ h = {round(h)} mm
+ b = {round(b)} mm
+ L = {round(L)} m
+ A = {"{:.2e}".format(A)} mm2
+ Iy = {"{:.2e}".format(Iy)} mm4
+ Iz = {"{:.2e}".format(Iz)} mm4""" + + div = Div( + text=div_text(h, b, L, A, Iy, Iz), + width=300, + height=300 + ) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + slider_L = Slider( + title="Change the length L [m]", + start=1, + end=L+1, + step=0.1, + value=L + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + x_axis_arrow = models.force_vector(fig_beam, axis_arrow_length, L, L+axis_arrow_length, 0, 0, 'gray') + x_axis_label = fig_beam.text(x=[L+axis_arrow_length/2], y=[0.1], text=["x axis"], text_color='gray', text_baseline='bottom') + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y axis"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z axis"], text_color='gray', text_align='right', text_baseline='middle') + + + ######################################################## + # Configurethe logics + ######################################################## + code_slider = lambda var, L_code, b_code, h_code, x_axis_code="" : f""" + // retrieve data used + const data_b = s_b.data + const data_s = s_s.data + // retrieve the var from the object that uses callback + const f = cb_obj.value // value of the slider + // compute the parameters and dimensions + const L = Math.round({L_code}*10)/10 + const b = Math.round({b_code}) + const h = Math.round({h_code}) + const A = b*h + const Iy = Math.round(Math.pow(h, 3)*b/12) + const Iz = Math.round(Math.pow(b, 3)*h/12) + div.text = "

Geometrical and mechanical parameters:

h = "+h+ + " mm
b = "+b+ + " mm
L = "+L+ + " m
A = "+A.toExponential()+ + " mm2
Iy = "+Iy.toExponential()+ + " mm4
Iz = "+Iz.toExponential()+ + " mm4" + // change the plot of the section + section.glyph.width = b + section.glyph.height = h + // change the plot of the beam + data_b['x'][1] = L + support_r.glyph.x = L + {x_axis_code} + // apply the changes + data_s['{var}'] = f + data_s['A'] = A + data_s['Iy'] = Iy + data_s['Iz'] = Iz + s_s.change.emit() + s_b.change.emit() + """ + + x_axis_code = f""" + // change the position of the x axis arrow and text + x_axis_arrow.x_start = L + x_axis_arrow.x_end = L+{axis_arrow_length} + x_axis_label.glyph.x = L+{axis_arrow_length}/2 + """ + + # logic for slider_L + update_L = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r, + x_axis_arrow=x_axis_arrow, x_axis_label=x_axis_label), + code=code_slider("L", "f", "data_s['b']", "data_s['h']", x_axis_code)) + + slider_L.js_on_change('value', update_L) + + # logic for slider_b + update_b = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r), + code=code_slider("b", "data_s['L']", "f", "data_s['h']")) + + slider_b.js_on_change('value', update_b) + + # logic for slider_h + update_h = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r), + code=code_slider("h", "data_s['L']", "data_s['b']", "f")) + + slider_h.js_on_change('value', update_h) + + + ######################################################## + # Build the layout + ######################################################## + layout1 = layout([ + [fig_beam], + [fig_section, Spacer(width=20), column([Spacer(height=50), slider_L, slider_b, slider_h, Spacer(height=50), div])] + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_mohr.py b/HiddenCode/hidden_code_nb_mohr.py new file mode 100644 index 0000000..b1f5396 --- /dev/null +++ b/HiddenCode/hidden_code_nb_mohr.py @@ -0,0 +1,1700 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource, output_file, save +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import stress_strain_elastic as stst +from cienpy import models +from cienpy import javascriptcodes as js +from cienpy import mohrcircle + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 2*b + MAX_H = 2*h + MAX_Q = q/4*5 + MAX_STRESS = 60 + MAX_STRESS_MOHR = 10 + MAX_DIM_STRESS_STATE = MAX_STRESS*2.5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + data_section_scheme = dict( + x=[0, 0], + y=[0, h] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + E=[E], + A=[A], + Iy=[Iy], + Iz=[Iz], + yG=[yG], + y_n_axis=[y_n_axis], + P=[P], + x=[initial_position], + y=[0], + y_var=[initial_y], + theta_element=[initial_theta_element], # rad + theta=[initial_theta], # rad + sigma_x0=[sigma_x0], + sigma_y0=[sigma_y0], + tau_0=[tau_0], + sigma_average=[sigma_average_mohr], + r_circle_mohr=[r_circle_mohr], + sigma_x=[new_state[0]], + sigma_y=[new_state[1]], + tau=[new_state[2]], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source_section_scheme = ColumnDataSource(data_section_scheme) + source = ColumnDataSource(data) + + # Constants + FIG_H_B = 200 # height figure beam + FIG_B_B = 600 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 500 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + FIG_MOHR = 600 + FIG_STRESS_STATE = 600 + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + options = dict( + toolbar_location=None + ) + + + + ######################## Start modifications + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-MAX_H*0.2, MAX_H*1.4) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + # modify beam + #TODO: add to cienpy + def draw_beam_2D(fig, L: float, h: float, b_supp=0.25, ratio = 1.0): + """ + Function that draws the simple beam in a figure. + + @param fig (bokeh.plotting.figure.Figure): Figure that will be the canvas for the plot. + @param src (bokeh.models.sources.ColumnDataSource): Source of the coordinates. + @param L (float): Length of the beam in m. + @param x (str): Key for the x values. Defaults to 'x'. + @param y (str): Key for the y values. Defaults to 'y'. + @param b_supp (float, optional): Size of the supports in x. Defaults to 0.3. + @param ratio (float, optional): Ratio of the figure (interval_y/height*100). Defaults to 1.0 (axis equal). + + @return tuple: Tuple with the renderers of the beam and supports. + """ + beam = fig.rect([L/2], [h/2], width=L, height=h, + fill_color='lightgray', color='black', line_width=1) + supp_opt = dict( + fill_color='white', + line_color='black' + ) + support_l = models.define_pinned(fig, 0, 0, b_supp, ratio, supp_opt) + support_r = models.define_roller(fig, L, 0, b_supp, ratio, supp_opt) + + return (beam, support_l, support_r) + + (beam, support_l, support_r) = draw_beam_2D(fig_beam, L, h, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # uniform load (beam) + if q!=0: + fig_beam.rect([L/2], [(int_y_b[1]+MAX_H)/2], width=L, height=(0.99*(int_y_b[1]-MAX_H)), + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + fig_beam.text(x=[-0.2], y=[MAX_H], text=["q"], text_color="blue") + + ####################### End modification + + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC) + + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(width=DIV_B_FORCES, + text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + + # figures for the stresses and strains + FIG_B_ss = 200 + FIG_H_ss = 200 + options_stress_strain = dict( + toolbar_location=None, + y_axis_label="Height h [mm]", + plot_width=FIG_B_ss, + plot_height=FIG_H_ss + ) + fig_stress_N = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Axial stress", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2099 [MPa]") + fig_stress_N.yaxis.visible = False + fig_axial_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Axial strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2099 [%]", + y_range=fig_stress_N.y_range) + fig_axial_strain.yaxis.visible = False + fig_stress_M = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Bending stress and centroid", + y_range=fig_stress_N.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2098 [MPa]") + fig_stress_M.yaxis.visible = False + fig_bending_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Bending strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2098 [%]", + y_range=fig_stress_N.y_range) + fig_bending_strain.yaxis.visible = False + fig_stress_V = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Shear stress", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\u1d65 [MPa]") + fig_stress_V.yaxis.visible = False + fig_stress_sigma = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER SIGMA} and neutral axis", + y_range=fig_stress_N.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]") + fig_stress_tau = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER TAU}", + y_range=fig_stress_V.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]") + + # plot stress N V M + discr_stress_strain = 10 + scale_x = 25 + y_discr = np.linspace(0, h, discr_stress_strain) + sigma_N = stst.compute_sigma_axial(y_discr, 0, A) + N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h, + source_section_scheme, scale_x=scale_x/10) + sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG) + (M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h, + source_section_scheme, True, yG, scale_x=scale_x) + S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG) + tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b) + V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1) + + # plot stress sigma and tau + sigma_total = sigma_M + sigma_N + (sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h, + source_section_scheme,True, yG, scale_x=scale_x) + tau_total = tau_V + tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h, + source_section_scheme, scale_x=1) + + # plot strain N M + strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E) + axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme) + strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E) + bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme) + + + # figures for NVM + fig_NM_section = figure(**options_stress_strain, + title="N and M at position x", + match_aspect=True) + fig_NM_section.axis.visible = False + fig_NM_section.grid.grid_line_alpha = 0 + + fig_V_section = figure(**options_stress_strain, + title="V at position x", + match_aspect=True) + fig_V_section.axis.visible = False + fig_V_section.grid.grid_line_alpha = 0 + + # section with NVM + models.section_diagram(fig_NM_section) + models.section_diagram(fig_V_section) + + # NVM in section + section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red') + section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red') + (section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0) + + # NVM label in section + OFFSET_N = 1 + label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[""], text_color="red", text_baseline='bottom') + label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[""], text_color="red", text_baseline='top') + label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[""], text_color="red", text_baseline='middle') + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + SCALE_TAU = 5 + + # Modify the beam figure and plots (see in the previous code cell) + + + # Modifiy focus point to square in beam + beam_position = fig_beam.square('x', 'y_var', **pos_opt) + + + # choose height of interest + slider_y = Slider( + title="Change the height y along the section [mm]", + start=0, + end=h, + step=1, + value=initial_y + ) + + + # choose angle theta of interest + slider_theta_element = Slider( + title="Change the angle \N{GREEK SMALL LETTER THETA} of the element [°]", + start=0, + end=90, + step=0.5, + value=initial_theta_element + ) + + + # figure Mohr circle + fig_Mohr_circle = figure(toolbar_location=None, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]", + y_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]", + plot_height=FIG_MOHR, + plot_width=FIG_MOHR, + match_aspect=True, + # x_range=[-MAX_STRESS_MOHR, MAX_STRESS_MOHR], + title="Mohr circle, x axis: stress \N{GREEK SMALL LETTER SIGMA} [MPa], y axis: stress \N{GREEK SMALL LETTER TAU} [MPa]" + ) + fig_Mohr_circle.axis.fixed_location = 0 + + + # figure stress state element + fig_stress_state = figure(toolbar_location=None, + plot_height=FIG_STRESS_STATE, + plot_width=FIG_STRESS_STATE, + match_aspect=True, + title="Stress state" + ) + fig_stress_state.grid.grid_line_alpha = 0 + fig_stress_state.axis.visible = False + fig_stress_state.min_border_left = 0 + fig_stress_state.rect([MAX_DIM_STRESS_STATE*0.4], [MAX_DIM_STRESS_STATE*0.4], + width=MAX_DIM_STRESS_STATE*1.2, + height=MAX_DIM_STRESS_STATE*1.2, + alpha=0, + fill_alpha=0) + + + # stress state (theta 0) + fig_stress_state.rect([0], [0], + width=MAX_STRESS/2, + height=MAX_STRESS/2, + angle=0, + fill_alpha=0, color='black', line_width=2) + fig_stress_state.text([0], [0], + text=["Fixed \nelement"], + text_align="center", text_baseline="middle", + text_font_size="14px") + + + # stress state variable + stress_state_theta = fig_stress_state.rect([MAX_STRESS*2], [0], + width=MAX_STRESS/2, + height=MAX_STRESS/2, + angle=initial_theta_element, + fill_alpha=0, color='black', line_width=2) + label_stress_state_theta = fig_stress_state.text([MAX_STRESS*2], [0], + text=["Rotating \nelement"], + text_align="center", text_baseline="middle", + text_font_size="14px") + + # rotating axis + rotating_axis = fig_stress_state.line([0, MAX_DIM_STRESS_STATE], [0, 0], + line_dash="4 4", line_color="black", line_width=0.5) + + + # arc and label theta in stress state + arc_theta_element = fig_stress_state.arc(x=[0], y=[0], + radius=MAX_STRESS, start_angle=0, end_angle=0, + line_color="gray", line_dash="2 5") + label_theta_element = fig_stress_state.text([MAX_STRESS], [0], + text=[""], + text_baseline="middle", x_offset=5, text_font_size="14px") + + # fixed axis + fig_stress_state.line([0, MAX_DIM_STRESS_STATE], [0, 0], + line_dash="4 4", line_color="black", line_width=0.5) + + + # stress state arrows + arrows_stress_state = models.set_arrows_stress_state(fig_stress_state, sigma_x0, sigma_y0, tau_0, MAX_STRESS/2, + SCALE_TAU) + + + # stress state theta arrows + arrows_stress_state_theta = models.set_arrows_stress_state(fig_stress_state, sigma_x0, sigma_y0, tau_0, MAX_STRESS/2, + SCALE_TAU, MAX_STRESS*2) + + # Mohr circle + Mohr_circle = fig_Mohr_circle.circle([sigma_average_mohr], [0], + radius=r_circle_mohr, + fill_alpha=0, color="gray") + + + # arc and label theta in Mohr circle + arc_theta_Mohr = fig_Mohr_circle.arc(x=[sigma_average_mohr], y=[0], + radius=r_circle_mohr/2, start_angle=0, end_angle=0, + line_color="gray", line_dash="2 5") + label_theta_Mohr = fig_Mohr_circle.text([sigma_average_mohr+r_circle_mohr/2], [0], + text=[""], + text_baseline="middle", x_offset=5, text_font_size="14px") + arc_theta_p_Mohr = fig_Mohr_circle.arc(x=[sigma_average_mohr], y=[0], + radius=r_circle_mohr/2, start_angle=0, end_angle=0, + line_color="gray", line_dash="2 5") + label_theta_p_Mohr = fig_Mohr_circle.text([sigma_average_mohr+r_circle_mohr/5*2], [0], + text=[""], + text_baseline="middle", x_offset=5, text_font_size="14px") + + + # linking line and two points from current stress state + mohr_points_opt = dict( + size=5, + fill_alpha=0.5, + alpha=0.5 + ) + line_stress_state = fig_Mohr_circle.line([sigma_x0, tau_0], [sigma_y0, -tau_0], + line_dash="4 4", line_color="blue", line_width=0.5) + points_stress_state = fig_Mohr_circle.circle([sigma_x0, tau_0], [sigma_y0, -tau_0], + **mohr_points_opt, color="blue", fill_color="blue") + 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})" + label_points_stress_state = fig_Mohr_circle.text([sigma_x0, tau_0], [sigma_y0, -tau_0], + text=[str_label_stress_state1, str_label_stress_state2], + color="blue", x_offset=5, y_offset=18, text_font_size="14px") + + + # linking line and two points from stress state in function of theta + line_stress_state_theta = fig_Mohr_circle.line([sigma_x0, tau_0], [sigma_y0, -tau_0], + line_dash="4 4", line_color="red", line_width=0.5) + points_stress_state_theta = fig_Mohr_circle.circle([sigma_x0, tau_0], [sigma_y0, -tau_0], + **mohr_points_opt, color="red", fill_color="red") + str_label_stress_state_theta1 = "Rotating element \n(\N{GREEK SMALL LETTER SIGMA}\N{LATIN SUBSCRIPT SMALL LETTER X}, \N{GREEK SMALL LETTER TAU})" + # NB: no subscript of latin y, so use gamma (very similar in the display) + str_label_stress_state_theta2 = "Rotating element \n(\N{GREEK SMALL LETTER SIGMA}\N{Greek Subscript Small Letter Gamma}, -\N{GREEK SMALL LETTER TAU})" + label_points_stress_state_theta = fig_Mohr_circle.text([sigma_x0, tau_0], [sigma_y0, -tau_0], + text=[str_label_stress_state_theta1, str_label_stress_state_theta2], + text_align="right", + color="red", x_offset=-5, y_offset=18, text_font_size="14px") + + + ######################################################## + # Configurethe logics + ######################################################## + update_circle_mohr = f""" + const y_var = db['y_var'][0] + const A = db['A'][0] + const b = db['b'][0] + const h = db['h'][0] + const yG = db['yG'][0] + const Iy = db['Iy'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b)) + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // update data + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['tau_0'][0] = tau_0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + """ + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + line_stress_state_theta=line_stress_state_theta, + points_stress_state=points_stress_state, + points_stress_state_theta=points_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_tau_x1=arrows_stress_state[4], + arrow_tau_x2=arrows_stress_state[5], + arrow_tau_y1=arrows_stress_state[6], + arrow_tau_y2=arrows_stress_state[7], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + const N = compute_N(db['P'][0]) + const V = compute_V(pos, q, L) + const M = compute_M(pos, q, L) + + // update data + db['N'][0] = N + db['V'][0] = V + db['M'][0] = M + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + {update_circle_mohr} + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {models.implement_check_stateJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_update_NVM_sectionJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b = dict(source=source, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + points_stress_state_theta=points_stress_state_theta, + line_stress_state_theta=line_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_tau_x1=arrows_stress_state[4], + arrow_tau_x2=arrows_stress_state[5], + arrow_tau_y1=arrows_stress_state[6], + arrow_tau_y2=arrows_stress_state[7], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + const V = db['V'][0] + const y_var = db['y_var'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b)) + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['tau_0'][0] = tau_0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + // Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + // stress state + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_b = CustomJS(args=args_slider_b, code=code_change_b) + + + args_slider_h = dict(source=source, + s_ss=source_section_scheme, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + slider_y=slider_y, + beam=beam, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + points_stress_state_theta=points_stress_state_theta, + line_stress_state_theta=line_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_tau_x1=arrows_stress_state[4], + arrow_tau_x2=arrows_stress_state[5], + arrow_tau_y1=arrows_stress_state[6], + arrow_tau_y2=arrows_stress_state[7], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_change_h = f""" + // solve sliders conflict + const db = source.data + const h = cb_obj.value // value of the slider + if (h < db['y_var'][0]) {{ + db['y_var'][0] = h + }} + slider_y.end = h + if (h < slider_y.value) {{ + slider_y.value = h + }} + + // retrieve data used + const data_ss = s_ss.data + const b = db['b'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const N = db['N'][0] + const V = db['V'][0] + const M = db['M'][0] + const yG = compute_centroid_y(h) + const y_var = db['y_var'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b)) + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['yG'][0] = yG + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + beam.glyph.height = h // change the beam height + beam.glyph.y = h/2 + data_ss['y'][1] = h // change the height of the section in the diagrams + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['tau_0'][0] = tau_0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + // Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + // stress state + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // emit the changes + source.change.emit() + s_ss.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_h = CustomJS(args=args_slider_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + points_stress_state_theta=points_stress_state_theta, + line_stress_state_theta=line_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const P = {P}*(1-f) + const db = source.data + const N = compute_N(P) + const M = db['M'][0] + const A = db['A'][0] + const Iy = db['Iy'][0] + const yG = db['yG'][0] + const y_var = db['y_var'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = db['tau_0'][0] + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // apply the changes + db['P'][0] = P + db['N'][0] = N + db['Rx'][0] = compute_Rx(db['P'][0]) + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + // Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + // stress state + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_total_tauJS()} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag, + centroid=centroid, + neutral_axis=neutral_axis, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + points_stress_state_theta=points_stress_state_theta, + line_stress_state_theta=line_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_tau_x1=arrows_stress_state[4], + arrow_tau_x2=arrows_stress_state[5], + arrow_tau_y1=arrows_stress_state[6], + arrow_tau_y2=arrows_stress_state[7], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + const N = db['N'][0] + const V = compute_V(pos, q, L) + const M = compute_M(pos, q, L) + const y_var = db['y_var'][0] + const A = db['A'][0] + const b = db['b'][0] + const h = db['h'][0] + const yG = db['yG'][0] + const Iy = db['Iy'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b)) + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // update data + db['q'][0] = q + db['V'][0] = V + db['M'][0] = M + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['tau_0'][0] = tau_0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + // Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + // stress state + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + args_slider_theta = dict(source=source, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + line_stress_state_theta=line_stress_state_theta, + points_stress_state_theta=points_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + stress_state_theta=stress_state_theta, + label_stress_state_theta=label_stress_state_theta, + arc_theta_element=arc_theta_element, + label_theta_element= label_theta_element, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + rotating_axis=rotating_axis, + beam_position=beam_position, + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_slider_theta = f""" + // retrieve data + const db = source.data + const theta_element = cb_obj.value/180*Math.PI + const sigma_x0 = db['sigma_x0'][0] + const sigma_y0 = db['sigma_y0'][0] + const tau_0 = db['tau_0'][0] + const sigma_average = db['sigma_average'][0] + const r_circle = db['r_circle_mohr'][0] + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // update data + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta_element'][0] = theta_element + db['theta'][0] = theta + + // update + // square point: + beam_position.glyph.angle = theta_element + // stress state element + update_stress_state_elements(db, stress_state_theta, rotating_axis, label_stress_state_theta, arc_theta_element, label_theta_element) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + // update Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + + // apply changes + source.change.emit() + + // declare functions + {mohrcircle.implement_update_stress_state_elementsJS(MAX_STRESS, MAX_DIM_STRESS_STATE)} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_slider_theta = CustomJS(args=args_slider_theta, code=code_slider_theta) + + + args_slider_y = dict(source=source, + Mohr_circle=Mohr_circle, + line_stress_state=line_stress_state, + points_stress_state=points_stress_state, + line_stress_state_theta=line_stress_state_theta, + points_stress_state_theta=points_stress_state_theta, + label_points_stress_state=label_points_stress_state, + label_points_stress_state_theta=label_points_stress_state_theta, + arc_theta_Mohr=arc_theta_Mohr, + label_theta_Mohr=label_theta_Mohr, + arc_theta_p_Mohr=arc_theta_p_Mohr, + label_theta_p_Mohr=label_theta_p_Mohr, + beam_position=beam_position, + arrow_sigma_x1=arrows_stress_state[0], + arrow_sigma_x2=arrows_stress_state[1], + arrow_sigma_y1=arrows_stress_state[2], + arrow_sigma_y2=arrows_stress_state[3], + arrow_tau_x1=arrows_stress_state[4], + arrow_tau_x2=arrows_stress_state[5], + arrow_tau_y1=arrows_stress_state[6], + arrow_tau_y2=arrows_stress_state[7], + arrow_sigma_x1_theta=arrows_stress_state_theta[0], + arrow_sigma_x2_theta=arrows_stress_state_theta[1], + arrow_sigma_y1_theta=arrows_stress_state_theta[2], + arrow_sigma_y2_theta=arrows_stress_state_theta[3], + arrow_tau_x1_theta=arrows_stress_state_theta[4], + arrow_tau_x2_theta=arrows_stress_state_theta[5], + arrow_tau_y1_theta=arrows_stress_state_theta[6], + arrow_tau_y2_theta=arrows_stress_state_theta[7]) + code_slider_y = f""" + // retrieve data + const db = source.data + const y_var = cb_obj.value + const N = db['N'][0] + const V = db['V'][0] + const M = db['M'][0] + const A = db['A'][0] + const b = db['b'][0] + const h = db['h'][0] + const yG = db['yG'][0] + const Iy = db['Iy'][0] + const theta_element = db['theta_element'][0] + const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG)) + const sigma_y0 = 0 + const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b)) + const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0) + const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0) + const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) + const theta = compute_theta_mohr(theta_element, theta_principal) + const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta) + + // update data + db['y_var'][0] = y_var + db['sigma_x0'][0] = sigma_x0 + db['sigma_y0'][0] = sigma_y0 + db['tau_0'][0] = tau_0 + db['sigma_average'][0] = sigma_average + db['r_circle_mohr'][0] = r_circle + db['sigma_x'][0] = new_state[0] + db['sigma_y'][0] = new_state[1] + db['tau'][0] = new_state[2] + db['theta'][0] = theta + + // update + // square point: + beam_position.glyph.y = y_var + // update Mohr circle + update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr) + // stress state + update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2) + update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2) + update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2) + // stress state (theta) + update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta) + update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta) + update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta) + + // apply changes + source.change.emit() + + // declare functions + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {js.implement_arrow_growthJS()} + {mohrcircle.implement_compute_radius_mohrJS()} + {mohrcircle.implement_compute_stress_state_mohrJS()} + {mohrcircle.implement_compute_sigma_average_mohrJS()} + {mohrcircle.implement_compute_principal_theta_mohrJS()} + {mohrcircle.implement_compute_theta_mohrJS()} + {mohrcircle.implement_update_circle_mohrJS()} + {js.implement_update_arrowJS()} + {mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)} + {mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)} + {mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)} + {mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)} + """ + update_slider_y = CustomJS(args=args_slider_y, code=code_slider_y) + + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + slider_theta_element.js_on_change('value', update_slider_theta) + slider_y.js_on_change('value', update_slider_y) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout), + slider_b, + slider_h, + # row(div_geo, div_forces), + slider_y, + slider_theta_element, + Spacer(height=padding_layout), + slider_position, + slider_q, + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M)), + row(column( + row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma), + row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau), + )) + ), + column(fig_Mohr_circle, fig_stress_state) + ], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_plastic.py b/HiddenCode/hidden_code_nb_plastic.py new file mode 100644 index 0000000..8cf8c6f --- /dev/null +++ b/HiddenCode/hidden_code_nb_plastic.py @@ -0,0 +1,1183 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import stress_strain_elastic as ststel +from cienpy import stress_strain_plastic as ststpl +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_Q = q/4*5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + data_section_scheme = dict( + x=[0, 0], + y=[0, h] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + E=[E], + fy=[fy], + A=[A], + Iy=[Iy], + Iz=[Iz], + yG=[yG], + y_n_axis=[y_n_axis], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source_section_scheme = ColumnDataSource(data_section_scheme) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(width=DIV_B_FORCES, + text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + + # figures for the stresses and strains + FIG_B_ss = 200 + FIG_H_ss = 200 + options_stress_strain = dict( + toolbar_location=None, + y_axis_label="Height h [mm]", + plot_height=FIG_H_ss + ) + fig_stress_N = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Axial stress", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2099 [MPa]") + fig_stress_N.yaxis.visible = False + fig_axial_strain = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Axial strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2099 [%]", + y_range=fig_stress_N.y_range) + fig_axial_strain.yaxis.visible = False + fig_stress_M = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Bending stress and centroid", + y_range=fig_stress_N.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2098 [MPa]") + fig_stress_M.yaxis.visible = False + fig_bending_strain = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Bending strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2098 [%]", + y_range=fig_stress_N.y_range) + fig_bending_strain.yaxis.visible = False + fig_stress_V = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Shear stress", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\u1d65 [MPa]") + fig_stress_V.yaxis.visible = False + fig_stress_sigma = figure(**options_stress_strain, + plot_width=int(FIG_B_ss*1.2), + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress (green=yield) and N.A.", + y_range=fig_stress_N.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]") + fig_stress_tau = figure(**options_stress_strain, + plot_width=int(FIG_B_ss*1.2), + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER TAU}", + y_range=fig_stress_V.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]") + + # plot stress N V M + discr_stress_strain = 10 + scale_x = 25 + y_discr = np.linspace(0, h, discr_stress_strain) + sigma_N = ststel.compute_sigma_axial(y_discr, 0, A) + N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h, + source_section_scheme, scale_x=scale_x/10) + sigma_M = ststel.compute_sigma_bending(y_discr, 0, Iy, yG) + (M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h, + source_section_scheme, True, yG, scale_x=scale_x) + S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG) + tau_V = ststel.compute_tau_shear(y_discr, 0, S_rect, Iy, b) + V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1) + + # plot stress sigma (moved below) and tau + tau_total = tau_V + tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h, + source_section_scheme, scale_x=1) + + # plot strain N M + strain_axial = ststel.compute_epsilon_axial(y_discr, sigma_N, E) + axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme) + strain_bending = ststel.compute_epsilon_bending(y_discr, sigma_M, E) + bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme) + + + # figures for NVM + fig_NM_section = figure(**options_stress_strain, + plot_width=FIG_B_ss, + title="N and M at position x", + match_aspect=True) + fig_NM_section.axis.visible = False + fig_NM_section.grid.grid_line_alpha = 0 + + fig_V_section = figure(**options_stress_strain, + plot_width=FIG_B_ss, + title="V at position x", + match_aspect=True) + fig_V_section.axis.visible = False + fig_V_section.grid.grid_line_alpha = 0 + + # section with NVM + models.section_diagram(fig_NM_section) + models.section_diagram(fig_V_section) + + # NVM in section + section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red') + section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red') + (section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0) + + # NVM label in section + OFFSET_N = 1 + label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[""], text_color="red", text_baseline='bottom') + label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[""], text_color="red", text_baseline='top') + label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[""], text_color="red", text_baseline='middle') + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # choose different elastic modulus + E_wood = 8e3 # [MPa] + E_concrete = 26e3 # [MPa] + E_ceramic = 300e3 # [MPa] + slider_elastic = Slider( + title="Change the elastic modulus [MPa]", + start=E_wood, + end=E_ceramic, + step=1e3, + value=E, + margin=(5, 5, 0, 5) + ) + + + # show values of E + div_E = Div(margin=(0, 5, 0, 5), + text=f""" +

+ Ewood = {math.trunc(E_wood/1e3)} GPa; Econcrete = {math.trunc(E_concrete/1e3)} GPa
+ Esteel = {math.trunc(E_steel/1e3)} GPa; Eceramic = {math.trunc(E_ceramic/1e3)} GPa

+ """) + + + # choose different yield strength + fy_wood = 16 # [MPa] (bending) + fy_concrete = 25 # [MPa] + fy_glass = 1000 # [MPa] (compressive) + slider_yield = Slider( + title="Change the yield strength [MPa]", + start=fy_wood, + end=fy_glass, + step=1, + value=fy, + margin=(0, 5, 0, 5) + ) + + + # show values of fy + div_fy = Div(margin=(0, 5, 0, 5), + text=f""" +

+ fy,wood = {math.trunc(fy_wood)} MPa; fy,concrete = {math.trunc(fy_concrete)} MPa
+ fy,steel = {math.trunc(fy_steel)} MPa; fy,glass = {math.trunc(fy_glass)} MPa

+ """) + + + # add total strain epsilon + fig_total_strain = figure(**options_stress_strain, + plot_width=FIG_B_ss, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Total strain (green=yield)", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON} [%]", + y_range=fig_stress_N.y_range) + fig_total_strain.yaxis.visible = False + + + # add the strain and stress with yield implemented + # plastic + discr_pl = 2000 + (stress_pl, strain_pl, y_discr_pl, yNA_pl) = ststpl.compute_total_stress_strain(discr_pl, h, fy, E, N, M, A, Iy, yG) + tmp_y = np.linspace(0, h, len(stress_pl)) + total_stress_pl_diag = fig_stress_sigma.line([0, *stress_pl, 0], [0, *tmp_y, h], color='green') + total_strain_pl_diag = fig_total_strain.line(strain_pl*0, y_discr_pl, color='green') + # elastic + total_strain = ststel.compute_total_epsilon(strain_axial, strain_bending) + total_strain_diag = models.strain_diagram(fig_total_strain, total_strain, h, source_section_scheme) + # (moved from above, total stress sigma elastic) + sigma_total = sigma_M + sigma_N + (sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h, + source_section_scheme,True, yG, scale_x=scale_x) + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + discr_stress=discr_stress_strain, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {models.implement_check_stateJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {ststel.implement_compute_sigma_axialJS()} + {ststel.implement_compute_sigma_bendingJS()} + {ststel.implement_compute_tau_shearJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_total_sigmaJS()} + {ststel.implement_compute_total_tauJS()} + {ststel.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_update_NVM_sectionJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {ststel.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {ststel.implement_compute_sigma_bendingJS()} + {ststel.implement_compute_total_sigmaJS()} + {ststel.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {ststel.implement_compute_tau_shearJS()} + {beam_section.implement_compute_centroid_yJS()} + {ststel.implement_compute_neutral_axisJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + """ + update_b = CustomJS(args=args_slider_b, code=code_change_b) + + + args_slider_h = dict(source=source, + s_b=source_beam, + s_ss=source_section_scheme, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_change_h = f""" + // retrieve data used + const db = source.data + const data_ss = s_ss.data + const b = db['b'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const N = db['N'][0] + const M = db['M'][0] + const yG = compute_centroid_y(h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['yG'][0] = yG + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + data_ss['y'][1] = h // change the height of the section in the diagrams + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // emit the changes + source.change.emit() + s_ss.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {beam_section.implement_compute_centroid_yJS()} + {ststel.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {ststel.implement_compute_sigma_bendingJS()} + {ststel.implement_compute_total_sigmaJS()} + {ststel.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {ststel.implement_compute_tau_shearJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + """ + update_h = CustomJS(args=args_slider_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {ststel.implement_compute_neutral_axisJS()} + {ststel.implement_compute_sigma_bendingJS()} + {ststel.implement_compute_total_sigmaJS()} + {ststel.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {ststel.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + {ststel.implement_compute_epsilon_bendingJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag, + centroid=centroid, + neutral_axis=neutral_axis, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {ststel.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_centroid_yJS()} + {ststel.implement_compute_sigma_bendingJS()} + {ststel.implement_compute_total_sigmaJS()} + {ststel.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {ststel.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + {ststel.implement_compute_epsilon_axialJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + args_slider_yield = dict(source=source, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_slider_yield = f""" + // retrieve data + const db = source.data + const fy = cb_obj.value + const L = db['L'][0] + + // update q + db['fy'][0] = fy + + // update + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + {js.implement_linspaceJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_sigma_axialJS()} + {ststel.implement_compute_sigma_bendingJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + """ + update_slider_yield = CustomJS(args=args_slider_yield, code=code_slider_yield) + + # for the implementation in the other nbs!!! + # args_slider_elastic = dict(source=source, + # N_stress_diag=N_stress_diag, + # axial_strain_diag=axial_strain_diag, + # M_stress_diag=M_stress_diag, + # bending_strain_diag=bending_strain_diag, + # centroid=centroid) + # code_slider_elastic = f""" + # // retrieve data + # const db = source.data + # const E = cb_obj.value + + # // update E + # db['E'][0] = E + + # // update + # update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + # update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + + # // apply changes + # source.change.emit() + + # // declare functions + # {js.implement_linspaceJS()} + # {sb.implement_compute_NJS()} + # {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + # {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + # {ststel.implement_compute_epsilon_bendingJS()} + # {ststel.implement_compute_epsilon_axialJS()} + # {ststel.implement_compute_sigma_axialJS()} + # {js.implement_update_stress_diagramJS()} + # {js.implement_update_strain_diagramJS()} + # {ststel.implement_compute_sigma_bendingJS()} + # """ + # update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic) + + # slider_elastic.js_on_change('value', update_slider_elastic) + + args_slider_elastic = dict(source=source, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + centroid=centroid, + total_strain_diag=total_strain_diag, + total_stress_pl_diag=total_stress_pl_diag, + total_strain_pl_diag=total_strain_pl_diag) + code_slider_elastic = f""" + // retrieve data + const db = source.data + const E = cb_obj.value + + // update E + db['E'][0] = E + + // update + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_linspaceJS()} + {sb.implement_compute_NJS()} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {ststel.implement_compute_epsilon_bendingJS()} + {ststel.implement_compute_epsilon_axialJS()} + {ststel.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {ststel.implement_compute_sigma_bendingJS()} + {js.implement_update_plastic_stress_strainJS(discr_pl)} + {ststpl.implement_compute_NyJS()} + {ststpl.implement_compute_MyJS()} + {ststpl.implement_compute_total_stress_strainJS()} + {ststpl.implement_support_function_plasticJS()} + {ststel.implement_compute_total_epsilonJS()} + """ + update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic) + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + slider_elastic.js_on_change('value', update_slider_elastic) + slider_yield.js_on_change('value', update_slider_yield) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3), + slider_b, + slider_h, + # row(div_geo, div_forces), + slider_position, + slider_q, + slider_elastic, + div_E, + slider_yield, + div_fy, + # Spacer(height=padding_layout), + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M)), + row(column( + row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_total_strain, fig_stress_sigma), + row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau), + )) + ), + ], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_stress.py b/HiddenCode/hidden_code_nb_stress.py new file mode 100644 index 0000000..8f4675f --- /dev/null +++ b/HiddenCode/hidden_code_nb_stress.py @@ -0,0 +1,923 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import rectangular_section as beam_section +from cienpy import stress_strain_elastic as stst +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_Q = q/4*5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + data_section_scheme = dict( + x=[0, 0], + y=[0, h] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + E=[E], + A=[A], + Iy=[Iy], + Iz=[Iz], + yG=[yG], + y_n_axis=[y_n_axis], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source_section_scheme = ColumnDataSource(data_section_scheme) + source = ColumnDataSource(data) + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=20, + end=MAX_H, + step=20, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(width=DIV_B_FORCES, + text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # figures for the stresses and strains + FIG_B_ss = 200 + FIG_H_ss = 200 + options_stress_strain = dict( + toolbar_location=None, + y_axis_label="Height h [mm]", + plot_width=FIG_B_ss, + plot_height=FIG_H_ss + ) + fig_stress_N = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Axial stress", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2099 [MPa]") + fig_stress_N.yaxis.visible = False + fig_axial_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Axial strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2099 [%]", + y_range=fig_stress_N.y_range) + fig_axial_strain.yaxis.visible = False + fig_stress_M = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Bending stress and centroid", + y_range=fig_stress_N.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2098 [MPa]") + fig_stress_M.yaxis.visible = False + fig_bending_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Bending strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2098 [%]", + y_range=fig_stress_N.y_range) + fig_bending_strain.yaxis.visible = False + fig_stress_V = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Shear stress", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\u1d65 [MPa]") + fig_stress_V.yaxis.visible = False + fig_stress_sigma = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER SIGMA} and neutral axis", + y_range=fig_stress_N.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]") + fig_stress_tau = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER TAU}", + y_range=fig_stress_V.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]") + + # plot stress N V M + discr_stress_strain = 10 + scale_x = 25 + y_discr = np.linspace(0, h, discr_stress_strain) + sigma_N = stst.compute_sigma_axial(y_discr, 0, A) + N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h, + source_section_scheme, scale_x=scale_x/10) + sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG) + (M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h, + source_section_scheme, True, yG, scale_x=scale_x) + S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG) + tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b) + V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1) + + # plot stress sigma and tau + sigma_total = sigma_M + sigma_N + (sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h, + source_section_scheme,True, yG, scale_x=scale_x) + tau_total = tau_V + tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h, + source_section_scheme, scale_x=1) + + # plot strain N M + strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E) + axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme) + strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E) + bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme) + + + # figures for NVM + fig_NM_section = figure(**options_stress_strain, + title="N and M at position x", + match_aspect=True) + fig_NM_section.axis.visible = False + fig_NM_section.grid.grid_line_alpha = 0 + + fig_V_section = figure(**options_stress_strain, + title="V at position x", + match_aspect=True) + fig_V_section.axis.visible = False + fig_V_section.grid.grid_line_alpha = 0 + + # section with NVM + models.section_diagram(fig_NM_section) + models.section_diagram(fig_V_section) + + # NVM in section + section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red') + section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red') + (section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0) + + # NVM label in section + OFFSET_N = 1 + label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[""], text_color="red", text_baseline='bottom') + label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[""], text_color="red", text_baseline='top') + label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[""], text_color="red", text_baseline='middle') + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {models.implement_check_stateJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_update_NVM_sectionJS()} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + """ + update_b = CustomJS(args=args_slider_b, code=code_change_b) + + + args_slider_h = dict(source=source, + s_b=source_beam, + s_ss=source_section_scheme, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag) + code_change_h = f""" + // retrieve data used + const db = source.data + const data_ss = s_ss.data + const b = db['b'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h) + const Iy = compute_inertia_y(b, h) + const N = db['N'][0] + const M = db['M'][0] + const yG = compute_centroid_y(h) + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h) + db['yG'][0] = yG + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + data_ss['y'][1] = h // change the height of the section in the diagrams + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + + // emit the changes + source.change.emit() + s_ss.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + """ + update_h = CustomJS(args=args_slider_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag, + centroid=centroid, + neutral_axis=neutral_axis, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain)} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout), + slider_b, + slider_h, + row(div_geo, div_forces), + Spacer(height=padding_layout), + slider_position, + slider_q, + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M)), + row(column( + row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma), + row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau), + )) + )], + ]) + + show(layout1) \ No newline at end of file diff --git a/HiddenCode/hidden_code_nb_torsion.py b/HiddenCode/hidden_code_nb_torsion.py new file mode 100644 index 0000000..b266e65 --- /dev/null +++ b/HiddenCode/hidden_code_nb_torsion.py @@ -0,0 +1,1194 @@ +import math +import numpy as np +from bokeh.layouts import layout, column, row +from bokeh.models.annotations import Label, Arrow +from bokeh.models.arrow_heads import VeeHead +from bokeh.models import Div, CustomJS, Slider, Spacer, Text +from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup +from bokeh.plotting import figure, show, ColumnDataSource +from bokeh.io import output_notebook +from cienpy import simplebeam as sb +from cienpy import hollow_rectangular_section as beam_section +from cienpy import stress_strain_elastic as stst +from cienpy import models +from cienpy import javascriptcodes as js + +output_notebook() + + +def 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): + ######################################################## + # Initialisation + ######################################################## + # constants for the visualisation + SCALE = 10 + SCALE_T = 10 + OFFSET_Q = q + MAX_B = 3*b + MAX_H = 3*h + MAX_T = 2*t + MAX_Q = q/4*5 + + # store the values in a specific format + data_beam = dict( + x=[0, L], + y=[0, 0] + ) + + data_scheme_beam = dict( + x=[0, L*SCALE], + y=[0, 0] + ) + + data_scheme_q = dict( + x=[0, 0, L*SCALE, L*SCALE], + y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q], + x_fade=[0, 0, L*SCALE, L*SCALE] + ) + + data_section_scheme = dict( + x=[0, 0], + y=[0, h] + ) + + initial_position = L + initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC + initial_FBD = 0 # right=0 left=1 + data = dict( # stores every useful single variable + state=[initial_state], + FBD=[initial_FBD], + SCALE=[SCALE], + L=[L], + b=[b], + h=[h], + t=[t], + E=[E], + A=[A], + Iy=[Iy], + Iz=[Iz], + yG=[yG], + y_n_axis=[y_n_axis], + P=[P], + x=[initial_position], + y=[0], + q=[q], + Mt=[Mt], + Rx=[Rx], + Ry_l=[Ry_l], + Ry_r=[Ry_r], + N=[N], + V=[V], + M=[M], + T=[T], + xF=[L*SCALE] + ) + + source_beam = ColumnDataSource(data_beam) + source_scheme_beam = ColumnDataSource(data_scheme_beam) + source_scheme_q = ColumnDataSource(data_scheme_q) + source_section_scheme = ColumnDataSource(data_section_scheme) + source = ColumnDataSource(data) + + # Constants + FIG_H_B = 200 # height figure beam + FIG_B_B = 700 # width figure beam + FIG_H_S = FIG_H_B # height figure scheme + FIG_B_S = FIG_B_B # width figure scheme + FIG_H_SEC = 600 # height figure section + DIV_B_GEO = 170 + DIV_B_FORCES = 170 + + + ######################################################## + # Define figures, widgets and renderers as from the previous notebook + ######################################################## + options = dict( + toolbar_location=None + ) + + # figure for the beam + paddingx = 0.2*L + int_x_b = (0-paddingx, L+paddingx) + int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE) + fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options, + f_h=FIG_H_B, f_b=FIG_B_B) + + + # figure for the cross-section + fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC) + + + # beam + (beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L, + ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100) + + # section + section = beam_section.draw_section(fig_section, b, h, t) + + + # show mechanical parameters + div_geo = Div(width= DIV_B_GEO, + text=beam_section.div_text_geo(round(h), round(b), round(t), round(L), + "{:.2e}".format(A), + "{:.2e}".format(Iy), + "{:.2e}".format(Iz))) + + + # change geometry + slider_b = Slider( + title="Change the width b [mm]", + start=MAX_T*2+10, + end=MAX_B, + step=10, + value=b + ) + slider_h = Slider( + title="Change the height h [mm]", + start=MAX_T*2+10, + end=MAX_H, + step=10, + value=h + ) + + # reference system + axis_arrow_length = 0.8 + axis_arrow_scale = 100 + models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis + fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=["y"], text_color='gray', text_baseline='middle', angle=math.pi/2) + models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis + fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=["z"], text_color='gray', text_align='right', text_baseline='middle') + + + # figure for the forces and moments + fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S) + + + # uniform load (beam) + u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE, + fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6) + label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=["q"], text_color="blue") + + + # axial force (beam) + axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green') + label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/4], text=["P"], text_color="green") + + + # position point + pos_opt = dict( + source=source, + size=10, + fill_alpha=0.5, + fill_color="magenta", + color="magenta", + alpha=0.5 + ) + beam_position = fig_beam.circle('x', 'y', **pos_opt) + forces_position = fig_scheme.circle('xF', 'y', **pos_opt) + + + # beam (scheme) + scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black') + scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2) + # uniform load (scheme) + scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy', + fill_alpha=0.3, alpha=0.3) + scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue', + color='navy', fill_alpha=0.3, alpha=0.3) + # axial force (scheme) + scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green') + # Reactions (scheme) + scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange') + scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange') + scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange') + # force N + scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # force V + scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red') + # moment M + (scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0) + + + # change the uniform load q + slider_q = Slider( + title="Change the uniform load q [kN/m]", + start=0.1, + end=MAX_Q, + step=0.1, + value=q + ) + + + # choose position of interest + slider_position = Slider( + title="Change the position x along the beam [m]", + start=0, + end=L, + step=0.02, + value=L + ) + + + # choose left or right FBD + div_rg_FBD = Div(text="Free-body diagram (FBD):") + radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD) + + + # choose axial force or not + div_cb_P = Div(text=f"Axial force P={P} kN (applied)") + checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0]) + + + # show values of forces and moments + div_forces = Div(width=DIV_B_FORCES, + text=sb.div_text_forces(P, P, Ry_l, Ry_r, "No cross section analysed.", 0, 0, 0)) + + + # figures for the diagrams + options_diag = dict( + toolbar_location=None, + x_axis_label="Position [m]", + plot_width=FIG_B_B, + x_range=fig_beam.x_range + ) + fig_N = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Axial force", "@y kN")], + y_axis_label="Axial force N [kN]", + plot_height=int(FIG_H_B*0.8), + title="N V M Diagrams") + fig_V = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Shear force", "@y kN")], + y_axis_label="Shear force V [kN]", + plot_height=int(FIG_H_B*0.8)) + fig_M = figure(**options_diag, + tooltips= [("Position", "@x m"), + ("Bending moment", "@y kNm")], + y_axis_label="Bending moment M [kNm]", + plot_height=FIG_H_B) + fig_N.xaxis.visible = False + fig_V.xaxis.visible = False + + + # plot N V M + N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam) + V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam) + M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam) + + + # point that shows the position that it's analyzed + N_position = fig_N.circle('x', 'N', **pos_opt) + V_position = fig_V.circle('x', 'V', **pos_opt) + M_position = fig_M.circle('x', 'M', **pos_opt) + + + # figures for the stresses and strains + FIG_B_ss = 200 + FIG_H_ss = 200 + options_stress_strain = dict( + toolbar_location=None, + y_axis_label="Height h [mm]", + plot_width=FIG_B_ss, + plot_height=FIG_H_ss, + ) + fig_stress_N = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Axial stress", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2099 [MPa]") + fig_stress_N.yaxis.visible = False + fig_axial_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Axial strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2099 [%]", + y_range=fig_stress_N.y_range) + fig_axial_strain.yaxis.visible = False + fig_stress_M = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Bending stress and centroid", + y_range=fig_stress_N.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA}\u2098 [MPa]") + fig_stress_M.yaxis.visible = False + fig_bending_strain = figure(**options_stress_strain, + tooltips= [("Strain", "@x %"), + ("Height", "@y mm")], + title="Bending strain", + x_axis_label="Strain \N{GREEK SMALL LETTER EPSILON}\u2098 [%]", + y_range=fig_stress_N.y_range) + fig_bending_strain.yaxis.visible = False + fig_stress_V = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Shear stress", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\u1d65 [MPa]") + fig_stress_V.yaxis.visible = False + fig_stress_sigma = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER SIGMA} and neutral axis", + y_range=fig_stress_N.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER SIGMA} [MPa]") + fig_stress_tau = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Total stress \N{GREEK SMALL LETTER TAU}", + y_range=fig_stress_V.y_range, + y_axis_location="right", + x_axis_label="Stress \N{GREEK SMALL LETTER TAU} [MPa]") + + + # plot stress N V M + discr_stress_strain = 50 + scale_x = 25 + y_discr = np.linspace(0, h, discr_stress_strain) + sigma_N = stst.compute_sigma_axial(y_discr, N, A) + N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h, + source_section_scheme, scale_x=scale_x/10) + sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG) + (M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h, + source_section_scheme, True, yG, scale_x=scale_x) + S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, t, yG) + tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b) + V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1) + + + # plot stress sigma and tau + sigma_total = sigma_M + sigma_N + (sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h, + source_section_scheme,True, yG, scale_x=scale_x) + tau_total = tau_V + tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h, + source_section_scheme, scale_x=1) + + # plot strain N M + strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E) + axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme) + strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E) + bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme) + + + # figures for NVM + fig_NM_section = figure(**options_stress_strain, + title="N and M at position x", + match_aspect=True) + fig_NM_section.axis.visible = False + fig_NM_section.grid.grid_line_alpha = 0 + + fig_V_section = figure(**options_stress_strain, + title="V at position x", + match_aspect=True) + fig_V_section.axis.visible = False + fig_V_section.grid.grid_line_alpha = 0 + + + # section with NVM + models.section_diagram(fig_NM_section) + models.section_diagram(fig_V_section) + + + # NVM in section + section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red') + section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red') + (section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0) + + + # NVM label in section + OFFSET_N = 1 + label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[""], text_color="red", text_baseline='bottom') + label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[""], text_color="red", text_baseline='top') + label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[OFFSET_N*4], text=[""], text_color="red", text_baseline='middle') + + + ######################################################## + # Define the new figures, widgets and renderers + ######################################################## + # applied torsion Mt + str_Mt = "M\N{LATIN SUBSCRIPT SMALL LETTER T}" + div_cb_T = Div(text=f"Torsion {str_Mt}={Mt} kNm (applied)") + checkbox_T = CheckboxButtonGroup(labels=[f'Apply or remove torsion {str_Mt}'], active=[0]) + + + # torsion diagram + fig_M.plot_height = int(FIG_H_B*0.8) + fig_M.xaxis.visible = False + fig_T = figure(**options_diag, + tooltips= [("Position:", "@x m"), + ("Torsion:", "@y kNm")], + y_axis_label="Torsion T [kNm]", + plot_height=FIG_H_B) + + + # change geometry (thickness) + slider_t = Slider( + title="Change the thicknes t [mm]", + start=2, + end=MAX_T, + step=1, + value=t + ) + + + # plot T + T_diag = models.NVM_diagram(fig_T, x_discr, T_discr, L, source_beam) + + + # point that shows the position that it's analyzed + T_position = fig_T.circle('x', 'T', **pos_opt) + + + # figure for the stress tau_T + fig_stress_T = figure(**options_stress_strain, + tooltips= [("Stress", "@x MPa"), + ("Height", "@y mm")], + title="Torsional stress", + y_range=fig_stress_V.y_range, + x_axis_label="Stress \N{GREEK SMALL LETTER TAU}\N{LATIN SUBSCRIPT SMALL LETTER T} [MPa]") + fig_stress_T.yaxis.visible = False + + + # torsion in the section + (section_torsion_line, section_torsion_head, section_torsion_source) = models.define_curvedArrow(fig_section, 0, T*4/SCALE_T, abs(T*3/SCALE_T), size_head=20) + + + # moment Mt in beam + PIXEL2UNIT_BEAM = 100 + (beam_torsion_line, beam_torsion_head, source_beam_torsion) = models.define_doubleArrow(fig_beam, L/2, L/2+Mt/SCALE/10, 0, 0, + arrow_color="green", pixel2unit=PIXEL2UNIT_BEAM) + # label + label_Mt_force = fig_beam.text(x=[L/2+Mt/2/SCALE/SCALE_T], y=[OFFSET_Q/4/SCALE/SCALE_T], text=[str_Mt], text_color="green") + + + # add torsion in section stress + T_DOUBLE_HEAD_SIZE = 10 + (section_T_line, section_T_head, section_T_source) = models.define_doubleArrow(fig_V_section, OFFSET_N*4-T/SCALE_T, OFFSET_N*4, 0, 0, size_head=T_DOUBLE_HEAD_SIZE) + # label + label_T_section = fig_V_section.text(x=[Mt*1.1/SCALE_T], y=[OFFSET_N], text=["T"], text_color="red", text_baseline='bottom') + + + # tau stress torsion + tau_T = beam_section.compute_tau_torsion(y_discr, T, b, h, t) + T_stress_diag = models.stress_diagram(fig_stress_T, tau_T, h, source_section_scheme, scale_x=1) + + # Easter egg + EasterEgg1 = fig_N.text(x=[2], y=[-4], text=[""], text_color="purple", text_font_size="10px", angle=math.pi/10) + + + ######################################################## + # Configurethe logics + ######################################################## + args_slider_pos = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + s_M=source_M, + arr_head=scheme_M_head, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section, + section_T_line=section_T_line, + section_T_head=section_T_head, + section_T_source=section_T_source, + section_torsion_head=section_torsion_head, + section_torsion_source=section_torsion_source, + label_T_section=label_T_section, + div_T=div_cb_T, + T_stress_diag=T_stress_diag) + code_slider_pos = f""" + // retrieve data + const db = source.data + const data_sb = s_sb.data + const data_q = s_q.data + const FBD = db['FBD'][0] + const pos = cb_obj.value + const q = db['q'][0] + const L = db['L'][0] + const Mt = db['Mt'][0] + + // update data + db['N'][0] = compute_N(db['P'][0]) + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['T'][0] = compute_T(pos, Mt, L) + db['x'][0] = pos + + // check state + check_state(db) + + // update: + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section) + update_torsional_stress(db, T_stress_diag) + + // apply the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + // declare functions + {sb.implement_compute_NJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_growthJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_NVM_diagramJS()} + {js.implement_update_stress_diagramJS()} + {models.implement_check_stateJS()} + {js.implement_update_strain_diagramJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_tau_shearJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {js.implement_update_NVM_sectionJS()} + {sb.implement_update_T_sectionJS(scale_T=SCALE_T)} + {js.implement_update_doubleArrowJS()} + {sb.implement_compute_TJS()} + {beam_section.implement_compute_tau_torsionJS()} + {beam_section.implement_update_torsional_stressJS(discr_stress_strain)} + """ + updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos) + + + args_slider_b = dict(source=source, + s_b=source_beam, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + T_stress_diag=T_stress_diag, + div_P=div_cb_P) + code_change_b = f""" + // retrieve data used + const db = source.data + const b = cb_obj.value // value of the slider + const h = db['h'][0] + const t = db['t'][0] + const A = compute_area(b, h, t) + const Iy = compute_inertia_y(b, h, t) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + + // Easter egg + const str_Doge = " such width" + const str_tmp = div_P.text + if (b == {MAX_B}) {{ + div_P.text = str_tmp+str_Doge + }} else {{ + div_P.text = str_tmp.replace(str_Doge, '') + }} + + // apply the changes + db['b'][0] = b + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h, t) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_torsional_stress(db, T_stress_diag) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_tau_torsionJS()} + {beam_section.implement_update_torsional_stressJS(discr_stress_strain)} + """ + update_b = CustomJS(args=args_slider_b, code=code_change_b) + + + args_slider_h = dict(source=source, + s_b=source_beam, + s_ss=source_section_scheme, + div=div_geo, + section=section, + support_r=support_r, + centroid=centroid, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + T_stress_diag=T_stress_diag, + div_T=div_cb_T, + EE1=EasterEgg1) + code_change_h = f""" + // retrieve data used + const db = source.data + const data_ss = s_ss.data + const b = db['b'][0] + const t = db['t'][0] + const h = cb_obj.value // value of the slider + const A = compute_area(b, h, t) + const Iy = compute_inertia_y(b, h, t) + const N = db['N'][0] + const M = db['M'][0] + const yG = compute_centroid_y(h) + + // Easter egg + /*const str_Doge = " much wow" + const str_tmp = div_T.text + if (h == {MAX_H}) {{ + div_T.text = str_tmp+str_Doge + }} else {{ + div_T.text = str_tmp.replace(str_Doge, '') + }}*/ + if (h == {MAX_H}) {{ + EE1.glyph.text = "much wow" + }} else {{ + EE1.glyph.text = "" + }} + + // apply the changes + db['h'][0] = h + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h, t) + db['yG'][0] = yG + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + data_ss['y'][1] = h // change the height of the section in the diagrams + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_torsional_stress(db, T_stress_diag) + + // emit the changes + source.change.emit() + s_ss.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_tau_torsionJS()} + {beam_section.implement_update_torsional_stressJS(discr_stress_strain)} + """ + update_h = CustomJS(args=args_slider_h, code=code_change_h) + + + args_checkbox_P = dict(source=source, + s_M=source_M, + div_P=div_cb_P, + div_f=div_forces, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + N_diag=N_diag, + neutral_axis=neutral_axis, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_checkbox_P = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox P + if (f.length==0) f = [1] + const db = source.data + + // apply the changes + db['P'][0] = {P}*(1-f) + db['N'][0] = compute_N(db['P'][0]) + db['Rx'][0] = compute_Rx(db['P'][0]) + + // update + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_N_diagram(db, N_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // emit the changes + source.change.emit() + + // declare functions + {sb.implement_update_external_forcesJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_compute_RxJS()} + {js.implement_update_arrowJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_compute_NJS()} + {sb.implement_update_N_diagramJS(discr_NVM)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {beam_section.implement_compute_tau_torsionJS()} + """ + update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P) + + + args_radiogroup_FBD = dict(source=source, + s_sb=source_scheme_beam, + s_q=source_scheme_q, + s_M=source_M, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + tau_stress_diag=tau_stress_diag) + code_radiogroup_FBD = f""" + // retrieve data + const db = source.data + const FBD = cb_obj.active + const data_sb = s_sb.data + const data_q = s_q.data + const pos = db['x'][0] + + // apply the changes + db['FBD'][0] = FBD + + // update + check_state(db) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_scheme_position(db, data_sb, data_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + + // emit the changes + source.change.emit() + s_sb.change.emit() + s_q.change.emit() + + {models.implement_check_stateJS()} + {sb.implement_update_internal_forcesJS()} + {sb.implement_update_scheme_positionJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_arrowJS()} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + """ + update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD) + + + args_slider_q = dict(source=source, + s_q=source_scheme_q, + s_M=source_M, + div_f=div_forces, + div_P=div_cb_P, + fP=scheme_axial_force, + fRx=scheme_Rx_l, + fRyl=scheme_Ry_l, + fRyr=scheme_Ry_r, + fN=scheme_N, + fV=scheme_V, + arr_head=scheme_M_head, + V_diag=V_diag, + M_diag=M_diag, + centroid=centroid, + neutral_axis=neutral_axis, + V_stress_diag=V_stress_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + section_N=section_N, + section_V=section_V, + section_M_head=section_M_head, + s_section_M=source_section_M, + label_N_section=label_N_section, + label_V_section=label_V_section, + label_M_section=label_M_section) + code_slider_q = f""" + // retrieve data + const db = source.data + const q = cb_obj.value + const pos = db['x'][0] + const L = db['L'][0] + + // update q + db['q'][0] = q + db['V'][0] = compute_V(pos, q, L) + db['M'][0] = compute_M(pos, q, L) + db['Ry_l'][0] = compute_Ry_l(q, L) + db['Ry_r'][0] = compute_Ry_r(q, L) + + // update + update_u_load(db, s_q) + update_reactions(db, fRx, fRyl, fRyr) + update_external_forces(db, fP, div_P) + update_V_diagram(db, V_diag) + update_M_diagram(db, M_diag) + update_internal_forces(db, fN, fV, arr_head, s_M) + update_div_forces(db, div_f) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section) + + // apply changes + source.change.emit() + + // declare functions + {js.implement_update_arrowJS()} + {js.implement_linspaceJS()} + {js.implement_parabolaJS()} + {js.implement_arrow_alphaJS()} + {js.implement_update_arrowJS()} + {sb.implement_compute_VJS()} + {sb.implement_compute_MJS()} + {sb.implement_compute_Ry_lJS()} + {sb.implement_compute_Ry_rJS()} + {js.implement_update_NVM_diagramJS()} + {sb.implement_update_V_diagramJS(discr_NVM)} + {sb.implement_update_M_diagramJS(discr_NVM)} + {sb.implement_update_reactionsJS()} + {sb.implement_update_external_forcesJS()} + {sb.implement_update_u_loadJS(OFFSET_Q)} + {sb.implement_update_internal_forcesJS()} + {js.implement_update_curvedArrowJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_neutral_axisJS()} + {beam_section.implement_compute_centroid_yJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {sb.implement_update_div_forcesJS()} + {js.implement_update_NVM_sectionJS()} + {js.implement_arrow_growthJS()} + {beam_section.implement_compute_tau_torsionJS()} + """ + update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q) + + + args_checkbox_T = dict(source=source, + T_diag=T_diag, + div_T=div_cb_T, + label_T_section=label_T_section, + section_T_line=section_T_line, + section_T_head=section_T_head, + section_T_source=section_T_source, + section_torsion_head=section_torsion_head, + section_torsion_source=section_torsion_source, + neutral_axis=neutral_axis, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + T_stress_diag=T_stress_diag) + code_checkbox_T = f""" + // retrieve var from the object that uses callback + var f = cb_obj.active // checkbox Mt + if (f.length==0) f = [1] + const db = source.data + const L = db['L'][0] + const x = db['x'][0] + + // apply the changes + db['Mt'][0] = {Mt}*(1-f) + db['T'][0] = compute_T(x, db['Mt'][0], L) + + // update + update_torsional_stress(db, T_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + update_T_diagram(db, T_diag) + update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section) + + // emit the changes + source.change.emit() + + // declare functions + {js.implement_update_curvedArrowJS()} + {js.implement_update_doubleArrowJS()} + {js.implement_arrow_growthJS()} + {sb.implement_update_T_sectionJS(scale_T=SCALE_T)} + {sb.implement_compute_TJS()} + {sb.implement_update_T_diagramJS(discr_NVM)} + {js.implement_linspaceJS()} + {js.implement_update_NVM_diagramJS()} + {beam_section.implement_compute_tau_torsionJS()} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {stst.implement_compute_neutral_axisJS()} + {stst.implement_compute_sigma_axialJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {js.implement_update_stress_diagramJS()} + {beam_section.implement_update_torsional_stressJS(discr_stress_strain)} + """ + update_checkbox_T = CustomJS(args=args_checkbox_T, code=code_checkbox_T) + + + args_slider_t = dict(source=source, + div=div_geo, + section=section, + N_stress_diag=N_stress_diag, + axial_strain_diag=axial_strain_diag, + M_stress_diag=M_stress_diag, + bending_strain_diag=bending_strain_diag, + centroid=centroid, + V_stress_diag=V_stress_diag, + sigma_stress_diag=sigma_stress_diag, + tau_stress_diag=tau_stress_diag, + neutral_axis=neutral_axis, + T_stress_diag=T_stress_diag) + code_change_t = f""" + // retrieve data used + const db = source.data + const t = cb_obj.value // value of the slider + const b = db['b'][0] + const h = db['h'][0] + const A = compute_area(b, h, t) + const Iy = compute_inertia_y(b, h, t) + const yG = db['yG'][0] + const N = db['N'][0] + const M = db['M'][0] + + // apply the changes + db['t'][0] = t + db['A'][0] = A + db['Iy'][0] = Iy + db['Iz'][0] = compute_inertia_z(b, h, t) + db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG) + + // update + update_div_geo(db, div) + update_section(db, section) + update_axial_stress_strain(db, N_stress_diag, axial_strain_diag) + update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid) + update_shear_stress(db, V_stress_diag) + update_torsional_stress(db, T_stress_diag) + update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis) + + // emit the changes + source.change.emit() + + {beam_section.implement_update_div_geoJS()} + {beam_section.implement_update_sectionJS()} + {beam_section.implement_compute_areaJS()} + {beam_section.implement_compute_inertia_yJS()} + {beam_section.implement_compute_inertia_zJS()} + {stst.implement_compute_neutral_axisJS()} + {js.implement_update_axial_stress_strainJS(discr_stress_strain)} + {js.implement_update_bending_stress_strainJS(discr_stress_strain)} + {js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)} + {js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)} + {js.implement_linspaceJS()} + {stst.implement_compute_epsilon_axialJS()} + {stst.implement_compute_epsilon_bendingJS()} + {stst.implement_compute_sigma_axialJS()} + {js.implement_update_stress_diagramJS()} + {js.implement_update_strain_diagramJS()} + {stst.implement_compute_sigma_bendingJS()} + {stst.implement_compute_total_sigmaJS()} + {stst.implement_compute_total_tauJS()} + {beam_section.implement_compute_first_moment_of_areaJS()} + {beam_section.implement_compute_first_moment_of_area_implicitJS()} + {stst.implement_compute_tau_shearJS()} + {beam_section.implement_compute_tau_torsionJS()} + {beam_section.implement_update_torsional_stressJS(discr_stress_strain)} + """ + update_t = CustomJS(args=args_slider_t, code=code_change_t) + + + + # apply the logics + slider_b.js_on_change('value', update_b) + slider_h.js_on_change('value', update_h) + slider_position.js_on_change('value', updade_slider_pos) + checkbox_P.js_on_click(update_checkbox_P) + radiogroup_FBD.js_on_click(update_radiogroup_FBD) + slider_q.js_on_change('value', update_slider_q) + slider_t.js_on_change('value', update_t) + checkbox_T.js_on_click(update_checkbox_T) + + + ######################################################## + # Build the layout + ######################################################## + padding_layout = 10 + layout1 = layout([ + [column(row(column(fig_scheme, + row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3), + slider_b, + slider_h, + slider_t, + # row(div_geo, div_forces), + slider_position, + slider_q, + Spacer(height=padding_layout*3), + div_rg_FBD, + radiogroup_FBD, + div_cb_P, + checkbox_P, + Spacer(height=padding_layout*3), + div_cb_T, + checkbox_T))), + column(fig_beam, + Spacer(height=padding_layout), + fig_N, + fig_V, + fig_M, + fig_T)), + row(column( + row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma), + row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), fig_stress_T, fig_stress_tau), + )) + ), + ], + ]) + + show(layout1) \ No newline at end of file diff --git a/Simple Beam DEMOs/sb_actions.ipynb b/Simple Beam DEMOs/sb_actions.ipynb index f56be60..7a96717 100644 --- a/Simple Beam DEMOs/sb_actions.ipynb +++ b/Simple Beam DEMOs/sb_actions.ipynb @@ -1,697 +1,477 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Actions\n", "In this second notebook, different actions are applied on the simple supported beam. The internal forces and moments can be visuallized and the N V M graphs are presented. " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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 numpy as np\n", + "import sys\n", + "sys.path.append('../HiddenCode')\n", + "import hidden_code_nb_actions\n", "import math\n", - "from bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\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 models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "from cienpy import rectangular_section as beam_section" ] }, { "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", "# 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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_Q = q/4*5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source = ColumnDataSource(data)" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Create the figures, the plots and the widgets (same of Notebook 1 - Geo):" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
GlyphRenderer(
id = '1124', …)
coordinates = None,
data_source = ColumnDataSource(id='1120', ...),
glyph = Text(id='1121', ...),
group = None,
hover_glyph = None,
js_event_callbacks = {},
js_property_callbacks = {},
level = 'glyph',
muted = False,
muted_glyph = Text(id='1123', ...),
name = None,
nonselection_glyph = Text(id='1122', ...),
selection_glyph = 'auto',
subscribed_events = [],
syncable = True,
tags = [],
view = CDSView(id='1125', ...),
visible = True,
x_range_name = 'default',
y_range_name = 'default')
\n", - "\n" - ], - "text/plain": [ - "GlyphRenderer(id='1124', ...)" + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" ] }, - "execution_count": 3, "metadata": {}, - "output_type": "execute_result" + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"a1bf6f28-4cd4-479a-9950-ff4d2cd2f8ef\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1277\"}]},\"id\":\"1278\",\"type\":\"Column\"},{\"attributes\":{\"below\":[{\"id\":\"1138\"}],\"center\":[{\"id\":\"1141\"},{\"id\":\"1145\"},{\"id\":\"1224\"},{\"id\":\"1227\"},{\"id\":\"1230\"},{\"id\":\"1233\"},{\"id\":\"1236\"},{\"id\":\"1239\"}],\"height\":200,\"left\":[{\"id\":\"1142\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1164\"},{\"id\":\"1197\"},{\"id\":\"1203\"},{\"id\":\"1209\"},{\"id\":\"1215\"},{\"id\":\"1221\"},{\"id\":\"1246\"},{\"id\":\"1252\"}],\"title\":{\"id\":\"1128\"},\"toolbar\":{\"id\":\"1153\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1130\"},\"x_scale\":{\"id\":\"1134\"},\"y_range\":{\"id\":\"1132\"},\"y_scale\":{\"id\":\"1136\"}},\"id\":\"1127\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1311\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1325\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1055\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1058\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1312\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1318\"},\"group\":null,\"major_label_policy\":{\"id\":\"1319\"},\"ticker\":{\"id\":\"1079\"}},\"id\":\"1055\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1162\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1083\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1085\"},\"nonselection_glyph\":{\"id\":\"1084\"},\"view\":{\"id\":\"1087\"}},\"id\":\"1086\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1130\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1132\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1134\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1290\"},\"group\":null,\"major_label_policy\":{\"id\":\"1291\"},\"ticker\":{\"id\":\"1143\"},\"visible\":false},\"id\":\"1142\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1293\"},\"group\":null,\"major_label_policy\":{\"id\":\"1294\"},\"ticker\":{\"id\":\"1139\"},\"visible\":false},\"id\":\"1138\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1142\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1145\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1049\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1138\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1141\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1118\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1136\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1128\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1290\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1139\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1282\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1160\"}},\"id\":\"1165\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1291\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1313\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1283\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1320\"},\"group\":null,\"major_label_policy\":{\"id\":\"1321\"},\"ticker\":{\"id\":\"1079\"}},\"id\":\"1051\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1146\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1152\"}},\"id\":\"1148\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1293\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1314\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1318\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1285\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1294\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1332\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1319\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1286\",\"type\":\"AllLabels\"},{\"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\":\"1152\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"1073\"}},\"id\":\"1078\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1333\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1163\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1320\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1229\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1297\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1230\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1321\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1338\"},\"selection_policy\":{\"id\":\"1337\"}},\"id\":\"1295\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1229\",\"type\":\"VeeHead\"},{\"attributes\":{\"interval\":50},\"id\":\"1079\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1326\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1232\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1317\"},\"selection_policy\":{\"id\":\"1316\"}},\"id\":\"1287\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1235\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1340\"},\"selection_policy\":{\"id\":\"1339\"}},\"id\":\"1296\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1106\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1104\"},\"source\":{\"id\":\"1006\"},\"support_r\":{\"id\":\"1098\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \"},\"id\":\"1262\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1327\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1232\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1298\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1233\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1342\"},\"selection_policy\":{\"id\":\"1341\"}},\"id\":\"1297\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1143\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1359\"},\"selection_policy\":{\"id\":\"1358\"}},\"id\":\"1322\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1334\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1344\"},\"selection_policy\":{\"id\":\"1343\"}},\"id\":\"1298\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1335\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1361\"},\"selection_policy\":{\"id\":\"1360\"}},\"id\":\"1323\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1346\"},\"selection_policy\":{\"id\":\"1345\"}},\"id\":\"1299\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1075\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1047\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1051\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1054\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1328\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1167\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1041\",\"type\":\"Title\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1348\"},\"selection_policy\":{\"id\":\"1347\"}},\"id\":\"1300\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1329\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1146\"},{\"id\":\"1147\"},{\"id\":\"1148\"},{\"id\":\"1149\"},{\"id\":\"1150\"},{\"id\":\"1151\"}]},\"id\":\"1153\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1301\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1178\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1287\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1179\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1160\"},\"glyph\":{\"id\":\"1161\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1163\"},\"nonselection_glyph\":{\"id\":\"1162\"},\"view\":{\"id\":\"1165\"}},\"id\":\"1164\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1337\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[0.6]},\"selected\":{\"id\":\"1308\"},\"selection_policy\":{\"id\":\"1307\"}},\"id\":\"1166\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1166\"},\"glyph\":{\"id\":\"1167\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1169\"},\"nonselection_glyph\":{\"id\":\"1168\"},\"view\":{\"id\":\"1171\"}},\"id\":\"1170\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Rect\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1178\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1302\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1172\"},\"glyph\":{\"id\":\"1173\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1175\"},\"nonselection_glyph\":{\"id\":\"1174\"},\"view\":{\"id\":\"1177\"}},\"id\":\"1176\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[0.4]},\"selected\":{\"id\":\"1310\"},\"selection_policy\":{\"id\":\"1309\"}},\"id\":\"1172\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1166\"}},\"id\":\"1171\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1330\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1316\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1173\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1317\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1331\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1172\"}},\"id\":\"1177\",\"type\":\"CDSView\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1188\",\"type\":\"Circle\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1181\"}},\"id\":\"1186\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1181\"},\"glyph\":{\"id\":\"1182\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1184\"},\"nonselection_glyph\":{\"id\":\"1183\"},\"view\":{\"id\":\"1186\"}},\"id\":\"1185\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"1312\"},\"selection_policy\":{\"id\":\"1311\"}},\"id\":\"1181\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1324\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1182\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1194\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1196\"},\"nonselection_glyph\":{\"id\":\"1195\"},\"view\":{\"id\":\"1198\"}},\"id\":\"1197\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"height\":10},\"id\":\"1269\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1303\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1268\"},{\"id\":\"1107\"},{\"id\":\"1108\"},{\"id\":\"1106\"},{\"id\":\"1269\"},{\"id\":\"1255\"},{\"id\":\"1254\"},{\"id\":\"1256\"},{\"id\":\"1257\"},{\"id\":\"1258\"},{\"id\":\"1259\"}]},\"id\":\"1270\",\"type\":\"Column\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1188\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1190\"},\"nonselection_glyph\":{\"id\":\"1189\"},\"view\":{\"id\":\"1192\"}},\"id\":\"1191\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1304\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1064\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1059\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1338\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1040\"},{\"id\":\"1267\"},{\"id\":\"1270\"}]},\"id\":\"1271\",\"type\":\"Row\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"1065\"}},\"id\":\"1061\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1192\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1062\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1063\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1241\"},\"glyph\":{\"id\":\"1243\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1245\"},\"nonselection_glyph\":{\"id\":\"1244\"},\"view\":{\"id\":\"1247\"}},\"id\":\"1246\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1339\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1007\"},{\"id\":\"1271\"}]},\"id\":\"1272\",\"type\":\"Column\"},{\"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\":\"1065\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1194\",\"type\":\"Circle\"},{\"attributes\":{\"height\":10},\"id\":\"1273\",\"type\":\"Spacer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1084\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1340\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1272\"},{\"id\":\"1274\"}]},\"id\":\"1275\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1200\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1202\"},\"nonselection_glyph\":{\"id\":\"1201\"},\"view\":{\"id\":\"1204\"}},\"id\":\"1203\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[{\"id\":\"1127\"},{\"id\":\"1273\"},{\"id\":\"1260\"}]},\"id\":\"1274\",\"type\":\"Column\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1198\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Circle\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1243\",\"type\":\"Line\"},{\"attributes\":{\"children\":[{\"id\":\"1275\"}]},\"id\":\"1276\",\"type\":\"Column\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1200\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1341\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1090\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"1333\"},\"selection_policy\":{\"id\":\"1332\"}},\"id\":\"1241\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1349\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1088\"},\"glyph\":{\"id\":\"1089\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1091\"},\"nonselection_glyph\":{\"id\":\"1090\"},\"view\":{\"id\":\"1093\"}},\"id\":\"1092\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1206\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1342\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1276\"}]},\"id\":\"1277\",\"type\":\"Row\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1350\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1305\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1204\",\"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\":\"1101\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"1205\"}},\"id\":\"1210\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1306\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1343\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1212\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1214\"},\"nonselection_glyph\":{\"id\":\"1213\"},\"view\":{\"id\":\"1216\"}},\"id\":\"1215\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1205\"},\"glyph\":{\"id\":\"1206\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1208\"},\"nonselection_glyph\":{\"id\":\"1207\"},\"view\":{\"id\":\"1210\"}},\"id\":\"1209\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"1304\"},\"selection_policy\":{\"id\":\"1303\"}},\"id\":\"1088\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1329\"},\"selection_policy\":{\"id\":\"1328\"}},\"id\":\"1205\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1344\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1218\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1358\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1087\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"1331\"},\"selection_policy\":{\"id\":\"1330\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1216\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1212\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1345\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1359\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1095\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1219\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1346\",\"type\":\"Selection\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1012\",\"type\":\"Range1d\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1235\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1299\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1236\",\"type\":\"Arrow\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1083\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1351\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1238\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1300\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1239\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1360\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1218\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1220\"},\"nonselection_glyph\":{\"id\":\"1219\"},\"view\":{\"id\":\"1222\"}},\"id\":\"1221\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1085\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1222\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1347\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1226\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1352\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1361\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1223\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1295\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1224\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1073\"},\"glyph\":{\"id\":\"1074\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1076\"},\"nonselection_glyph\":{\"id\":\"1075\"},\"view\":{\"id\":\"1078\"}},\"id\":\"1077\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1059\"},{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"},{\"id\":\"1063\"},{\"id\":\"1064\"}]},\"id\":\"1066\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1220\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1348\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1089\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"1241\"}},\"id\":\"1247\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1307\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1223\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"1335\"},\"selection_policy\":{\"id\":\"1334\"}},\"id\":\"1248\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1308\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1302\"},\"selection_policy\":{\"id\":\"1301\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1238\",\"type\":\"VeeHead\"},{\"attributes\":{\"source\":{\"id\":\"1100\"}},\"id\":\"1105\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"1306\"},\"selection_policy\":{\"id\":\"1305\"}},\"id\":\"1094\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"A\":[20000],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0]},\"selected\":{\"id\":\"1314\"},\"selection_policy\":{\"id\":\"1313\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1226\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1296\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1227\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1091\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1327\"},\"selection_policy\":{\"id\":\"1326\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1094\"}},\"id\":\"1099\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1019\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1249\",\"type\":\"Scatter\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1256\",\"type\":\"Div\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1352\"},\"selection_policy\":{\"id\":\"1351\"}},\"id\":\"1100\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1088\"}},\"id\":\"1093\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1250\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1008\",\"type\":\"Title\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1266\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1254\",\"type\":\"Slider\"},{\"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\":\"1096\",\"type\":\"Circle\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1261\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1255\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"1325\"},\"selection_policy\":{\"id\":\"1324\"}},\"id\":\"1160\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1251\",\"type\":\"Scatter\"},{\"attributes\":{\"below\":[{\"id\":\"1018\"}],\"center\":[{\"id\":\"1021\"},{\"id\":\"1025\"},{\"id\":\"1179\"}],\"height\":200,\"left\":[{\"id\":\"1022\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1086\"},{\"id\":\"1092\"},{\"id\":\"1098\"},{\"id\":\"1170\"},{\"id\":\"1176\"},{\"id\":\"1185\"},{\"id\":\"1191\"}],\"title\":{\"id\":\"1008\"},\"toolbar\":{\"id\":\"1033\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1010\"},\"x_scale\":{\"id\":\"1014\"},\"y_range\":{\"id\":\"1012\"},\"y_scale\":{\"id\":\"1016\"}},\"id\":\"1007\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1248\"},\"glyph\":{\"id\":\"1249\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1251\"},\"nonselection_glyph\":{\"id\":\"1250\"},\"view\":{\"id\":\"1253\"}},\"id\":\"1252\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1094\"},\"glyph\":{\"id\":\"1095\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1097\"},\"nonselection_glyph\":{\"id\":\"1096\"},\"view\":{\"id\":\"1099\"}},\"id\":\"1098\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1248\"}},\"id\":\"1253\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1076\",\"type\":\"Rect\"},{\"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\":\"1097\",\"type\":\"Circle\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1265\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1257\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{},\"id\":\"1353\",\"type\":\"UnionRenderers\"},{\"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\":\"1102\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1109\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1322\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1110\",\"type\":\"Arrow\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1258\",\"type\":\"Div\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \"},\"id\":\"1260\",\"type\":\"Div\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1100\"},\"glyph\":{\"id\":\"1101\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1103\"},\"nonselection_glyph\":{\"id\":\"1102\"},\"view\":{\"id\":\"1105\"}},\"id\":\"1104\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1350\"},\"selection_policy\":{\"id\":\"1349\"}},\"id\":\"1073\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1010\",\"type\":\"Range1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1109\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1354\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1051\"}],\"center\":[{\"id\":\"1054\"},{\"id\":\"1058\"},{\"id\":\"1110\"},{\"id\":\"1119\"}],\"left\":[{\"id\":\"1055\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1077\"},{\"id\":\"1104\"},{\"id\":\"1116\"},{\"id\":\"1125\"}],\"title\":{\"id\":\"1041\"},\"toolbar\":{\"id\":\"1066\"},\"toolbar_location\":null,\"width\":375,\"x_range\":{\"id\":\"1043\"},\"x_scale\":{\"id\":\"1047\"},\"y_range\":{\"id\":\"1045\"},\"y_scale\":{\"id\":\"1049\"}},\"id\":\"1040\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1161\",\"type\":\"Rect\"},{\"attributes\":{\"tools\":[{\"id\":\"1026\"},{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"}]},\"id\":\"1033\",\"type\":\"Toolbar\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\"},\"id\":\"1106\",\"type\":\"Div\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1074\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"1018\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1021\",\"type\":\"Grid\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1264\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1259\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"ResetTool\"},{\"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\":\"1103\",\"type\":\"Rect\"},{\"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\":\"1123\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1022\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1025\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1121\"},\"glyph\":{\"id\":\"1122\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1124\"},\"nonselection_glyph\":{\"id\":\"1123\"},\"view\":{\"id\":\"1126\"}},\"id\":\"1125\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \"},\"id\":\"1261\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1310\",\"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\":\"1115\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1282\"},\"group\":null,\"major_label_policy\":{\"id\":\"1283\"},\"ticker\":{\"id\":\"1023\"},\"visible\":false},\"id\":\"1022\",\"type\":\"LinearAxis\"},{\"attributes\":{\"height\":10},\"id\":\"1268\",\"type\":\"Spacer\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1262\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1107\",\"type\":\"Slider\"},{\"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\":\"1032\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1016\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1263\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1108\",\"type\":\"Slider\"},{\"attributes\":{\"source\":{\"id\":\"1121\"}},\"id\":\"1126\",\"type\":\"CDSView\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1106\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1104\"},\"source\":{\"id\":\"1006\"},\"support_r\":{\"id\":\"1098\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = db['b'][0]\\n const h = cb_obj.value // value of the slider\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \"},\"id\":\"1263\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"HelpTool\"},{\"attributes\":{\"source\":{\"id\":\"1112\"}},\"id\":\"1117\",\"type\":\"CDSView\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1122\",\"type\":\"Text\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1264\",\"type\":\"CustomJS\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1285\"},\"group\":null,\"major_label_policy\":{\"id\":\"1286\"},\"ticker\":{\"id\":\"1019\"}},\"id\":\"1018\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1112\"},\"glyph\":{\"id\":\"1113\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1115\"},\"nonselection_glyph\":{\"id\":\"1114\"},\"view\":{\"id\":\"1117\"}},\"id\":\"1116\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1355\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1023\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"1356\"},\"selection_policy\":{\"id\":\"1355\"}},\"id\":\"1121\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1265\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"SaveTool\"},{\"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\":\"1114\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1026\",\"type\":\"PanTool\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1113\",\"type\":\"Text\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1266\",\"type\":\"CustomJS\"},{\"attributes\":{\"overlay\":{\"id\":\"1032\"}},\"id\":\"1028\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"1354\"},\"selection_policy\":{\"id\":\"1353\"}},\"id\":\"1112\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1356\",\"type\":\"Selection\"},{\"attributes\":{\"width\":10},\"id\":\"1267\",\"type\":\"Spacer\"},{\"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\":\"1124\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1118\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1323\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1119\",\"type\":\"Arrow\"}],\"root_ids\":[\"1278\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"a1bf6f28-4cd4-479a-9950-ff4d2cd2f8ef\",\"root_ids\":[\"1278\"],\"roots\":{\"1278\":\"3c0b4244-f256-4a63-b201-a3e4fbaf4e4c\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "1278" + } + }, + "output_type": "display_data" } ], "source": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{models.implement_check_stateJS()}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b_h = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b_h, code=code_change_b)\n", - "\n", - "\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = db['b'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_b_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_beam,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout),\n", - " slider_b,\n", - " slider_h,\n", - " div_geo,\n", - " Spacer(height=padding_layout),\n", - " slider_position,\n", - " slider_q,\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_scheme,\n", - " Spacer(height=padding_layout),\n", - " div_forces))\n", - " )],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_buckling.ipynb b/Simple Beam DEMOs/sb_buckling.ipynb index 34341ed..f8111e4 100644 --- a/Simple Beam DEMOs/sb_buckling.ipynb +++ b/Simple Beam DEMOs/sb_buckling.ipynb @@ -1,644 +1,479 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Buckling\n", - "In this second notebook, the instability of a simple beam under constant axial load is studied. " + "In this last notebook, the instability of a simple beam under constant axial load is studied. " ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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 bokeh.layouts import layout, column, row\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer\n", - "from bokeh.models.widgets import RadioButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\n", "from cienpy import simplebeam as sb\n", "from cienpy import rectangular_section as beam_section\n", - "from cienpy import models\n", - "from cienpy import javascriptcodes as js\n", - "from cienpy import buckling\n", - "\n", - "# output_notebook()" + "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": 20, + "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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "\n", "# compute buckling resistance\n", "n_bracey = 0\n", "n_bracez = 0\n", "Ncrity = buckling.compute_N_buckling_y(E, Iy, L, n_bracey)\n", - "Ncritz = buckling.compute_N_buckling_z(E, Iz, L, n_bracez)\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_P = 100*P\n", - "MAX_L = 10\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " E=[E],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " Rx=[Rx],\n", - " N=[N],\n", - " Ncrity=[Ncrity],\n", - " Ncritz=[Ncritz],\n", - " n_bracey=[n_bracey],\n", - " n_bracez=[n_bracez],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source = ColumnDataSource(data)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Create the figures, the plots and the widgets (same of Notebook 2 - Actions):" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [], - "source": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "MAX_Q = 5\n", - "OFFSET_Q = 4\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO,\n", - " text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [], - "source": [ - "# change title in beam (y direction)\n", - "fig_beam.title.text = \"Simple supported beam: x-y plane\"\n", - "\n", - "\n", - "# beam in z direction\n", - "fig_beam_z = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "fig_beam_z.title.text = \"Simple supported beam: x-z plane\"\n", - "(beam_z, support_l_z, support_r_z) = sb.draw_beam(fig_beam_z, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "fig_beam_z.x_range = fig_beam.x_range\n", - "\n", - "\n", - "# axial force (beam z direction)\n", - "axial_force_z = models.force_vector(fig_beam_z, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force_z = fig_beam_z.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# reference system (x-y plane)\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_beam, axis_arrow_length, -axis_arrow_length-0.1, -0.1, 0, 0, 'gray')\n", - "fig_beam.text(x=[-axis_arrow_length], y=[0.1], text=[\"x axis\"], text_color='gray', text_baseline='bottom')\n", - "models.force_vector(fig_beam, axis_arrow_length, 0, 0, 0, axis_arrow_length, 'gray')\n", - "fig_beam.text(x=[0.1], y=[0.2], text=[\"y axis\"], text_color='gray', text_baseline='bottom')\n", - "\n", - "\n", - "# reference system (x-z plane)\n", - "models.force_vector(fig_beam_z, axis_arrow_length, -axis_arrow_length-0.1, -0.1, 0, 0, 'gray')\n", - "fig_beam_z.text(x=[-axis_arrow_length], y=[0.1], text=[\"x axis\"], text_color='gray', text_baseline='bottom')\n", - "models.force_vector(fig_beam_z, axis_arrow_length, 0, 0, 0, axis_arrow_length, 'gray')\n", - "fig_beam_z.text(x=[0.1], y=[0.2], text=[\"z axis\"], text_color='gray', text_baseline='bottom')\n", - "\n", - "\n", - "# slider P\n", - "slider_P = Slider(\n", - " title=\"Change the axial force P [kN]\",\n", - " start=1,\n", - " end=MAX_P,\n", - " step=1,\n", - " value=P\n", - ")\n", - "\n", - "\n", - "# slider L\n", - "slider_L = Slider(\n", - " title=\"Change the length of the beam [m]\",\n", - " start=1,\n", - " end=L,\n", - " step=0.1,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# bracing options\n", - "div_rg_brace_y = Div(text=\"Number of braces in y direction:\")\n", - "radiogroup_brace_y = RadioButtonGroup(labels=['No brace', 'One middle brace', 'Two equally spaced braces'], active=n_bracey)\n", - "div_rg_brace_z = Div(text=\"Number of braces in z direction:\")\n", - "radiogroup_brace_z = RadioButtonGroup(labels=['No brace', 'One middle brace', 'Two equally spaced braces'], active=n_bracez)\n", - "\n", - "\n", - "# figure for buckling\n", - "fig_buckling_y = figure(toolbar_location=None,\n", - " plot_height=FIG_H_S,\n", - " plot_width=FIG_B_S,\n", - " title=\"Beam instability in y direction\",\n", - " x_axis_label=\"Position [m]\",\n", - " x_range = fig_beam.x_range\n", - ")\n", - "fig_buckling_y.ygrid.grid_line_alpha = 0\n", - "fig_buckling_y.yaxis.visible = False\n", - "fig_buckling_y.line('x', 'y', source=source_beam, line_width=1, color='gray')\n", - "mode_shape_y = fig_buckling_y.line(x=[0, L], y=[0, 0], line_width=2, color='black')\n", - "\n", - "fig_buckling_z = figure(toolbar_location=None,\n", - " plot_height=FIG_H_S,\n", - " plot_width=FIG_B_S,\n", - " title=\"Beam instability in z direction\",\n", - " x_axis_label=\"Position [m]\",\n", - " x_range = fig_beam.x_range\n", - ")\n", - "fig_buckling_z.ygrid.grid_line_alpha = 0\n", - "fig_buckling_z.yaxis.visible = False\n", - "fig_buckling_z.line('x', 'y', source=source_beam, line_width=1, color='gray')\n", - "mode_shape_z = fig_buckling_z.line(x=[0, L], y=[0, 0], line_width=2, color='black')\n", - "\n", - "\n", - "# show values of forces \n", - "div_buckling = Div(width=DIV_B_FORCES,\n", - " text=buckling.div_text_buckling(P, Rx, N, \"{:.2f}\".format(Ncrity), \"{:.2f}\".format(Ncritz), \"No\"))\n", - "\n", - "\n", - "# show brace position\n", - "point_brace_y = fig_buckling_y.circle(x=[], y=[], size=10, fill_alpha=0.5, fill_color=\"red\", color=\"red\", alpha=0.5)\n", - "point_brace_z = fig_buckling_z.circle(x=[], y=[], size=10, fill_alpha=0.5, fill_color=\"red\", color=\"red\", alpha=0.5)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_b_h = dict(source=source,\n", - " mode_shape_y=mode_shape_y,\n", - " mode_shape_z=mode_shape_z,\n", - " div=div_geo, \n", - " div_buckling=div_buckling,\n", - " section=section)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const L = db['L'][0]\n", - "const E = db['E'][0]\n", - "const n_bracey = db['n_bracey'][0]\n", - "const n_bracez = db['n_bracez'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const Iz = compute_inertia_z(b, h)\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = Iz\n", - "db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\n", - "db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_div_buckling(db, div_buckling)\n", - "update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{buckling.implement_update_div_bucklingJS()}\n", - "{buckling.implement_compute_N_buckling_yJS()}\n", - "{buckling.implement_compute_N_buckling_zJS()}\n", - "{buckling.implement_compute_mode_shape_N_bucklingJS()}\n", - "{js.implement_linspaceJS()}\n", - "{buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b_h, code=code_change_b)\n", - "\n", - "\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const h = cb_obj.value // value of the slider\n", - "const b = db['b'][0]\n", - "const L = db['L'][0]\n", - "const E = db['E'][0]\n", - "const n_bracey = db['n_bracey'][0]\n", - "const n_bracez = db['n_bracez'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const Iz = compute_inertia_z(b, h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = Iz\n", - "db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\n", - "db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_div_buckling(db, div_buckling)\n", - "update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{buckling.implement_update_div_bucklingJS()}\n", - "{buckling.implement_compute_N_buckling_yJS()}\n", - "{buckling.implement_compute_N_buckling_zJS()}\n", - "{buckling.implement_compute_mode_shape_N_bucklingJS()}\n", - "{js.implement_linspaceJS()}\n", - "{buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_b_h, code=code_change_h)\n", - "\n", - "\n", - "args_slider_L = dict(source=source,\n", - " s_b=source_beam,\n", - " support_r_y=support_r,\n", - " support_r_z=support_r_z,\n", - " axial_force_y=axial_force,\n", - " axial_force_z=axial_force_z,\n", - " label_P_force_y=label_P_force,\n", - " label_P_force_z=label_P_force_z,\n", - " point_brace_y=point_brace_y,\n", - " point_brace_z=point_brace_z,\n", - " mode_shape_y=mode_shape_y,\n", - " mode_shape_z=mode_shape_z,\n", - " div=div_geo,\n", - " div_buckling=div_buckling)\n", - "code_change_L = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const data_b = s_b.data\n", - "const L = cb_obj.value // value of the slider\n", - "const E = db['E'][0]\n", - "const Iy = db['Iy'][0]\n", - "const Iz = db['Iz'][0]\n", - "const n_bracey = db['n_bracey'][0]\n", - "const n_bracez = db['n_bracez'][0]\n", - "\n", - "// apply the changes\n", - "data_b['x'][1] = L\n", - "db['L'][0] = L\n", - "db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\n", - "db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_div_buckling(db, div_buckling)\n", - "support_r_y.glyph.x = L\n", - "support_r_z.glyph.x = L\n", - "axial_force_y.x_start = L+{P/SCALE}\n", - "axial_force_y.x_end = L\n", - "label_P_force_y.glyph.x = L+{P/SCALE}/2\n", - "axial_force_z.x_start = L+{P/SCALE}\n", - "axial_force_z.x_end = L\n", - "label_P_force_z.glyph.x = L+{P/SCALE}/2\n", - "update_point_brace(point_brace_y, n_bracey)\n", - "update_point_brace(point_brace_z, n_bracez)\n", - "update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_b.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{buckling.implement_update_div_bucklingJS()}\n", - "{buckling.implement_compute_N_buckling_yJS()}\n", - "{buckling.implement_compute_N_buckling_zJS()}\n", - "{buckling.implement_update_point_braceJS()}\n", - "{buckling.implement_compute_mode_shape_N_bucklingJS()}\n", - "{js.implement_linspaceJS()}\n", - "{buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)}\n", - "\"\"\"\n", - "update_L = CustomJS(args=args_slider_L, code=code_change_L)\n", - "\n", - "\n", - "args_slider_P = dict(source=source,\n", - " mode_shape_y=mode_shape_y,\n", - " mode_shape_z=mode_shape_z,\n", - " div_buckling=div_buckling)\n", - "code_slider_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "const db = source.data\n", - "const P = cb_obj.value // value of the slider\n", - "\n", - "// apply the changes\n", - "db['P'][0] = P\n", - "db['N'][0] = compute_N(P)\n", - "db['Rx'][0] = compute_Rx(P)\n", - "\n", - "// update\n", - "update_div_buckling(db, div_buckling)\n", - "update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_RxJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{buckling.implement_update_div_bucklingJS()}\n", - "{buckling.implement_compute_mode_shape_N_bucklingJS()}\n", - "{js.implement_linspaceJS()}\n", - "{buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)}\n", - "\"\"\"\n", - "update_P = CustomJS(args=args_slider_P, code=code_slider_P)\n", - "\n", - "\n", - "args_radiogroup_brace_y = dict(source=source,\n", - " mode_shape_y=mode_shape_y,\n", - " mode_shape_z=mode_shape_z,\n", - " div_buckling=div_buckling,\n", - " point_brace=point_brace_y)\n", - "args_radiogroup_brace_z = dict(source=source,\n", - " mode_shape_y=mode_shape_y,\n", - " mode_shape_z=mode_shape_z,\n", - " div_buckling=div_buckling,\n", - " point_brace=point_brace_z)\n", - "code_radiogroup_brace = lambda which_axis : f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const n_brace = cb_obj.active\n", - "const E = db['E'][0]\n", - "const L = db['L'][0]\n", - "const I = db['I{which_axis}'][0]\n", - "\n", - "// apply the changes\n", - "db['n_brace{which_axis}'][0] = n_brace\n", - "db['Ncrit{which_axis}'][0] = compute_N_buckling_{which_axis}(E, I, L, n_brace)\n", - "\n", - "// update\n", - "update_div_buckling(db, div_buckling)\n", - "update_point_brace(point_brace, n_brace)\n", - "update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{buckling.implement_update_div_bucklingJS()}\n", - "{buckling.implement_compute_N_buckling_yJS()}\n", - "{buckling.implement_compute_N_buckling_zJS()}\n", - "{buckling.implement_update_point_braceJS()}\n", - "{buckling.implement_compute_mode_shape_N_bucklingJS()}\n", - "{js.implement_linspaceJS()}\n", - "{buckling.implement_update_mode_shape_N_bucklingJS(discr_NVM)}\n", - "\"\"\"\n", - "update_brace_y = CustomJS(args=args_radiogroup_brace_y, code=code_radiogroup_brace('y'))\n", - "update_brace_z = CustomJS(args=args_radiogroup_brace_z, code=code_radiogroup_brace('z'))\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_P.js_on_change('value', update_P)\n", - "slider_L.js_on_change('value', update_L)\n", - "radiogroup_brace_y.js_on_click(update_brace_y)\n", - "radiogroup_brace_z.js_on_click(update_brace_z)" + "Ncritz = buckling.compute_N_buckling_z(E, Iz, L, n_bracez)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Build the layout and show the figures. Note that the two \"beam instability\" graphs have no y axis (that should show how much the deflection is) because we know only the shape, not the amplitude of the buckling deformation (the constant of integration is set to 1 arbitrarily)." + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 3, "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "Opening in existing browser session.\n" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "name": "stderr", - "output_type": "stream", - "text": [ - "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\n" - ] + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"c8f06a0a-e584-4717-aa52-b032f08dea83\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1355\"}]},\"id\":\"1356\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1372\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1373\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1375\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1376\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1429\"},\"selection_policy\":{\"id\":\"1428\"}},\"id\":\"1377\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1431\"},\"selection_policy\":{\"id\":\"1430\"}},\"id\":\"1378\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1433\"},\"selection_policy\":{\"id\":\"1432\"}},\"id\":\"1379\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1381\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1382\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1384\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1385\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1185\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1377\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1186\",\"type\":\"Arrow\"},{\"attributes\":{\"source\":{\"id\":\"1110\"}},\"id\":\"1115\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1444\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Patch\"},{\"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\":\"1112\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1180\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"1119\"}},\"id\":\"1124\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1445\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1110\"},\"glyph\":{\"id\":\"1111\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1113\"},\"nonselection_glyph\":{\"id\":\"1112\"},\"view\":{\"id\":\"1115\"}},\"id\":\"1114\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1173\"}},\"id\":\"1178\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"1449\"},\"selection_policy\":{\"id\":\"1448\"}},\"id\":\"1110\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"1418\"},\"selection_policy\":{\"id\":\"1417\"}},\"id\":\"1173\",\"type\":\"ColumnDataSource\"},{\"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\":\"1113\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1116\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1173\"},\"glyph\":{\"id\":\"1174\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1176\"},\"nonselection_glyph\":{\"id\":\"1175\"},\"view\":{\"id\":\"1178\"}},\"id\":\"1177\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1116\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1397\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1117\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"1422\"},\"selection_policy\":{\"id\":\"1421\"}},\"id\":\"1188\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1176\",\"type\":\"Patch\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1120\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1188\"}},\"id\":\"1193\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1128\"}},\"id\":\"1133\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"1420\"},\"selection_policy\":{\"id\":\"1419\"}},\"id\":\"1179\",\"type\":\"ColumnDataSource\"},{\"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\":\"1121\",\"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\":\"1181\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1119\"},\"glyph\":{\"id\":\"1120\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1122\"},\"nonselection_glyph\":{\"id\":\"1121\"},\"view\":{\"id\":\"1124\"}},\"id\":\"1123\",\"type\":\"GlyphRenderer\"},{\"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\":\"1182\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"1451\"},\"selection_policy\":{\"id\":\"1450\"}},\"id\":\"1119\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1363\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1194\",\"type\":\"VeeHead\"},{\"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\":\"1122\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1125\",\"type\":\"VeeHead\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1125\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1368\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1126\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1179\"},\"glyph\":{\"id\":\"1180\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1182\"},\"nonselection_glyph\":{\"id\":\"1181\"},\"view\":{\"id\":\"1184\"}},\"id\":\"1183\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1129\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1364\",\"type\":\"AllLabels\"},{\"attributes\":{\"below\":[{\"id\":\"1145\"}],\"center\":[{\"id\":\"1148\"},{\"id\":\"1152\"},{\"id\":\"1186\"},{\"id\":\"1213\"},{\"id\":\"1222\"}],\"height\":200,\"left\":[{\"id\":\"1149\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1171\"},{\"id\":\"1177\"},{\"id\":\"1183\"},{\"id\":\"1192\"},{\"id\":\"1219\"},{\"id\":\"1228\"}],\"title\":{\"id\":\"1135\"},\"toolbar\":{\"id\":\"1160\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1008\"},\"x_scale\":{\"id\":\"1141\"},\"y_range\":{\"id\":\"1139\"},\"y_scale\":{\"id\":\"1143\"}},\"id\":\"1134\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1194\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":0.5877866649021191},\"source\":{\"id\":\"1369\"},\"start\":null,\"x_end\":{\"value\":-0.1},\"x_start\":{\"value\":-0.9},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1195\",\"type\":\"Arrow\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1139\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1188\"},\"glyph\":{\"id\":\"1189\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1191\"},\"nonselection_glyph\":{\"id\":\"1190\"},\"view\":{\"id\":\"1193\"}},\"id\":\"1192\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"1405\"},\"selection_policy\":{\"id\":\"1404\"}},\"id\":\"1128\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1366\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1179\"}},\"id\":\"1184\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1446\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1128\"},\"glyph\":{\"id\":\"1129\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1131\"},\"nonselection_glyph\":{\"id\":\"1130\"},\"view\":{\"id\":\"1133\"}},\"id\":\"1132\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1206\"}},\"id\":\"1211\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1367\",\"type\":\"AllLabels\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1185\",\"type\":\"VeeHead\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1130\",\"type\":\"Text\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1198\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1447\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1168\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1170\"},\"nonselection_glyph\":{\"id\":\"1169\"},\"view\":{\"id\":\"1172\"}},\"id\":\"1171\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1191\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1131\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1197\"}},\"id\":\"1202\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"x axis\"],\"x\":[-0.8],\"y\":[0.1]},\"selected\":{\"id\":\"1407\"},\"selection_policy\":{\"id\":\"1406\"}},\"id\":\"1197\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1197\"},\"glyph\":{\"id\":\"1198\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1200\"},\"nonselection_glyph\":{\"id\":\"1199\"},\"view\":{\"id\":\"1202\"}},\"id\":\"1201\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1145\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1148\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam: x-z plane\"},\"id\":\"1135\",\"type\":\"Title\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1199\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1158\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1375\"},\"group\":null,\"major_label_policy\":{\"id\":\"1376\"},\"ticker\":{\"id\":\"1146\"}},\"id\":\"1145\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1200\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1203\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1203\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":0.5877866649021191},\"source\":{\"id\":\"1370\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0.8},\"y_start\":{\"value\":0}},\"id\":\"1204\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1412\"},\"selection_policy\":{\"id\":\"1411\"}},\"id\":\"1368\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1215\"}},\"id\":\"1220\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1146\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1372\"},\"group\":null,\"major_label_policy\":{\"id\":\"1373\"},\"ticker\":{\"id\":\"1150\"},\"visible\":false},\"id\":\"1149\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1149\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1152\",\"type\":\"Grid\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1206\"},\"glyph\":{\"id\":\"1207\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1209\"},\"nonselection_glyph\":{\"id\":\"1208\"},\"view\":{\"id\":\"1211\"}},\"id\":\"1210\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1414\"},\"selection_policy\":{\"id\":\"1413\"}},\"id\":\"1369\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"text\":[\"y axis\"],\"x\":[0.1],\"y\":[0.2]},\"selected\":{\"id\":\"1409\"},\"selection_policy\":{\"id\":\"1408\"}},\"id\":\"1206\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1209\",\"type\":\"Text\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1416\"},\"selection_policy\":{\"id\":\"1415\"}},\"id\":\"1370\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1224\"}},\"id\":\"1229\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1154\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1216\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1153\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1159\"}},\"id\":\"1155\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1448\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1156\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1212\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1212\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":0.5877866649021191},\"source\":{\"id\":\"1378\"},\"start\":null,\"x_end\":{\"value\":-0.1},\"x_start\":{\"value\":-0.9},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1213\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1157\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1449\",\"type\":\"Selection\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1217\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1215\"},\"glyph\":{\"id\":\"1216\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1218\"},\"nonselection_glyph\":{\"id\":\"1217\"},\"view\":{\"id\":\"1220\"}},\"id\":\"1219\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"x axis\"],\"x\":[-0.8],\"y\":[0.1]},\"selected\":{\"id\":\"1424\"},\"selection_policy\":{\"id\":\"1423\"}},\"id\":\"1215\",\"type\":\"ColumnDataSource\"},{\"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\":\"1159\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1218\",\"type\":\"Text\"},{\"attributes\":{\"text\":\"Number of braces in z direction:\"},\"id\":\"1234\",\"type\":\"Div\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1221\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1221\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":0.5877866649021191},\"source\":{\"id\":\"1379\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0.8},\"y_start\":{\"value\":0}},\"id\":\"1222\",\"type\":\"Arrow\"},{\"attributes\":{\"below\":[{\"id\":\"1246\"}],\"center\":[{\"id\":\"1249\"},{\"id\":\"1253\"}],\"height\":200,\"left\":[{\"id\":\"1250\"}],\"renderers\":[{\"id\":\"1272\"},{\"id\":\"1278\"},{\"id\":\"1329\"}],\"title\":{\"id\":\"1237\"},\"toolbar\":{\"id\":\"1261\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1008\"},\"x_scale\":{\"id\":\"1242\"},\"y_range\":{\"id\":\"1240\"},\"y_scale\":{\"id\":\"1244\"}},\"id\":\"1236\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1225\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1226\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1224\"},\"glyph\":{\"id\":\"1225\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1227\"},\"nonselection_glyph\":{\"id\":\"1226\"},\"view\":{\"id\":\"1229\"}},\"id\":\"1228\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1240\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"text\":[\"z axis\"],\"x\":[0.1],\"y\":[0.2]},\"selected\":{\"id\":\"1426\"},\"selection_policy\":{\"id\":\"1425\"}},\"id\":\"1224\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1227\",\"type\":\"Text\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1342\"}]},\"labels\":[\"No brace\",\"One middle brace\",\"Two equally spaced braces\"]},\"id\":\"1235\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1341\"}]},\"labels\":[\"No brace\",\"One middle brace\",\"Two equally spaced braces\"]},\"id\":\"1233\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{},\"id\":\"1450\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1339\"}]},\"start\":1,\"step\":0.1,\"title\":\"Change the length of the beam [m]\",\"value\":6},\"id\":\"1231\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1269\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1271\"},\"nonselection_glyph\":{\"id\":\"1270\"},\"view\":{\"id\":\"1273\"}},\"id\":\"1272\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text\":\"Number of braces in y direction:\"},\"id\":\"1232\",\"type\":\"Div\"},{\"attributes\":{\"end\":1000,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1340\"}]},\"start\":1,\"title\":\"Change the axial force P [kN]\",\"value\":10},\"id\":\"1230\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1451\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1244\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1246\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1249\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1172\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Beam instability in y direction\"},\"id\":\"1237\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1242\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1259\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1457\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1384\"},\"group\":null,\"major_label_policy\":{\"id\":\"1385\"},\"ticker\":{\"id\":\"1247\"}},\"id\":\"1246\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1170\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1247\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1458\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1381\"},\"group\":null,\"major_label_policy\":{\"id\":\"1382\"},\"ticker\":{\"id\":\"1251\"},\"visible\":false},\"id\":\"1250\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1250\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1253\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1251\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1326\",\"type\":\"Circle\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"1254\"},{\"id\":\"1255\"},{\"id\":\"1256\"},{\"id\":\"1257\"},{\"id\":\"1258\"},{\"id\":\"1259\"}]},\"id\":\"1261\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1255\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1254\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1260\"}},\"id\":\"1256\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1257\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1258\",\"type\":\"ResetTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1153\"},{\"id\":\"1154\"},{\"id\":\"1155\"},{\"id\":\"1156\"},{\"id\":\"1157\"},{\"id\":\"1158\"}]},\"id\":\"1160\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":240.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":150},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1072\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1021\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1399\"},\"selection_policy\":{\"id\":\"1398\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"BasicTicker\"},{\"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\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1010\",\"type\":\"Range1d\"},{\"attributes\":{\"below\":[{\"id\":\"1016\"}],\"center\":[{\"id\":\"1019\"},{\"id\":\"1023\"},{\"id\":\"1126\"},{\"id\":\"1195\"},{\"id\":\"1204\"}],\"height\":200,\"left\":[{\"id\":\"1020\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1084\"},{\"id\":\"1090\"},{\"id\":\"1096\"},{\"id\":\"1132\"},{\"id\":\"1201\"},{\"id\":\"1210\"}],\"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\":{\"data\":{\"A\":[5000],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[4166666.6666666665],\"Iz\":[1041666.6666666666],\"L\":[6],\"N\":[-10],\"Ncrity\":[228.46306484003142],\"Ncritz\":[57.115766210007855],\"P\":[10],\"Rx\":[10],\"SCALE\":[10],\"b\":[50],\"h\":[100],\"n_bracey\":[0],\"n_bracez\":[0],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0]},\"selected\":{\"id\":\"1458\"},\"selection_policy\":{\"id\":\"1457\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1012\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1008\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1363\"},\"group\":null,\"major_label_policy\":{\"id\":\"1364\"},\"ticker\":{\"id\":\"1021\"},\"visible\":false},\"id\":\"1020\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam: x-y plane\"},\"id\":\"1006\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1041\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1016\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1019\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1366\"},\"group\":null,\"major_label_policy\":{\"id\":\"1367\"},\"ticker\":{\"id\":\"1017\"}},\"id\":\"1016\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1020\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1023\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1454\"},\"selection_policy\":{\"id\":\"1453\"}},\"id\":\"1396\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1456\"},\"selection_policy\":{\"id\":\"1455\"}},\"id\":\"1397\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1411\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1412\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1439\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1440\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1413\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1414\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1415\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1398\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1416\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1399\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1441\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1442\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1418\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1400\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1401\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1394\"},\"group\":null,\"major_label_policy\":{\"id\":\"1395\"},\"ticker\":{\"id\":\"1077\"}},\"id\":\"1049\",\"type\":\"LinearAxis\"},{\"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\":\"1260\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1445\"},\"selection_policy\":{\"id\":\"1444\"}},\"id\":\"1071\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1334\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1058\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1428\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1039\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1049\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1052\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1053\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1056\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1325\"}},\"id\":\"1330\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1429\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1392\"},\"group\":null,\"major_label_policy\":{\"id\":\"1393\"},\"ticker\":{\"id\":\"1077\"}},\"id\":\"1053\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1047\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[],\"y\":[]},\"selected\":{\"id\":\"1442\"},\"selection_policy\":{\"id\":\"1441\"}},\"id\":\"1331\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1141\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1332\",\"type\":\"Circle\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 100 mm
\\n b = 50 mm
\\n L = 6 m
\\n A = 5.00e+03 mm2
\\n Iy = 4.17e+06 mm4
\\n Iz = 1.04e+06 mm4\",\"width\":170},\"id\":\"1104\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1453\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1081\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1333\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1454\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1431\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1062\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1057\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1063\"}},\"id\":\"1059\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1432\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1456\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1433\",\"type\":\"Selection\"},{\"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\":{\"source\":{\"id\":\"1086\"}},\"id\":\"1091\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1269\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1270\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1082\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1277\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1271\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1085\",\"type\":\"CDSView\"},{\"attributes\":{\"interval\":50},\"id\":\"1077\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1274\"},\"glyph\":{\"id\":\"1275\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1277\"},\"nonselection_glyph\":{\"id\":\"1276\"},\"view\":{\"id\":\"1279\"}},\"id\":\"1278\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1325\"},\"glyph\":{\"id\":\"1326\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1328\"},\"nonselection_glyph\":{\"id\":\"1327\"},\"view\":{\"id\":\"1330\"}},\"id\":\"1329\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1273\",\"type\":\"CDSView\"},{\"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\":\"1291\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1290\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1293\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1434\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1290\"}],\"center\":[{\"id\":\"1293\"},{\"id\":\"1297\"}],\"height\":200,\"left\":[{\"id\":\"1294\"}],\"renderers\":[{\"id\":\"1316\"},{\"id\":\"1322\"},{\"id\":\"1335\"}],\"title\":{\"id\":\"1281\"},\"toolbar\":{\"id\":\"1305\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1008\"},\"x_scale\":{\"id\":\"1286\"},\"y_range\":{\"id\":\"1284\"},\"y_scale\":{\"id\":\"1288\"}},\"id\":\"1280\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1087\",\"type\":\"Patch\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1275\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1435\"},\"selection_policy\":{\"id\":\"1434\"}},\"id\":\"1274\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1435\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1276\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1274\"}},\"id\":\"1279\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Beam instability in z direction\"},\"id\":\"1281\",\"type\":\"Title\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1083\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1288\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1286\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1313\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1315\"},\"nonselection_glyph\":{\"id\":\"1314\"},\"view\":{\"id\":\"1317\"}},\"id\":\"1316\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1284\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1303\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1390\"},\"group\":null,\"major_label_policy\":{\"id\":\"1391\"},\"ticker\":{\"id\":\"1291\"}},\"id\":\"1290\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1327\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1436\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1057\"},{\"id\":\"1058\"},{\"id\":\"1059\"},{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"}]},\"id\":\"1064\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[],\"y\":[]},\"selected\":{\"id\":\"1437\"},\"selection_policy\":{\"id\":\"1436\"}},\"id\":\"1325\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":100},\"line_width\":{\"value\":3},\"width\":{\"value\":50},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1099\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1143\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1387\"},\"group\":null,\"major_label_policy\":{\"id\":\"1388\"},\"ticker\":{\"id\":\"1295\"},\"visible\":false},\"id\":\"1294\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1437\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1294\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1297\",\"type\":\"Grid\"},{\"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\":{},\"id\":\"1295\",\"type\":\"BasicTicker\"},{\"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\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"1401\"},\"selection_policy\":{\"id\":\"1400\"}},\"id\":\"1086\",\"type\":\"ColumnDataSource\"},{\"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\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1447\"},\"selection_policy\":{\"id\":\"1446\"}},\"id\":\"1098\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"1403\"},\"selection_policy\":{\"id\":\"1402\"}},\"id\":\"1092\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1299\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1093\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1298\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1304\"}},\"id\":\"1300\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1107\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1396\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1108\",\"type\":\"Arrow\"},{\"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\":{},\"id\":\"1301\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":100},\"line_alpha\":{\"value\":0.1},\"line_width\":{\"value\":3},\"width\":{\"value\":50},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1100\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1302\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1107\",\"type\":\"VeeHead\"},{\"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\":{\"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\":\"1304\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"1092\"}},\"id\":\"1097\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1298\"},{\"id\":\"1299\"},{\"id\":\"1300\"},{\"id\":\"1301\"},{\"id\":\"1302\"},{\"id\":\"1303\"}]},\"id\":\"1305\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_pattern\":{\"value\":\"/\"},\"height\":{\"value\":100},\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":3},\"width\":{\"value\":50},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1101\",\"type\":\"Rect\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1338\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":100},\"id\":\"1106\",\"type\":\"Slider\"},{\"attributes\":{\"end\":150,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1337\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":50},\"id\":\"1105\",\"type\":\"Slider\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1111\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1328\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1098\"}},\"id\":\"1103\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1024\"},{\"id\":\"1025\"},{\"id\":\"1026\"},{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"}]},\"id\":\"1031\",\"type\":\"Toolbar\"},{\"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\":{\"source\":{\"id\":\"1071\"}},\"id\":\"1076\",\"type\":\"CDSView\"},{\"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\":{\"line_alpha\":0.1,\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1314\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1321\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1315\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1387\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1104\"},\"div_buckling\":{\"id\":\"1324\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"section\":{\"id\":\"1102\"},\"source\":{\"id\":\"1004\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const h = cb_obj.value // value of the slider\\n const b = db['b'][0]\\n const L = db['L'][0]\\n const E = db['E'][0]\\n const n_bracey = db['n_bracey'][0]\\n const n_bracez = db['n_bracez'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const Iz = compute_inertia_z(b, h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = Iz\\n db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\\n db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_div_buckling(db, div_buckling)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_N_buckling_y(E, Iy, L, n_bracey) {\\n return ((n_bracey+1)*Math.PI)**2*E*Iy/L**2/1e9\\n }\\n \\n \\n function compute_N_buckling_z(E, Iz, L, n_bracez) {\\n return ((n_bracez+1)*Math.PI)**2*E*Iz/L**2/1e9\\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1338\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_color\":\"gray\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1313\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1318\"},\"glyph\":{\"id\":\"1319\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1321\"},\"nonselection_glyph\":{\"id\":\"1320\"},\"view\":{\"id\":\"1323\"}},\"id\":\"1322\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1388\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1317\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1390\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1104\"},\"div_buckling\":{\"id\":\"1324\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"section\":{\"id\":\"1102\"},\"source\":{\"id\":\"1004\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const L = db['L'][0]\\n const E = db['E'][0]\\n const n_bracey = db['n_bracey'][0]\\n const n_bracez = db['n_bracez'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const Iz = compute_inertia_z(b, h)\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = Iz\\n db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\\n db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_div_buckling(db, div_buckling)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_N_buckling_y(E, Iy, L, n_bracey) {\\n return ((n_bracey+1)*Math.PI)**2*E*Iy/L**2/1e9\\n }\\n \\n \\n function compute_N_buckling_z(E, Iz, L, n_bracez) {\\n return ((n_bracez+1)*Math.PI)**2*E*Iz/L**2/1e9\\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1337\",\"type\":\"CustomJS\"},{\"attributes\":{\"text\":\"\\n

Forces and Instability:

\\n P = 10 kN
\\n Rx = 10 kN
\\n N = -10 kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = 228.46 kN
\\n Ncrit,z = 57.12 kN
\\n Instability: No\\n \",\"width\":170},\"id\":\"1324\",\"type\":\"Div\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1319\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1440\"},\"selection_policy\":{\"id\":\"1439\"}},\"id\":\"1318\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1391\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1318\"}},\"id\":\"1323\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1320\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1331\"}},\"id\":\"1336\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1331\"},\"glyph\":{\"id\":\"1332\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1334\"},\"nonselection_glyph\":{\"id\":\"1333\"},\"view\":{\"id\":\"1336\"}},\"id\":\"1335\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"args\":{\"axial_force_y\":{\"id\":\"1126\"},\"axial_force_z\":{\"id\":\"1186\"},\"div\":{\"id\":\"1104\"},\"div_buckling\":{\"id\":\"1324\"},\"label_P_force_y\":{\"id\":\"1132\"},\"label_P_force_z\":{\"id\":\"1192\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"point_brace_y\":{\"id\":\"1329\"},\"point_brace_z\":{\"id\":\"1335\"},\"s_b\":{\"id\":\"1003\"},\"source\":{\"id\":\"1004\"},\"support_r_y\":{\"id\":\"1096\"},\"support_r_z\":{\"id\":\"1183\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const data_b = s_b.data\\n const L = cb_obj.value // value of the slider\\n const E = db['E'][0]\\n const Iy = db['Iy'][0]\\n const Iz = db['Iz'][0]\\n const n_bracey = db['n_bracey'][0]\\n const n_bracez = db['n_bracez'][0]\\n\\n // apply the changes\\n data_b['x'][1] = L\\n db['L'][0] = L\\n db['Ncrity'][0] = compute_N_buckling_y(E, Iy, L, n_bracey)\\n db['Ncritz'][0] = compute_N_buckling_z(E, Iz, L, n_bracez)\\n\\n // update\\n update_div_geo(db, div)\\n update_div_buckling(db, div_buckling)\\n support_r_y.glyph.x = L\\n support_r_z.glyph.x = L\\n axial_force_y.x_start = L+1.0\\n axial_force_y.x_end = L\\n label_P_force_y.glyph.x = L+1.0/2\\n axial_force_z.x_start = L+1.0\\n axial_force_z.x_end = L\\n label_P_force_z.glyph.x = L+1.0/2\\n update_point_brace(point_brace_y, n_bracey)\\n update_point_brace(point_brace_z, n_bracez)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n s_b.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_N_buckling_y(E, Iy, L, n_bracey) {\\n return ((n_bracey+1)*Math.PI)**2*E*Iy/L**2/1e9\\n }\\n \\n \\n function compute_N_buckling_z(E, Iz, L, n_bracez) {\\n return ((n_bracez+1)*Math.PI)**2*E*Iz/L**2/1e9\\n }\\n \\n \\n function update_point_brace(point_brace, n_brace) {\\n switch(n_brace) {\\n case 0:\\n var x_ = []\\n var y_ = []\\n break\\n case 1:\\n var x_ = [L/2]\\n var y_ = [0]\\n break\\n case 2:\\n var x_ = [L/3, 2*L/3]\\n var y_ = [0, 0]\\n break\\n default:\\n console.error(\\\"Number of braces \\\"+n_brace+\\\" exceeds the implemented limit (2)\\\")\\n }\\n const src_point = point_brace.data_source\\n src_point.data.x = x_\\n src_point.data.y = y_\\n src_point.change.emit()\\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1339\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"div_buckling\":{\"id\":\"1324\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"source\":{\"id\":\"1004\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n const db = source.data\\n const P = cb_obj.value // value of the slider\\n\\n // apply the changes\\n db['P'][0] = P\\n db['N'][0] = compute_N(P)\\n db['Rx'][0] = compute_Rx(P)\\n\\n // update\\n update_div_buckling(db, div_buckling)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1340\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"div_buckling\":{\"id\":\"1324\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"point_brace\":{\"id\":\"1329\"},\"source\":{\"id\":\"1004\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const n_brace = cb_obj.active\\n const E = db['E'][0]\\n const L = db['L'][0]\\n const I = db['Iy'][0]\\n\\n // apply the changes\\n db['n_bracey'][0] = n_brace\\n db['Ncrity'][0] = compute_N_buckling_y(E, I, L, n_brace)\\n\\n // update\\n update_div_buckling(db, div_buckling)\\n update_point_brace(point_brace, n_brace)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_N_buckling_y(E, Iy, L, n_bracey) {\\n return ((n_bracey+1)*Math.PI)**2*E*Iy/L**2/1e9\\n }\\n \\n \\n function compute_N_buckling_z(E, Iz, L, n_bracez) {\\n return ((n_bracez+1)*Math.PI)**2*E*Iz/L**2/1e9\\n }\\n \\n \\n function update_point_brace(point_brace, n_brace) {\\n switch(n_brace) {\\n case 0:\\n var x_ = []\\n var y_ = []\\n break\\n case 1:\\n var x_ = [L/2]\\n var y_ = [0]\\n break\\n case 2:\\n var x_ = [L/3, 2*L/3]\\n var y_ = [0, 0]\\n break\\n default:\\n console.error(\\\"Number of braces \\\"+n_brace+\\\" exceeds the implemented limit (2)\\\")\\n }\\n const src_point = point_brace.data_source\\n src_point.data.x = x_\\n src_point.data.y = y_\\n src_point.change.emit()\\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1341\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"div_buckling\":{\"id\":\"1324\"},\"mode_shape_y\":{\"id\":\"1278\"},\"mode_shape_z\":{\"id\":\"1322\"},\"point_brace\":{\"id\":\"1335\"},\"source\":{\"id\":\"1004\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const n_brace = cb_obj.active\\n const E = db['E'][0]\\n const L = db['L'][0]\\n const I = db['Iz'][0]\\n\\n // apply the changes\\n db['n_bracez'][0] = n_brace\\n db['Ncritz'][0] = compute_N_buckling_z(E, I, L, n_brace)\\n\\n // update\\n update_div_buckling(db, div_buckling)\\n update_point_brace(point_brace, n_brace)\\n update_mode_shape_N_buckling(db, mode_shape_y, mode_shape_z)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_buckling(data, div) {\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const N = data['N'][0]\\n const Ncrity = Math.round(data['Ncrity'][0]*10)/10\\n const Ncritz = Math.round(data['Ncritz'][0]*10)/10\\n if ((-NForces and Instability:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n N = `+N+` kN
\\n V = 0 kN
\\n M = 0 kNm
\\n Ncrit,y = `+Ncrity+` kN
\\n Ncrit,z = `+Ncritz+` kN
\\n Instability: `+str_insta+`\\n ` \\n }\\n \\n \\n function compute_N_buckling_y(E, Iy, L, n_bracey) {\\n return ((n_bracey+1)*Math.PI)**2*E*Iy/L**2/1e9\\n }\\n \\n \\n function compute_N_buckling_z(E, Iz, L, n_bracez) {\\n return ((n_bracez+1)*Math.PI)**2*E*Iz/L**2/1e9\\n }\\n \\n \\n function update_point_brace(point_brace, n_brace) {\\n switch(n_brace) {\\n case 0:\\n var x_ = []\\n var y_ = []\\n break\\n case 1:\\n var x_ = [L/2]\\n var y_ = [0]\\n break\\n case 2:\\n var x_ = [L/3, 2*L/3]\\n var y_ = [0, 0]\\n break\\n default:\\n console.error(\\\"Number of braces \\\"+n_brace+\\\" exceeds the implemented limit (2)\\\")\\n }\\n const src_point = point_brace.data_source\\n src_point.data.x = x_\\n src_point.data.y = y_\\n src_point.change.emit()\\n }\\n \\n \\n function compute_mode_shape_N_buckling(x, L, n_brace, C=1) {\\n return C*Math.sin((n_brace+1)*Math.PI*x/L)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_mode_shape_N_buckling(data, glyph_ms_y, glyph_ms_z, discr=100, C=1) {\\n const L = data['L'][0]\\n const n_bracey = data['n_bracey'][0]\\n const n_bracez = data['n_bracez'][0]\\n const N = -data['N'][0]\\n const Ncrity = data['Ncrity'][0]\\n const Ncritz = data['Ncritz'][0]\\n const x_discr = linspace(0, L, discr)\\n let mode_shape_y = new Array(discr)\\n let mode_shape_z = new Array(discr)\\n \\n // compute the arrays\\n if (N >= Ncrity) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_y[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracey, C)\\n }\\n } else {\\n mode_shape_y = new Array(discr).fill(0)\\n }\\n if (N >= Ncritz) {\\n for (var i = 0; i < discr; i++) {\\n mode_shape_z[i] = compute_mode_shape_N_buckling(x_discr[i], L, n_bracez, C)\\n }\\n } else {\\n mode_shape_z = new Array(discr).fill(0)\\n }\\n debugger\\n // update the mode shape\\n const src_ms_y = glyph_ms_y.data_source\\n src_ms_y.data.x = x_discr\\n src_ms_y.data.y = mode_shape_y\\n src_ms_y.change.emit()\\n const src_ms_z = glyph_ms_z.data_source\\n src_ms_z.data.x = x_discr\\n src_ms_z.data.y = mode_shape_z\\n src_ms_z.change.emit()\\n }\\n \\n \"},\"id\":\"1342\",\"type\":\"CustomJS\"},{\"attributes\":{\"width\":10},\"id\":\"1343\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":10},\"id\":\"1346\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":10},\"id\":\"1344\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"1104\"},{\"id\":\"1324\"}]},\"id\":\"1345\",\"type\":\"Row\"},{\"attributes\":{\"children\":[{\"id\":\"1038\"},{\"id\":\"1343\"},{\"id\":\"1347\"}]},\"id\":\"1348\",\"type\":\"Row\"},{\"attributes\":{\"children\":[{\"id\":\"1344\"},{\"id\":\"1105\"},{\"id\":\"1106\"},{\"id\":\"1230\"},{\"id\":\"1231\"},{\"id\":\"1345\"},{\"id\":\"1346\"},{\"id\":\"1232\"},{\"id\":\"1233\"},{\"id\":\"1234\"},{\"id\":\"1235\"}]},\"id\":\"1347\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1348\"}]},\"id\":\"1349\",\"type\":\"Column\"},{\"attributes\":{\"width\":10},\"id\":\"1350\",\"type\":\"Spacer\"},{\"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\":{\"children\":[{\"id\":\"1005\"},{\"id\":\"1134\"},{\"id\":\"1236\"},{\"id\":\"1280\"}]},\"id\":\"1352\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1350\"}]},\"id\":\"1351\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1349\"},{\"id\":\"1351\"},{\"id\":\"1352\"}]},\"id\":\"1353\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1392\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"children\":[{\"id\":\"1353\"}]},\"id\":\"1354\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1393\",\"type\":\"AllLabels\"},{\"attributes\":{\"children\":[{\"id\":\"1354\"}]},\"id\":\"1355\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1394\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1395\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1402\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1403\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1025\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1421\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1422\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1404\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1405\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1423\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1049\"}],\"center\":[{\"id\":\"1052\"},{\"id\":\"1056\"},{\"id\":\"1108\"},{\"id\":\"1117\"}],\"left\":[{\"id\":\"1053\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1075\"},{\"id\":\"1102\"},{\"id\":\"1114\"},{\"id\":\"1123\"}],\"title\":{\"id\":\"1039\"},\"toolbar\":{\"id\":\"1064\"},\"toolbar_location\":null,\"width\":375,\"x_range\":{\"id\":\"1041\"},\"x_scale\":{\"id\":\"1045\"},\"y_range\":{\"id\":\"1043\"},\"y_scale\":{\"id\":\"1047\"}},\"id\":\"1038\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1424\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1406\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1407\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1425\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1426\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1408\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1409\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":240.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":150},\"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\":240.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":150},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1073\",\"type\":\"Rect\"},{\"attributes\":{\"overlay\":{\"id\":\"1030\"}},\"id\":\"1026\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"SaveTool\"}],\"root_ids\":[\"1356\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"c8f06a0a-e584-4717-aa52-b032f08dea83\",\"root_ids\":[\"1356\"],\"roots\":{\"1356\":\"a743359c-c5c2-462d-9c0c-f95ef4d9ace0\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "1356" + } + }, + "output_type": "display_data" } ], "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout),\n", - " slider_b,\n", - " slider_h,\n", - " slider_P,\n", - " slider_L,\n", - " row(div_geo, div_buckling),\n", - " Spacer(height=padding_layout),\n", - " div_rg_brace_y,\n", - " radiogroup_brace_y,\n", - " div_rg_brace_z,\n", - " radiogroup_brace_z))),\n", - " column(Spacer(width=padding_layout)),\n", - " column(fig_beam,\n", - " fig_beam_z,\n", - " fig_buckling_y,\n", - " fig_buckling_z))\n", - " )],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_deflection.ipynb b/Simple Beam DEMOs/sb_deflection.ipynb index de19ea3..7d0e12f 100644 --- a/Simple Beam DEMOs/sb_deflection.ipynb +++ b/Simple Beam DEMOs/sb_deflection.ipynb @@ -1,1171 +1,486 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Deflection\n", "In this eigth notebook, the deflection of a simple supported beam is studied." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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 bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\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 models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "yG = beam_section.compute_centroid_y(h)\n", "y_n_axis = stst.compute_neutral_axis(N, A, Iy, M, yG)\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_Q = q/4*5\n", - "SCALE_DEFL = 100\n", - "\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "data_section_scheme = dict(\n", - " x=[0, 0], \n", - " y=[0, h]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " E=[E],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " yG=[yG],\n", - " y_n_axis=[y_n_axis],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source_section_scheme = ColumnDataSource(data_section_scheme)\n", - "source = ColumnDataSource(data)" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Create the figures, the plots and the widgets (same of Notebook 3 - Diagrams):" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, - "outputs": [], - "source": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE*SCALE_DEFL, (MAX_Q+OFFSET_Q)/SCALE*SCALE_DEFL)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO, \n", - " text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE*SCALE_DEFL], width=L, height=q/SCALE*SCALE_DEFL,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE*SCALE_DEFL], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2*SCALE_DEFL], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "# CHAGED: moved below for correct display order of glyphs\n", - "# beam_position = fig_beam.circle('x', 'y', **pos_opt) \n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(width=DIV_B_FORCES, \n", - " text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))\n", - "\n", - "\n", - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)\n", - "\n", - "# figures for the stresses and strains\n", - "FIG_B_ss = 200\n", - "FIG_H_ss = 200\n", - "options_stress_strain = dict(\n", - " toolbar_location=None,\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_width=FIG_B_ss,\n", - " plot_height=FIG_H_ss\n", - ")\n", - "fig_stress_N = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2099 [MPa]\")\n", - "fig_stress_N.yaxis.visible = False\n", - "fig_axial_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2099 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_axial_strain.yaxis.visible = False\n", - "fig_stress_M = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending stress and centroid\",\n", - " y_range=fig_stress_N.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2098 [MPa]\")\n", - "fig_stress_M.yaxis.visible = False\n", - "fig_bending_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2098 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_bending_strain.yaxis.visible = False\n", - "fig_stress_V = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Shear stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\u1d65 [MPa]\")\n", - "fig_stress_V.yaxis.visible = False\n", - "fig_stress_sigma = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER SIGMA} and neutral axis\",\n", - " y_range=fig_stress_N.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\")\n", - "fig_stress_tau = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER TAU}\",\n", - " y_range=fig_stress_V.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\")\n", - "\n", - "# plot stress N V M\n", - "discr_stress_strain = 10\n", - "scale_x = 25\n", - "y_discr = np.linspace(0, h, discr_stress_strain)\n", - "sigma_N = stst.compute_sigma_axial(y_discr, 0, A)\n", - "N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h,\n", - " source_section_scheme, scale_x=scale_x/10)\n", - "sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG)\n", - "(M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h,\n", - " source_section_scheme, True, yG, scale_x=scale_x)\n", - "S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG)\n", - "tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b)\n", - "V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1)\n", - "\n", - "# plot stress sigma and tau\n", - "sigma_total = sigma_M + sigma_N\n", - "(sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h,\n", - " source_section_scheme,True, yG, scale_x=scale_x)\n", - "tau_total = tau_V\n", - "tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h,\n", - " source_section_scheme, scale_x=1)\n", - "\n", - "# plot strain N M\n", - "strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E)\n", - "axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme)\n", - "strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E)\n", - "bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme)\n", - "\n", - "\n", - "# figures for NVM\n", - "fig_NM_section = figure(**options_stress_strain,\n", - " title=\"N and M at position x\",\n", - " match_aspect=True)\n", - "fig_NM_section.axis.visible = False\n", - "fig_NM_section.grid.grid_line_alpha = 0\n", - "\n", - "fig_V_section = figure(**options_stress_strain,\n", - " title=\"V at position x\",\n", - " match_aspect=True)\n", - "fig_V_section.axis.visible = False\n", - "fig_V_section.grid.grid_line_alpha = 0\n", - "\n", - "# section with NVM\n", - "models.section_diagram(fig_NM_section)\n", - "models.section_diagram(fig_V_section)\n", - "\n", - "# NVM in section\n", - "section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red')\n", - "section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red')\n", - "(section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0)\n", - "\n", - "# NVM label in section\n", - "OFFSET_N = 1\n", - "label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[\"\"], text_color=\"red\", text_baseline='bottom')\n", - "label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[\"\"], text_color=\"red\", text_baseline='top')\n", - "label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[\"\"], text_color=\"red\", text_baseline='middle')\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "# deflection of the beam\n", - "fig_beam.title.text = \"Simple supported beam with deflection under uniform load\"\n", - "fig_beam.ygrid.grid_line_alpha = 1\n", - "fig_beam.yaxis.visible = True\n", - "fig_beam.yaxis.axis_label = \"Deflection [mm]\"\n", - "\n", - "\n", - "# line 70-76 removed: uniform load (beam) and axial force (beam) in the simple beam\n", - "\n", - "\n", - "# Change the beam in the beam figure to gray and line width smaller and add new line\n", - "beam.glyph.line_width = 1\n", - "beam.glyph.line_color = \"gray\"\n", - "beam_defl = fig_beam.line(x=x_discr,\n", - " y=sb.compute_deflection_uniform_load(x_discr, q, L, Iy, E),\n", - " line_width=6, color='black')\n", - "\n", - "# FROM ABOVE: position point\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "\n", - "\n", - "# choose different elastic modulus\n", - "E_wood = 8e3 # [MPa]\n", - "E_concrete = 26e3 # [MPa]\n", - "E_ceramic = 300e3 # [MPa]\n", - "slider_elastic = Slider(\n", - " title=\"Change the elastic modulus [MPa]\",\n", - " start=E_wood,\n", - " end=E_ceramic,\n", - " step=1e3,\n", - " value=E,\n", - " margin=(5, 5, 0, 5)\n", - ")\n", - "\n", - "\n", - "# show values of E\n", - "div_E = Div(margin=(0, 5, 0, 5),\n", - " text=f\"\"\"\n", - "

\n", - " Ewood = {math.trunc(E_wood/1e3)} GPa; Econcrete = {math.trunc(E_concrete/1e3)} GPa
\n", - " Esteel = {math.trunc(E_steel/1e3)} GPa; Eceramic = {math.trunc(E_ceramic/1e3)} GPa

\n", - " \"\"\")\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " beam_defl=beam_defl)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_deflection_beam(db, beam_defl)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_deflection_beamJS(discr_NVM)}\n", - "{sb.implement_compute_deflection_uniform_loadJS()}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b, code=code_change_b)\n", - "\n", - "\n", - "args_slider_h = dict(source=source,\n", - " s_b=source_beam,\n", - " s_ss=source_section_scheme,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " beam_defl=beam_defl)\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const data_ss = s_ss.data\n", - "const b = db['b'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "const yG = compute_centroid_y(h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['yG'][0] = yG\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "data_ss['y'][1] = h // change the height of the section in the diagrams\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_deflection_beam(db, beam_defl)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_ss.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{js.implement_update_deflection_beamJS(discr_NVM)}\n", - "{sb.implement_compute_deflection_uniform_loadJS()}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " beam_defl=beam_defl)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "update_deflection_beam(db, beam_defl)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_deflection_beamJS(discr_NVM)}\n", - "{sb.implement_compute_deflection_uniform_loadJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "args_slider_elastic = dict(source=source,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " centroid=centroid,\n", - " beam_defl=beam_defl)\n", - "# code_slider_elastic = \"\"\n", - "code_slider_elastic = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const E = cb_obj.value\n", - "\n", - "// update E\n", - "db['E'][0] = E\n", - "\n", - "// update\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_deflection_beam(db, beam_defl)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_linspaceJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{js.implement_update_deflection_beamJS(discr_NVM)}\n", - "{sb.implement_compute_deflection_uniform_loadJS()}\n", - "\"\"\"\n", - "update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic)\n", - "\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)\n", - "slider_elastic.js_on_change('value', update_slider_elastic)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\n" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "name": "stdout", - "output_type": "stream", - "text": [ - "Opening in existing browser session.\n" - ] + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"09fd65be-e224-4536-94d0-4f4c5f93935a\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1930\"}]},\"id\":\"1931\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1953\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1721\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1781\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2137\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1954\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1723\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1728\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2114\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2138\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1720\"}},\"id\":\"1725\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1956\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1722\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2126\"},\"selection_policy\":{\"id\":\"2125\"}},\"id\":\"1738\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2115\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1727\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1957\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1770\"},\"glyph\":{\"id\":\"1771\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1773\"},\"nonselection_glyph\":{\"id\":\"1772\"},\"view\":{\"id\":\"1775\"}},\"id\":\"1774\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2167\"},\"selection_policy\":{\"id\":\"2166\"}},\"id\":\"1732\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1729\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1731\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1733\",\"type\":\"Line\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1776\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1735\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1745\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1747\"},\"nonselection_glyph\":{\"id\":\"1746\"},\"view\":{\"id\":\"1749\"}},\"id\":\"1748\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1732\"},\"glyph\":{\"id\":\"1733\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1735\"},\"nonselection_glyph\":{\"id\":\"1734\"},\"view\":{\"id\":\"1737\"}},\"id\":\"1736\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2035\"},\"selection_policy\":{\"id\":\"2034\"}},\"id\":\"1958\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1741\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1734\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1738\"},\"glyph\":{\"id\":\"1739\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1741\"},\"nonselection_glyph\":{\"id\":\"1740\"},\"view\":{\"id\":\"1743\"}},\"id\":\"1742\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2116\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1732\"}},\"id\":\"1737\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1739\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2117\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1746\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1738\"}},\"id\":\"1743\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1740\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1761\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1745\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1773\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2139\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2130\"},\"selection_policy\":{\"id\":\"2129\"}},\"id\":\"1750\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1747\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2140\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1749\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1751\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1753\",\"type\":\"Line\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1756\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1750\"},\"glyph\":{\"id\":\"1751\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1753\"},\"nonselection_glyph\":{\"id\":\"1752\"},\"view\":{\"id\":\"1755\"}},\"id\":\"1754\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1759\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1752\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2118\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1785\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1750\"}},\"id\":\"1755\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2119\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2138\"},\"selection_policy\":{\"id\":\"2137\"}},\"id\":\"1758\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1960\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1766\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1760\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1961\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2039\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2140\"},\"selection_policy\":{\"id\":\"2139\"}},\"id\":\"1770\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1767\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1771\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1963\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2040\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1769\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1772\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1789\"}],\"center\":[{\"id\":\"1792\"},{\"id\":\"1796\"},{\"id\":\"1857\"}],\"height\":200,\"left\":[{\"id\":\"1793\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1848\"},{\"id\":\"1867\"},{\"id\":\"1873\"},{\"id\":\"1879\"},{\"id\":\"1885\"}],\"title\":{\"id\":\"1779\"},\"toolbar\":{\"id\":\"1804\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1781\"},\"x_scale\":{\"id\":\"1785\"},\"y_range\":{\"id\":\"1783\"},\"y_scale\":{\"id\":\"1787\"}},\"id\":\"1778\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1964\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1770\"}},\"id\":\"1775\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1783\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2120\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2049\"},\"group\":null,\"major_label_policy\":{\"id\":\"2050\"},\"ticker\":{\"id\":\"1790\"},\"visible\":false},\"id\":\"1789\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2046\"},\"group\":null,\"major_label_policy\":{\"id\":\"2047\"},\"ticker\":{\"id\":\"1794\"},\"visible\":false},\"id\":\"1793\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2121\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1798\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1789\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1792\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N and M at position x\"},\"id\":\"1779\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1790\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1793\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1796\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1787\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1822\"}],\"center\":[{\"id\":\"1825\"},{\"id\":\"1829\"},{\"id\":\"1860\"}],\"height\":200,\"left\":[{\"id\":\"1826\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1854\"},{\"id\":\"1891\"}],\"title\":{\"id\":\"1812\"},\"toolbar\":{\"id\":\"1837\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1814\"},\"x_scale\":{\"id\":\"1818\"},\"y_range\":{\"id\":\"1816\"},\"y_scale\":{\"id\":\"1820\"}},\"id\":\"1811\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2142\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1794\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2143\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1802\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1797\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1803\"}},\"id\":\"1799\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1801\",\"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\":\"1803\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1797\"},{\"id\":\"1798\"},{\"id\":\"1799\"},{\"id\":\"1800\"},{\"id\":\"1801\"},{\"id\":\"1802\"}]},\"id\":\"1804\",\"type\":\"Toolbar\"},{\"attributes\":{\"source\":{\"id\":\"1243\"}},\"id\":\"1248\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2002\"},\"selection_policy\":{\"id\":\"2001\"}},\"id\":\"1945\",\"type\":\"ColumnDataSource\"},{\"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\":\"1501\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1911\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1252\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2004\"},\"selection_policy\":{\"id\":\"2003\"}},\"id\":\"1946\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1907\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1250\",\"type\":\"Slider\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"2020\"},\"selection_policy\":{\"id\":\"2019\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"width\":200},\"id\":\"1923\",\"type\":\"Spacer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":40.0},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1480\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1161\"}},\"id\":\"1166\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2006\"},\"selection_policy\":{\"id\":\"2005\"}},\"id\":\"1947\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1912\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1249\",\"type\":\"Slider\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1251\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"2001\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2031\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"height\":10},\"id\":\"1919\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"2002\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1918\"},{\"id\":\"1920\"}]},\"id\":\"1921\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1179\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1958\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1180\",\"type\":\"Arrow\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1253\",\"type\":\"Div\"},{\"attributes\":{\"children\":[{\"id\":\"1008\"},{\"id\":\"1919\"},{\"id\":\"1256\"},{\"id\":\"1290\"},{\"id\":\"1322\"}]},\"id\":\"1920\",\"type\":\"Column\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[60.0]},\"selected\":{\"id\":\"2026\"},\"selection_policy\":{\"id\":\"2025\"}},\"id\":\"1167\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2032\",\"type\":\"Selection\"},{\"attributes\":{\"width\":200},\"id\":\"1924\",\"type\":\"Spacer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2008\"},\"selection_policy\":{\"id\":\"2007\"}},\"id\":\"1948\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \",\"width\":170},\"id\":\"1255\",\"type\":\"Div\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1167\"},\"glyph\":{\"id\":\"1168\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1170\"},\"nonselection_glyph\":{\"id\":\"1169\"},\"view\":{\"id\":\"1172\"}},\"id\":\"1171\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"width\":200},\"id\":\"1925\",\"type\":\"Spacer\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending stress and centroid\"},\"id\":\"1478\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":40.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"1281\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2003\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1910\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1254\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1179\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1499\",\"type\":\"ResetTool\"},{\"attributes\":{\"below\":[{\"id\":\"1266\"}],\"center\":[{\"id\":\"1269\"},{\"id\":\"1273\"}],\"height\":160,\"left\":[{\"id\":\"1270\"}],\"renderers\":[{\"id\":\"1358\"},{\"id\":\"1364\"},{\"id\":\"1394\"}],\"title\":{\"id\":\"1257\"},\"toolbar\":{\"id\":\"1282\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1262\"},\"y_range\":{\"id\":\"1260\"},\"y_scale\":{\"id\":\"1264\"}},\"id\":\"1256\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":40.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1170\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1500\",\"type\":\"HelpTool\"},{\"attributes\":{\"children\":[{\"id\":\"1778\"},{\"id\":\"1443\"},{\"id\":\"1408\"},{\"id\":\"1511\"},{\"id\":\"1477\"},{\"id\":\"1580\"}]},\"id\":\"1922\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1173\"},\"glyph\":{\"id\":\"1174\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1176\"},\"nonselection_glyph\":{\"id\":\"1175\"},\"view\":{\"id\":\"1178\"}},\"id\":\"1177\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2010\"},\"selection_policy\":{\"id\":\"2009\"}},\"id\":\"1949\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1167\"}},\"id\":\"1172\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2004\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1260\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[40.0]},\"selected\":{\"id\":\"2028\"},\"selection_policy\":{\"id\":\"2027\"}},\"id\":\"1173\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1262\",\"type\":\"LinearScale\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1266\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1269\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2157\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"1257\",\"type\":\"Title\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2012\"},\"selection_policy\":{\"id\":\"2011\"}},\"id\":\"1950\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1173\"}},\"id\":\"1178\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1195\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1197\"},\"nonselection_glyph\":{\"id\":\"1196\"},\"view\":{\"id\":\"1199\"}},\"id\":\"1198\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1264\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2005\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1921\"},{\"id\":\"1928\"}]},\"id\":\"1929\",\"type\":\"Column\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1275\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1963\"},\"group\":null,\"major_label_policy\":{\"id\":\"1964\"},\"ticker\":{\"id\":\"1267\"},\"visible\":false},\"id\":\"1266\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2006\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2158\",\"type\":\"Selection\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1176\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2099\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1182\"},\"glyph\":{\"id\":\"1183\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1185\"},\"nonselection_glyph\":{\"id\":\"1184\"},\"view\":{\"id\":\"1187\"}},\"id\":\"1186\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1267\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2159\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1929\"}]},\"id\":\"1930\",\"type\":\"Row\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1588\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1960\"},\"group\":null,\"major_label_policy\":{\"id\":\"1961\"},\"ticker\":{\"id\":\"1271\"}},\"id\":\"1270\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[20.0]},\"selected\":{\"id\":\"2030\"},\"selection_policy\":{\"id\":\"2029\"}},\"id\":\"1182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c3 and neutral axis\"},\"id\":\"1581\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1270\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1273\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1182\"}},\"id\":\"1187\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2007\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1271\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2100\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2160\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1189\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1191\"},\"nonselection_glyph\":{\"id\":\"1190\"},\"view\":{\"id\":\"1193\"}},\"id\":\"1192\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2008\",\"type\":\"Selection\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1279\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1274\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1517\",\"type\":\"LinearScale\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1185\",\"type\":\"Text\"},{\"attributes\":{\"overlay\":{\"id\":\"1280\"}},\"id\":\"1276\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1277\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1191\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1278\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2009\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1193\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1213\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1215\"},\"nonselection_glyph\":{\"id\":\"1214\"},\"view\":{\"id\":\"1217\"}},\"id\":\"1216\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1299\",\"type\":\"BasicTicker\"},{\"attributes\":{\"tools\":[{\"id\":\"1495\"},{\"id\":\"1496\"},{\"id\":\"1497\"},{\"id\":\"1498\"},{\"id\":\"1499\"},{\"id\":\"1500\"},{\"id\":\"1502\"}]},\"id\":\"1503\",\"type\":\"Toolbar\"},{\"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\":\"1280\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2010\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Line\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1856\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1966\"},\"group\":null,\"major_label_policy\":{\"id\":\"1967\"},\"ticker\":{\"id\":\"1303\"}},\"id\":\"1302\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1197\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2011\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2101\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1203\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"1995\"},\"selection_policy\":{\"id\":\"1994\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1991\"},\"selection_policy\":{\"id\":\"1990\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1199\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1303\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2012\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2102\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1200\"}},\"id\":\"1205\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1514\",\"type\":\"DataRange1d\"},{\"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\":\"1312\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"1302\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1305\",\"type\":\"Grid\"},{\"attributes\":{\"below\":[{\"id\":\"1521\"}],\"center\":[{\"id\":\"1524\"},{\"id\":\"1528\"}],\"height\":200,\"left\":[{\"id\":\"1525\"}],\"renderers\":[{\"id\":\"1762\"},{\"id\":\"1768\"},{\"id\":\"1774\"}],\"title\":{\"id\":\"1512\"},\"toolbar\":{\"id\":\"1537\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1514\"},\"x_scale\":{\"id\":\"1517\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1519\"}},\"id\":\"1511\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1200\"},\"glyph\":{\"id\":\"1201\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1203\"},\"nonselection_glyph\":{\"id\":\"1202\"},\"view\":{\"id\":\"1205\"}},\"id\":\"1204\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1536\",\"type\":\"HoverTool\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1993\"},\"selection_policy\":{\"id\":\"1992\"}},\"id\":\"1200\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"1313\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1217\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1533\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1969\"},\"group\":null,\"major_label_policy\":{\"id\":\"1970\"},\"ticker\":{\"id\":\"1299\"},\"visible\":false},\"id\":\"1298\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending strain\"},\"id\":\"1512\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2046\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1221\",\"type\":\"VeeHead\"},{\"attributes\":{\"overlay\":{\"id\":\"1312\"}},\"id\":\"1308\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1521\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1524\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1218\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1945\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1219\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1530\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2161\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1519\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2047\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1215\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2162\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2098 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2066\"},\"group\":null,\"major_label_policy\":{\"id\":\"2067\"},\"ticker\":{\"id\":\"1776\"}},\"id\":\"1521\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1583\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1224\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2034\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2049\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"tools\":[{\"id\":\"1274\"},{\"id\":\"1275\"},{\"id\":\"1276\"},{\"id\":\"1277\"},{\"id\":\"1278\"},{\"id\":\"1279\"},{\"id\":\"1281\"}]},\"id\":\"1282\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1218\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2064\"},\"group\":null,\"major_label_policy\":{\"id\":\"2065\"},\"ticker\":{\"id\":\"1526\"},\"visible\":false},\"id\":\"1525\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1230\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis\":{\"id\":\"1525\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1528\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1227\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2035\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2050\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1230\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1949\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1231\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1526\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1221\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1946\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1222\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2036\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2103\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1233\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1950\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1234\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1534\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1224\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1947\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1225\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1529\",\"type\":\"PanTool\"},{\"attributes\":{\"below\":[{\"id\":\"1590\"}],\"center\":[{\"id\":\"1593\"},{\"id\":\"1597\"}],\"height\":200,\"renderers\":[{\"id\":\"1706\"},{\"id\":\"1712\"},{\"id\":\"1718\"}],\"right\":[{\"id\":\"1594\"}],\"title\":{\"id\":\"1581\"},\"toolbar\":{\"id\":\"1606\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1583\"},\"x_scale\":{\"id\":\"1586\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1588\"}},\"id\":\"1580\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1233\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2037\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1227\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1948\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1228\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1292\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"1535\"}},\"id\":\"1531\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1298\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1301\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1532\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2104\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1238\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1586\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1298\"}],\"center\":[{\"id\":\"1301\"},{\"id\":\"1305\"}],\"height\":160,\"left\":[{\"id\":\"1302\"}],\"renderers\":[{\"id\":\"1370\"},{\"id\":\"1376\"},{\"id\":\"1400\"}],\"title\":{\"id\":\"1935\"},\"toolbar\":{\"id\":\"1314\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1294\"},\"y_range\":{\"id\":\"1292\"},\"y_scale\":{\"id\":\"1296\"}},\"id\":\"1290\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1243\"},\"glyph\":{\"id\":\"1244\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1246\"},\"nonselection_glyph\":{\"id\":\"1245\"},\"view\":{\"id\":\"1248\"}},\"id\":\"1247\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1294\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"1997\"},\"selection_policy\":{\"id\":\"1996\"}},\"id\":\"1236\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1246\",\"type\":\"Scatter\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2124\"},\"selection_policy\":{\"id\":\"2123\"}},\"id\":\"2051\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1236\"},\"glyph\":{\"id\":\"1238\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1240\"},\"nonselection_glyph\":{\"id\":\"1239\"},\"view\":{\"id\":\"1242\"}},\"id\":\"1241\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1311\",\"type\":\"HelpTool\"},{\"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\":\"1535\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"1330\"}],\"center\":[{\"id\":\"1333\"},{\"id\":\"1337\"}],\"height\":200,\"left\":[{\"id\":\"1334\"}],\"renderers\":[{\"id\":\"1382\"},{\"id\":\"1388\"},{\"id\":\"1406\"}],\"title\":{\"id\":\"1937\"},\"toolbar\":{\"id\":\"1346\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1326\"},\"y_range\":{\"id\":\"1324\"},\"y_scale\":{\"id\":\"1328\"}},\"id\":\"1322\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1239\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0],\"y\":[0,200]},\"selected\":{\"id\":\"2128\"},\"selection_policy\":{\"id\":\"2127\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1296\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1556\"}],\"center\":[{\"id\":\"1559\"},{\"id\":\"1563\"}],\"height\":200,\"left\":[{\"id\":\"1560\"}],\"renderers\":[{\"id\":\"1688\"},{\"id\":\"1694\"},{\"id\":\"1700\"}],\"title\":{\"id\":\"1546\"},\"toolbar\":{\"id\":\"1572\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1548\"},\"x_scale\":{\"id\":\"1552\"},\"y_range\":{\"id\":\"1550\"},\"y_scale\":{\"id\":\"1554\"}},\"id\":\"1545\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1240\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1307\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"1999\"},\"selection_policy\":{\"id\":\"1998\"}},\"id\":\"1243\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1306\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2013\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1236\"}},\"id\":\"1242\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Scatter\"},{\"attributes\":{\"tools\":[{\"id\":\"1564\"},{\"id\":\"1565\"},{\"id\":\"1566\"},{\"id\":\"1567\"},{\"id\":\"1568\"},{\"id\":\"1569\"},{\"id\":\"1571\"}]},\"id\":\"1572\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2014\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1310\",\"type\":\"ResetTool\"},{\"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\":\"1097\",\"type\":\"Circle\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1011\",\"type\":\"Range1d\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-9.75]},\"selected\":{\"id\":\"2024\"},\"selection_policy\":{\"id\":\"2023\"}},\"id\":\"1095\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2102\"},\"selection_policy\":{\"id\":\"2101\"}},\"id\":\"1101\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1096\",\"type\":\"Circle\"},{\"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\":\"1604\",\"type\":\"BoxAnnotation\"},{\"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\":\"1104\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2149\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1691\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1693\"},\"nonselection_glyph\":{\"id\":\"1692\"},\"view\":{\"id\":\"1695\"}},\"id\":\"1694\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1095\"}},\"id\":\"1100\",\"type\":\"CDSView\"},{\"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\":\"1098\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2150\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1095\"},\"glyph\":{\"id\":\"1096\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1098\"},\"nonselection_glyph\":{\"id\":\"1097\"},\"view\":{\"id\":\"1100\"}},\"id\":\"1099\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2145\"},\"selection_policy\":{\"id\":\"2144\"}},\"id\":\"1678\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam with deflection under uniform load\"},\"id\":\"1009\",\"type\":\"Title\"},{\"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\":\"1103\",\"type\":\"Rect\"},{\"attributes\":{\"below\":[{\"id\":\"1019\"}],\"center\":[{\"id\":\"1022\"},{\"id\":\"1026\"},{\"id\":\"1180\"}],\"height\":200,\"left\":[{\"id\":\"1023\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1087\"},{\"id\":\"1093\"},{\"id\":\"1099\"},{\"id\":\"1171\"},{\"id\":\"1177\"},{\"id\":\"1186\"},{\"id\":\"1897\"},{\"id\":\"1903\"}],\"title\":{\"id\":\"1009\"},\"toolbar\":{\"id\":\"1034\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1015\"},\"y_range\":{\"id\":\"1013\"},\"y_scale\":{\"id\":\"1017\"}},\"id\":\"1008\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1908\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1108\",\"type\":\"Slider\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1677\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1675\",\"type\":\"Line\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\",\"width\":170},\"id\":\"1107\",\"type\":\"Div\"},{\"attributes\":{\"end\":90.0,\"start\":-40.0},\"id\":\"1013\",\"type\":\"Range1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1110\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1101\"},\"glyph\":{\"id\":\"1102\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1104\"},\"nonselection_glyph\":{\"id\":\"1103\"},\"view\":{\"id\":\"1106\"}},\"id\":\"1105\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1678\"},\"glyph\":{\"id\":\"1679\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1681\"},\"nonselection_glyph\":{\"id\":\"1680\"},\"view\":{\"id\":\"1683\"}},\"id\":\"1682\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"below\":[{\"id\":\"1052\"}],\"center\":[{\"id\":\"1055\"},{\"id\":\"1059\"},{\"id\":\"1111\"},{\"id\":\"1120\"}],\"left\":[{\"id\":\"1056\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1078\"},{\"id\":\"1105\"},{\"id\":\"1117\"},{\"id\":\"1126\"}],\"title\":{\"id\":\"1042\"},\"toolbar\":{\"id\":\"1067\"},\"toolbar_location\":null,\"width\":300,\"x_range\":{\"id\":\"1044\"},\"x_scale\":{\"id\":\"1048\"},\"y_range\":{\"id\":\"1046\"},\"y_scale\":{\"id\":\"1050\"}},\"id\":\"1041\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1101\"}},\"id\":\"1106\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1015\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1909\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1109\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1110\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2017\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1111\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c4\"},\"id\":\"1615\",\"type\":\"Title\"},{\"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\":\"1125\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1122\"}},\"id\":\"1127\",\"type\":\"CDSView\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1114\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"A\":[20000],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0],\"yG\":[100.0],\"y_n_axis\":[100.0]},\"selected\":{\"id\":\"1989\"},\"selection_policy\":{\"id\":\"1988\"}},\"id\":\"1007\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"2104\"},\"selection_policy\":{\"id\":\"2103\"}},\"id\":\"1113\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1639\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1122\"},\"glyph\":{\"id\":\"1123\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1125\"},\"nonselection_glyph\":{\"id\":\"1124\"},\"view\":{\"id\":\"1127\"}},\"id\":\"1126\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"2106\"},\"selection_policy\":{\"id\":\"2105\"}},\"id\":\"1122\",\"type\":\"ColumnDataSource\"},{\"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\":\"1124\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1625\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1162\",\"type\":\"Rect\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"1987\"},\"selection_policy\":{\"id\":\"1986\"}},\"id\":\"1161\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"below\":[{\"id\":\"1139\"}],\"center\":[{\"id\":\"1142\"},{\"id\":\"1146\"},{\"id\":\"1219\"},{\"id\":\"1222\"},{\"id\":\"1225\"},{\"id\":\"1228\"},{\"id\":\"1231\"},{\"id\":\"1234\"}],\"height\":200,\"left\":[{\"id\":\"1143\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1165\"},{\"id\":\"1192\"},{\"id\":\"1198\"},{\"id\":\"1204\"},{\"id\":\"1210\"},{\"id\":\"1216\"},{\"id\":\"1241\"},{\"id\":\"1247\"}],\"title\":{\"id\":\"1129\"},\"toolbar\":{\"id\":\"1154\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1131\"},\"x_scale\":{\"id\":\"1135\"},\"y_range\":{\"id\":\"1133\"},\"y_scale\":{\"id\":\"1137\"}},\"id\":\"1128\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1163\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2075\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1131\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1617\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1133\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1135\",\"type\":\"LinearScale\"},{\"attributes\":{\"tools\":[{\"id\":\"1598\"},{\"id\":\"1599\"},{\"id\":\"1600\"},{\"id\":\"1601\"},{\"id\":\"1602\"},{\"id\":\"1603\"},{\"id\":\"1605\"}]},\"id\":\"1606\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2076\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1943\"},\"group\":null,\"major_label_policy\":{\"id\":\"1944\"},\"ticker\":{\"id\":\"1140\"},\"visible\":false},\"id\":\"1139\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1940\"},\"group\":null,\"major_label_policy\":{\"id\":\"1941\"},\"ticker\":{\"id\":\"1144\"},\"visible\":false},\"id\":\"1143\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1624\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1627\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2078\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1139\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1142\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1636\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1137\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1620\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2079\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1129\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1633\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1143\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1146\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1622\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1152\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1140\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2097\"},\"group\":null,\"major_label_policy\":{\"id\":\"2098\"},\"ticker\":{\"id\":\"1625\"}},\"id\":\"1624\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2152\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1144\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1164\",\"type\":\"Rect\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2094\"},\"group\":null,\"major_label_policy\":{\"id\":\"2095\"},\"ticker\":{\"id\":\"1629\"}},\"id\":\"1628\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2153\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1628\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1631\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1629\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"1153\"}},\"id\":\"1149\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1637\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1632\",\"type\":\"PanTool\"},{\"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\":\"1153\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"overlay\":{\"id\":\"1638\"}},\"id\":\"1634\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1635\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1655\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1657\"},\"nonselection_glyph\":{\"id\":\"1656\"},\"view\":{\"id\":\"1659\"}},\"id\":\"1658\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Patch\"},{\"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\":\"1638\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2154\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1209\",\"type\":\"Patch\"},{\"attributes\":{\"tools\":[{\"id\":\"1632\"},{\"id\":\"1633\"},{\"id\":\"1634\"},{\"id\":\"1635\"},{\"id\":\"1636\"},{\"id\":\"1637\"},{\"id\":\"1639\"}]},\"id\":\"1640\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1207\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1209\"},\"nonselection_glyph\":{\"id\":\"1208\"},\"view\":{\"id\":\"1211\"}},\"id\":\"1210\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2155\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1211\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1986\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1987\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1758\"}},\"id\":\"1763\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1161\"},\"glyph\":{\"id\":\"1162\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1164\"},\"nonselection_glyph\":{\"id\":\"1163\"},\"view\":{\"id\":\"1166\"}},\"id\":\"1165\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1758\"},\"glyph\":{\"id\":\"1759\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1761\"},\"nonselection_glyph\":{\"id\":\"1760\"},\"view\":{\"id\":\"1763\"}},\"id\":\"1762\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1674\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2081\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1673\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2082\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"1147\"},{\"id\":\"1148\"},{\"id\":\"1149\"},{\"id\":\"1150\"},{\"id\":\"1151\"},{\"id\":\"1152\"}]},\"id\":\"1154\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1673\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1675\"},\"nonselection_glyph\":{\"id\":\"1674\"},\"view\":{\"id\":\"1677\"}},\"id\":\"1676\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2084\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1488\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1487\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1490\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1492\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2069\"},\"group\":null,\"major_label_policy\":{\"id\":\"2070\"},\"ticker\":{\"id\":\"1492\"},\"visible\":false},\"id\":\"1491\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2023\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2024\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2132\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1449\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2133\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1765\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1767\"},\"nonselection_glyph\":{\"id\":\"1766\"},\"view\":{\"id\":\"1769\"}},\"id\":\"1768\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1427\"},{\"id\":\"1428\"},{\"id\":\"1429\"},{\"id\":\"1430\"},{\"id\":\"1431\"},{\"id\":\"1432\"},{\"id\":\"1434\"}]},\"id\":\"1435\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2025\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1446\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2026\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1468\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1465\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial strain\"},\"id\":\"1444\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1453\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1456\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1462\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1451\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2099 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2055\"},\"group\":null,\"major_label_policy\":{\"id\":\"2056\"},\"ticker\":{\"id\":\"1756\"}},\"id\":\"1453\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2134\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2053\"},\"group\":null,\"major_label_policy\":{\"id\":\"2054\"},\"ticker\":{\"id\":\"1458\"},\"visible\":false},\"id\":\"1457\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1457\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1460\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2135\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1458\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1466\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2027\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1461\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1467\"}},\"id\":\"1463\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2028\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1464\",\"type\":\"SaveTool\"},{\"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\":\"1467\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"1487\"}],\"center\":[{\"id\":\"1490\"},{\"id\":\"1494\"}],\"height\":200,\"left\":[{\"id\":\"1491\"}],\"renderers\":[{\"id\":\"1670\"},{\"id\":\"1676\"},{\"id\":\"1682\"}],\"title\":{\"id\":\"1478\"},\"toolbar\":{\"id\":\"1503\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1480\"},\"x_scale\":{\"id\":\"1483\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1485\"}},\"id\":\"1477\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"tools\":[{\"id\":\"1461\"},{\"id\":\"1462\"},{\"id\":\"1463\"},{\"id\":\"1464\"},{\"id\":\"1465\"},{\"id\":\"1466\"},{\"id\":\"1468\"}]},\"id\":\"1469\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2098 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2072\"},\"group\":null,\"major_label_policy\":{\"id\":\"2073\"},\"ticker\":{\"id\":\"1488\"}},\"id\":\"1487\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2112\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2029\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2113\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1485\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2030\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1483\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2094\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1386\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2095\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1391\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1393\"},\"nonselection_glyph\":{\"id\":\"1392\"},\"view\":{\"id\":\"1395\"}},\"id\":\"1394\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1046\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1966\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2097\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1392\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1967\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1044\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2098\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1969\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1491\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1494\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1076\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1996\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1970\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1048\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1997\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2015\"},\"group\":null,\"major_label_policy\":{\"id\":\"2016\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1052\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"1066\"}},\"id\":\"1062\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1042\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1052\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1055\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1065\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2013\"},\"group\":null,\"major_label_policy\":{\"id\":\"2014\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1056\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1975\"},\"group\":null,\"major_label_policy\":{\"id\":\"1976\"},\"ticker\":{\"id\":\"1331\"}},\"id\":\"1330\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1050\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"WheelZoomTool\"},{\"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\":\"1102\",\"type\":\"Rect\"},{\"attributes\":{\"line_color\":\"gray\",\"line_width\":1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1084\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1324\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1063\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1064\",\"type\":\"ResetTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1306\"},{\"id\":\"1307\"},{\"id\":\"1308\"},{\"id\":\"1309\"},{\"id\":\"1310\"},{\"id\":\"1311\"},{\"id\":\"1313\"}]},\"id\":\"1314\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1998\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1326\",\"type\":\"LinearScale\"},{\"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\":\"1066\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2042\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1119\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2018\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1120\",\"type\":\"Arrow\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"1345\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1999\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1328\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2043\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1331\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1119\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis\":{\"id\":\"1330\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1333\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1339\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1113\"}},\"id\":\"1118\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1334\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1337\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1972\"},\"group\":null,\"major_label_policy\":{\"id\":\"1973\"},\"ticker\":{\"id\":\"1335\"}},\"id\":\"1334\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1113\"},\"glyph\":{\"id\":\"1114\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1116\"},\"nonselection_glyph\":{\"id\":\"1115\"},\"view\":{\"id\":\"1118\"}},\"id\":\"1117\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1338\"},{\"id\":\"1339\"},{\"id\":\"1340\"},{\"id\":\"1341\"},{\"id\":\"1342\"},{\"id\":\"1343\"},{\"id\":\"1345\"}]},\"id\":\"1346\",\"type\":\"Toolbar\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1123\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1335\",\"type\":\"BasicTicker\"},{\"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\":\"1116\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1343\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1338\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1344\"}},\"id\":\"1340\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1972\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1341\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1342\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1973\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1074\"},\"glyph\":{\"id\":\"1075\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1077\"},\"nonselection_glyph\":{\"id\":\"1076\"},\"view\":{\"id\":\"1079\"}},\"id\":\"1078\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1975\",\"type\":\"BasicTickFormatter\"},{\"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\":\"1344\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"interval\":50},\"id\":\"1080\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"1976\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1084\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1086\"},\"nonselection_glyph\":{\"id\":\"1085\"},\"view\":{\"id\":\"1088\"}},\"id\":\"1087\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1077\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1385\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1387\"},\"nonselection_glyph\":{\"id\":\"1386\"},\"view\":{\"id\":\"1389\"}},\"id\":\"1388\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"},{\"id\":\"1063\"},{\"id\":\"1064\"},{\"id\":\"1065\"}]},\"id\":\"1067\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1085\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1387\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1074\"}},\"id\":\"1079\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1088\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1393\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-16.88749537379655,-16.88749537379655]},\"selected\":{\"id\":\"2022\"},\"selection_policy\":{\"id\":\"2021\"}},\"id\":\"1089\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1389\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1091\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"1089\"}},\"id\":\"1094\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1391\",\"type\":\"Circle\"},{\"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\":\"1115\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1086\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1092\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1089\"},\"glyph\":{\"id\":\"1090\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1092\"},\"nonselection_glyph\":{\"id\":\"1091\"},\"view\":{\"id\":\"1094\"}},\"id\":\"1093\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1090\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1361\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1363\"},\"nonselection_glyph\":{\"id\":\"1362\"},\"view\":{\"id\":\"1365\"}},\"id\":\"1364\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1935\",\"type\":\"Title\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1649\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2133\"},\"selection_policy\":{\"id\":\"2132\"}},\"id\":\"1648\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1937\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1648\"},\"glyph\":{\"id\":\"1649\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1651\"},\"nonselection_glyph\":{\"id\":\"1650\"},\"view\":{\"id\":\"1653\"}},\"id\":\"1652\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1651\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1656\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2164\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1648\"}},\"id\":\"1653\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1650\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,-0.0,-0.0,-0.0,-0.0,-0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2143\"},\"selection_policy\":{\"id\":\"2142\"}},\"id\":\"1666\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2165\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1655\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1680\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-3.0,3.0],\"y\":[0,0]},\"selected\":{\"id\":\"2135\"},\"selection_policy\":{\"id\":\"2134\"}},\"id\":\"1660\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1657\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2144\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1659\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1661\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2145\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1681\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1663\",\"type\":\"Line\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1679\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1660\"},\"glyph\":{\"id\":\"1661\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1663\"},\"nonselection_glyph\":{\"id\":\"1662\"},\"view\":{\"id\":\"1665\"}},\"id\":\"1664\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1669\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1662\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2064\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1666\"},\"glyph\":{\"id\":\"1667\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1669\"},\"nonselection_glyph\":{\"id\":\"1668\"},\"view\":{\"id\":\"1671\"}},\"id\":\"1670\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1660\"}},\"id\":\"1665\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2065\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1667\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1685\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2066\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1666\"}},\"id\":\"1671\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1668\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1678\"}},\"id\":\"1683\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2067\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1691\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1687\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2166\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1684\"},\"glyph\":{\"id\":\"1685\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1687\"},\"nonselection_glyph\":{\"id\":\"1686\"},\"view\":{\"id\":\"1689\"}},\"id\":\"1688\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2160\"},\"selection_policy\":{\"id\":\"2159\"}},\"id\":\"1684\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1686\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2167\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1684\"}},\"id\":\"1689\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2148\"},\"selection_policy\":{\"id\":\"2147\"}},\"id\":\"1702\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1692\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1765\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2162\"},\"selection_policy\":{\"id\":\"2161\"}},\"id\":\"1696\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1693\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1695\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1697\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1851\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1699\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1709\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1711\"},\"nonselection_glyph\":{\"id\":\"1710\"},\"view\":{\"id\":\"1713\"}},\"id\":\"1712\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1696\"},\"glyph\":{\"id\":\"1697\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1699\"},\"nonselection_glyph\":{\"id\":\"1698\"},\"view\":{\"id\":\"1701\"}},\"id\":\"1700\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2147\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1705\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1698\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1702\"},\"glyph\":{\"id\":\"1703\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1705\"},\"nonselection_glyph\":{\"id\":\"1704\"},\"view\":{\"id\":\"1707\"}},\"id\":\"1706\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2148\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1940\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1696\"}},\"id\":\"1701\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1703\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1941\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1710\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1702\"}},\"id\":\"1707\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1704\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1943\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1709\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1944\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1850\"},\"glyph\":{\"id\":\"1851\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1853\"},\"nonselection_glyph\":{\"id\":\"1852\"},\"view\":{\"id\":\"1855\"}},\"id\":\"1854\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2069\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2150\"},\"selection_policy\":{\"id\":\"2149\"}},\"id\":\"1714\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1711\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2070\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1713\",\"type\":\"CDSView\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1715\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1720\"},\"glyph\":{\"id\":\"1721\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1723\"},\"nonselection_glyph\":{\"id\":\"1722\"},\"view\":{\"id\":\"1725\"}},\"id\":\"1724\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2072\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1717\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1727\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1729\"},\"nonselection_glyph\":{\"id\":\"1728\"},\"view\":{\"id\":\"1731\"}},\"id\":\"1730\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1714\"},\"glyph\":{\"id\":\"1715\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1717\"},\"nonselection_glyph\":{\"id\":\"1716\"},\"view\":{\"id\":\"1719\"}},\"id\":\"1718\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2073\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1714\"}},\"id\":\"1719\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1716\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2165\"},\"selection_policy\":{\"id\":\"2164\"}},\"id\":\"1720\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1845\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1847\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1603\",\"type\":\"HelpTool\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2115\"},\"selection_policy\":{\"id\":\"2114\"}},\"id\":\"1862\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1850\"}},\"id\":\"1855\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1988\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1846\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1859\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2086\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1860\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1856\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2051\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1857\",\"type\":\"Arrow\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1864\",\"type\":\"Line\"},{\"attributes\":{\"children\":[{\"id\":\"1927\"}]},\"id\":\"1928\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1989\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1862\"},\"glyph\":{\"id\":\"1864\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1866\"},\"nonselection_glyph\":{\"id\":\"1865\"},\"view\":{\"id\":\"1868\"}},\"id\":\"1867\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1852\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2117\"},\"selection_policy\":{\"id\":\"2116\"}},\"id\":\"1869\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1859\",\"type\":\"VeeHead\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1877\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1865\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1866\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1871\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1862\"}},\"id\":\"1868\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1831\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1548\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1872\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1869\"},\"glyph\":{\"id\":\"1870\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1872\"},\"nonselection_glyph\":{\"id\":\"1871\"},\"view\":{\"id\":\"1874\"}},\"id\":\"1873\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1529\"},{\"id\":\"1530\"},{\"id\":\"1531\"},{\"id\":\"1532\"},{\"id\":\"1533\"},{\"id\":\"1534\"},{\"id\":\"1536\"}]},\"id\":\"1537\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1870\",\"type\":\"Scatter\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1876\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1554\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[11.0],\"y\":[1]},\"selected\":{\"id\":\"2119\"},\"selection_policy\":{\"id\":\"2118\"}},\"id\":\"1875\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1550\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1869\"}},\"id\":\"1874\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1875\"}},\"id\":\"1880\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2084\"},\"group\":null,\"major_label_policy\":{\"id\":\"2085\"},\"ticker\":{\"id\":\"1823\"},\"visible\":false},\"id\":\"1822\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1557\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1875\"},\"glyph\":{\"id\":\"1876\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1878\"},\"nonselection_glyph\":{\"id\":\"1877\"},\"view\":{\"id\":\"1880\"}},\"id\":\"1879\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Shear stress\"},\"id\":\"1546\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1990\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1881\"},\"glyph\":{\"id\":\"1882\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1884\"},\"nonselection_glyph\":{\"id\":\"1883\"},\"view\":{\"id\":\"1886\"}},\"id\":\"1885\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1814\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1556\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1559\",\"type\":\"Grid\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1878\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1552\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1991\",\"type\":\"Selection\"},{\"attributes\":{\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1882\",\"type\":\"Text\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u1d65 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2091\"},\"group\":null,\"major_label_policy\":{\"id\":\"2092\"},\"ticker\":{\"id\":\"1557\"}},\"id\":\"1556\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[6],\"y\":[-5]},\"selected\":{\"id\":\"2121\"},\"selection_policy\":{\"id\":\"2120\"}},\"id\":\"1881\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1881\"}},\"id\":\"1886\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1571\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1816\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1565\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1883\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1887\"},\"glyph\":{\"id\":\"1888\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1890\"},\"nonselection_glyph\":{\"id\":\"1889\"},\"view\":{\"id\":\"1892\"}},\"id\":\"1891\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2081\"},\"group\":null,\"major_label_policy\":{\"id\":\"2082\"},\"ticker\":{\"id\":\"1827\"},\"visible\":false},\"id\":\"1826\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2088\"},\"group\":null,\"major_label_policy\":{\"id\":\"2089\"},\"ticker\":{\"id\":\"1561\"},\"visible\":false},\"id\":\"1560\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1818\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1560\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1563\",\"type\":\"Grid\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1884\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[5],\"y\":[0]},\"selected\":{\"id\":\"2155\"},\"selection_policy\":{\"id\":\"2154\"}},\"id\":\"1887\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1561\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1889\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1822\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1825\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1887\"}},\"id\":\"1892\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"V at position x\"},\"id\":\"1812\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1569\",\"type\":\"HelpTool\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1888\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1823\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1564\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1900\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1902\"},\"nonselection_glyph\":{\"id\":\"1901\"},\"view\":{\"id\":\"1904\"}},\"id\":\"1903\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1826\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1829\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1570\"}},\"id\":\"1566\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1890\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1567\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1893\"},\"glyph\":{\"id\":\"1894\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1896\"},\"nonselection_glyph\":{\"id\":\"1895\"},\"view\":{\"id\":\"1898\"}},\"id\":\"1897\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1844\"},\"glyph\":{\"id\":\"1845\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1847\"},\"nonselection_glyph\":{\"id\":\"1846\"},\"view\":{\"id\":\"1849\"}},\"id\":\"1848\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1568\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1896\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1820\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAIH3zwwQevPwgffPDBB78/RhdddNFFxz8IH3zwwQfPP2WTTTbZZNM/RhdddNFF1z8nm2yyySbbPwgffPDBB98/dNFFF1104T9lk0022WTjP1ZVVVVVVeU/RhdddNFF5z822WSTTTbpPyebbLLJJus/GF100UUX7T8IH3zwwQfvP3zwwQcffPA/dNFFF1108T9tsskmm2zyP2WTTTbZZPM/XXTRRRdd9D9WVVVVVVX1P0422WSTTfY/RhdddNFF9z8++OCDDz74PzbZZJNNNvk/L7rooosu+j8nm2yyySb7Px988MEHH/w/GF100UUX/T8QPvjggw/+PwgffPDBB/8/AAAAAAAAAEB88MEHH3wAQPjggw8++ABAdNFFF110AUDxwQcffPABQG2yySabbAJA6aKLLrroAkBlk0022WQDQOGDDz744ANAXXTRRRddBEDZZJNNNtkEQFZVVVVVVQVA0kUXXXTRBUBONtlkk00GQMomm2yyyQZARhdddNFFB0DCBx988MEHQD744IMPPghAuuiiiy66CEA22WSTTTYJQLPJJptssglAL7rooosuCkCrqqqqqqoKQCebbLLJJgtAo4suuuiiC0AffPDBBx8MQJtssskmmwxAGF100UUXDUCUTTbZZJMNQBA++OCDDw5AjC666KKLDkAIH3zwwQcPQIQPPvjggw9AAAAAAAAAEEA++OCDDz4QQHzwwQcffBBAuuiiiy66EED44IMPPvgQQDbZZJNNNhFAdNFFF110EUCzySabbLIRQPHBBx988BFAL7rooosuEkBtsskmm2wSQKuqqqqqqhJA6aKLLrroEkAnm2yyySYTQGWTTTbZZBNAo4suuuiiE0Dhgw8++OATQB988MEHHxRAXXTRRRddFECbbLLJJpsUQNlkk0022RRAF1100UUXFUBWVVVVVVUVQJRNNtlkkxVA0kUXXXTRFUAQPvjggw8WQE422WSTTRZAjC666KKLFkDKJptssskWQAgffPDBBxdARhdddNFFF0CEDz744IMXQMIHH3zwwRdAAAAAAAAAGEA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[100]},\"y\":{\"__ndarray__\":\"AAAAAAAAAIDANQOd8vDEv54GUi+07dS/ySOLxIFc378kzx0V4uDkv6t2Mzs3Deq/uqmCXMIx77+h9wD/hibyv+wZ0ZDWrvS/32Qnox0x979vtPYzrqz5v2QXr3/eIPy/Ws89AQmN/r9kqAY5RngAwHqhAuVlpQHA+j/FH5fNAsBgir+jj/ADwIsgoUoHDgXAyTtYDbglBsDSrhEEXjcHwMXlOGa3QgjALuZ3ioRHCcAET7fmh0UKwKVYHhCGPAvA3dQSu0UsDMDgLjm7jxQNwE1rdAMv9Q3ALijmpfDNDsD0nO7To54PwEBNFu+MMxDAjcU+GpOTEMA4uf4yT+8QwNF2gxCtRhHAmZmZmZmZEcCNCa3EAugRwFf7yJfXMRLAXfCXKAh3EsCztmOchbcSwCtpFShC8xLARG81EDEqE8A0feuoRlwTwOqT/lV4iRPACgHViryxE8DlXnTKCtUTwIuUgadb8xPAvdVAxKgMFMDwopXS7CAUwFHJApQjMBTAwGKq2Uk6FMDS1U2EXT8UwNHVTYRdPxTAwGKq2Uk6FMBQyQKUIzAUwPCildLsIBTAvdVAxKgMFMCLlIGnW/MTwONedMoK1RPACAHViryxE8Drk/5VeIkTwDN966hGXBPAQm81EDEqE8AqaRUoQvMSwLS2Y5yFtxLAW/CXKAh3EsBY+8iX1zESwI4JrcQC6BHAmZmZmZmZEcDPdoMQrUYRwDi5/jJP7xDAjcU+GpOTEMBCTRbvjDMQwPic7tOjng/ALijmpfDNDsBNa3QDL/UNwN4uObuPFA3A29QSu0UsDMCkWB4QhjwLwAJPt+aHRQrALOZ3ioRHCcDE5Thmt0IIwNKuEQReNwfAzDtYDbglBsCHIKFKBw4FwF2Kv6OP8APA+j/FH5fNAsB2oQLlZaUBwGSoBjlGeADAU889AQmN/r9mF69/3iD8v1609jOurPm/6WQnox0x97/dGdGQ1q70v573AP+GJvK/r6mCXMIx77+adjM7Nw3qvwDPHRXi4OS/xyOLxIFc37/nBlIvtO3Uv1g2A53y8MS/AAAAAAAAAIA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[100]}},\"selected\":{\"id\":\"2032\"},\"selection_policy\":{\"id\":\"2031\"}},\"id\":\"1893\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1992\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1894\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1827\",\"type\":\"BasicTicker\"},{\"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\":\"1570\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1900\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2078\"},\"group\":null,\"major_label_policy\":{\"id\":\"2079\"},\"ticker\":{\"id\":\"1591\"}},\"id\":\"1590\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1993\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1901\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1835\",\"type\":\"HelpTool\"},{\"attributes\":{\"source\":{\"id\":\"1893\"}},\"id\":\"1898\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1830\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1895\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1594\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1597\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1836\"}},\"id\":\"1832\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1904\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1833\",\"type\":\"SaveTool\"},{\"attributes\":{\"children\":[{\"id\":\"1922\"},{\"id\":\"1926\"}]},\"id\":\"1927\",\"type\":\"Column\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1902\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1834\",\"type\":\"ResetTool\"},{\"attributes\":{\"children\":[{\"id\":\"1811\"},{\"id\":\"1923\"},{\"id\":\"1545\"},{\"id\":\"1924\"},{\"id\":\"1925\"},{\"id\":\"1614\"}]},\"id\":\"1926\",\"type\":\"Row\"},{\"attributes\":{\"end\":300000.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1913\"}]},\"margin\":[5,5,0,5],\"start\":8000.0,\"step\":1000.0,\"title\":\"Change the elastic modulus [MPa]\",\"value\":200000.0},\"id\":\"1905\",\"type\":\"Slider\"},{\"attributes\":{\"margin\":[0,5,0,5],\"text\":\"\\n

\\n Ewood = 8 GPa; Econcrete = 26 GPa
\\n Esteel = 200 GPa; Eceramic = 300 GPa

\\n \"},\"id\":\"1906\",\"type\":\"Div\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2113\"},\"selection_policy\":{\"id\":\"2112\"}},\"id\":\"1844\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1595\",\"type\":\"BasicTicker\"},{\"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\":\"1836\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2075\"},\"group\":null,\"major_label_policy\":{\"id\":\"2076\"},\"ticker\":{\"id\":\"1595\"}},\"id\":\"1594\",\"type\":\"LinearAxis\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"beam_defl\":{\"id\":\"1897\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div\":{\"id\":\"1107\"},\"neutral_axis\":{\"id\":\"1718\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1099\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_deflection_beam(db, beam_defl)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_deflection_beam(data, glyph_beam, discr=100) {\\n const q = data['q'][0]\\n const E = data['E'][0]\\n const L = data['L'][0]\\n const Iy = data['Iy'][0]\\n \\n const x = linspace(0, L, discr)\\n const defl = new Array(discr)\\n for(var i = 0; i < discr; i++) {\\n defl[i] = compute_deflection_uniform_load(x[i], q, L, Iy, E)\\n }\\n \\n const source = glyph_beam.data_source\\n source.data.x = x\\n source.data.y = defl\\n source.change.emit()\\n }\\n \\n \\n function compute_deflection_uniform_load(x, q, L, Iy, E) {\\n return -q*x / (24*E*Iy) * (L**3-2*L*x**2+x**3)*1e12\\n }\\n \\n \"},\"id\":\"1908\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arr_head\":{\"id\":\"1247\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"neutral_axis\":{\"id\":\"1718\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \"},\"id\":\"1907\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1994\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1602\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1844\"}},\"id\":\"1849\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1995\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"beam_defl\":{\"id\":\"1897\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div\":{\"id\":\"1107\"},\"neutral_axis\":{\"id\":\"1718\"},\"s_b\":{\"id\":\"1003\"},\"s_ss\":{\"id\":\"1006\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1099\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const data_ss = s_ss.data\\n const b = db['b'][0]\\n const h = cb_obj.value // value of the slider\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const N = db['N'][0]\\n const M = db['M'][0]\\n const yG = compute_centroid_y(h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['yG'][0] = yG\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n data_ss['y'][1] = h // change the height of the section in the diagrams\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_deflection_beam(db, beam_defl)\\n\\n // emit the changes\\n source.change.emit()\\n s_ss.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_deflection_beam(data, glyph_beam, discr=100) {\\n const q = data['q'][0]\\n const E = data['E'][0]\\n const L = data['L'][0]\\n const Iy = data['Iy'][0]\\n \\n const x = linspace(0, L, discr)\\n const defl = new Array(discr)\\n for(var i = 0; i < discr; i++) {\\n defl[i] = compute_deflection_uniform_load(x[i], q, L, Iy, E)\\n }\\n \\n const source = glyph_beam.data_source\\n source.data.x = x\\n source.data.y = defl\\n source.change.emit()\\n }\\n \\n \\n function compute_deflection_uniform_load(x, q, L, Iy, E) {\\n return -q*x / (24*E*Iy) * (L**3-2*L*x**2+x**3)*1e12\\n }\\n \\n \"},\"id\":\"1909\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"N_diag\":{\"id\":\"1358\"},\"N_stress_diag\":{\"id\":\"1652\"},\"arr_head\":{\"id\":\"1247\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"neutral_axis\":{\"id\":\"1718\"},\"s_M\":{\"id\":\"1236\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1910\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1599\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1247\"},\"div_P\":{\"id\":\"1253\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1911\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1853\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"1382\"},\"M_stress_diag\":{\"id\":\"1670\"},\"V_diag\":{\"id\":\"1370\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arr_head\":{\"id\":\"1247\"},\"beam_defl\":{\"id\":\"1897\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"neutral_axis\":{\"id\":\"1718\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n update_deflection_beam(db, beam_defl)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_deflection_beam(data, glyph_beam, discr=100) {\\n const q = data['q'][0]\\n const E = data['E'][0]\\n const L = data['L'][0]\\n const Iy = data['Iy'][0]\\n \\n const x = linspace(0, L, discr)\\n const defl = new Array(discr)\\n for(var i = 0; i < discr; i++) {\\n defl[i] = compute_deflection_uniform_load(x[i], q, L, Iy, E)\\n }\\n \\n const source = glyph_beam.data_source\\n source.data.x = x\\n source.data.y = defl\\n source.change.emit()\\n }\\n \\n \\n function compute_deflection_uniform_load(x, q, L, Iy, E) {\\n return -q*x / (24*E*Iy) * (L**3-2*L*x**2+x**3)*1e12\\n }\\n \\n \"},\"id\":\"1912\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1598\",\"type\":\"PanTool\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2153\"},\"selection_policy\":{\"id\":\"2152\"}},\"id\":\"1850\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"N_stress_diag\":{\"id\":\"1652\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"beam_defl\":{\"id\":\"1897\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"source\":{\"id\":\"1007\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const E = cb_obj.value\\n\\n // update E\\n db['E'][0] = E\\n\\n // update\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_deflection_beam(db, beam_defl)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function update_deflection_beam(data, glyph_beam, discr=100) {\\n const q = data['q'][0]\\n const E = data['E'][0]\\n const L = data['L'][0]\\n const Iy = data['Iy'][0]\\n \\n const x = linspace(0, L, discr)\\n const defl = new Array(discr)\\n for(var i = 0; i < discr; i++) {\\n defl[i] = compute_deflection_uniform_load(x[i], q, L, Iy, E)\\n }\\n \\n const source = glyph_beam.data_source\\n source.data.x = x\\n source.data.y = defl\\n source.change.emit()\\n }\\n \\n \\n function compute_deflection_uniform_load(x, q, L, Iy, E) {\\n return -q*x / (24*E*Iy) * (L**3-2*L*x**2+x**3)*1e12\\n }\\n \\n \"},\"id\":\"1913\",\"type\":\"CustomJS\"},{\"attributes\":{\"width\":10},\"id\":\"1914\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1591\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1605\",\"type\":\"HoverTool\"},{\"attributes\":{\"children\":[{\"id\":\"1128\"},{\"id\":\"1917\"}]},\"id\":\"1918\",\"type\":\"Column\"},{\"attributes\":{\"axis\":{\"id\":\"1590\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1593\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1041\"},{\"id\":\"1914\"},{\"id\":\"1916\"}]},\"id\":\"1917\",\"type\":\"Row\"},{\"attributes\":{\"overlay\":{\"id\":\"1604\"}},\"id\":\"1600\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"height\":30},\"id\":\"1915\",\"type\":\"Spacer\"},{\"attributes\":{\"tools\":[{\"id\":\"1830\"},{\"id\":\"1831\"},{\"id\":\"1832\"},{\"id\":\"1833\"},{\"id\":\"1834\"},{\"id\":\"1835\"}]},\"id\":\"1837\",\"type\":\"Toolbar\"},{\"attributes\":{\"children\":[{\"id\":\"1915\"},{\"id\":\"1108\"},{\"id\":\"1109\"},{\"id\":\"1250\"},{\"id\":\"1249\"},{\"id\":\"1905\"},{\"id\":\"1906\"},{\"id\":\"1251\"},{\"id\":\"1252\"},{\"id\":\"1253\"},{\"id\":\"1254\"}]},\"id\":\"1916\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1601\",\"type\":\"SaveTool\"},{\"attributes\":{\"below\":[{\"id\":\"1624\"}],\"center\":[{\"id\":\"1627\"},{\"id\":\"1631\"}],\"height\":200,\"renderers\":[{\"id\":\"1724\"},{\"id\":\"1730\"},{\"id\":\"1736\"}],\"right\":[{\"id\":\"1628\"}],\"title\":{\"id\":\"1615\"},\"toolbar\":{\"id\":\"1640\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1617\"},\"x_scale\":{\"id\":\"1620\"},\"y_range\":{\"id\":\"1550\"},\"y_scale\":{\"id\":\"1622\"}},\"id\":\"1614\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2085\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2106\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2015\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2105\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"2037\"},\"selection_policy\":{\"id\":\"2036\"}},\"id\":\"1354\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1354\"},\"glyph\":{\"id\":\"1355\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1357\"},\"nonselection_glyph\":{\"id\":\"1356\"},\"view\":{\"id\":\"1359\"}},\"id\":\"1358\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2016\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1495\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1357\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1355\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1362\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1354\"}},\"id\":\"1359\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1356\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2158\"},\"selection_policy\":{\"id\":\"2157\"}},\"id\":\"2086\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1407\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1363\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1361\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2109\"},\"selection_policy\":{\"id\":\"2108\"}},\"id\":\"2017\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2123\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1419\"}],\"center\":[{\"id\":\"1422\"},{\"id\":\"1426\"}],\"height\":200,\"left\":[{\"id\":\"1423\"}],\"renderers\":[{\"id\":\"1652\"},{\"id\":\"1658\"},{\"id\":\"1664\"}],\"title\":{\"id\":\"1409\"},\"toolbar\":{\"id\":\"1435\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1411\"},\"x_scale\":{\"id\":\"1415\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1417\"}},\"id\":\"1408\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"2040\"},\"selection_policy\":{\"id\":\"2039\"}},\"id\":\"1366\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2124\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1365\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2111\"},\"selection_policy\":{\"id\":\"2110\"}},\"id\":\"2018\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1367\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2125\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1374\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1369\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1373\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1375\"},\"nonselection_glyph\":{\"id\":\"1374\"},\"view\":{\"id\":\"1377\"}},\"id\":\"1376\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2053\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2126\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1366\"},\"glyph\":{\"id\":\"1367\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1369\"},\"nonselection_glyph\":{\"id\":\"1368\"},\"view\":{\"id\":\"1371\"}},\"id\":\"1370\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1366\"}},\"id\":\"1371\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1368\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2054\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1404\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1375\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2055\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1373\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1401\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"2043\"},\"selection_policy\":{\"id\":\"2042\"}},\"id\":\"1378\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2056\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1377\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1379\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1397\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2108\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1381\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1395\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2127\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1378\"},\"glyph\":{\"id\":\"1379\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1381\"},\"nonselection_glyph\":{\"id\":\"1380\"},\"view\":{\"id\":\"1383\"}},\"id\":\"1382\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2109\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1378\"}},\"id\":\"1383\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1380\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2128\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1502\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2088\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1032\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1399\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2110\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1385\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2089\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1496\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2111\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1397\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1399\"},\"nonselection_glyph\":{\"id\":\"1398\"},\"view\":{\"id\":\"1401\"}},\"id\":\"1400\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2091\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1398\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"1501\"}},\"id\":\"1497\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1403\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2092\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1411\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1403\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1405\"},\"nonselection_glyph\":{\"id\":\"1404\"},\"view\":{\"id\":\"1407\"}},\"id\":\"1406\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1405\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2019\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2129\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1956\"},\"group\":null,\"major_label_policy\":{\"id\":\"1957\"},\"ticker\":{\"id\":\"1020\"}},\"id\":\"1019\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2020\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2130\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1019\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1022\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1413\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2100\"},\"selection_policy\":{\"id\":\"2099\"}},\"id\":\"1074\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Deflection [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1953\"},\"group\":null,\"major_label_policy\":{\"id\":\"1954\"},\"ticker\":{\"id\":\"1024\"},\"visible\":true},\"id\":\"1023\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial stress\"},\"id\":\"1409\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1023\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":1,\"group\":null,\"ticker\":null},\"id\":\"1026\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1419\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1422\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1056\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1059\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1415\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2099 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2061\"},\"group\":null,\"major_label_policy\":{\"id\":\"2062\"},\"ticker\":{\"id\":\"1420\"}},\"id\":\"1419\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2058\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1434\",\"type\":\"HoverTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1075\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1428\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2059\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"1033\"}},\"id\":\"1029\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2058\"},\"group\":null,\"major_label_policy\":{\"id\":\"2059\"},\"ticker\":{\"id\":\"1424\"},\"visible\":false},\"id\":\"1423\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1423\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1426\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2021\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1424\",\"type\":\"BasicTicker\"},{\"attributes\":{\"tools\":[{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"},{\"id\":\"1032\"}]},\"id\":\"1034\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2061\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2022\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1432\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2062\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1427\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1433\"}},\"id\":\"1429\",\"type\":\"BoxZoomTool\"},{\"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\":\"1033\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1431\",\"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\":\"1433\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"1453\"}],\"center\":[{\"id\":\"1456\"},{\"id\":\"1460\"}],\"height\":200,\"left\":[{\"id\":\"1457\"}],\"renderers\":[{\"id\":\"1742\"},{\"id\":\"1748\"},{\"id\":\"1754\"}],\"title\":{\"id\":\"1444\"},\"toolbar\":{\"id\":\"1469\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1446\"},\"x_scale\":{\"id\":\"1449\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1451\"}},\"id\":\"1443\",\"subtype\":\"Figure\",\"type\":\"Plot\"}],\"root_ids\":[\"1931\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"09fd65be-e224-4536-94d0-4f4c5f93935a\",\"root_ids\":[\"1931\"],\"roots\":{\"1931\":\"55e49958-3dc8-447c-a262-d25d686921ca\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "1931" + } + }, + "output_type": "display_data" } ], "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3),\n", - " slider_b,\n", - " slider_h,\n", - " slider_position,\n", - " slider_q,\n", - " slider_elastic,\n", - " div_E,\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M)),\n", - " row(column(\n", - " row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma),\n", - " row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau),\n", - " ))\n", - " ),\n", - " ],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_diagrams.ipynb b/Simple Beam DEMOs/sb_diagrams.ipynb index da296ea..52caf7f 100644 --- a/Simple Beam DEMOs/sb_diagrams.ipynb +++ b/Simple Beam DEMOs/sb_diagrams.ipynb @@ -1,722 +1,477 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Diagrams\n", "In this third notebook, the axial N, shear V and bending moment M diagrams are presented. " ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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_diagrams\n", "import math\n", "import numpy as np \n", - "from bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\n", "from cienpy import simplebeam as sb\n", - "from cienpy import rectangular_section as beam_section\n", - "from cienpy import models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "from cienpy import rectangular_section as beam_section" ] }, { "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": 8, + "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", "# 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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_Q = q/4*5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source = ColumnDataSource(data)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Create the figures, the plots and the widgets (same of Notebook 2 - Actions):" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Now define the new figures, renderers and widgets:" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"d93c1850-5993-4a11-9090-a79696878ba5\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1429\"}]},\"id\":\"1430\",\"type\":\"Column\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1182\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1181\"}},\"id\":\"1186\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1194\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1196\"},\"nonselection_glyph\":{\"id\":\"1195\"},\"view\":{\"id\":\"1198\"}},\"id\":\"1197\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1188\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1190\"},\"nonselection_glyph\":{\"id\":\"1189\"},\"view\":{\"id\":\"1192\"}},\"id\":\"1191\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1192\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1241\"},\"glyph\":{\"id\":\"1243\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1245\"},\"nonselection_glyph\":{\"id\":\"1244\"},\"view\":{\"id\":\"1247\"}},\"id\":\"1246\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1194\",\"type\":\"Circle\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1249\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1200\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1202\"},\"nonselection_glyph\":{\"id\":\"1201\"},\"view\":{\"id\":\"1204\"}},\"id\":\"1203\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1198\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1205\"},\"glyph\":{\"id\":\"1206\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1208\"},\"nonselection_glyph\":{\"id\":\"1207\"},\"view\":{\"id\":\"1210\"}},\"id\":\"1209\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1200\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"1487\"},\"selection_policy\":{\"id\":\"1486\"}},\"id\":\"1241\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1218\",\"type\":\"Patch\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1216\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1510\"},\"selection_policy\":{\"id\":\"1509\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1204\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1205\"}},\"id\":\"1210\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1206\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1483\"},\"selection_policy\":{\"id\":\"1482\"}},\"id\":\"1205\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1243\",\"type\":\"Line\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1238\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1212\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1212\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1214\"},\"nonselection_glyph\":{\"id\":\"1213\"},\"view\":{\"id\":\"1216\"}},\"id\":\"1215\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1491\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1219\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1492\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"1485\"},\"selection_policy\":{\"id\":\"1484\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1229\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1446\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1230\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1232\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1447\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1233\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1481\"},\"selection_policy\":{\"id\":\"1480\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1218\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1220\"},\"nonselection_glyph\":{\"id\":\"1219\"},\"view\":{\"id\":\"1222\"}},\"id\":\"1221\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1222\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1493\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1008\",\"type\":\"Title\"},{\"attributes\":{\"below\":[{\"id\":\"1018\"}],\"center\":[{\"id\":\"1021\"},{\"id\":\"1025\"},{\"id\":\"1179\"}],\"height\":200,\"left\":[{\"id\":\"1022\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1086\"},{\"id\":\"1092\"},{\"id\":\"1098\"},{\"id\":\"1170\"},{\"id\":\"1176\"},{\"id\":\"1185\"},{\"id\":\"1191\"}],\"title\":{\"id\":\"1008\"},\"toolbar\":{\"id\":\"1033\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1010\"},\"x_scale\":{\"id\":\"1014\"},\"y_range\":{\"id\":\"1012\"},\"y_scale\":{\"id\":\"1016\"}},\"id\":\"1007\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1232\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1220\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1494\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1238\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1449\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1239\",\"type\":\"Arrow\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1012\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1235\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1448\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1236\",\"type\":\"Arrow\"},{\"attributes\":{\"axis\":{\"id\":\"1022\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1025\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1235\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1019\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"A\":[20000],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0]},\"selected\":{\"id\":\"1479\"},\"selection_policy\":{\"id\":\"1478\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1248\"}},\"id\":\"1253\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1495\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1241\"}},\"id\":\"1247\",\"type\":\"CDSView\"},{\"attributes\":{\"below\":[{\"id\":\"1051\"}],\"center\":[{\"id\":\"1054\"},{\"id\":\"1058\"},{\"id\":\"1110\"},{\"id\":\"1119\"}],\"left\":[{\"id\":\"1055\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1077\"},{\"id\":\"1104\"},{\"id\":\"1116\"},{\"id\":\"1125\"}],\"title\":{\"id\":\"1041\"},\"toolbar\":{\"id\":\"1066\"},\"toolbar_location\":null,\"width\":375,\"x_range\":{\"id\":\"1043\"},\"x_scale\":{\"id\":\"1047\"},\"y_range\":{\"id\":\"1045\"},\"y_scale\":{\"id\":\"1049\"}},\"id\":\"1040\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"1489\"},\"selection_policy\":{\"id\":\"1488\"}},\"id\":\"1248\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1018\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1021\",\"type\":\"Grid\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1418\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1254\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1496\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1250\",\"type\":\"Scatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1251\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1248\"},\"glyph\":{\"id\":\"1249\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1251\"},\"nonselection_glyph\":{\"id\":\"1250\"},\"view\":{\"id\":\"1253\"}},\"id\":\"1252\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1256\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1497\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1010\",\"type\":\"Range1d\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1413\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1255\",\"type\":\"Slider\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1417\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1257\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{},\"id\":\"1016\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1276\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"Selection\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1258\",\"type\":\"Div\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \"},\"id\":\"1260\",\"type\":\"Div\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1074\",\"type\":\"Rect\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1455\"},\"group\":null,\"major_label_policy\":{\"id\":\"1456\"},\"ticker\":{\"id\":\"1019\"}},\"id\":\"1018\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1023\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1499\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1416\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1259\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"HelpTool\"},{\"attributes\":{\"below\":[{\"id\":\"1271\"}],\"center\":[{\"id\":\"1274\"},{\"id\":\"1278\"}],\"height\":160,\"left\":[{\"id\":\"1275\"}],\"renderers\":[{\"id\":\"1363\"},{\"id\":\"1369\"},{\"id\":\"1399\"}],\"title\":{\"id\":\"1262\"},\"toolbar\":{\"id\":\"1287\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1010\"},\"x_scale\":{\"id\":\"1267\"},\"y_range\":{\"id\":\"1265\"},\"y_scale\":{\"id\":\"1269\"}},\"id\":\"1261\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"tools\":[{\"id\":\"1026\"},{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"}]},\"id\":\"1033\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1265\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1161\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1500\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1452\"},\"group\":null,\"major_label_policy\":{\"id\":\"1453\"},\"ticker\":{\"id\":\"1023\"},\"visible\":false},\"id\":\"1022\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1267\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1271\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1274\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"1262\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1501\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1269\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1026\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1462\"},\"group\":null,\"major_label_policy\":{\"id\":\"1463\"},\"ticker\":{\"id\":\"1272\"},\"visible\":false},\"id\":\"1271\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"1032\"}},\"id\":\"1028\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1502\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1459\"},\"group\":null,\"major_label_policy\":{\"id\":\"1460\"},\"ticker\":{\"id\":\"1276\"}},\"id\":\"1275\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1272\",\"type\":\"BasicTicker\"},{\"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\":\"1032\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1462\",\"type\":\"BasicTickFormatter\"},{\"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\":\"1123\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1167\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1463\",\"type\":\"AllLabels\"},{\"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\":\"1124\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1121\"}},\"id\":\"1126\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1121\"},\"glyph\":{\"id\":\"1122\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1124\"},\"nonselection_glyph\":{\"id\":\"1123\"},\"view\":{\"id\":\"1126\"}},\"id\":\"1125\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1509\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"1477\"},\"selection_policy\":{\"id\":\"1476\"}},\"id\":\"1160\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1162\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1510\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1138\"}],\"center\":[{\"id\":\"1141\"},{\"id\":\"1145\"},{\"id\":\"1224\"},{\"id\":\"1227\"},{\"id\":\"1230\"},{\"id\":\"1233\"},{\"id\":\"1236\"},{\"id\":\"1239\"}],\"height\":200,\"left\":[{\"id\":\"1142\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1164\"},{\"id\":\"1197\"},{\"id\":\"1203\"},{\"id\":\"1209\"},{\"id\":\"1215\"},{\"id\":\"1221\"},{\"id\":\"1246\"},{\"id\":\"1252\"}],\"title\":{\"id\":\"1128\"},\"toolbar\":{\"id\":\"1153\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1130\"},\"x_scale\":{\"id\":\"1134\"},\"y_range\":{\"id\":\"1132\"},\"y_scale\":{\"id\":\"1136\"}},\"id\":\"1127\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1130\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1132\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1134\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1138\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1141\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1539\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1143\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1540\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1439\"},\"group\":null,\"major_label_policy\":{\"id\":\"1440\"},\"ticker\":{\"id\":\"1143\"},\"visible\":false},\"id\":\"1142\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1136\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1128\",\"type\":\"Title\"},{\"attributes\":{\"tools\":[{\"id\":\"1146\"},{\"id\":\"1147\"},{\"id\":\"1148\"},{\"id\":\"1149\"},{\"id\":\"1150\"},{\"id\":\"1151\"}]},\"id\":\"1153\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1511\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"1142\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1145\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1512\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1146\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1152\"}},\"id\":\"1148\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1150\",\"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\":\"1152\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1223\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1444\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1224\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1465\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1229\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1466\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1226\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1226\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1445\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1227\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1468\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1513\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1223\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1469\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1514\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1542\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1543\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1163\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1160\"},\"glyph\":{\"id\":\"1161\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1163\"},\"nonselection_glyph\":{\"id\":\"1162\"},\"view\":{\"id\":\"1165\"}},\"id\":\"1164\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1544\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1181\"},\"glyph\":{\"id\":\"1182\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1184\"},\"nonselection_glyph\":{\"id\":\"1183\"},\"view\":{\"id\":\"1186\"}},\"id\":\"1185\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1545\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1515\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1160\"}},\"id\":\"1165\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[0.6]},\"selected\":{\"id\":\"1516\"},\"selection_policy\":{\"id\":\"1515\"}},\"id\":\"1166\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1516\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1166\"},\"glyph\":{\"id\":\"1167\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1169\"},\"nonselection_glyph\":{\"id\":\"1168\"},\"view\":{\"id\":\"1171\"}},\"id\":\"1170\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1178\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1457\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1179\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1178\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1172\"},\"glyph\":{\"id\":\"1173\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1175\"},\"nonselection_glyph\":{\"id\":\"1174\"},\"view\":{\"id\":\"1177\"}},\"id\":\"1176\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[0.4]},\"selected\":{\"id\":\"1518\"},\"selection_policy\":{\"id\":\"1517\"}},\"id\":\"1172\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1166\"}},\"id\":\"1171\",\"type\":\"CDSView\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1173\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1172\"}},\"id\":\"1177\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1188\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1471\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"1520\"},\"selection_policy\":{\"id\":\"1519\"}},\"id\":\"1181\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1329\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1474\"},\"group\":null,\"major_label_policy\":{\"id\":\"1475\"},\"ticker\":{\"id\":\"1336\"}},\"id\":\"1335\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1331\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1484\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"1350\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1333\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1485\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1336\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1335\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1338\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1344\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1471\"},\"group\":null,\"major_label_policy\":{\"id\":\"1472\"},\"ticker\":{\"id\":\"1340\"}},\"id\":\"1339\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1339\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1342\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1340\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1348\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1343\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1349\"}},\"id\":\"1345\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1346\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1347\",\"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\":\"1349\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"1525\"},\"selection_policy\":{\"id\":\"1524\"}},\"id\":\"1359\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1403\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1443\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1406\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1408\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1402\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1404\"},\"nonselection_glyph\":{\"id\":\"1403\"},\"view\":{\"id\":\"1406\"}},\"id\":\"1405\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1360\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1486\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1530\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1487\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1343\"},{\"id\":\"1344\"},{\"id\":\"1345\"},{\"id\":\"1346\"},{\"id\":\"1347\"},{\"id\":\"1348\"},{\"id\":\"1350\"}]},\"id\":\"1351\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1531\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1359\"},\"glyph\":{\"id\":\"1360\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1362\"},\"nonselection_glyph\":{\"id\":\"1361\"},\"view\":{\"id\":\"1364\"}},\"id\":\"1363\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1366\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1368\"},\"nonselection_glyph\":{\"id\":\"1367\"},\"view\":{\"id\":\"1370\"}},\"id\":\"1369\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1367\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1362\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1488\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"1528\"},\"selection_policy\":{\"id\":\"1527\"}},\"id\":\"1371\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1359\"}},\"id\":\"1364\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1489\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1361\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1404\",\"type\":\"Circle\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1366\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1368\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1374\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1378\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1380\"},\"nonselection_glyph\":{\"id\":\"1379\"},\"view\":{\"id\":\"1382\"}},\"id\":\"1381\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1373\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1370\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1372\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1371\"},\"glyph\":{\"id\":\"1372\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1374\"},\"nonselection_glyph\":{\"id\":\"1373\"},\"view\":{\"id\":\"1376\"}},\"id\":\"1375\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1371\"}},\"id\":\"1376\",\"type\":\"CDSView\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1378\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1386\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1379\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1390\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1392\"},\"nonselection_glyph\":{\"id\":\"1391\"},\"view\":{\"id\":\"1394\"}},\"id\":\"1393\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1380\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1382\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1384\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1391\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"1531\"},\"selection_policy\":{\"id\":\"1530\"}},\"id\":\"1383\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1383\"},\"glyph\":{\"id\":\"1384\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1386\"},\"nonselection_glyph\":{\"id\":\"1385\"},\"view\":{\"id\":\"1388\"}},\"id\":\"1387\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1383\"}},\"id\":\"1388\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1385\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1106\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1104\"},\"source\":{\"id\":\"1006\"},\"support_r\":{\"id\":\"1098\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \"},\"id\":\"1414\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1392\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1390\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1396\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1402\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1396\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1398\"},\"nonselection_glyph\":{\"id\":\"1397\"},\"view\":{\"id\":\"1400\"}},\"id\":\"1399\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1059\"},{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"},{\"id\":\"1063\"},{\"id\":\"1064\"}]},\"id\":\"1066\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1503\"},\"group\":null,\"major_label_policy\":{\"id\":\"1504\"},\"ticker\":{\"id\":\"1079\"}},\"id\":\"1055\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1394\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1408\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1410\"},\"nonselection_glyph\":{\"id\":\"1409\"},\"view\":{\"id\":\"1412\"}},\"id\":\"1411\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1452\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1400\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1397\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1453\",\"type\":\"AllLabels\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \"},\"id\":\"1413\",\"type\":\"CustomJS\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1398\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1409\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1410\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1456\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1412\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1434\",\"type\":\"Title\"},{\"attributes\":{\"args\":{\"div\":{\"id\":\"1106\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1104\"},\"source\":{\"id\":\"1006\"},\"support_r\":{\"id\":\"1098\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = db['b'][0]\\n const h = cb_obj.value // value of the slider\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \"},\"id\":\"1415\",\"type\":\"CustomJS\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1083\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1085\"},\"nonselection_glyph\":{\"id\":\"1084\"},\"view\":{\"id\":\"1087\"}},\"id\":\"1086\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"args\":{\"N_diag\":{\"id\":\"1363\"},\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1416\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1417\",\"type\":\"CustomJS\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1436\",\"type\":\"Title\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"1387\"},\"V_diag\":{\"id\":\"1375\"},\"arr_head\":{\"id\":\"1252\"},\"div_P\":{\"id\":\"1258\"},\"div_f\":{\"id\":\"1260\"},\"fN\":{\"id\":\"1236\"},\"fP\":{\"id\":\"1224\"},\"fRx\":{\"id\":\"1233\"},\"fRyl\":{\"id\":\"1230\"},\"fRyr\":{\"id\":\"1227\"},\"fV\":{\"id\":\"1239\"},\"s_M\":{\"id\":\"1241\"},\"s_q\":{\"id\":\"1005\"},\"source\":{\"id\":\"1006\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1418\",\"type\":\"CustomJS\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1523\"},\"selection_policy\":{\"id\":\"1522\"}},\"id\":\"1457\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1075\",\"type\":\"Rect\"},{\"attributes\":{\"width\":10},\"id\":\"1419\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1049\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1041\",\"type\":\"Title\"},{\"attributes\":{\"children\":[{\"id\":\"1420\"},{\"id\":\"1107\"},{\"id\":\"1108\"},{\"id\":\"1106\"},{\"id\":\"1421\"},{\"id\":\"1255\"},{\"id\":\"1254\"},{\"id\":\"1256\"},{\"id\":\"1257\"},{\"id\":\"1258\"},{\"id\":\"1259\"}]},\"id\":\"1422\",\"type\":\"Column\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1534\"},\"selection_policy\":{\"id\":\"1533\"}},\"id\":\"1073\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"height\":10},\"id\":\"1420\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":10},\"id\":\"1421\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1139\",\"type\":\"BasicTicker\"},{\"attributes\":{\"children\":[{\"id\":\"1040\"},{\"id\":\"1419\"},{\"id\":\"1422\"}]},\"id\":\"1423\",\"type\":\"Row\"},{\"attributes\":{\"axis\":{\"id\":\"1055\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1058\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1427\"}]},\"id\":\"1428\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1127\"},{\"id\":\"1423\"}]},\"id\":\"1424\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"DataRange1d\"},{\"attributes\":{\"height\":10},\"id\":\"1425\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"1007\"},{\"id\":\"1425\"},{\"id\":\"1261\"},{\"id\":\"1295\"},{\"id\":\"1327\"},{\"id\":\"1260\"}]},\"id\":\"1426\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1424\"},{\"id\":\"1426\"}]},\"id\":\"1427\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1043\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1505\"},\"group\":null,\"major_label_policy\":{\"id\":\"1506\"},\"ticker\":{\"id\":\"1079\"}},\"id\":\"1051\",\"type\":\"LinearAxis\"},{\"attributes\":{\"children\":[{\"id\":\"1428\"}]},\"id\":\"1429\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1047\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1459\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1051\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1054\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1460\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1439\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1440\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1442\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1503\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1492\"},\"selection_policy\":{\"id\":\"1491\"}},\"id\":\"1444\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1504\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1494\"},\"selection_policy\":{\"id\":\"1493\"}},\"id\":\"1445\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1505\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1496\"},\"selection_policy\":{\"id\":\"1495\"}},\"id\":\"1446\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1506\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1533\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1534\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1498\"},\"selection_policy\":{\"id\":\"1497\"}},\"id\":\"1447\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1500\"},\"selection_policy\":{\"id\":\"1499\"}},\"id\":\"1448\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1543\"},\"selection_policy\":{\"id\":\"1542\"}},\"id\":\"1507\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1502\"},\"selection_policy\":{\"id\":\"1501\"}},\"id\":\"1449\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1545\"},\"selection_policy\":{\"id\":\"1544\"}},\"id\":\"1508\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1535\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1536\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1537\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1538\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1527\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1528\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1472\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1064\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1517\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1474\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1059\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1065\"}},\"id\":\"1061\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1518\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1062\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1475\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1063\",\"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\":\"1065\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1083\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1476\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1477\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1519\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1520\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":300},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1076\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1073\"},\"glyph\":{\"id\":\"1074\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1076\"},\"nonselection_glyph\":{\"id\":\"1075\"},\"view\":{\"id\":\"1078\"}},\"id\":\"1077\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1478\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1073\"}},\"id\":\"1078\",\"type\":\"CDSView\"},{\"attributes\":{\"interval\":50},\"id\":\"1079\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"1479\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1084\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1088\"}},\"id\":\"1093\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1087\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1089\",\"type\":\"Patch\"},{\"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\":\"1097\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1442\"},\"group\":null,\"major_label_policy\":{\"id\":\"1443\"},\"ticker\":{\"id\":\"1139\"},\"visible\":false},\"id\":\"1138\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1085\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1088\"},\"glyph\":{\"id\":\"1089\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1091\"},\"nonselection_glyph\":{\"id\":\"1090\"},\"view\":{\"id\":\"1093\"}},\"id\":\"1092\",\"type\":\"GlyphRenderer\"},{\"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\":\"1101\",\"type\":\"Rect\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"1512\"},\"selection_policy\":{\"id\":\"1511\"}},\"id\":\"1088\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1090\",\"type\":\"Patch\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1118\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1095\",\"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\":\"1091\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"1514\"},\"selection_policy\":{\"id\":\"1513\"}},\"id\":\"1094\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1480\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1536\"},\"selection_policy\":{\"id\":\"1535\"}},\"id\":\"1100\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"1540\"},\"selection_policy\":{\"id\":\"1539\"}},\"id\":\"1121\",\"type\":\"ColumnDataSource\"},{\"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\":\"1096\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1481\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1118\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1508\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1119\",\"type\":\"Arrow\"},{\"attributes\":{\"source\":{\"id\":\"1094\"}},\"id\":\"1099\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"1538\"},\"selection_policy\":{\"id\":\"1537\"}},\"id\":\"1112\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1112\"},\"glyph\":{\"id\":\"1113\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1115\"},\"nonselection_glyph\":{\"id\":\"1114\"},\"view\":{\"id\":\"1117\"}},\"id\":\"1116\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1094\"},\"glyph\":{\"id\":\"1095\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1097\"},\"nonselection_glyph\":{\"id\":\"1096\"},\"view\":{\"id\":\"1099\"}},\"id\":\"1098\",\"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\":\"1102\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"1100\"}},\"id\":\"1105\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1109\",\"type\":\"VeeHead\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1113\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1100\"},\"glyph\":{\"id\":\"1101\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1103\"},\"nonselection_glyph\":{\"id\":\"1102\"},\"view\":{\"id\":\"1105\"}},\"id\":\"1104\",\"type\":\"GlyphRenderer\"},{\"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\":\"1114\",\"type\":\"Text\"},{\"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\":\"1103\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1522\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1122\",\"type\":\"Text\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\"},\"id\":\"1106\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1482\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1109\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"1507\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1110\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1523\",\"type\":\"Selection\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1414\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1107\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1483\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1524\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1415\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1108\",\"type\":\"Slider\"},{\"attributes\":{\"source\":{\"id\":\"1112\"}},\"id\":\"1117\",\"type\":\"CDSView\"},{\"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\":\"1115\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1525\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1280\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"1286\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis\":{\"id\":\"1275\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1278\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1284\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1279\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1285\"}},\"id\":\"1281\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1282\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1283\",\"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\":\"1285\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1279\"},{\"id\":\"1280\"},{\"id\":\"1281\"},{\"id\":\"1282\"},{\"id\":\"1283\"},{\"id\":\"1284\"},{\"id\":\"1286\"}]},\"id\":\"1287\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1468\"},\"group\":null,\"major_label_policy\":{\"id\":\"1469\"},\"ticker\":{\"id\":\"1304\"},\"visible\":false},\"id\":\"1303\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1297\",\"type\":\"DataRange1d\"},{\"attributes\":{\"below\":[{\"id\":\"1303\"}],\"center\":[{\"id\":\"1306\"},{\"id\":\"1310\"}],\"height\":160,\"left\":[{\"id\":\"1307\"}],\"renderers\":[{\"id\":\"1375\"},{\"id\":\"1381\"},{\"id\":\"1405\"}],\"title\":{\"id\":\"1434\"},\"toolbar\":{\"id\":\"1319\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1010\"},\"x_scale\":{\"id\":\"1299\"},\"y_range\":{\"id\":\"1297\"},\"y_scale\":{\"id\":\"1301\"}},\"id\":\"1295\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1299\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"1318\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1301\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1304\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1303\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1306\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1312\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1307\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1310\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1465\"},\"group\":null,\"major_label_policy\":{\"id\":\"1466\"},\"ticker\":{\"id\":\"1308\"}},\"id\":\"1307\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"1335\"}],\"center\":[{\"id\":\"1338\"},{\"id\":\"1342\"}],\"height\":200,\"left\":[{\"id\":\"1339\"}],\"renderers\":[{\"id\":\"1387\"},{\"id\":\"1393\"},{\"id\":\"1411\"}],\"title\":{\"id\":\"1436\"},\"toolbar\":{\"id\":\"1351\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1010\"},\"x_scale\":{\"id\":\"1331\"},\"y_range\":{\"id\":\"1329\"},\"y_scale\":{\"id\":\"1333\"}},\"id\":\"1327\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1308\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1316\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1311\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1317\"}},\"id\":\"1313\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1314\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1315\",\"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\":\"1317\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1311\"},{\"id\":\"1312\"},{\"id\":\"1313\"},{\"id\":\"1314\"},{\"id\":\"1315\"},{\"id\":\"1316\"},{\"id\":\"1318\"}]},\"id\":\"1319\",\"type\":\"Toolbar\"}],\"root_ids\":[\"1430\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"d93c1850-5993-4a11-9090-a79696878ba5\",\"root_ids\":[\"1430\"],\"roots\":{\"1430\":\"c11f1b72-942a-4993-b879-7a89c91e22fa\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": [ - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b_h = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b_h, code=code_change_b)\n", - "\n", - "\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = db['b'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_b_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout),\n", - " slider_b,\n", - " slider_h,\n", - " div_geo,\n", - " Spacer(height=padding_layout),\n", - " slider_position,\n", - " slider_q,\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M,\n", - " div_forces))\n", - " )],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_geo.ipynb b/Simple Beam DEMOs/sb_geo.ipynb index b8a0d09..0e9d96b 100644 --- a/Simple Beam DEMOs/sb_geo.ipynb +++ b/Simple Beam DEMOs/sb_geo.ipynb @@ -1,346 +1,460 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Geometry\n", "In this first notebook, the geometry of a simple beam with rectangular section is explored. The correlated mechanical parameters are also visualized." ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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_geo\n", "import math\n", "import numpy as np \n", - "from bokeh.layouts import layout, column\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer\n", - "from bokeh.models.tickers import SingleIntervalTicker\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\n", "from cienpy import simplebeam as sb\n", - "from cienpy import rectangular_section as beam_section\n", - "from cienpy import models\n", - "\n", - "# output_notebook()" + "from cienpy import rectangular_section as beam_section" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the geometry:" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Choose the dimensions\n", "L = 6 # [m]\n", "h = 200 # [mm]\n", "b = 100 # [mm]\n", "\n", "# compute the parameters\n", "A = beam_section.compute_area(b, h) # [mm2]\n", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", - "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", - "\n", - "# constants for the visualisation\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "initial_position = L\n", - "data = dict( # stores every useful single variable\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " x=[initial_position],\n", - " y=[0]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source = ColumnDataSource(data)" + "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Now define the new figures, renderers and widgets:" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
GlyphRenderer(
id = '1829', …)
coordinates = None,
data_source = ColumnDataSource(id='1825', ...),
glyph = Text(id='1826', ...),
group = None,
hover_glyph = None,
js_event_callbacks = {},
js_property_callbacks = {},
level = 'glyph',
muted = False,
muted_glyph = Text(id='1828', ...),
name = None,
nonselection_glyph = Text(id='1827', ...),
selection_glyph = 'auto',
subscribed_events = [],
syncable = True,
tags = [],
view = CDSView(id='1830', ...),
visible = True,
x_range_name = 'default',
y_range_name = 'default')
\n", - "\n" - ], - "text/plain": [ - "GlyphRenderer(id='1829', ...)" + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" ] }, - "execution_count": 8, "metadata": {}, - "output_type": "execute_result" + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"048788ba-8a20-49fa-bd4a-3f0abfb09c19\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1142\"},{\"id\":\"1143\"}]},\"id\":\"1144\",\"type\":\"Column\"},{\"attributes\":{\"children\":[{\"id\":\"1139\"},{\"id\":\"1107\"},{\"id\":\"1105\"},{\"id\":\"1106\"},{\"id\":\"1140\"},{\"id\":\"1104\"}]},\"id\":\"1141\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1160\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1005\"}]},\"id\":\"1142\",\"type\":\"Row\"},{\"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\":{\"data\":{},\"selected\":{\"id\":\"1170\"},\"selection_policy\":{\"id\":\"1169\"}},\"id\":\"1153\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1161\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1038\"},{\"id\":\"1138\"},{\"id\":\"1141\"}]},\"id\":\"1143\",\"type\":\"Row\"},{\"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\":{},\"id\":\"1177\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1014\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1081\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1016\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1019\",\"type\":\"Grid\"},{\"attributes\":{\"interval\":50},\"id\":\"1077\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"1178\",\"type\":\"Selection\"},{\"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\":{\"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\":\"1017\",\"type\":\"BasicTicker\"},{\"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\":{\"source\":{\"id\":\"1071\"}},\"id\":\"1076\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1082\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1085\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1162\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"start\":-1},\"id\":\"1010\",\"type\":\"Range1d\"},{\"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\":{},\"id\":\"1163\",\"type\":\"Selection\"},{\"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\":\"1012\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1093\",\"type\":\"Circle\"},{\"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\":{\"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\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1151\"},\"group\":null,\"major_label_policy\":{\"id\":\"1152\"},\"ticker\":{\"id\":\"1017\"}},\"id\":\"1016\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1083\",\"type\":\"Line\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1008\",\"type\":\"Range1d\"},{\"attributes\":{\"source\":{\"id\":\"1098\"}},\"id\":\"1103\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1006\",\"type\":\"Title\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1087\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1029\",\"type\":\"HelpTool\"},{\"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\":{},\"id\":\"1021\",\"type\":\"BasicTicker\"},{\"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\":{\"coordinates\":null,\"formatter\":{\"id\":\"1148\"},\"group\":null,\"major_label_policy\":{\"id\":\"1149\"},\"ticker\":{\"id\":\"1021\"},\"visible\":false},\"id\":\"1020\",\"type\":\"LinearAxis\"},{\"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\":{\"axis\":{\"id\":\"1020\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1023\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1086\"}},\"id\":\"1091\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1174\"},\"selection_policy\":{\"id\":\"1173\"}},\"id\":\"1098\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1045\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.15]},\"selected\":{\"id\":\"1165\"},\"selection_policy\":{\"id\":\"1164\"}},\"id\":\"1092\",\"type\":\"ColumnDataSource\"},{\"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\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"1161\"},\"selection_policy\":{\"id\":\"1160\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1047\",\"type\":\"LinearScale\"},{\"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\":{},\"id\":\"1154\",\"type\":\"BasicTickFormatter\"},{\"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\":{},\"id\":\"1024\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1030\"}},\"id\":\"1026\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":4.114506654314834}},\"id\":\"1108\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1164\",\"type\":\"UnionRenderers\"},{\"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\":{},\"id\":\"1155\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1092\"}},\"id\":\"1097\",\"type\":\"CDSView\"},{\"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\":{},\"id\":\"1057\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1165\",\"type\":\"Selection\"},{\"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\":{},\"id\":\"1156\",\"type\":\"BasicTickFormatter\"},{\"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\":{\"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\":{\"height\":300,\"text\":\"

Geometrical and mechanical parameters

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\",\"width\":300},\"id\":\"1104\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"SaveTool\"},{\"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\":{},\"id\":\"1028\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1157\",\"type\":\"AllLabels\"},{\"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\":{},\"id\":\"1180\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1025\",\"type\":\"WheelZoomTool\"},{\"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\":\"1181\",\"type\":\"Selection\"},{\"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\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1121\",\"type\":\"Text\"},{\"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\":{\"axis\":{\"id\":\"1053\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1056\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1120\"}},\"id\":\"1125\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1182\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"text\":[\"x axis\"],\"x\":[6.4],\"y\":[0.1]},\"selected\":{\"id\":\"1167\"},\"selection_policy\":{\"id\":\"1166\"}},\"id\":\"1111\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1114\",\"type\":\"Text\"},{\"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\":{\"data\":{\"text\":[\"y axis\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"1176\"},\"selection_policy\":{\"id\":\"1175\"}},\"id\":\"1120\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1181\"},\"selection_policy\":{\"id\":\"1180\"}},\"id\":\"1158\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1183\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1129\"}},\"id\":\"1134\",\"type\":\"CDSView\"},{\"attributes\":{\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1112\",\"type\":\"Text\"},{\"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\":{\"data\":{},\"selected\":{\"id\":\"1183\"},\"selection_policy\":{\"id\":\"1182\"}},\"id\":\"1159\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1166\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1130\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1117\",\"type\":\"VeeHead\"},{\"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\":\"1167\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1024\"},{\"id\":\"1025\"},{\"id\":\"1026\"},{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"}]},\"id\":\"1031\",\"type\":\"Toolbar\"},{\"attributes\":{\"height\":50},\"id\":\"1139\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"text\":[\"z axis\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"1178\"},\"selection_policy\":{\"id\":\"1177\"}},\"id\":\"1129\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1041\",\"type\":\"DataRange1d\"},{\"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\":\"1149\",\"type\":\"AllLabels\"},{\"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 = \\\"

Geometrical and mechanical parameters:

h = \\\"+h+\\n \\\" mm
b = \\\"+b+\\n \\\" mm
L = \\\"+L+\\n \\\" m
A = \\\"+A.toExponential()+\\n \\\" mm2
Iy = \\\"+Iy.toExponential()+\\n \\\" mm4
Iz = \\\"+Iz.toExponential()+\\n \\\" mm4\\\"\\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\":{\"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 = \\\"

Geometrical and mechanical parameters:

h = \\\"+h+\\n \\\" mm
b = \\\"+b+\\n \\\" mm
L = \\\"+L+\\n \\\" m
A = \\\"+A.toExponential()+\\n \\\" mm2
Iy = \\\"+Iy.toExponential()+\\n \\\" mm4
Iz = \\\"+Iz.toExponential()+\\n \\\" mm4\\\"\\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\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1113\",\"type\":\"Text\"},{\"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\":{},\"id\":\"1151\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"1172\"},\"selection_policy\":{\"id\":\"1171\"}},\"id\":\"1071\",\"type\":\"ColumnDataSource\"},{\"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 = \\\"

Geometrical and mechanical parameters:

h = \\\"+h+\\n \\\" mm
b = \\\"+b+\\n \\\" mm
L = \\\"+L+\\n \\\" m
A = \\\"+A.toExponential()+\\n \\\" mm2
Iy = \\\"+Iy.toExponential()+\\n \\\" mm4
Iz = \\\"+Iz.toExponential()+\\n \\\" mm4\\\"\\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\":{},\"id\":\"1152\",\"type\":\"AllLabels\"},{\"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\":{},\"id\":\"1043\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1111\"}},\"id\":\"1116\",\"type\":\"CDSView\"},{\"attributes\":{\"height\":50},\"id\":\"1140\",\"type\":\"Spacer\"},{\"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\":{\"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\":{\"overlay\":{\"id\":\"1063\"}},\"id\":\"1059\",\"type\":\"BoxZoomTool\"},{\"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\":{\"tools\":[{\"id\":\"1057\"},{\"id\":\"1058\"},{\"id\":\"1059\"},{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"}]},\"id\":\"1064\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1058\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1169\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1170\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1171\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1039\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1172\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1062\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1173\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1174\",\"type\":\"Selection\"},{\"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\":{\"axis\":{\"id\":\"1049\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1052\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1184\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1185\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1175\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1176\",\"type\":\"Selection\"}],\"root_ids\":[\"1144\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"048788ba-8a20-49fa-bd4a-3f0abfb09c19\",\"root_ids\":[\"1144\"],\"roots\":{\"1144\":\"ebc97ded-dd80-4662-9a18-1cf56cf92025\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_SEC = 600 # height figure section\n", - "\n", - "paddingx = 0.2*L\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "fig_beam = figure(**options,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_height=200,\n", - " plot_width=700,\n", - " x_range=(0-paddingx, L+paddingx),\n", - " y_range=(-1, 1),\n", - " title=\"Simple supported beam\"\n", - ")\n", - "fig_beam.xgrid.grid_line_alpha = 0\n", - "fig_beam.ygrid.grid_line_alpha = 0\n", - "fig_beam.yaxis.visible = False\n", - "\n", - "fig_section = figure(**options,\n", - " x_axis_label=\"Width b [mm]\",\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_height=int(MAX_H*0.9),\n", - " plot_width=int(MAX_B),\n", - " match_aspect=True,\n", - " title=\"Cross-section of the beam\"\n", - ")\n", - "fig_section.rect([0], [0], width=MAX_B, height=MAX_H, alpha=0, fill_alpha=0) # transparent rect\n", - "fig_section.axis.ticker = SingleIntervalTicker(interval=50, num_minor_ticks=5)\n", - "\n", - "\n", - "# beam\n", - "beam = fig_beam.line('x', 'y', source=source_beam, line_width=6, color='black')\n", - "b_supp = 0.3\n", - "supp_opt = dict(\n", - " fill_color='white',\n", - " line_color='black'\n", - ")\n", - "support_l = fig_beam.patch([0, b_supp/2, -b_supp/2],\n", - " [0, -b_supp/2*math.sqrt(3), -b_supp/2*math.sqrt(3)],\n", - " **supp_opt)\n", - "support_r = fig_beam.circle([L], [-b_supp/2], radius=b_supp/2, **supp_opt)\n", - "\n", - "\n", - "# section\n", - "section = fig_section.rect([0], [0], width=b, height=h, fill_color='white',\n", - " color='black', line_width=3, hatch_pattern='/', hatch_color='black')\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_text = lambda h, b, L, A, Iy, Iz : f\"\"\"

Geometrical and mechanical parameters:

\n", - " h = {round(h)} mm
\n", - " b = {round(b)} mm
\n", - " L = {round(L)} m
\n", - " A = {\"{:.2e}\".format(A)} mm2
\n", - " Iy = {\"{:.2e}\".format(Iy)} mm4
\n", - " Iz = {\"{:.2e}\".format(Iz)} mm4\"\"\"\n", - "\n", - "div = Div(\n", - " text=div_text(h, b, L, A, Iy, Iz),\n", - " width=300,\n", - " height=300\n", - ")\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "slider_L = Slider(\n", - " title=\"Change the length L [m]\",\n", - " start=1,\n", - " end=L+1,\n", - " step=0.1,\n", - " value=L\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "x_axis_arrow = models.force_vector(fig_beam, axis_arrow_length, L, L+axis_arrow_length, 0, 0, 'gray')\n", - "x_axis_label = fig_beam.text(x=[L+axis_arrow_length/2], y=[0.1], text=[\"x axis\"], text_color='gray', text_baseline='bottom')\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y axis\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z axis\"], text_color='gray', text_align='right', text_baseline='middle')\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "code_slider = lambda var, L_code, b_code, h_code, x_axis_code=\"\" : f\"\"\"\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({L_code}*10)/10\n", - " const b = Math.round({b_code})\n", - " const h = Math.round({h_code})\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 = \"

Geometrical and mechanical parameters:

h = \"+h+\n", - " \" mm
b = \"+b+\n", - " \" mm
L = \"+L+\n", - " \" m
A = \"+A.toExponential()+\n", - " \" mm2
Iy = \"+Iy.toExponential()+\n", - " \" mm4
Iz = \"+Iz.toExponential()+\n", - " \" mm4\"\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", - " {x_axis_code}\n", - " // apply the changes\n", - " data_s['{var}'] = 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", - "\"\"\"\n", - "\n", - "x_axis_code = f\"\"\"\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+{axis_arrow_length}\n", - "x_axis_label.glyph.x = L+{axis_arrow_length}/2\n", - "\"\"\"\n", - "\n", - "# logic for slider_L\n", - "update_L = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r,\n", - " x_axis_arrow=x_axis_arrow, x_axis_label=x_axis_label),\n", - " code=code_slider(\"L\", \"f\", \"data_s['b']\", \"data_s['h']\", x_axis_code))\n", - "\n", - "slider_L.js_on_change('value', update_L)\n", - "\n", - "# logic for slider_b\n", - "update_b = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r),\n", - " code=code_slider(\"b\", \"data_s['L']\", \"f\", \"data_s['h']\"))\n", - "\n", - "slider_b.js_on_change('value', update_b)\n", - "\n", - "# logic for slider_h\n", - "update_h = CustomJS(args=dict(s_b=source_beam, s_s=source, div=div, section=section, support_r=support_r),\n", - " code=code_slider(\"h\", \"data_s['L']\", \"data_s['b']\", \"f\"))\n", - "\n", - "slider_h.js_on_change('value', update_h)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "layout1 = layout([\n", - " [fig_beam],\n", - " [fig_section, Spacer(width=20), column([Spacer(height=50), slider_L, slider_b, slider_h, Spacer(height=50), div])] \n", - "])\n", - "\n", - "show(layout1)" + "hidden_code_nb_geo.main_code(L, h, b, A, Iy, Iz)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "cienpy venv", "language": "python", - "name": "python3" + "name": "cienpy_venv" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_mohr.ipynb b/Simple Beam DEMOs/sb_mohr.ipynb index 2c37e1a..38281f1 100644 --- a/Simple Beam DEMOs/sb_mohr.ipynb +++ b/Simple Beam DEMOs/sb_mohr.ipynb @@ -1,1861 +1,502 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Mohr Circle\n", "In this first notebook, the Mohr circle is presented." ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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 bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource, output_file, save\n", - "from bokeh.io import output_notebook\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 models\n", - "from cienpy import javascriptcodes as js\n", - "from cienpy import mohrcircle\n", - "\n", - "# output_notebook()" + "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": 19, + "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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "yG = beam_section.compute_centroid_y(h)\n", "y_n_axis = stst.compute_neutral_axis(N, A, Iy, M, yG)\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", "Ry_r = sb.compute_Ry_r(q, L)\n", "\n", "# compute Mohr circle parameters\n", "initial_y = h\n", "initial_theta_element = 0\n", "sigma_axial = stst.compute_sigma_axial(initial_y, N, A)\n", "sigma_bending = stst.compute_sigma_bending(initial_y, M, Iy, yG)\n", "S = beam_section. compute_first_moment_of_area(initial_y, b, h, yG)\n", "sigma_tau = stst.compute_tau_shear(initial_y, V, S, Iy, b)\n", "sigma_x0 = stst.compute_total_sigma(sigma_axial, sigma_bending)\n", "sigma_y0 = 0 # no vertical axial forces\n", "tau_0 = stst.compute_total_tau(sigma_tau)\n", "sigma_average_mohr = mohrcircle.compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", "r_circle_mohr = mohrcircle.compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", "theta_principal = mohrcircle.compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", "initial_theta = mohrcircle.compute_theta_mohr(initial_theta_element, theta_principal)\n", "\n", "# stress state in function of theta\n", - "new_state = mohrcircle.compute_stress_state_mohr(sigma_average_mohr, r_circle_mohr, initial_theta)\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 2*b\n", - "MAX_H = 2*h\n", - "MAX_Q = q/4*5\n", - "MAX_STRESS = 60\n", - "MAX_STRESS_MOHR = 10\n", - "MAX_DIM_STRESS_STATE = MAX_STRESS*2.5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "data_section_scheme = dict(\n", - " x=[0, 0], \n", - " y=[0, h]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " E=[E],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " yG=[yG],\n", - " y_n_axis=[y_n_axis],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " y_var=[initial_y],\n", - " theta_element=[initial_theta_element], # rad\n", - " theta=[initial_theta], # rad\n", - " sigma_x0=[sigma_x0],\n", - " sigma_y0=[sigma_y0],\n", - " tau_0=[tau_0],\n", - " sigma_average=[sigma_average_mohr],\n", - " r_circle_mohr=[r_circle_mohr],\n", - " sigma_x=[new_state[0]],\n", - " sigma_y=[new_state[1]],\n", - " tau=[new_state[2]],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source_section_scheme = ColumnDataSource(data_section_scheme)\n", - "source = ColumnDataSource(data)\n", - "\n", - "# Constants\n", - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 600 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 500 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170\n", - "FIG_MOHR = 600\n", - "FIG_STRESS_STATE = 600" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Create the figures, the plots and the widgets (same of Notebook 3 - Diagrams):" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [], - "source": [ - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "\n", - "\n", - "######################## Start modifications\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-MAX_H*0.2, MAX_H*1.4)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "# modify beam \n", - "#TODO: add to cienpy\n", - "def draw_beam_2D(fig, L: float, h: float, b_supp=0.25, ratio = 1.0):\n", - " \"\"\"\n", - " Function that draws the simple beam in a figure.\n", - "\n", - " @param fig (bokeh.plotting.figure.Figure): Figure that will be the canvas for the plot.\n", - " @param src (bokeh.models.sources.ColumnDataSource): Source of the coordinates.\n", - " @param L (float): Length of the beam in m.\n", - " @param x (str): Key for the x values. Defaults to 'x'.\n", - " @param y (str): Key for the y values. Defaults to 'y'.\n", - " @param b_supp (float, optional): Size of the supports in x. Defaults to 0.3.\n", - " @param ratio (float, optional): Ratio of the figure (interval_y/height*100). Defaults to 1.0 (axis equal).\n", - " \n", - " @return tuple: Tuple with the renderers of the beam and supports.\n", - " \"\"\"\n", - " beam = fig.rect([L/2], [h/2], width=L, height=h, \n", - " fill_color='lightgray', color='black', line_width=1)\n", - " supp_opt = dict(\n", - " fill_color='white',\n", - " line_color='black'\n", - " )\n", - " support_l = models.define_pinned(fig, 0, 0, b_supp, ratio, supp_opt)\n", - " support_r = models.define_roller(fig, L, 0, b_supp, ratio, supp_opt)\n", - " \n", - " return (beam, support_l, support_r)\n", - "\n", - "(beam, support_l, support_r) = draw_beam_2D(fig_beam, L, h,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# uniform load (beam)\n", - "if q!=0:\n", - " fig_beam.rect([L/2], [(int_y_b[1]+MAX_H)/2], width=L, height=(0.99*(int_y_b[1]-MAX_H)),\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - " fig_beam.text(x=[-0.2], y=[MAX_H], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "####################### End modification\n", - "\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO, \n", - " text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(width=DIV_B_FORCES, \n", - " text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))\n", - "\n", - "\n", - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)\n", - "\n", - "\n", - "# figures for the stresses and strains\n", - "FIG_B_ss = 200\n", - "FIG_H_ss = 200\n", - "options_stress_strain = dict(\n", - " toolbar_location=None,\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_width=FIG_B_ss,\n", - " plot_height=FIG_H_ss\n", - ")\n", - "fig_stress_N = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2099 [MPa]\")\n", - "fig_stress_N.yaxis.visible = False\n", - "fig_axial_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2099 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_axial_strain.yaxis.visible = False\n", - "fig_stress_M = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending stress and centroid\",\n", - " y_range=fig_stress_N.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2098 [MPa]\")\n", - "fig_stress_M.yaxis.visible = False\n", - "fig_bending_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2098 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_bending_strain.yaxis.visible = False\n", - "fig_stress_V = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Shear stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\u1d65 [MPa]\")\n", - "fig_stress_V.yaxis.visible = False\n", - "fig_stress_sigma = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER SIGMA} and neutral axis\",\n", - " y_range=fig_stress_N.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\")\n", - "fig_stress_tau = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER TAU}\",\n", - " y_range=fig_stress_V.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\")\n", - "\n", - "# plot stress N V M\n", - "discr_stress_strain = 10\n", - "scale_x = 25\n", - "y_discr = np.linspace(0, h, discr_stress_strain)\n", - "sigma_N = stst.compute_sigma_axial(y_discr, 0, A)\n", - "N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h,\n", - " source_section_scheme, scale_x=scale_x/10)\n", - "sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG)\n", - "(M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h,\n", - " source_section_scheme, True, yG, scale_x=scale_x)\n", - "S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG)\n", - "tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b)\n", - "V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1)\n", - "\n", - "# plot stress sigma and tau\n", - "sigma_total = sigma_M + sigma_N\n", - "(sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h,\n", - " source_section_scheme,True, yG, scale_x=scale_x)\n", - "tau_total = tau_V\n", - "tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h,\n", - " source_section_scheme, scale_x=1)\n", - "\n", - "# plot strain N M\n", - "strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E)\n", - "axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme)\n", - "strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E)\n", - "bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme)\n", - "\n", - "\n", - "# figures for NVM\n", - "fig_NM_section = figure(**options_stress_strain,\n", - " title=\"N and M at position x\",\n", - " match_aspect=True)\n", - "fig_NM_section.axis.visible = False\n", - "fig_NM_section.grid.grid_line_alpha = 0\n", - "\n", - "fig_V_section = figure(**options_stress_strain,\n", - " title=\"V at position x\",\n", - " match_aspect=True)\n", - "fig_V_section.axis.visible = False\n", - "fig_V_section.grid.grid_line_alpha = 0\n", - "\n", - "# section with NVM\n", - "models.section_diagram(fig_NM_section)\n", - "models.section_diagram(fig_V_section)\n", - "\n", - "# NVM in section\n", - "section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red')\n", - "section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red')\n", - "(section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0)\n", - "\n", - "# NVM label in section\n", - "OFFSET_N = 1\n", - "label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[\"\"], text_color=\"red\", text_baseline='bottom')\n", - "label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[\"\"], text_color=\"red\", text_baseline='top')\n", - "label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[\"\"], text_color=\"red\", text_baseline='middle')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [], - "source": [ - "SCALE_TAU = 5\n", - "\n", - "# Modify the beam figure and plots (see in the previous code cell)\n", - "\n", - "\n", - "# Modifiy focus point to square in beam\n", - "beam_position = fig_beam.square('x', 'y_var', **pos_opt)\n", - "\n", - "\n", - "# choose height of interest\n", - "slider_y = Slider(\n", - " title=\"Change the height y along the section [mm]\",\n", - " start=0,\n", - " end=h,\n", - " step=1,\n", - " value=initial_y\n", - ")\n", - "\n", - "\n", - "# choose angle theta of interest\n", - "slider_theta_element = Slider(\n", - " title=\"Change the angle \\N{GREEK SMALL LETTER THETA} of the element [°]\",\n", - " start=0,\n", - " end=90,\n", - " step=0.5,\n", - " value=initial_theta_element\n", - ")\n", - "\n", - "\n", - "# figure Mohr circle\n", - "fig_Mohr_circle = figure(toolbar_location=None,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\",\n", - " y_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\",\n", - " plot_height=FIG_MOHR,\n", - " plot_width=FIG_MOHR,\n", - " match_aspect=True,\n", - " # x_range=[-MAX_STRESS_MOHR, MAX_STRESS_MOHR],\n", - " title=\"Mohr circle, x axis: stress \\N{GREEK SMALL LETTER SIGMA} [MPa], y axis: stress \\N{GREEK SMALL LETTER TAU} [MPa]\"\n", - ")\n", - "fig_Mohr_circle.axis.fixed_location = 0\n", - "\n", - "\n", - "# figure stress state element\n", - "fig_stress_state = figure(toolbar_location=None,\n", - " plot_height=FIG_STRESS_STATE,\n", - " plot_width=FIG_STRESS_STATE,\n", - " match_aspect=True,\n", - " title=\"Stress state\"\n", - ")\n", - "fig_stress_state.grid.grid_line_alpha = 0\n", - "fig_stress_state.axis.visible = False\n", - "fig_stress_state.min_border_left = 0\n", - "fig_stress_state.rect([MAX_DIM_STRESS_STATE*0.4], [MAX_DIM_STRESS_STATE*0.4],\n", - " width=MAX_DIM_STRESS_STATE*1.2,\n", - " height=MAX_DIM_STRESS_STATE*1.2,\n", - " alpha=0,\n", - " fill_alpha=0)\n", - "\n", - "\n", - "# stress state (theta 0)\n", - "fig_stress_state.rect([0], [0],\n", - " width=MAX_STRESS/2,\n", - " height=MAX_STRESS/2,\n", - " angle=0,\n", - " fill_alpha=0, color='black', line_width=2)\n", - "fig_stress_state.text([0], [0],\n", - " text=[\"Fixed \\nelement\"],\n", - " text_align=\"center\", text_baseline=\"middle\",\n", - " text_font_size=\"14px\")\n", - "\n", - "\n", - "# stress state variable\n", - "stress_state_theta = fig_stress_state.rect([MAX_STRESS*2], [0],\n", - " width=MAX_STRESS/2,\n", - " height=MAX_STRESS/2,\n", - " angle=initial_theta_element, \n", - " fill_alpha=0, color='black', line_width=2)\n", - "label_stress_state_theta = fig_stress_state.text([MAX_STRESS*2], [0],\n", - " text=[\"Rotating \\nelement\"],\n", - " text_align=\"center\", text_baseline=\"middle\",\n", - " text_font_size=\"14px\")\n", - "\n", - "# rotating axis\n", - "rotating_axis = fig_stress_state.line([0, MAX_DIM_STRESS_STATE], [0, 0],\n", - " line_dash=\"4 4\", line_color=\"black\", line_width=0.5)\n", - "\n", - "\n", - "# arc and label theta in stress state\n", - "arc_theta_element = fig_stress_state.arc(x=[0], y=[0],\n", - " radius=MAX_STRESS, start_angle=0, end_angle=0,\n", - " line_color=\"gray\", line_dash=\"2 5\")\n", - "label_theta_element = fig_stress_state.text([MAX_STRESS], [0],\n", - " text=[\"\"],\n", - " text_baseline=\"middle\", x_offset=5, text_font_size=\"14px\")\n", - "\n", - "# fixed axis\n", - "fig_stress_state.line([0, MAX_DIM_STRESS_STATE], [0, 0],\n", - " line_dash=\"4 4\", line_color=\"black\", line_width=0.5)\n", - "\n", - "\n", - "# stress state arrows\n", - "arrows_stress_state = models.set_arrows_stress_state(fig_stress_state, sigma_x0, sigma_y0, tau_0, MAX_STRESS/2,\n", - " SCALE_TAU)\n", - "\n", - "\n", - "# stress state theta arrows \n", - "arrows_stress_state_theta = models.set_arrows_stress_state(fig_stress_state, sigma_x0, sigma_y0, tau_0, MAX_STRESS/2,\n", - " SCALE_TAU, MAX_STRESS*2)\n", - "\n", - "# Mohr circle\n", - "Mohr_circle = fig_Mohr_circle.circle([sigma_average_mohr], [0],\n", - " radius=r_circle_mohr,\n", - " fill_alpha=0, color=\"gray\")\n", - "\n", - "\n", - "# arc and label theta in Mohr circle\n", - "arc_theta_Mohr = fig_Mohr_circle.arc(x=[sigma_average_mohr], y=[0],\n", - " radius=r_circle_mohr/2, start_angle=0, end_angle=0,\n", - " line_color=\"gray\", line_dash=\"2 5\")\n", - "label_theta_Mohr = fig_Mohr_circle.text([sigma_average_mohr+r_circle_mohr/2], [0],\n", - " text=[\"\"],\n", - " text_baseline=\"middle\", x_offset=5, text_font_size=\"14px\")\n", - "arc_theta_p_Mohr = fig_Mohr_circle.arc(x=[sigma_average_mohr], y=[0],\n", - " radius=r_circle_mohr/2, start_angle=0, end_angle=0,\n", - " line_color=\"gray\", line_dash=\"2 5\")\n", - "label_theta_p_Mohr = fig_Mohr_circle.text([sigma_average_mohr+r_circle_mohr/5*2], [0],\n", - " text=[\"\"],\n", - " text_baseline=\"middle\", x_offset=5, text_font_size=\"14px\")\n", - "\n", - "\n", - "# linking line and two points from current stress state\n", - "mohr_points_opt = dict(\n", - " size=5,\n", - " fill_alpha=0.5,\n", - " alpha=0.5\n", - ")\n", - "line_stress_state = fig_Mohr_circle.line([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " line_dash=\"4 4\", line_color=\"blue\", line_width=0.5)\n", - "points_stress_state = fig_Mohr_circle.circle([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " **mohr_points_opt, color=\"blue\", fill_color=\"blue\")\n", - "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})\"\n", - "# NB: no subscript of latin y, so use gamma (very similar in the display)\n", - "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})\"\n", - "label_points_stress_state = fig_Mohr_circle.text([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " text=[str_label_stress_state1, str_label_stress_state2],\n", - " color=\"blue\", x_offset=5, y_offset=18, text_font_size=\"14px\")\n", - "\n", - "\n", - "# linking line and two points from stress state in function of theta\n", - "line_stress_state_theta = fig_Mohr_circle.line([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " line_dash=\"4 4\", line_color=\"red\", line_width=0.5)\n", - "points_stress_state_theta = fig_Mohr_circle.circle([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " **mohr_points_opt, color=\"red\", fill_color=\"red\")\n", - "str_label_stress_state_theta1 = \"Rotating element \\n(\\N{GREEK SMALL LETTER SIGMA}\\N{LATIN SUBSCRIPT SMALL LETTER X}, \\N{GREEK SMALL LETTER TAU})\"\n", - "# NB: no subscript of latin y, so use gamma (very similar in the display)\n", - "str_label_stress_state_theta2 = \"Rotating element \\n(\\N{GREEK SMALL LETTER SIGMA}\\N{Greek Subscript Small Letter Gamma}, -\\N{GREEK SMALL LETTER TAU})\"\n", - "label_points_stress_state_theta = fig_Mohr_circle.text([sigma_x0, tau_0], [sigma_y0, -tau_0],\n", - " text=[str_label_stress_state_theta1, str_label_stress_state_theta2],\n", - " text_align=\"right\",\n", - " color=\"red\", x_offset=-5, y_offset=18, text_font_size=\"14px\")" + "new_state = mohrcircle.compute_stress_state_mohr(sigma_average_mohr, r_circle_mohr, initial_theta)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Configure the logics:" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [], - "source": [ - "update_circle_mohr = f\"\"\"\n", - "const y_var = db['y_var'][0]\n", - "const A = db['A'][0]\n", - "const b = db['b'][0]\n", - "const h = db['h'][0]\n", - "const yG = db['yG'][0]\n", - "const Iy = db['Iy'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// update data\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['tau_0'][0] = tau_0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "\"\"\"\n", - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " points_stress_state=points_stress_state,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " arrow_sigma_x1=arrows_stress_state[0], \n", - " arrow_sigma_x2=arrows_stress_state[1], \n", - " arrow_sigma_y1=arrows_stress_state[2], \n", - " arrow_sigma_y2=arrows_stress_state[3], \n", - " arrow_tau_x1=arrows_stress_state[4], \n", - " arrow_tau_x2=arrows_stress_state[5], \n", - " arrow_tau_y1=arrows_stress_state[6], \n", - " arrow_tau_y2=arrows_stress_state[7],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "const N = compute_N(db['P'][0])\n", - "const V = compute_V(pos, q, L)\n", - "const M = compute_M(pos, q, L)\n", - "\n", - "// update data\n", - "db['N'][0] = N\n", - "db['V'][0] = V\n", - "db['M'][0] = M\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "{update_circle_mohr}\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b = dict(source=source,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " arrow_sigma_x1=arrows_stress_state[0], \n", - " arrow_sigma_x2=arrows_stress_state[1], \n", - " arrow_sigma_y1=arrows_stress_state[2], \n", - " arrow_sigma_y2=arrows_stress_state[3], \n", - " arrow_tau_x1=arrows_stress_state[4], \n", - " arrow_tau_x2=arrows_stress_state[5], \n", - " arrow_tau_y1=arrows_stress_state[6], \n", - " arrow_tau_y2=arrows_stress_state[7],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "const V = db['V'][0]\n", - "const y_var = db['y_var'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['tau_0'][0] = tau_0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "// Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "// stress state\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b, code=code_change_b)\n", - "\n", - "\n", - "args_slider_h = dict(source=source,\n", - " s_ss=source_section_scheme,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " slider_y=slider_y,\n", - " beam=beam,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " arrow_sigma_x1=arrows_stress_state[0], \n", - " arrow_sigma_x2=arrows_stress_state[1], \n", - " arrow_sigma_y1=arrows_stress_state[2], \n", - " arrow_sigma_y2=arrows_stress_state[3], \n", - " arrow_tau_x1=arrows_stress_state[4], \n", - " arrow_tau_x2=arrows_stress_state[5], \n", - " arrow_tau_y1=arrows_stress_state[6], \n", - " arrow_tau_y2=arrows_stress_state[7],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_change_h = f\"\"\"\n", - "// solve sliders conflict\n", - "const db = source.data\n", - "const h = cb_obj.value // value of the slider\n", - "if (h < db['y_var'][0]) {{\n", - " db['y_var'][0] = h\n", - "}}\n", - "slider_y.end = h\n", - "if (h < slider_y.value) {{\n", - " slider_y.value = h\n", - "}}\n", - "\n", - "// retrieve data used\n", - "const data_ss = s_ss.data\n", - "const b = db['b'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const N = db['N'][0]\n", - "const V = db['V'][0]\n", - "const M = db['M'][0]\n", - "const yG = compute_centroid_y(h)\n", - "const y_var = db['y_var'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['yG'][0] = yG\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "beam.glyph.height = h // change the beam height\n", - "beam.glyph.y = h/2\n", - "data_ss['y'][1] = h // change the height of the section in the diagrams\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['tau_0'][0] = tau_0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "// Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "// stress state\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_ss.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " arrow_sigma_x1=arrows_stress_state[0],\n", - " arrow_sigma_x2=arrows_stress_state[1],\n", - " arrow_sigma_y1=arrows_stress_state[2],\n", - " arrow_sigma_y2=arrows_stress_state[3],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const P = {P}*(1-f)\n", - "const db = source.data\n", - "const N = compute_N(P)\n", - "const M = db['M'][0]\n", - "const A = db['A'][0]\n", - "const Iy = db['Iy'][0]\n", - "const yG = db['yG'][0]\n", - "const y_var = db['y_var'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = db['tau_0'][0]\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// apply the changes\n", - "db['P'][0] = P\n", - "db['N'][0] = N\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "// Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "// stress state\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " arrow_sigma_x1=arrows_stress_state[0], \n", - " arrow_sigma_x2=arrows_stress_state[1], \n", - " arrow_sigma_y1=arrows_stress_state[2], \n", - " arrow_sigma_y2=arrows_stress_state[3], \n", - " arrow_tau_x1=arrows_stress_state[4], \n", - " arrow_tau_x2=arrows_stress_state[5], \n", - " arrow_tau_y1=arrows_stress_state[6], \n", - " arrow_tau_y2=arrows_stress_state[7],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "const N = db['N'][0]\n", - "const V = compute_V(pos, q, L)\n", - "const M = compute_M(pos, q, L)\n", - "const y_var = db['y_var'][0]\n", - "const A = db['A'][0]\n", - "const b = db['b'][0]\n", - "const h = db['h'][0]\n", - "const yG = db['yG'][0]\n", - "const Iy = db['Iy'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// update data\n", - "db['q'][0] = q\n", - "db['V'][0] = V\n", - "db['M'][0] = M\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['tau_0'][0] = tau_0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "// Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "// stress state\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "args_slider_theta = dict(source=source,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " stress_state_theta=stress_state_theta,\n", - " label_stress_state_theta=label_stress_state_theta,\n", - " arc_theta_element=arc_theta_element,\n", - " label_theta_element= label_theta_element,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " rotating_axis=rotating_axis,\n", - " beam_position=beam_position,\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_slider_theta = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const theta_element = cb_obj.value/180*Math.PI\n", - "const sigma_x0 = db['sigma_x0'][0]\n", - "const sigma_y0 = db['sigma_y0'][0]\n", - "const tau_0 = db['tau_0'][0]\n", - "const sigma_average = db['sigma_average'][0]\n", - "const r_circle = db['r_circle_mohr'][0]\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// update data\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta_element'][0] = theta_element\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "// square point:\n", - "beam_position.glyph.angle = theta_element\n", - "// stress state element\n", - "update_stress_state_elements(db, stress_state_theta, rotating_axis, label_stress_state_theta, arc_theta_element, label_theta_element)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "// update Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{mohrcircle.implement_update_stress_state_elementsJS(MAX_STRESS, MAX_DIM_STRESS_STATE)}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_slider_theta = CustomJS(args=args_slider_theta, code=code_slider_theta)\n", - "\n", - "\n", - "args_slider_y = dict(source=source,\n", - " Mohr_circle=Mohr_circle,\n", - " line_stress_state=line_stress_state,\n", - " points_stress_state=points_stress_state,\n", - " line_stress_state_theta=line_stress_state_theta,\n", - " points_stress_state_theta=points_stress_state_theta,\n", - " label_points_stress_state=label_points_stress_state,\n", - " label_points_stress_state_theta=label_points_stress_state_theta,\n", - " arc_theta_Mohr=arc_theta_Mohr,\n", - " label_theta_Mohr=label_theta_Mohr,\n", - " arc_theta_p_Mohr=arc_theta_p_Mohr,\n", - " label_theta_p_Mohr=label_theta_p_Mohr,\n", - " beam_position=beam_position,\n", - " arrow_sigma_x1=arrows_stress_state[0], \n", - " arrow_sigma_x2=arrows_stress_state[1], \n", - " arrow_sigma_y1=arrows_stress_state[2], \n", - " arrow_sigma_y2=arrows_stress_state[3], \n", - " arrow_tau_x1=arrows_stress_state[4], \n", - " arrow_tau_x2=arrows_stress_state[5], \n", - " arrow_tau_y1=arrows_stress_state[6], \n", - " arrow_tau_y2=arrows_stress_state[7],\n", - " arrow_sigma_x1_theta=arrows_stress_state_theta[0], \n", - " arrow_sigma_x2_theta=arrows_stress_state_theta[1], \n", - " arrow_sigma_y1_theta=arrows_stress_state_theta[2], \n", - " arrow_sigma_y2_theta=arrows_stress_state_theta[3], \n", - " arrow_tau_x1_theta=arrows_stress_state_theta[4], \n", - " arrow_tau_x2_theta=arrows_stress_state_theta[5], \n", - " arrow_tau_y1_theta=arrows_stress_state_theta[6], \n", - " arrow_tau_y2_theta=arrows_stress_state_theta[7])\n", - "code_slider_y = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const y_var = cb_obj.value\n", - "const N = db['N'][0]\n", - "const V = db['V'][0]\n", - "const M = db['M'][0]\n", - "const A = db['A'][0]\n", - "const b = db['b'][0]\n", - "const h = db['h'][0]\n", - "const yG = db['yG'][0]\n", - "const Iy = db['Iy'][0]\n", - "const theta_element = db['theta_element'][0]\n", - "const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\n", - "const sigma_y0 = 0\n", - "const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\n", - "const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\n", - "const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\n", - "const theta = compute_theta_mohr(theta_element, theta_principal)\n", - "const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\n", - "\n", - "// update data\n", - "db['y_var'][0] = y_var\n", - "db['sigma_x0'][0] = sigma_x0\n", - "db['sigma_y0'][0] = sigma_y0\n", - "db['tau_0'][0] = tau_0\n", - "db['sigma_average'][0] = sigma_average\n", - "db['r_circle_mohr'][0] = r_circle\n", - "db['sigma_x'][0] = new_state[0]\n", - "db['sigma_y'][0] = new_state[1]\n", - "db['tau'][0] = new_state[2]\n", - "db['theta'][0] = theta\n", - "\n", - "// update\n", - "// square point:\n", - "beam_position.glyph.y = y_var\n", - "// update Mohr circle\n", - "update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\n", - "// stress state\n", - "update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\n", - "update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\n", - "update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\n", - "// stress state (theta)\n", - "update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\n", - "update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\n", - "update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{mohrcircle.implement_compute_radius_mohrJS()}\n", - "{mohrcircle.implement_compute_stress_state_mohrJS()}\n", - "{mohrcircle.implement_compute_sigma_average_mohrJS()}\n", - "{mohrcircle.implement_compute_principal_theta_mohrJS()}\n", - "{mohrcircle.implement_compute_theta_mohrJS()}\n", - "{mohrcircle.implement_update_circle_mohrJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{mohrcircle.implement_update_sigmax_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_sigmay_stateJS(MAX_STRESS/2)}\n", - "{mohrcircle.implement_update_tau_stateJS(MAX_STRESS/2, SCALE_TAU)}\n", - "{mohrcircle.implement_update_sigmax_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_sigmay_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2)}\n", - "{mohrcircle.implement_update_tau_state_thetaJS(MAX_STRESS/2, MAX_STRESS*2, SCALE_TAU)}\n", - "\"\"\"\n", - "update_slider_y = CustomJS(args=args_slider_y, code=code_slider_y)\n", - "\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)\n", - "slider_theta_element.js_on_change('value', update_slider_theta)\n", - "slider_y.js_on_change('value', update_slider_y)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme.\n", - "Note that the size of the tau arrows in the stress state elements is 5 times bigger (check the value of the constant SCALE_TAU to change it)." - ] - }, - { - "cell_type": "code", - "execution_count": 23, + "execution_count": 3, "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\n" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "name": "stdout", - "output_type": "stream", - "text": [ - "Opening in existing browser session.\n" - ] + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"4091ddde-7c54-4fd2-a6a6-4bb0c025871d\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"2161\"}]},\"id\":\"2162\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1328\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2299\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1379\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2200\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2388\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1667\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1326\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1381\",\"type\":\"Line\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"1345\",\"type\":\"HoverTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1669\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2201\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1331\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2389\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2310\"},\"group\":null,\"major_label_policy\":{\"id\":\"2311\"},\"ticker\":{\"id\":\"1331\"}},\"id\":\"1330\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1378\"}},\"id\":\"1383\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1666\"}},\"id\":\"1671\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1380\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1668\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1674\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1330\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1333\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1419\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1422\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2390\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1339\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1673\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2488\"},\"selection_policy\":{\"id\":\"2487\"}},\"id\":\"1850\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1397\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1692\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2307\"},\"group\":null,\"major_label_policy\":{\"id\":\"2308\"},\"ticker\":{\"id\":\"1335\"}},\"id\":\"1334\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1386\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2391\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"1334\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1337\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1391\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1709\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1711\"},\"nonselection_glyph\":{\"id\":\"1710\"},\"view\":{\"id\":\"1713\"}},\"id\":\"1712\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1385\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1335\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1675\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1387\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1681\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1391\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1393\"},\"nonselection_glyph\":{\"id\":\"1392\"},\"view\":{\"id\":\"1395\"}},\"id\":\"1394\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2331\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1677\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2242\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1389\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1343\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1338\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial stress\"},\"id\":\"1409\",\"type\":\"Title\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1679\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2243\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"1344\"}},\"id\":\"1340\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2332\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1392\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1341\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2480\"},\"selection_policy\":{\"id\":\"2479\"}},\"id\":\"1678\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1342\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1413\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1678\"},\"glyph\":{\"id\":\"1679\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1681\"},\"nonselection_glyph\":{\"id\":\"1680\"},\"view\":{\"id\":\"1683\"}},\"id\":\"1682\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1420\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"1678\"}},\"id\":\"1683\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2501\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1395\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1680\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2423\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2244\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1393\",\"type\":\"Circle\"},{\"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\":\"1344\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"1419\"}],\"center\":[{\"id\":\"1422\"},{\"id\":\"1426\"}],\"height\":200,\"left\":[{\"id\":\"1423\"}],\"renderers\":[{\"id\":\"1652\"},{\"id\":\"1658\"},{\"id\":\"1664\"}],\"title\":{\"id\":\"1409\"},\"toolbar\":{\"id\":\"1435\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1411\"},\"x_scale\":{\"id\":\"1415\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1417\"}},\"id\":\"1408\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2497\"},\"selection_policy\":{\"id\":\"2496\"}},\"id\":\"1696\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1699\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1354\"},\"glyph\":{\"id\":\"1355\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1357\"},\"nonselection_glyph\":{\"id\":\"1356\"},\"view\":{\"id\":\"1359\"}},\"id\":\"1358\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2202\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1398\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2245\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1691\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1411\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1695\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2424\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2203\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1401\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2483\"},\"selection_policy\":{\"id\":\"2482\"}},\"id\":\"1702\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1696\"},\"glyph\":{\"id\":\"1697\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1699\"},\"nonselection_glyph\":{\"id\":\"1698\"},\"view\":{\"id\":\"1701\"}},\"id\":\"1700\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2426\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1399\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1705\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2246\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1407\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1698\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1702\"},\"glyph\":{\"id\":\"1703\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1705\"},\"nonselection_glyph\":{\"id\":\"1704\"},\"view\":{\"id\":\"1707\"}},\"id\":\"1706\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2427\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1405\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1415\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2333\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2247\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1404\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2099 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2396\"},\"group\":null,\"major_label_policy\":{\"id\":\"2397\"},\"ticker\":{\"id\":\"1420\"}},\"id\":\"1419\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1434\",\"type\":\"HoverTool\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1703\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1696\"}},\"id\":\"1701\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2301\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2334\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1428\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1702\"}},\"id\":\"1707\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1710\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2393\"},\"group\":null,\"major_label_policy\":{\"id\":\"2394\"},\"ticker\":{\"id\":\"1424\"},\"visible\":false},\"id\":\"1423\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1704\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2248\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2302\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"1423\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1426\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1354\"}},\"id\":\"1359\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1727\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1729\"},\"nonselection_glyph\":{\"id\":\"1728\"},\"view\":{\"id\":\"1731\"}},\"id\":\"1730\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1424\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1709\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2249\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2304\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1785\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1432\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2204\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1427\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1711\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2305\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"1433\"}},\"id\":\"1429\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1717\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"1338\"},{\"id\":\"1339\"},{\"id\":\"1340\"},{\"id\":\"1341\"},{\"id\":\"1342\"},{\"id\":\"1343\"},{\"id\":\"1345\"}]},\"id\":\"1346\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2393\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2205\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2250\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1431\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1713\",\"type\":\"CDSView\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1715\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1852\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2394\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2485\"},\"selection_policy\":{\"id\":\"2484\"}},\"id\":\"1714\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2251\",\"type\":\"Selection\"},{\"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\":\"1433\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1714\"},\"glyph\":{\"id\":\"1715\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1717\"},\"nonselection_glyph\":{\"id\":\"1716\"},\"view\":{\"id\":\"1719\"}},\"id\":\"1718\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2396\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1714\"}},\"id\":\"1719\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1850\"}},\"id\":\"1855\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2206\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1716\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1728\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2252\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2397\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1721\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1357\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1720\"}},\"id\":\"1725\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1723\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1521\"}],\"center\":[{\"id\":\"1524\"},{\"id\":\"1528\"}],\"height\":200,\"left\":[{\"id\":\"1525\"}],\"renderers\":[{\"id\":\"1762\"},{\"id\":\"1768\"},{\"id\":\"1774\"}],\"title\":{\"id\":\"1512\"},\"toolbar\":{\"id\":\"1537\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1514\"},\"x_scale\":{\"id\":\"1517\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1519\"}},\"id\":\"1511\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2253\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1355\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"2370\"},\"selection_policy\":{\"id\":\"2369\"}},\"id\":\"1354\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1720\"},\"glyph\":{\"id\":\"1721\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1723\"},\"nonselection_glyph\":{\"id\":\"1722\"},\"view\":{\"id\":\"1725\"}},\"id\":\"1724\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2500\"},\"selection_policy\":{\"id\":\"2499\"}},\"id\":\"1720\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1403\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1405\"},\"nonselection_glyph\":{\"id\":\"1404\"},\"view\":{\"id\":\"1407\"}},\"id\":\"1406\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1722\",\"type\":\"Line\"},{\"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\":\"1501\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1397\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1399\"},\"nonselection_glyph\":{\"id\":\"1398\"},\"view\":{\"id\":\"1401\"}},\"id\":\"1400\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1745\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1747\"},\"nonselection_glyph\":{\"id\":\"1746\"},\"view\":{\"id\":\"1749\"}},\"id\":\"1748\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1356\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1727\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2207\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1362\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1787\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1363\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2461\"},\"selection_policy\":{\"id\":\"2460\"}},\"id\":\"1738\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2256\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1361\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1729\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1735\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2429\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1373\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1375\"},\"nonselection_glyph\":{\"id\":\"1374\"},\"view\":{\"id\":\"1377\"}},\"id\":\"1376\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1731\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2257\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1377\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1733\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1369\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1738\"}},\"id\":\"1743\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2430\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1365\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2502\"},\"selection_policy\":{\"id\":\"2501\"}},\"id\":\"1732\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1367\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2432\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1403\",\"type\":\"Circle\"},{\"attributes\":{\"tools\":[{\"id\":\"1427\"},{\"id\":\"1428\"},{\"id\":\"1429\"},{\"id\":\"1430\"},{\"id\":\"1431\"},{\"id\":\"1432\"},{\"id\":\"1434\"}]},\"id\":\"1435\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1732\"},\"glyph\":{\"id\":\"1733\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1735\"},\"nonselection_glyph\":{\"id\":\"1734\"},\"view\":{\"id\":\"1737\"}},\"id\":\"1736\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2258\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"2375\"},\"selection_policy\":{\"id\":\"2374\"}},\"id\":\"1366\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1741\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1734\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2433\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1366\"},\"glyph\":{\"id\":\"1367\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1369\"},\"nonselection_glyph\":{\"id\":\"1368\"},\"view\":{\"id\":\"1371\"}},\"id\":\"1370\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1738\"},\"glyph\":{\"id\":\"1739\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1741\"},\"nonselection_glyph\":{\"id\":\"1740\"},\"view\":{\"id\":\"1743\"}},\"id\":\"1742\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2336\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2259\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"2378\"},\"selection_policy\":{\"id\":\"2377\"}},\"id\":\"1378\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1732\"}},\"id\":\"1737\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1366\"}},\"id\":\"1371\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1368\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2337\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1739\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1378\"},\"glyph\":{\"id\":\"1379\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1381\"},\"nonselection_glyph\":{\"id\":\"1380\"},\"view\":{\"id\":\"1383\"}},\"id\":\"1382\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2307\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1781\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1385\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1387\"},\"nonselection_glyph\":{\"id\":\"1386\"},\"view\":{\"id\":\"1389\"}},\"id\":\"1388\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2208\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1783\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2260\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1374\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1446\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1375\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2308\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1449\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1453\"}],\"center\":[{\"id\":\"1456\"},{\"id\":\"1460\"}],\"height\":200,\"left\":[{\"id\":\"1457\"}],\"renderers\":[{\"id\":\"1742\"},{\"id\":\"1748\"},{\"id\":\"1754\"}],\"title\":{\"id\":\"1444\"},\"toolbar\":{\"id\":\"1469\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1446\"},\"x_scale\":{\"id\":\"1449\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1451\"}},\"id\":\"1443\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2209\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1373\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1740\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1745\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2263\"},\"selection_policy\":{\"id\":\"2262\"}},\"id\":\"2187\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2460\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2461\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1859\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2265\"},\"selection_policy\":{\"id\":\"2264\"}},\"id\":\"2188\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2444\"},\"selection_policy\":{\"id\":\"2443\"}},\"id\":\"2352\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2218\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2446\"},\"selection_policy\":{\"id\":\"2445\"}},\"id\":\"2353\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2267\"},\"selection_policy\":{\"id\":\"2266\"}},\"id\":\"2189\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2219\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2443\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2269\"},\"selection_policy\":{\"id\":\"2268\"}},\"id\":\"2190\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1697\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2444\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2462\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2271\"},\"selection_policy\":{\"id\":\"2270\"}},\"id\":\"2191\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2445\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2463\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2273\"},\"selection_policy\":{\"id\":\"2272\"}},\"id\":\"2192\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2446\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1866\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2502\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2220\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2374\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2221\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1870\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1823\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2375\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2464\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1869\"},\"glyph\":{\"id\":\"1870\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1872\"},\"nonselection_glyph\":{\"id\":\"1871\"},\"view\":{\"id\":\"1874\"}},\"id\":\"1873\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2465\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1693\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2354\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1564\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2355\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2482\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"2196\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2356\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2357\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"2198\",\"type\":\"Title\"},{\"attributes\":{\"overlay\":{\"id\":\"1570\"}},\"id\":\"1566\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2223\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2224\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2467\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2468\",\"type\":\"Selection\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2095\",\"type\":\"Text\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1756\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1746\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2093\"}},\"id\":\"2098\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1761\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2211\"},\"selection_policy\":{\"id\":\"2210\"}},\"id\":\"2099\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1747\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2096\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2323\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1753\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2093\"},\"glyph\":{\"id\":\"2094\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2096\"},\"nonselection_glyph\":{\"id\":\"2095\"},\"view\":{\"id\":\"2098\"}},\"id\":\"2097\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1749\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2100\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2324\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1751\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2101\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2465\"},\"selection_policy\":{\"id\":\"2464\"}},\"id\":\"1750\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"blue\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2106\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1567\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1750\"},\"glyph\":{\"id\":\"1751\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1753\"},\"nonselection_glyph\":{\"id\":\"1752\"},\"view\":{\"id\":\"1755\"}},\"id\":\"1754\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"2105\"}},\"id\":\"2110\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1759\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"blue\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2108\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1752\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2102\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1758\"},\"glyph\":{\"id\":\"1759\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1761\"},\"nonselection_glyph\":{\"id\":\"1760\"},\"view\":{\"id\":\"1763\"}},\"id\":\"1762\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2099\"},\"glyph\":{\"id\":\"2100\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2102\"},\"nonselection_glyph\":{\"id\":\"2101\"},\"view\":{\"id\":\"2104\"}},\"id\":\"2103\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1750\"}},\"id\":\"1755\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"2099\"}},\"id\":\"2104\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1766\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"blue\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2107\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2473\"},\"selection_policy\":{\"id\":\"2472\"}},\"id\":\"1758\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2213\"},\"selection_policy\":{\"id\":\"2212\"}},\"id\":\"2105\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1793\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1796\",\"type\":\"Grid\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2113\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1758\"}},\"id\":\"1763\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1760\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2105\"},\"glyph\":{\"id\":\"2106\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2108\"},\"nonselection_glyph\":{\"id\":\"2107\"},\"view\":{\"id\":\"2110\"}},\"id\":\"2109\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1776\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"data\":{\"text\":[\"Fixed element \\n(\\u03c3\\u2093\\u2080, \\u03c4\\u2080)\",\"Fixed element \\n(\\u03c3\\u1d67\\u2080, -\\u03c4\\u2080)\"],\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2215\"},\"selection_policy\":{\"id\":\"2214\"}},\"id\":\"2111\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1765\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1595\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2112\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2217\"},\"selection_policy\":{\"id\":\"2216\"}},\"id\":\"2117\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1790\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_color\":\"red\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2118\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1789\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1792\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2325\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2119\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1767\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2326\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1773\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2114\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1769\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2111\"},\"glyph\":{\"id\":\"2112\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2114\"},\"nonselection_glyph\":{\"id\":\"2113\"},\"view\":{\"id\":\"2116\"}},\"id\":\"2115\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1771\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2111\"}},\"id\":\"2116\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1798\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"data\":{\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2219\"},\"selection_policy\":{\"id\":\"2218\"}},\"id\":\"2123\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2475\"},\"selection_policy\":{\"id\":\"2474\"}},\"id\":\"1770\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"2123\"}},\"id\":\"2128\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2381\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2124\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1770\"},\"glyph\":{\"id\":\"1771\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1773\"},\"nonselection_glyph\":{\"id\":\"1772\"},\"view\":{\"id\":\"1775\"}},\"id\":\"1774\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2120\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1655\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2117\"},\"glyph\":{\"id\":\"2118\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2120\"},\"nonselection_glyph\":{\"id\":\"2119\"},\"view\":{\"id\":\"2122\"}},\"id\":\"2121\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2382\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1772\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2117\"}},\"id\":\"2122\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2384\"},\"group\":null,\"major_label_policy\":{\"id\":\"2385\"},\"ticker\":{\"id\":\"1790\"},\"visible\":false},\"id\":\"1789\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1568\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2126\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1770\"}},\"id\":\"1775\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":5},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2125\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2384\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_color\":{\"value\":\"red\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2130\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N and M at position x\"},\"id\":\"1779\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2129\"},\"glyph\":{\"id\":\"2130\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2132\"},\"nonselection_glyph\":{\"id\":\"2131\"},\"view\":{\"id\":\"2134\"}},\"id\":\"2133\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2381\"},\"group\":null,\"major_label_policy\":{\"id\":\"2382\"},\"ticker\":{\"id\":\"1794\"},\"visible\":false},\"id\":\"1793\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"text\":[\"Rotating element \\n(\\u03c3\\u2093, \\u03c4)\",\"Rotating element \\n(\\u03c3\\u1d67, -\\u03c4)\"],\"x\":[-0.5,0.0],\"y\":[0,-0.0]},\"selected\":{\"id\":\"2221\"},\"selection_policy\":{\"id\":\"2220\"}},\"id\":\"2129\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"below\":[{\"id\":\"1822\"}],\"center\":[{\"id\":\"1825\"},{\"id\":\"1829\"},{\"id\":\"1860\"}],\"height\":200,\"left\":[{\"id\":\"1826\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1854\"},{\"id\":\"1891\"}],\"title\":{\"id\":\"1812\"},\"toolbar\":{\"id\":\"1837\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1814\"},\"x_scale\":{\"id\":\"1818\"},\"y_range\":{\"id\":\"1816\"},\"y_scale\":{\"id\":\"1820\"}},\"id\":\"1811\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2385\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2123\"},\"glyph\":{\"id\":\"2124\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2126\"},\"nonselection_glyph\":{\"id\":\"2125\"},\"view\":{\"id\":\"2128\"}},\"id\":\"2127\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2327\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1794\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2131\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"2129\"}},\"id\":\"2134\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2328\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1802\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1797\",\"type\":\"PanTool\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"Mohr_circle\":{\"id\":\"2073\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arr_head\":{\"id\":\"1247\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1\":{\"id\":\"2034\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2\":{\"id\":\"2037\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1\":{\"id\":\"2040\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2\":{\"id\":\"2043\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"neutral_axis\":{\"id\":\"1718\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n const N = compute_N(db['P'][0])\\n const V = compute_V(pos, q, L)\\n const M = compute_M(pos, q, L)\\n\\n // update data\\n db['N'][0] = N\\n db['V'][0] = V\\n db['M'][0] = M\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n \\n const y_var = db['y_var'][0]\\n const A = db['A'][0]\\n const b = db['b'][0]\\n const h = db['h'][0]\\n const yG = db['yG'][0]\\n const Iy = db['Iy'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // update data\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['tau_0'][0] = tau_0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n \\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_tau_state(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const tau_0 = data['tau_0'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1, tau_0, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, -tau_0/2, tau_0/2, AHF)\\n update_arrow(arrow_tau_x2, tau_0, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), tau_0/2, -tau_0/2, AHF)\\n update_arrow(arrow_tau_y1, tau_0, -tau_0/2, tau_0/2, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, AHF)\\n update_arrow(arrow_tau_y2, tau_0, tau_0/2, -tau_0/2, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), AHF)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2135\",\"type\":\"CustomJS\"},{\"attributes\":{\"overlay\":{\"id\":\"1803\"}},\"id\":\"1799\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-5},\"y\":{\"field\":\"y\"},\"y_offset\":{\"value\":18}},\"id\":\"2132\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1801\",\"type\":\"ResetTool\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"Mohr_circle\":{\"id\":\"2073\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1\":{\"id\":\"2034\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2\":{\"id\":\"2037\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1\":{\"id\":\"2040\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2\":{\"id\":\"2043\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div\":{\"id\":\"1119\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"neutral_axis\":{\"id\":\"1718\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"section\":{\"id\":\"1117\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1057\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n const V = db['V'][0]\\n const y_var = db['y_var'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['tau_0'][0] = tau_0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n // Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n // stress state\\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_tau_state(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const tau_0 = data['tau_0'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1, tau_0, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, -tau_0/2, tau_0/2, AHF)\\n update_arrow(arrow_tau_x2, tau_0, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), tau_0/2, -tau_0/2, AHF)\\n update_arrow(arrow_tau_y1, tau_0, -tau_0/2, tau_0/2, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, AHF)\\n update_arrow(arrow_tau_y2, tau_0, tau_0/2, -tau_0/2, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), AHF)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2136\",\"type\":\"CustomJS\"},{\"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\":\"1803\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2459\"},\"selection_policy\":{\"id\":\"2458\"}},\"id\":\"2386\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1670\"},\"Mohr_circle\":{\"id\":\"2073\"},\"N_stress_diag\":{\"id\":\"1652\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1\":{\"id\":\"2034\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2\":{\"id\":\"2037\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1\":{\"id\":\"2040\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2\":{\"id\":\"2043\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"beam\":{\"id\":\"1045\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div\":{\"id\":\"1119\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"neutral_axis\":{\"id\":\"1718\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"s_ss\":{\"id\":\"1006\"},\"section\":{\"id\":\"1117\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"slider_y\":{\"id\":\"1899\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1057\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // solve sliders conflict\\n const db = source.data\\n const h = cb_obj.value // value of the slider\\n if (h < db['y_var'][0]) {\\n db['y_var'][0] = h\\n }\\n slider_y.end = h\\n if (h < slider_y.value) {\\n slider_y.value = h\\n }\\n\\n // retrieve data used\\n const data_ss = s_ss.data\\n const b = db['b'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const N = db['N'][0]\\n const V = db['V'][0]\\n const M = db['M'][0]\\n const yG = compute_centroid_y(h)\\n const y_var = db['y_var'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['yG'][0] = yG\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n beam.glyph.height = h // change the beam height\\n beam.glyph.y = h/2\\n data_ss['y'][1] = h // change the height of the section in the diagrams\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['tau_0'][0] = tau_0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n // Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n // stress state\\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // emit the changes\\n source.change.emit()\\n s_ss.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_tau_state(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const tau_0 = data['tau_0'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1, tau_0, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, -tau_0/2, tau_0/2, AHF)\\n update_arrow(arrow_tau_x2, tau_0, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), tau_0/2, -tau_0/2, AHF)\\n update_arrow(arrow_tau_y1, tau_0, -tau_0/2, tau_0/2, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, AHF)\\n update_arrow(arrow_tau_y2, tau_0, tau_0/2, -tau_0/2, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), AHF)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2137\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"Mohr_circle\":{\"id\":\"2073\"},\"N_diag\":{\"id\":\"1358\"},\"N_stress_diag\":{\"id\":\"1652\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arr_head\":{\"id\":\"1247\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"axial_strain_diag\":{\"id\":\"1742\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"neutral_axis\":{\"id\":\"1718\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"s_M\":{\"id\":\"1236\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const P = 10*(1-f)\\n const db = source.data\\n const N = compute_N(P)\\n const M = db['M'][0]\\n const A = db['A'][0]\\n const Iy = db['Iy'][0]\\n const yG = db['yG'][0]\\n const y_var = db['y_var'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = db['tau_0'][0]\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // apply the changes\\n db['P'][0] = P\\n db['N'][0] = N\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n // Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n // stress state\\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2138\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1247\"},\"div_P\":{\"id\":\"1253\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"2139\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2329\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1882\",\"type\":\"Text\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"1382\"},\"M_stress_diag\":{\"id\":\"1670\"},\"Mohr_circle\":{\"id\":\"2073\"},\"V_diag\":{\"id\":\"1370\"},\"V_stress_diag\":{\"id\":\"1688\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arr_head\":{\"id\":\"1247\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1\":{\"id\":\"2034\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2\":{\"id\":\"2037\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1\":{\"id\":\"2040\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2\":{\"id\":\"2043\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"bending_strain_diag\":{\"id\":\"1762\"},\"centroid\":{\"id\":\"1682\"},\"div_P\":{\"id\":\"1253\"},\"div_f\":{\"id\":\"1255\"},\"fN\":{\"id\":\"1231\"},\"fP\":{\"id\":\"1219\"},\"fRx\":{\"id\":\"1228\"},\"fRyl\":{\"id\":\"1225\"},\"fRyr\":{\"id\":\"1222\"},\"fV\":{\"id\":\"1234\"},\"label_M_section\":{\"id\":\"1885\"},\"label_N_section\":{\"id\":\"1879\"},\"label_V_section\":{\"id\":\"1891\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"neutral_axis\":{\"id\":\"1718\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"s_M\":{\"id\":\"1236\"},\"s_q\":{\"id\":\"1005\"},\"s_section_M\":{\"id\":\"1862\"},\"section_M_head\":{\"id\":\"1873\"},\"section_N\":{\"id\":\"1857\"},\"section_V\":{\"id\":\"1860\"},\"sigma_stress_diag\":{\"id\":\"1706\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1724\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n const N = db['N'][0]\\n const V = compute_V(pos, q, L)\\n const M = compute_M(pos, q, L)\\n const y_var = db['y_var'][0]\\n const A = db['A'][0]\\n const b = db['b'][0]\\n const h = db['h'][0]\\n const yG = db['yG'][0]\\n const Iy = db['Iy'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // update data\\n db['q'][0] = q\\n db['V'][0] = V\\n db['M'][0] = M\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['tau_0'][0] = tau_0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n // Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n // stress state\\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_tau_state(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const tau_0 = data['tau_0'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1, tau_0, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, -tau_0/2, tau_0/2, AHF)\\n update_arrow(arrow_tau_x2, tau_0, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), tau_0/2, -tau_0/2, AHF)\\n update_arrow(arrow_tau_y1, tau_0, -tau_0/2, tau_0/2, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, AHF)\\n update_arrow(arrow_tau_y2, tau_0, tau_0/2, -tau_0/2, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), AHF)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2140\",\"type\":\"CustomJS\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1875\"},\"glyph\":{\"id\":\"1876\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1878\"},\"nonselection_glyph\":{\"id\":\"1877\"},\"view\":{\"id\":\"1880\"}},\"id\":\"1879\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2330\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"Mohr_circle\":{\"id\":\"2073\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_element\":{\"id\":\"2007\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"beam_position\":{\"id\":\"1897\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_stress_state_theta\":{\"id\":\"1995\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_element\":{\"id\":\"2013\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"rotating_axis\":{\"id\":\"2001\"},\"source\":{\"id\":\"1007\"},\"stress_state_theta\":{\"id\":\"1989\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const theta_element = cb_obj.value/180*Math.PI\\n const sigma_x0 = db['sigma_x0'][0]\\n const sigma_y0 = db['sigma_y0'][0]\\n const tau_0 = db['tau_0'][0]\\n const sigma_average = db['sigma_average'][0]\\n const r_circle = db['r_circle_mohr'][0]\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // update data\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta_element'][0] = theta_element\\n db['theta'][0] = theta\\n\\n // update\\n // square point:\\n beam_position.glyph.angle = theta_element\\n // stress state element\\n update_stress_state_elements(db, stress_state_theta, rotating_axis, label_stress_state_theta, arc_theta_element, label_theta_element)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n // update Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_stress_state_elements(data, glyph_stress_state_theta, glyph_axis, glyph_label_element_theta, glyph_arc_theta, glyph_label_theta, max_stress=60, max_dim=150.0) {\\n // set variables\\n const theta_element = data['theta_element'][0]\\n const x_new = max_stress*Math.cos(theta_element)\\n const y_new = max_stress*Math.sin(theta_element)\\n \\n \\n // update rotating axis\\n const src_axis = glyph_axis.data_source\\n src_axis.data.x = [0, x_new*max_dim/max_stress]\\n src_axis.data.y = [0, y_new*max_dim/max_stress]\\n src_axis.change.emit()\\n \\n // update stress state theta\\n glyph_stress_state_theta.glyph.angle = theta_element\\n glyph_stress_state_theta.glyph.x = x_new*2\\n glyph_stress_state_theta.glyph.y = y_new*2\\n \\n // label element\\n const src_label_element = glyph_label_element_theta.data_source\\n src_label_element.data.x = [x_new*2]\\n src_label_element.data.y = [y_new*2]\\n src_label_element.change.emit()\\n \\n // arc theta (stress state)\\n glyph_arc_theta.glyph.end_angle = theta_element\\n \\n // label theta (stress state)\\n if (theta_element==0) {\\n glyph_label_theta.glyph.text = \\\"\\\"\\n } else {\\n glyph_label_theta.glyph.text = \\\"\\u03b8\\\"\\n const src_label_theta = glyph_label_theta.data_source\\n src_label_theta.data.x = [max_stress*Math.cos(theta_element/2)]\\n src_label_theta.data.y = [max_stress*Math.sin(theta_element/2)]\\n src_label_theta.change.emit()\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2141\",\"type\":\"CustomJS\"},{\"attributes\":{\"source\":{\"id\":\"1875\"}},\"id\":\"1880\",\"type\":\"CDSView\"},{\"attributes\":{\"args\":{\"Mohr_circle\":{\"id\":\"2073\"},\"arc_theta_Mohr\":{\"id\":\"2079\"},\"arc_theta_p_Mohr\":{\"id\":\"2091\"},\"arrow_sigma_x1\":{\"id\":\"2022\"},\"arrow_sigma_x1_theta\":{\"id\":\"2046\"},\"arrow_sigma_x2\":{\"id\":\"2025\"},\"arrow_sigma_x2_theta\":{\"id\":\"2049\"},\"arrow_sigma_y1\":{\"id\":\"2028\"},\"arrow_sigma_y1_theta\":{\"id\":\"2052\"},\"arrow_sigma_y2\":{\"id\":\"2031\"},\"arrow_sigma_y2_theta\":{\"id\":\"2055\"},\"arrow_tau_x1\":{\"id\":\"2034\"},\"arrow_tau_x1_theta\":{\"id\":\"2058\"},\"arrow_tau_x2\":{\"id\":\"2037\"},\"arrow_tau_x2_theta\":{\"id\":\"2061\"},\"arrow_tau_y1\":{\"id\":\"2040\"},\"arrow_tau_y1_theta\":{\"id\":\"2064\"},\"arrow_tau_y2\":{\"id\":\"2043\"},\"arrow_tau_y2_theta\":{\"id\":\"2067\"},\"beam_position\":{\"id\":\"1897\"},\"label_points_stress_state\":{\"id\":\"2115\"},\"label_points_stress_state_theta\":{\"id\":\"2133\"},\"label_theta_Mohr\":{\"id\":\"2085\"},\"label_theta_p_Mohr\":{\"id\":\"2097\"},\"line_stress_state\":{\"id\":\"2103\"},\"line_stress_state_theta\":{\"id\":\"2121\"},\"points_stress_state\":{\"id\":\"2109\"},\"points_stress_state_theta\":{\"id\":\"2127\"},\"source\":{\"id\":\"1007\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const y_var = cb_obj.value\\n const N = db['N'][0]\\n const V = db['V'][0]\\n const M = db['M'][0]\\n const A = db['A'][0]\\n const b = db['b'][0]\\n const h = db['h'][0]\\n const yG = db['yG'][0]\\n const Iy = db['Iy'][0]\\n const theta_element = db['theta_element'][0]\\n const sigma_x0 = compute_total_sigma(compute_sigma_axial(N, A), compute_sigma_bending(y_var, M, Iy, yG))\\n const sigma_y0 = 0\\n const tau_0 = compute_total_tau(compute_tau_shear(V, compute_first_moment_of_area(y_var, b, h, yG), Iy, b))\\n const sigma_average = compute_sigma_average_mohr(sigma_x0, sigma_y0)\\n const r_circle = compute_radius_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta_principal = compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0)\\n const theta = compute_theta_mohr(theta_element, theta_principal)\\n const new_state = compute_stress_state_mohr(sigma_average, r_circle, theta)\\n\\n // update data\\n db['y_var'][0] = y_var\\n db['sigma_x0'][0] = sigma_x0\\n db['sigma_y0'][0] = sigma_y0\\n db['tau_0'][0] = tau_0\\n db['sigma_average'][0] = sigma_average\\n db['r_circle_mohr'][0] = r_circle\\n db['sigma_x'][0] = new_state[0]\\n db['sigma_y'][0] = new_state[1]\\n db['tau'][0] = new_state[2]\\n db['theta'][0] = theta\\n\\n // update\\n // square point:\\n beam_position.glyph.y = y_var\\n // update Mohr circle\\n update_circle_mohr(db, Mohr_circle, line_stress_state, points_stress_state, label_points_stress_state, line_stress_state_theta, points_stress_state_theta, label_points_stress_state_theta, arc_theta_Mohr, label_theta_Mohr, arc_theta_p_Mohr, label_theta_p_Mohr)\\n // stress state\\n update_sigmax_state(db, arrow_sigma_x1, arrow_sigma_x2)\\n update_sigmay_state(db, arrow_sigma_y1, arrow_sigma_y2)\\n update_tau_state(db, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2)\\n // stress state (theta)\\n update_sigmax_state_theta(db, arrow_sigma_x1_theta, arrow_sigma_x2_theta)\\n update_sigmay_state_theta(db, arrow_sigma_y1_theta, arrow_sigma_y2_theta)\\n update_tau_state_theta(db, arrow_tau_x1_theta,arrow_tau_x2_theta, arrow_tau_y1_theta, arrow_tau_y2_theta)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_radius_mohr(sigma_x0, sigma_y0, tau_0) {\\n return Math.sqrt(tau_0**2 + (sigma_x0-sigma_y0)**2/4)\\n }\\n \\n \\n function compute_stress_state_mohr(sigma_average, r_circle, theta) {\\n if (sigma_average > 0) {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var tau = -r_circle*Math.sin(2*theta)\\n } else {\\n var sigma_x = sigma_average + r_circle*Math.cos(2*theta-Math.PI)\\n var sigma_y = sigma_average + r_circle*Math.cos(2*theta)\\n var tau = r_circle*Math.sin(2*theta)\\n }\\n return [sigma_x, sigma_y, tau]\\n }\\n \\n \\n function compute_sigma_average_mohr(sigma_x0, sigma_y0) {\\n return (sigma_x0+sigma_y0)/2\\n }\\n \\n \\n function compute_principal_theta_mohr(sigma_x0, sigma_y0, tau_0) {\\n if ((sigma_x0-sigma_y0)==0) {\\n if (tau_0>0) {\\n return Math.PI/2\\n } else {\\n return -Math.PI/2\\n }\\n } else {\\n return Math.atan(2*tau_0/(sigma_y0-sigma_x0))/2\\n }\\n }\\n \\n \\n function compute_theta_mohr(theta_element, theta_principal) {\\n return theta_element+theta_principal\\n }\\n \\n \\n function update_circle_mohr(data, glyph_circle, glyph_line, glyph_points, glyph_label, glyph_line_theta, glyph_points_theta, glyph_label_theta, glyph_arc, glyph_theta_text, glyph_arc_p, glyph_theta_p_text) {\\n // set variables\\n const sigma_average = data['sigma_average'][0]\\n const r_circle = data['r_circle_mohr'][0]\\n const sigma_x0 = data['sigma_x0'][0]\\n const sigma_y0 = data['sigma_y0'][0]\\n const tau_0 = data['tau_0'][0]\\n const sigma_x = data['sigma_x'][0]\\n const sigma_y = data['sigma_y'][0]\\n const tau = data['tau'][0]\\n const theta_element = data['theta_element'][0]\\n const theta = data['theta'][0]\\n \\n // update circle\\n glyph_circle.glyph.x = sigma_average\\n glyph_circle.glyph.radius = r_circle\\n \\n // update points\\n const src_points = glyph_points.data_source\\n src_points.data.x = [sigma_x0, sigma_y0]\\n src_points.data.y = [tau_0, -tau_0]\\n src_points.change.emit()\\n \\n // update lines\\n const src_line = glyph_line.data_source\\n src_line.data.x = [sigma_x0, sigma_y0]\\n src_line.data.y = [tau_0, -tau_0]\\n src_line.change.emit()\\n \\n // update labels\\n const src_labels = glyph_label.data_source\\n src_labels.data.x = [sigma_x0, sigma_y0]\\n src_labels.data.y = [tau_0, -tau_0]\\n src_labels.change.emit()\\n \\n // update points theta\\n const src_points_theta = glyph_points_theta.data_source\\n src_points_theta.data.x = [sigma_x, sigma_y]\\n src_points_theta.data.y = [tau, -tau]\\n src_points_theta.change.emit()\\n \\n // update lines theta\\n const src_line_theta = glyph_line_theta.data_source\\n src_line_theta.data.x = [sigma_x, sigma_y]\\n src_line_theta.data.y = [tau, -tau]\\n src_line_theta.change.emit()\\n \\n // update labels theta\\n const src_labels_theta = glyph_label_theta.data_source\\n src_labels_theta.data.x = [sigma_x, sigma_y]\\n src_labels_theta.data.y = [tau, -tau]\\n src_labels_theta.change.emit()\\n \\n // arc theta (Mohr)\\n const theta_p = theta-theta_element\\n glyph_arc.glyph.start_angle = -2*theta\\n glyph_arc.glyph.end_angle = -2*theta_p\\n glyph_arc.glyph.x = sigma_average\\n glyph_arc.glyph.radius = r_circle/2\\n \\n // label theta (Mohr)\\n if (theta_element==0) {\\n glyph_theta_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_text.glyph.text = \\\"2\\u03b8\\\"\\n const src_label_theta = glyph_theta_text.data_source\\n src_label_theta.data.x = [sigma_average + r_circle*Math.cos(theta+theta_p)/2]\\n src_label_theta.data.y = [r_circle*Math.sin(-theta-theta_p)/2]\\n src_label_theta.change.emit()\\n }\\n debugger\\n // arc principal theta (Mohr)\\n if (theta_p < 0) {\\n var theta_p_tmp = Math.PI/2+theta_p\\n } else {\\n var theta_p_tmp = theta_p\\n }\\n glyph_arc_p.glyph.x = sigma_average\\n glyph_arc_p.glyph.radius = r_circle/5*2\\n glyph_arc_p.glyph.start_angle = -2*theta_p_tmp\\n \\n // label principal theta (Mohr)\\n if (theta_p==0) {\\n glyph_theta_p_text.glyph.text = \\\"\\\"\\n } else {\\n glyph_theta_p_text.glyph.text = \\\"2\\u03b8\\u209a\\\"\\n const src_label_theta_p = glyph_theta_p_text.data_source\\n src_label_theta_p.data.x = [sigma_average + r_circle*Math.cos(theta_p_tmp)/5*2]\\n src_label_theta_p.data.y = [r_circle*Math.sin(-theta_p_tmp)/5*2]\\n src_label_theta_p.change.emit()\\n }\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_sigmax_state(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_x0 = data['sigma_x0'][0]\\n const AHF = 4\\n \\n if (sigma_x0 > 0) {\\n update_arrow(arrow_sigma_x1, sigma_x0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_x0, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, sigma_x0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_x0), 0, 0, AHF)\\n } else {\\n update_arrow(arrow_sigma_x1, -sigma_x0, width_element/2+offset_arrows-sigma_x0, width_element/2+offset_arrows, 0, 0, AHF)\\n update_arrow(arrow_sigma_x2, -sigma_x0, -(width_element/2+offset_arrows-sigma_x0), -(width_element/2+offset_arrows), 0, 0, AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0) {\\n const offset_arrows = width_element/3\\n const sigma_y0 = data['sigma_y0'][0]\\n const AHF = 4\\n \\n if (sigma_y0 > 0) {\\n update_arrow(arrow_sigma_y1, sigma_y0, 0, 0, width_element/2+offset_arrows, width_element/2+offset_arrows+sigma_y0, AHF)\\n update_arrow(arrow_sigma_y2, sigma_y0, 0, 0, -(width_element/2+offset_arrows), -(width_element/2+offset_arrows+sigma_y0), AHF)\\n } else {\\n update_arrow(arrow_sigma_y1, -sigma_y0, 0, 0, width_element/2+offset_arrows-sigma_y0, width_element/2+offset_arrows, AHF)\\n update_arrow(arrow_sigma_y2, -sigma_y0, 0, 0, -(width_element/2+offset_arrows-sigma_y0), -(width_element/2+offset_arrows), AHF)\\n }\\n }\\n \\n \\n function update_tau_state(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const tau_0 = data['tau_0'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1, tau_0, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, -tau_0/2, tau_0/2, AHF)\\n update_arrow(arrow_tau_x2, tau_0, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), tau_0/2, -tau_0/2, AHF)\\n update_arrow(arrow_tau_y1, tau_0, -tau_0/2, tau_0/2, width_element/2+offset_arrows/2, width_element/2+offset_arrows/2, AHF)\\n update_arrow(arrow_tau_y2, tau_0, tau_0/2, -tau_0/2, -(width_element/2+offset_arrows/2), -(width_element/2+offset_arrows/2), AHF)\\n }\\n \\n \\n function update_sigmax_state_theta(data, arrow_sigma_x1, arrow_sigma_x2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n var sigma_x = data['sigma_x'][0]\\n const theta = data['theta_element'][0]\\n const AHF = 4\\n \\n if (sigma_x < 0) {\\n var sigma_x = -sigma_x\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_x1,\\n sigma_x,\\n (offset_sigma+center_x)*Math.cos(theta),\\n (offset_sigma+center_x+sigma_x)*Math.cos(theta),\\n (offset_sigma+center_x)*Math.sin(theta),\\n (offset_sigma+center_x+sigma_x)*Math.sin(theta),\\n AHF)\\n update_arrow(arrow_sigma_x2,\\n sigma_x,\\n (-offset_sigma+center_x)*Math.cos(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.cos(theta),\\n (-offset_sigma+center_x)*Math.sin(theta),\\n (-(offset_sigma+sigma_x)+center_x)*Math.sin(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_sigmay_state_theta(data, arrow_sigma_y1, arrow_sigma_y2, width_element=30.0, center_x=120) {\\n const offset_arrows = width_element/3\\n const offset_sigma = width_element/2+offset_arrows\\n const theta = data['theta_element'][0]\\n var sigma_y = data['sigma_y'][0]\\n const AHF = 4\\n \\n if (sigma_y<0) {\\n var sigma_y = -sigma_y\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n AHF)\\n } else {\\n update_arrow(arrow_sigma_y1,\\n sigma_y,\\n (center_x)*Math.cos(theta)-(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)-(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)+(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_sigma_y2,\\n sigma_y,\\n (center_x)*Math.cos(theta)+(offset_sigma)*Math.sin(theta),\\n (center_x)*Math.cos(theta)+(offset_sigma+sigma_y)*Math.sin(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma)*Math.cos(theta),\\n (center_x)*Math.sin(theta)-(offset_sigma+sigma_y)*Math.cos(theta),\\n AHF)\\n }\\n }\\n \\n \\n function update_tau_state_theta(data, arrow_tau_x1, arrow_tau_x2, arrow_tau_y1, arrow_tau_y2, width_element=30.0, center_x=120, scale_tau=5) {\\n const offset_arrows = width_element/3\\n const offset_tau = width_element/2+offset_arrows/2\\n const theta = data['theta_element'][0]\\n const tau = data['tau'][0]*scale_tau\\n const AHF = 4\\n \\n update_arrow(arrow_tau_x1,\\n tau,\\n (center_x+offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x+offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n (center_x+offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_x2,\\n tau,\\n (center_x-offset_tau)*Math.cos(theta)-(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.cos(theta)+(tau/2)*Math.sin(theta),\\n (center_x-offset_tau)*Math.sin(theta)+(tau/2)*Math.cos(theta),\\n (center_x-offset_tau)*Math.sin(theta)-(tau/2)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y1,\\n tau,\\n (center_x-tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.cos(theta)-(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n (center_x+tau/2)*Math.sin(theta)+(offset_tau)*Math.cos(theta),\\n AHF)\\n update_arrow(arrow_tau_y2,\\n tau,\\n (center_x+tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x-tau/2)*Math.cos(theta)+(offset_tau)*Math.sin(theta),\\n (center_x+tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n (center_x-tau/2)*Math.sin(theta)-(offset_tau)*Math.cos(theta),\\n AHF)\\n }\\n \\n \"},\"id\":\"2142\",\"type\":\"CustomJS\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[6],\"y\":[-5]},\"selected\":{\"id\":\"2456\"},\"selection_policy\":{\"id\":\"2455\"}},\"id\":\"1881\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"width\":10},\"id\":\"2143\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"2144\"},{\"id\":\"1120\"},{\"id\":\"1121\"},{\"id\":\"1899\"},{\"id\":\"1900\"},{\"id\":\"2145\"},{\"id\":\"1250\"},{\"id\":\"1249\"},{\"id\":\"1251\"},{\"id\":\"1252\"},{\"id\":\"1253\"},{\"id\":\"1254\"}]},\"id\":\"2146\",\"type\":\"Column\"},{\"attributes\":{\"height\":10},\"id\":\"2144\",\"type\":\"Spacer\"},{\"attributes\":{\"height\":10},\"id\":\"2145\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"2148\"},{\"id\":\"2150\"}]},\"id\":\"2151\",\"type\":\"Row\"},{\"attributes\":{\"tools\":[{\"id\":\"1797\"},{\"id\":\"1798\"},{\"id\":\"1799\"},{\"id\":\"1800\"},{\"id\":\"1801\"},{\"id\":\"1802\"}]},\"id\":\"1804\",\"type\":\"Toolbar\"},{\"attributes\":{\"children\":[{\"id\":\"1071\"},{\"id\":\"2143\"},{\"id\":\"2146\"}]},\"id\":\"2147\",\"type\":\"Row\"},{\"attributes\":{\"width\":200},\"id\":\"2153\",\"type\":\"Spacer\"},{\"attributes\":{\"data\":{\"x\":[0,0],\"y\":[0,200]},\"selected\":{\"id\":\"2463\"},\"selection_policy\":{\"id\":\"2462\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"children\":[{\"id\":\"1008\"},{\"id\":\"2149\"},{\"id\":\"1256\"},{\"id\":\"1290\"},{\"id\":\"1322\"}]},\"id\":\"2150\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1814\",\"type\":\"DataRange1d\"},{\"attributes\":{\"children\":[{\"id\":\"1140\"},{\"id\":\"2147\"}]},\"id\":\"2148\",\"type\":\"Column\"},{\"attributes\":{\"height\":10},\"id\":\"2149\",\"type\":\"Spacer\"},{\"attributes\":{\"source\":{\"id\":\"1182\"}},\"id\":\"1187\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2434\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2233\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1236\"}},\"id\":\"1242\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2338\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2339\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2435\",\"type\":\"Selection\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2135\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1250\",\"type\":\"Slider\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1639\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2494\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1240\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2495\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1195\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1197\"},\"nonselection_glyph\":{\"id\":\"1196\"},\"view\":{\"id\":\"1199\"}},\"id\":\"1198\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1189\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1191\"},\"nonselection_glyph\":{\"id\":\"1190\"},\"view\":{\"id\":\"1193\"}},\"id\":\"1192\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2234\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1193\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2340\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1191\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2275\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1200\"},\"glyph\":{\"id\":\"1201\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1203\"},\"nonselection_glyph\":{\"id\":\"1202\"},\"view\":{\"id\":\"1205\"}},\"id\":\"1204\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1514\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2410\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2341\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2474\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2276\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"1495\"},{\"id\":\"1496\"},{\"id\":\"1497\"},{\"id\":\"1498\"},{\"id\":\"1499\"},{\"id\":\"1500\"},{\"id\":\"1502\"}]},\"id\":\"1503\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2411\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2475\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1856\",\"type\":\"VeeHead\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1211\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2278\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1536\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2172\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1199\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2342\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1197\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1517\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2413\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2279\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending strain\"},\"id\":\"1512\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2173\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1200\"}},\"id\":\"1205\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1521\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1524\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2343\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1530\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1203\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1519\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2414\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2175\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"2328\"},\"selection_policy\":{\"id\":\"2327\"}},\"id\":\"1200\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2436\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2235\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2098 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2401\"},\"group\":null,\"major_label_policy\":{\"id\":\"2402\"},\"ticker\":{\"id\":\"1776\"}},\"id\":\"1521\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2344\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2437\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2176\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2399\"},\"group\":null,\"major_label_policy\":{\"id\":\"2400\"},\"ticker\":{\"id\":\"1526\"},\"visible\":false},\"id\":\"1525\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2236\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1525\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1528\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2288\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2345\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1207\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1209\"},\"nonselection_glyph\":{\"id\":\"1208\"},\"view\":{\"id\":\"1211\"}},\"id\":\"1210\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1526\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1239\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2337\"},\"selection_policy\":{\"id\":\"2336\"}},\"id\":\"2280\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2399\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2289\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1534\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1209\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1529\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2346\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"overlay\":{\"id\":\"1535\"}},\"id\":\"1531\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1236\"},\"glyph\":{\"id\":\"1238\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1240\"},\"nonselection_glyph\":{\"id\":\"1239\"},\"view\":{\"id\":\"1242\"}},\"id\":\"1241\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2339\"},\"selection_policy\":{\"id\":\"2338\"}},\"id\":\"2281\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2291\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1213\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1215\"},\"nonselection_glyph\":{\"id\":\"1214\"},\"view\":{\"id\":\"1217\"}},\"id\":\"1216\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1532\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1533\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1217\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2341\"},\"selection_policy\":{\"id\":\"2340\"}},\"id\":\"2282\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2347\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2243\"},\"selection_policy\":{\"id\":\"2242\"}},\"id\":\"2177\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1221\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2292\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1218\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2280\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1219\",\"type\":\"Arrow\"},{\"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\":\"1535\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2497\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1215\",\"type\":\"Patch\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1224\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2245\"},\"selection_policy\":{\"id\":\"2244\"}},\"id\":\"2178\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1218\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2343\"},\"selection_policy\":{\"id\":\"2342\"}},\"id\":\"2283\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2237\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1238\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2247\"},\"selection_policy\":{\"id\":\"2246\"}},\"id\":\"2179\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1599\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2484\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2332\"},\"selection_policy\":{\"id\":\"2331\"}},\"id\":\"1236\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2438\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1221\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"2281\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1222\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2238\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2400\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2334\"},\"selection_policy\":{\"id\":\"2333\"}},\"id\":\"1243\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2345\"},\"selection_policy\":{\"id\":\"2344\"}},\"id\":\"2284\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1605\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1224\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"2282\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1225\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2439\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2249\"},\"selection_policy\":{\"id\":\"2248\"}},\"id\":\"2180\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1233\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2285\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1234\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2368\"},\"selection_policy\":{\"id\":\"2367\"}},\"id\":\"2293\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1243\"},\"glyph\":{\"id\":\"1244\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1246\"},\"nonselection_glyph\":{\"id\":\"1245\"},\"view\":{\"id\":\"1248\"}},\"id\":\"1247\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1598\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2239\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2347\"},\"selection_policy\":{\"id\":\"2346\"}},\"id\":\"2285\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2140\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1249\",\"type\":\"Slider\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1251\",\"type\":\"Div\"},{\"attributes\":{\"axis\":{\"id\":\"1594\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1597\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2477\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2251\"},\"selection_policy\":{\"id\":\"2250\"}},\"id\":\"2181\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1246\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1243\"}},\"id\":\"1248\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2478\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2416\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1557\",\"type\":\"BasicTicker\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"2139\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1252\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2253\"},\"selection_policy\":{\"id\":\"2252\"}},\"id\":\"2182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1253\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"2417\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2440\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \",\"width\":170},\"id\":\"1255\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"2485\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1624\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1627\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2401\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2240\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1529\"},{\"id\":\"1530\"},{\"id\":\"1531\"},{\"id\":\"1532\"},{\"id\":\"1533\"},{\"id\":\"1534\"},{\"id\":\"1536\"}]},\"id\":\"1537\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2419\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1264\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2441\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2255\"},\"selection_policy\":{\"id\":\"2254\"}},\"id\":\"2183\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"2138\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1254\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"below\":[{\"id\":\"1266\"}],\"center\":[{\"id\":\"1269\"},{\"id\":\"1273\"}],\"height\":160,\"left\":[{\"id\":\"1270\"}],\"renderers\":[{\"id\":\"1358\"},{\"id\":\"1364\"},{\"id\":\"1394\"}],\"title\":{\"id\":\"1257\"},\"toolbar\":{\"id\":\"1282\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1262\"},\"y_range\":{\"id\":\"1260\"},\"y_scale\":{\"id\":\"1264\"}},\"id\":\"1256\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1554\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2420\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1633\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1260\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2257\"},\"selection_policy\":{\"id\":\"2256\"}},\"id\":\"2184\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1262\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2348\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1266\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1269\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1275\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"1281\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1548\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2349\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"1257\",\"type\":\"Title\"},{\"attributes\":{\"below\":[{\"id\":\"1556\"}],\"center\":[{\"id\":\"1559\"},{\"id\":\"1563\"}],\"height\":200,\"left\":[{\"id\":\"1560\"}],\"renderers\":[{\"id\":\"1688\"},{\"id\":\"1694\"},{\"id\":\"1700\"}],\"title\":{\"id\":\"1546\"},\"toolbar\":{\"id\":\"1572\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1548\"},\"x_scale\":{\"id\":\"1552\"},\"y_range\":{\"id\":\"1550\"},\"y_scale\":{\"id\":\"1554\"}},\"id\":\"1545\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\",\"width\":170},\"id\":\"1119\",\"type\":\"Div\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2259\"},\"selection_policy\":{\"id\":\"2258\"}},\"id\":\"2185\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2298\"},\"group\":null,\"major_label_policy\":{\"id\":\"2299\"},\"ticker\":{\"id\":\"1267\"},\"visible\":false},\"id\":\"1266\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1550\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2350\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2499\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1267\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2493\"},\"selection_policy\":{\"id\":\"2492\"}},\"id\":\"2421\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2423\"},\"group\":null,\"major_label_policy\":{\"id\":\"2424\"},\"ticker\":{\"id\":\"1561\"},\"visible\":false},\"id\":\"1560\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"2295\"},\"group\":null,\"major_label_policy\":{\"id\":\"2296\"},\"ticker\":{\"id\":\"1271\"}},\"id\":\"1270\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2295\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Shear stress\"},\"id\":\"1546\",\"type\":\"Title\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2261\"},\"selection_policy\":{\"id\":\"2260\"}},\"id\":\"2186\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1270\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1273\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2351\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1271\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1556\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1559\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2500\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1279\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2296\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1552\",\"type\":\"LinearScale\"},{\"attributes\":{\"end\":200,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2136\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1120\",\"type\":\"Slider\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u1d65 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2426\"},\"group\":null,\"major_label_policy\":{\"id\":\"2427\"},\"ticker\":{\"id\":\"1557\"}},\"id\":\"1556\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1278\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2479\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1274\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2298\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1560\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1563\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1280\"}},\"id\":\"1276\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1561\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1277\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2480\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2451\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2452\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"lightgray\"},\"height\":{\"value\":200},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1042\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2453\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1462\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2454\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1629\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2367\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2368\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"2326\"},\"selection_policy\":{\"id\":\"2325\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2455\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2369\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2456\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2370\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"2372\"},\"selection_policy\":{\"id\":\"2371\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2371\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2372\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2321\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2322\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1831\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2458\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2459\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1125\"},\"glyph\":{\"id\":\"1126\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1128\"},\"nonselection_glyph\":{\"id\":\"1127\"},\"view\":{\"id\":\"1130\"}},\"id\":\"1129\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2310\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1468\",\"type\":\"HoverTool\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":60},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2005\",\"type\":\"Arc\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1765\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1767\"},\"nonselection_glyph\":{\"id\":\"1766\"},\"view\":{\"id\":\"1769\"}},\"id\":\"1768\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1125\"}},\"id\":\"1130\",\"type\":\"CDSView\"},{\"attributes\":{\"below\":[{\"id\":\"1151\"}],\"center\":[{\"id\":\"1154\"},{\"id\":\"1158\"},{\"id\":\"1219\"},{\"id\":\"1222\"},{\"id\":\"1225\"},{\"id\":\"1228\"},{\"id\":\"1231\"},{\"id\":\"1234\"}],\"height\":200,\"left\":[{\"id\":\"1155\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1177\"},{\"id\":\"1192\"},{\"id\":\"1198\"},{\"id\":\"1204\"},{\"id\":\"1210\"},{\"id\":\"1216\"},{\"id\":\"1241\"},{\"id\":\"1247\"}],\"title\":{\"id\":\"1141\"},\"toolbar\":{\"id\":\"1166\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1143\"},\"x_scale\":{\"id\":\"1147\"},\"y_range\":{\"id\":\"1145\"},\"y_scale\":{\"id\":\"1149\"}},\"id\":\"1140\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2236\"},\"selection_policy\":{\"id\":\"2235\"}},\"id\":\"2003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial strain\"},\"id\":\"1444\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2003\"},\"glyph\":{\"id\":\"2004\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2006\"},\"nonselection_glyph\":{\"id\":\"2005\"},\"view\":{\"id\":\"2008\"}},\"id\":\"2007\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2311\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"1453\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1456\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2210\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1126\",\"type\":\"Text\"},{\"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\":\"1127\",\"type\":\"Text\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2010\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1451\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"2439\"},\"selection_policy\":{\"id\":\"2438\"}},\"id\":\"1125\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"2003\"}},\"id\":\"2008\",\"type\":\"CDSView\"},{\"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\":\"1128\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2359\",\"type\":\"Selection\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":60},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2006\",\"type\":\"Arc\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2099 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2390\"},\"group\":null,\"major_label_policy\":{\"id\":\"2391\"},\"ticker\":{\"id\":\"1756\"}},\"id\":\"1453\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1131\",\"type\":\"VeeHead\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2011\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1131\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2353\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1132\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[60],\"y\":[0]},\"selected\":{\"id\":\"2238\"},\"selection_policy\":{\"id\":\"2237\"}},\"id\":\"2009\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2388\"},\"group\":null,\"major_label_policy\":{\"id\":\"2389\"},\"ticker\":{\"id\":\"1458\"},\"visible\":false},\"id\":\"1457\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1134\"}},\"id\":\"1139\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,150.0],\"y\":[0,0]},\"selected\":{\"id\":\"2240\"},\"selection_policy\":{\"id\":\"2239\"}},\"id\":\"2015\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"2322\"},\"selection_policy\":{\"id\":\"2321\"}},\"id\":\"1173\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1457\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1460\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"2009\"}},\"id\":\"2014\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1458\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2012\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2009\"},\"glyph\":{\"id\":\"2010\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2012\"},\"nonselection_glyph\":{\"id\":\"2011\"},\"view\":{\"id\":\"2014\"}},\"id\":\"2013\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1134\"},\"glyph\":{\"id\":\"1135\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1137\"},\"nonselection_glyph\":{\"id\":\"1136\"},\"view\":{\"id\":\"1139\"}},\"id\":\"1138\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2016\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2211\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2017\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1143\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1461\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1145\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"1467\"}},\"id\":\"1463\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1466\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2015\"},\"glyph\":{\"id\":\"2016\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2018\"},\"nonselection_glyph\":{\"id\":\"2017\"},\"view\":{\"id\":\"2020\"}},\"id\":\"2019\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1464\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2278\"},\"group\":null,\"major_label_policy\":{\"id\":\"2279\"},\"ticker\":{\"id\":\"1152\"},\"visible\":false},\"id\":\"1151\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2021\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.4054651081081644},\"source\":{\"id\":\"2177\"},\"start\":null,\"x_end\":{\"value\":25.0},\"x_start\":{\"value\":25.5},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2022\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1465\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2033\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2275\"},\"group\":null,\"major_label_policy\":{\"id\":\"2276\"},\"ticker\":{\"id\":\"1156\"},\"visible\":false},\"id\":\"1155\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2027\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1141\",\"type\":\"Title\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2018\",\"type\":\"Line\"},{\"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\":\"1467\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2469\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":2.8382557567571505}},\"id\":\"2024\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis\":{\"id\":\"1151\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1154\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2360\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"2015\"}},\"id\":\"2020\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1155\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1158\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2487\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":2.8382557567571505}},\"id\":\"2045\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2470\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":2.8382557567571505}},\"id\":\"2021\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1149\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2361\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2030\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1164\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2488\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2033\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2181\"},\"start\":null,\"x_end\":{\"value\":20.0},\"x_start\":{\"value\":20.0},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2034\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1152\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2024\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.4054651081081644},\"source\":{\"id\":\"2178\"},\"start\":null,\"x_end\":{\"value\":-25.0},\"x_start\":{\"value\":-25.5},\"y_end\":{\"value\":-0.0},\"y_start\":{\"value\":-0.0}},\"id\":\"2025\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2036\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2182\"},\"start\":null,\"x_end\":{\"value\":-20.0},\"x_start\":{\"value\":-20.0},\"y_end\":{\"value\":-0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2037\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1156\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1827\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2027\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2179\"},\"start\":null,\"x_end\":{\"value\":0.0},\"x_start\":{\"value\":0.0},\"y_end\":{\"value\":25.0},\"y_start\":{\"value\":25.0}},\"id\":\"2028\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2036\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2030\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2180\"},\"start\":null,\"x_end\":{\"value\":0.0},\"x_start\":{\"value\":0.0},\"y_end\":{\"value\":-25.0},\"y_start\":{\"value\":-25.0}},\"id\":\"2031\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2212\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1160\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2042\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1159\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":2.8382557567571505}},\"id\":\"2048\",\"type\":\"VeeHead\"},{\"attributes\":{\"overlay\":{\"id\":\"1165\"}},\"id\":\"1161\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2051\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2213\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1162\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2039\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1163\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2054\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2039\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2183\"},\"start\":null,\"x_end\":{\"value\":0.0},\"x_start\":{\"value\":0.0},\"y_end\":{\"value\":20.0},\"y_start\":{\"value\":20.0}},\"id\":\"2040\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1483\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2057\",\"type\":\"VeeHead\"},{\"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\":\"1165\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2042\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2184\"},\"start\":null,\"x_end\":{\"value\":0.0},\"x_start\":{\"value\":0.0},\"y_end\":{\"value\":-20.0},\"y_start\":{\"value\":-20.0}},\"id\":\"2043\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2489\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2060\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1173\"},\"glyph\":{\"id\":\"1174\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1176\"},\"nonselection_glyph\":{\"id\":\"1175\"},\"view\":{\"id\":\"1178\"}},\"id\":\"1177\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2045\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.4054651081081644},\"source\":{\"id\":\"2185\"},\"start\":null,\"x_end\":{\"value\":145.0},\"x_start\":{\"value\":145.5},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2046\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2063\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2490\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2048\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.4054651081081644},\"source\":{\"id\":\"2186\"},\"start\":null,\"x_end\":{\"value\":95.0},\"x_start\":{\"value\":94.5},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2049\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1230\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2284\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1231\",\"type\":\"Arrow\"},{\"attributes\":{\"tools\":[{\"id\":\"1461\"},{\"id\":\"1462\"},{\"id\":\"1463\"},{\"id\":\"1464\"},{\"id\":\"1465\"},{\"id\":\"1466\"},{\"id\":\"1468\"}]},\"id\":\"1469\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"value\":\"blue\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":0.0}},\"id\":\"2066\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2362\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1835\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2051\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2187\"},\"start\":null,\"x_end\":{\"value\":120.0},\"x_start\":{\"value\":120.0},\"y_end\":{\"value\":25.0},\"y_start\":{\"value\":25.0}},\"id\":\"2052\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2363\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"hatch_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"radius\":{\"value\":0.25},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2070\",\"type\":\"Circle\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1230\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2054\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2188\"},\"start\":null,\"x_end\":{\"value\":120.0},\"x_start\":{\"value\":120.0},\"y_end\":{\"value\":-25.0},\"y_start\":{\"value\":-25.0}},\"id\":\"2055\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1227\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2283\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1228\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1830\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2057\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2189\"},\"start\":null,\"x_end\":{\"value\":140.0},\"x_start\":{\"value\":140.0},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2058\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1227\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"gray\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"gray\"},\"radius\":{\"value\":0.25},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2071\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2060\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2190\"},\"start\":null,\"x_end\":{\"value\":100.0},\"x_start\":{\"value\":100.0},\"y_end\":{\"value\":0.0},\"y_start\":{\"value\":0.0}},\"id\":\"2061\",\"type\":\"Arrow\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2076\",\"type\":\"Arc\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1233\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2063\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2191\"},\"start\":null,\"x_end\":{\"value\":120.0},\"x_start\":{\"value\":120.0},\"y_end\":{\"value\":20.0},\"y_start\":{\"value\":20.0}},\"id\":\"2064\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2214\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1480\",\"type\":\"DataRange1d\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2082\",\"type\":\"Text\"},{\"attributes\":{\"below\":[{\"id\":\"1487\"}],\"center\":[{\"id\":\"1490\"},{\"id\":\"1494\"}],\"height\":200,\"left\":[{\"id\":\"1491\"}],\"renderers\":[{\"id\":\"1670\"},{\"id\":\"1676\"},{\"id\":\"1682\"}],\"title\":{\"id\":\"1478\"},\"toolbar\":{\"id\":\"1503\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1480\"},\"x_scale\":{\"id\":\"1483\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1485\"}},\"id\":\"1477\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"1836\"}},\"id\":\"1832\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"2066\"},\"group\":null,\"line_color\":{\"value\":\"blue\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2192\"},\"start\":null,\"x_end\":{\"value\":120.0},\"x_start\":{\"value\":120.0},\"y_end\":{\"value\":-20.0},\"y_start\":{\"value\":-20.0}},\"id\":\"2067\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1179\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2293\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1180\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2215\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"2069\"}},\"id\":\"2074\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1496\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"data\":{\"x\":[-0.25],\"y\":[0]},\"selected\":{\"id\":\"2201\"},\"selection_policy\":{\"id\":\"2200\"}},\"id\":\"2069\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"gray\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"gray\"},\"radius\":{\"value\":0.25},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2072\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending stress and centroid\"},\"id\":\"1478\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2364\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2069\"},\"glyph\":{\"id\":\"2070\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2072\"},\"nonselection_glyph\":{\"id\":\"2071\"},\"view\":{\"id\":\"2074\"}},\"id\":\"2073\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1488\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2472\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[-0.25],\"y\":[0]},\"selected\":{\"id\":\"2203\"},\"selection_policy\":{\"id\":\"2202\"}},\"id\":\"2075\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2216\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2077\",\"type\":\"Arc\"},{\"attributes\":{},\"id\":\"1485\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2365\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2473\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2075\"},\"glyph\":{\"id\":\"2076\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2078\"},\"nonselection_glyph\":{\"id\":\"2077\"},\"view\":{\"id\":\"2080\"}},\"id\":\"2079\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1179\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis\":{\"id\":\"1487\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1490\",\"type\":\"Grid\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2083\",\"type\":\"Text\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2098 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2407\"},\"group\":null,\"major_label_policy\":{\"id\":\"2408\"},\"ticker\":{\"id\":\"1488\"}},\"id\":\"1487\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1834\",\"type\":\"ResetTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"2075\"}},\"id\":\"2080\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1502\",\"type\":\"HoverTool\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2078\",\"type\":\"Arc\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2404\"},\"group\":null,\"major_label_policy\":{\"id\":\"2405\"},\"ticker\":{\"id\":\"1492\"},\"visible\":false},\"id\":\"1491\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[-0.125],\"y\":[0]},\"selected\":{\"id\":\"2205\"},\"selection_policy\":{\"id\":\"2204\"}},\"id\":\"2081\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1176\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"1491\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1494\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[-0.25],\"y\":[0]},\"selected\":{\"id\":\"2207\"},\"selection_policy\":{\"id\":\"2206\"}},\"id\":\"2087\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1492\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1625\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"2081\"}},\"id\":\"2086\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1648\"}},\"id\":\"1653\",\"type\":\"CDSView\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2084\",\"type\":\"Text\"},{\"attributes\":{\"tools\":[{\"id\":\"1159\"},{\"id\":\"1160\"},{\"id\":\"1161\"},{\"id\":\"1162\"},{\"id\":\"1163\"},{\"id\":\"1164\"}]},\"id\":\"1166\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2217\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2081\"},\"glyph\":{\"id\":\"2082\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2084\"},\"nonselection_glyph\":{\"id\":\"2083\"},\"view\":{\"id\":\"2086\"}},\"id\":\"2085\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1173\"}},\"id\":\"1178\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1500\",\"type\":\"HelpTool\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2088\",\"type\":\"Arc\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2089\",\"type\":\"Arc\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1495\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1182\"},\"glyph\":{\"id\":\"1183\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1185\"},\"nonselection_glyph\":{\"id\":\"1184\"},\"view\":{\"id\":\"1187\"}},\"id\":\"1186\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"1501\"}},\"id\":\"1497\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":0.125},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2090\",\"type\":\"Arc\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":5},\"y\":{\"field\":\"y\"}},\"id\":\"2094\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1185\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2492\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[-0.15],\"y\":[0]},\"selected\":{\"id\":\"2209\"},\"selection_policy\":{\"id\":\"2208\"}},\"id\":\"2093\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1499\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"2087\"}},\"id\":\"2092\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"2365\"},\"selection_policy\":{\"id\":\"2364\"}},\"id\":\"1182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2087\"},\"glyph\":{\"id\":\"2088\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2090\"},\"nonselection_glyph\":{\"id\":\"2089\"},\"view\":{\"id\":\"2092\"}},\"id\":\"2091\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2493\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2261\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1881\"}},\"id\":\"1886\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[5],\"y\":[0]},\"selected\":{\"id\":\"2490\"},\"selection_policy\":{\"id\":\"2489\"}},\"id\":\"1887\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":560.0,\"start\":-80.0},\"id\":\"1013\",\"type\":\"Range1d\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1884\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1881\"},\"glyph\":{\"id\":\"1882\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1884\"},\"nonselection_glyph\":{\"id\":\"1883\"},\"view\":{\"id\":\"1886\"}},\"id\":\"1885\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1015\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1872\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2262\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1883\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1887\"},\"glyph\":{\"id\":\"1888\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1890\"},\"nonselection_glyph\":{\"id\":\"1889\"},\"view\":{\"id\":\"1892\"}},\"id\":\"1891\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1889\",\"type\":\"Text\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1011\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"2263\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1887\"}},\"id\":\"1892\",\"type\":\"CDSView\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1888\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y_var\"}},\"id\":\"1896\",\"type\":\"Scatter\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1890\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2264\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y_var\"}},\"id\":\"1895\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2377\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1894\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1896\"},\"nonselection_glyph\":{\"id\":\"1895\"},\"view\":{\"id\":\"1898\"}},\"id\":\"1897\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2291\"},\"group\":null,\"major_label_policy\":{\"id\":\"2292\"},\"ticker\":{\"id\":\"1020\"}},\"id\":\"1019\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":[60.0],\"y\":[60.0]},\"selected\":{\"id\":\"2224\"},\"selection_policy\":{\"id\":\"2223\"}},\"id\":\"1967\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2265\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y_var\"}},\"id\":\"1894\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2378\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1361\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1363\"},\"nonselection_glyph\":{\"id\":\"1362\"},\"view\":{\"id\":\"1365\"}},\"id\":\"1364\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"end\":200,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2142\"}]},\"start\":0,\"title\":\"Change the height y along the section [mm]\",\"value\":200},\"id\":\"1899\",\"type\":\"Slider\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1898\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"fixed_location\":0,\"formatter\":{\"id\":\"2169\"},\"group\":null,\"major_label_policy\":{\"id\":\"2170\"},\"ticker\":{\"id\":\"1913\"}},\"id\":\"1912\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"1912\"}],\"center\":[{\"id\":\"1915\"},{\"id\":\"1919\"}],\"left\":[{\"id\":\"1916\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"2073\"},{\"id\":\"2079\"},{\"id\":\"2085\"},{\"id\":\"2091\"},{\"id\":\"2097\"},{\"id\":\"2103\"},{\"id\":\"2109\"},{\"id\":\"2115\"},{\"id\":\"2121\"},{\"id\":\"2127\"},{\"id\":\"2133\"}],\"title\":{\"id\":\"1902\"},\"toolbar\":{\"id\":\"1927\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1904\"},\"x_scale\":{\"id\":\"1908\"},\"y_range\":{\"id\":\"1906\"},\"y_scale\":{\"id\":\"1910\"}},\"id\":\"1901\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2266\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"ResetTool\"},{\"attributes\":{\"end\":90,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2141\"}]},\"start\":0,\"step\":0.5,\"title\":\"Change the angle \\u03b8 of the element [\\u00b0]\",\"value\":0},\"id\":\"1900\",\"type\":\"Slider\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":180.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":180.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1968\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1053\"},\"glyph\":{\"id\":\"1054\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1056\"},\"nonselection_glyph\":{\"id\":\"1055\"},\"view\":{\"id\":\"1058\"}},\"id\":\"1057\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1904\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1009\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2267\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1019\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1022\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2496\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1908\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1047\"}},\"id\":\"1052\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1906\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1032\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Mohr circle, x axis: stress \\u03c3 [MPa], y axis: stress \\u03c4 [MPa]\"},\"id\":\"1902\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2268\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0.125,-0.125],\"y\":[0,-69.28203230275508,-69.28203230275508]},\"selected\":{\"id\":\"2357\"},\"selection_policy\":{\"id\":\"2356\"}},\"id\":\"1047\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1921\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1912\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1915\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1910\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2288\"},\"group\":null,\"major_label_policy\":{\"id\":\"2289\"},\"ticker\":{\"id\":\"1024\"},\"visible\":false},\"id\":\"1023\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2269\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"fixed_location\":0,\"formatter\":{\"id\":\"2166\"},\"group\":null,\"major_label_policy\":{\"id\":\"2167\"},\"ticker\":{\"id\":\"1917\"}},\"id\":\"1916\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1023\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1026\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1916\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1919\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1913\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2270\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1917\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"1033\"}},\"id\":\"1029\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2271\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1925\",\"type\":\"HelpTool\"},{\"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\":\"1033\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1920\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1926\"}},\"id\":\"1922\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1923\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1924\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2272\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1041\"}},\"id\":\"1046\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2447\",\"type\":\"UnionRenderers\"},{\"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\":\"1926\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2273\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1939\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2358\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2448\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"lightgray\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":200},\"line_alpha\":{\"value\":0.2},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1044\",\"type\":\"Rect\"},{\"attributes\":{\"tools\":[{\"id\":\"1953\"},{\"id\":\"1954\"},{\"id\":\"1955\"},{\"id\":\"1956\"},{\"id\":\"1957\"},{\"id\":\"1958\"}]},\"id\":\"1960\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-40.0]},\"selected\":{\"id\":\"2359\"},\"selection_policy\":{\"id\":\"2358\"}},\"id\":\"1053\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":180.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":180.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1969\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":158.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1060\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"1053\"}},\"id\":\"1058\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"radius\":{\"value\":0.125},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1055\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":180.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":180.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1970\",\"type\":\"Rect\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.125},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1054\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2449\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1048\",\"type\":\"Patch\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1571\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2450\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1941\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1049\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1569\",\"type\":\"HelpTool\"},{\"attributes\":{\"below\":[{\"id\":\"1945\"}],\"center\":[{\"id\":\"1948\"},{\"id\":\"1952\"},{\"id\":\"2022\"},{\"id\":\"2025\"},{\"id\":\"2028\"},{\"id\":\"2031\"},{\"id\":\"2034\"},{\"id\":\"2037\"},{\"id\":\"2040\"},{\"id\":\"2043\"},{\"id\":\"2046\"},{\"id\":\"2049\"},{\"id\":\"2052\"},{\"id\":\"2055\"},{\"id\":\"2058\"},{\"id\":\"2061\"},{\"id\":\"2064\"},{\"id\":\"2067\"}],\"left\":[{\"id\":\"1949\"}],\"match_aspect\":true,\"min_border_left\":0,\"renderers\":[{\"id\":\"1971\"},{\"id\":\"1977\"},{\"id\":\"1983\"},{\"id\":\"1989\"},{\"id\":\"1995\"},{\"id\":\"2001\"},{\"id\":\"2007\"},{\"id\":\"2013\"},{\"id\":\"2019\"}],\"title\":{\"id\":\"1935\"},\"toolbar\":{\"id\":\"1960\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1937\"},\"x_scale\":{\"id\":\"1941\"},\"y_range\":{\"id\":\"1939\"},\"y_scale\":{\"id\":\"1943\"}},\"id\":\"1934\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"tools\":[{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"},{\"id\":\"1032\"}]},\"id\":\"1034\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1967\"},\"glyph\":{\"id\":\"1968\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1970\"},\"nonselection_glyph\":{\"id\":\"1969\"},\"view\":{\"id\":\"1972\"}},\"id\":\"1971\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1041\"},\"glyph\":{\"id\":\"1042\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1044\"},\"nonselection_glyph\":{\"id\":\"1043\"},\"view\":{\"id\":\"1046\"}},\"id\":\"1045\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1047\"},\"glyph\":{\"id\":\"1048\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1050\"},\"nonselection_glyph\":{\"id\":\"1049\"},\"view\":{\"id\":\"1052\"}},\"id\":\"1051\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1565\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1937\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[100.0]},\"selected\":{\"id\":\"2355\"},\"selection_policy\":{\"id\":\"2354\"}},\"id\":\"1041\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1050\",\"type\":\"Patch\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"radius\":{\"value\":0.125},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1056\",\"type\":\"Circle\"},{\"attributes\":{\"tools\":[{\"id\":\"1920\"},{\"id\":\"1921\"},{\"id\":\"1922\"},{\"id\":\"1923\"},{\"id\":\"1924\"},{\"id\":\"1925\"}]},\"id\":\"1927\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[480.0]},\"selected\":{\"id\":\"2361\"},\"selection_policy\":{\"id\":\"2360\"}},\"id\":\"1059\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1943\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":158.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1061\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2175\"},\"group\":null,\"major_label_policy\":{\"id\":\"2176\"},\"ticker\":{\"id\":\"1946\"},\"visible\":false},\"id\":\"1945\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":158.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1062\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2419\"},\"group\":null,\"major_label_policy\":{\"id\":\"2420\"},\"ticker\":{\"id\":\"1823\"},\"visible\":false},\"id\":\"1822\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Stress state\"},\"id\":\"1935\",\"type\":\"Title\"},{\"attributes\":{\"below\":[{\"id\":\"1082\"}],\"center\":[{\"id\":\"1085\"},{\"id\":\"1089\"},{\"id\":\"1123\"},{\"id\":\"1132\"}],\"height\":500,\"left\":[{\"id\":\"1086\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1108\"},{\"id\":\"1117\"},{\"id\":\"1129\"},{\"id\":\"1138\"}],\"title\":{\"id\":\"1072\"},\"toolbar\":{\"id\":\"1097\"},\"toolbar_location\":null,\"width\":250,\"x_range\":{\"id\":\"1074\"},\"x_scale\":{\"id\":\"1078\"},\"y_range\":{\"id\":\"1076\"},\"y_scale\":{\"id\":\"1080\"}},\"id\":\"1071\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1816\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1065\"},\"glyph\":{\"id\":\"1066\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1068\"},\"nonselection_glyph\":{\"id\":\"1067\"},\"view\":{\"id\":\"1070\"}},\"id\":\"1069\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1818\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1617\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1945\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1948\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1059\"},\"glyph\":{\"id\":\"1060\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1062\"},\"nonselection_glyph\":{\"id\":\"1061\"},\"view\":{\"id\":\"1064\"}},\"id\":\"1063\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"width\":200},\"id\":\"2154\",\"type\":\"Spacer\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2172\"},\"group\":null,\"major_label_policy\":{\"id\":\"2173\"},\"ticker\":{\"id\":\"1950\"},\"visible\":false},\"id\":\"1949\",\"type\":\"LinearAxis\"},{\"attributes\":{\"width\":200},\"id\":\"2155\",\"type\":\"Spacer\"},{\"attributes\":{\"source\":{\"id\":\"1059\"}},\"id\":\"1064\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1065\"}},\"id\":\"1070\",\"type\":\"CDSView\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2416\"},\"group\":null,\"major_label_policy\":{\"id\":\"2417\"},\"ticker\":{\"id\":\"1827\"},\"visible\":false},\"id\":\"1826\",\"type\":\"LinearAxis\"},{\"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\":\"1280\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"1949\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1952\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1811\"},{\"id\":\"2153\"},{\"id\":\"1545\"},{\"id\":\"2154\"},{\"id\":\"2155\"},{\"id\":\"1614\"}]},\"id\":\"2156\",\"type\":\"Row\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[400]},\"selected\":{\"id\":\"2363\"},\"selection_policy\":{\"id\":\"2362\"}},\"id\":\"1065\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1958\",\"type\":\"HelpTool\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1066\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1822\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1825\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1778\"},{\"id\":\"1443\"},{\"id\":\"1408\"},{\"id\":\"1511\"},{\"id\":\"1477\"},{\"id\":\"1580\"}]},\"id\":\"2152\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1946\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"A\":[20000],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"r_circle_mohr\":[0.25],\"sigma_average\":[-0.25],\"sigma_x\":[-0.5],\"sigma_x0\":[-0.5],\"sigma_y\":[0.0],\"sigma_y0\":[0],\"state\":[\"IDLE\"],\"tau\":[0.0],\"tau_0\":[0.0],\"theta\":[0.0],\"theta_element\":[0],\"x\":[6],\"xF\":[60],\"y\":[0],\"yG\":[100.0],\"y_n_axis\":[100.0],\"y_var\":[200]},\"selected\":{\"id\":\"2324\"},\"selection_policy\":{\"id\":\"2323\"}},\"id\":\"1007\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1068\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"V at position x\"},\"id\":\"1812\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c4\"},\"id\":\"1615\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1950\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1826\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1829\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1620\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2225\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2255\",\"type\":\"Selection\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1067\",\"type\":\"Text\"},{\"attributes\":{\"children\":[{\"id\":\"2152\"},{\"id\":\"2156\"}]},\"id\":\"2157\",\"type\":\"Column\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"black\"},\"height\":{\"value\":30.0},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1974\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1820\",\"type\":\"LinearScale\"},{\"attributes\":{\"children\":[{\"id\":\"2157\"}]},\"id\":\"2158\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"2226\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1076\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1954\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1078\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1844\"},\"glyph\":{\"id\":\"1845\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1847\"},\"nonselection_glyph\":{\"id\":\"1846\"},\"view\":{\"id\":\"1849\"}},\"id\":\"1848\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1953\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1622\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2432\"},\"group\":null,\"major_label_policy\":{\"id\":\"2433\"},\"ticker\":{\"id\":\"1625\"}},\"id\":\"1624\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"1959\"}},\"id\":\"1955\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1091\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2402\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1956\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2350\"},\"group\":null,\"major_label_policy\":{\"id\":\"2351\"},\"ticker\":{\"id\":\"1110\"}},\"id\":\"1082\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1601\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1957\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1074\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2429\"},\"group\":null,\"major_label_policy\":{\"id\":\"2430\"},\"ticker\":{\"id\":\"1629\"}},\"id\":\"1628\",\"type\":\"LinearAxis\"},{\"attributes\":{\"children\":[{\"id\":\"2151\"},{\"id\":\"2158\"}]},\"id\":\"2159\",\"type\":\"Column\"},{\"attributes\":{\"below\":[{\"id\":\"1019\"}],\"center\":[{\"id\":\"1022\"},{\"id\":\"1026\"},{\"id\":\"1180\"}],\"height\":200,\"left\":[{\"id\":\"1023\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1045\"},{\"id\":\"1051\"},{\"id\":\"1057\"},{\"id\":\"1063\"},{\"id\":\"1069\"},{\"id\":\"1186\"},{\"id\":\"1897\"}],\"title\":{\"id\":\"1009\"},\"toolbar\":{\"id\":\"1034\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1015\"},\"y_range\":{\"id\":\"1013\"},\"y_scale\":{\"id\":\"1017\"}},\"id\":\"1008\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2348\"},\"group\":null,\"major_label_policy\":{\"id\":\"2349\"},\"ticker\":{\"id\":\"1110\"}},\"id\":\"1086\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1082\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1085\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1299\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1628\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1631\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1901\"},{\"id\":\"1934\"}]},\"id\":\"2160\",\"type\":\"Column\"},{\"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\":\"1959\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1080\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1072\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1602\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1833\",\"type\":\"SaveTool\"},{\"attributes\":{\"source\":{\"id\":\"1967\"}},\"id\":\"1972\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1086\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1089\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":320.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":160.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1106\",\"type\":\"Rect\"},{\"attributes\":{\"overlay\":{\"id\":\"1604\"}},\"id\":\"1600\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1637\",\"type\":\"HelpTool\"},{\"attributes\":{\"children\":[{\"id\":\"2159\"},{\"id\":\"2160\"}]},\"id\":\"2161\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1113\"},\"glyph\":{\"id\":\"1114\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1116\"},\"nonselection_glyph\":{\"id\":\"1115\"},\"view\":{\"id\":\"1118\"}},\"id\":\"1117\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1632\",\"type\":\"PanTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1274\"},{\"id\":\"1275\"},{\"id\":\"1276\"},{\"id\":\"1277\"},{\"id\":\"1278\"},{\"id\":\"1279\"},{\"id\":\"1281\"}]},\"id\":\"1282\",\"type\":\"Toolbar\"},{\"attributes\":{\"overlay\":{\"id\":\"1638\"}},\"id\":\"1634\",\"type\":\"BoxZoomTool\"},{\"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\":\"1836\",\"type\":\"BoxAnnotation\"},{\"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\":\"1115\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1635\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"2330\"},\"selection_policy\":{\"id\":\"2329\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1636\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1685\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1296\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[11.0],\"y\":[1]},\"selected\":{\"id\":\"2454\"},\"selection_policy\":{\"id\":\"2453\"}},\"id\":\"1875\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1684\"}},\"id\":\"1689\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1095\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2227\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1090\",\"type\":\"PanTool\"},{\"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\":\"1638\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"overlay\":{\"id\":\"1096\"}},\"id\":\"1092\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1878\",\"type\":\"Text\"},{\"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\":\"1570\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1564\"},{\"id\":\"1565\"},{\"id\":\"1566\"},{\"id\":\"1567\"},{\"id\":\"1568\"},{\"id\":\"1569\"},{\"id\":\"1571\"}]},\"id\":\"1572\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1093\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1649\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2166\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1292\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2228\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2254\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1094\",\"type\":\"ResetTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1877\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c3 and neutral axis\"},\"id\":\"1581\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"lightgray\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":200},\"line_alpha\":{\"value\":0.1},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1043\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1657\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1298\"}],\"center\":[{\"id\":\"1301\"},{\"id\":\"1305\"}],\"height\":160,\"left\":[{\"id\":\"1302\"}],\"renderers\":[{\"id\":\"1370\"},{\"id\":\"1376\"},{\"id\":\"1400\"}],\"title\":{\"id\":\"2196\"},\"toolbar\":{\"id\":\"1314\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1294\"},\"y_range\":{\"id\":\"1292\"},\"y_scale\":{\"id\":\"1296\"}},\"id\":\"1290\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2167\",\"type\":\"AllLabels\"},{\"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\":\"1096\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1980\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1294\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1869\"}},\"id\":\"1874\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1691\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1693\"},\"nonselection_glyph\":{\"id\":\"1692\"},\"view\":{\"id\":\"1695\"}},\"id\":\"1694\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2437\"},\"selection_policy\":{\"id\":\"2436\"}},\"id\":\"1113\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1662\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2169\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2229\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"1313\",\"type\":\"HoverTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1853\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1687\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2483\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2304\"},\"group\":null,\"major_label_policy\":{\"id\":\"2305\"},\"ticker\":{\"id\":\"1299\"},\"visible\":false},\"id\":\"1298\",\"type\":\"LinearAxis\"},{\"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\":\"1137\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2495\"},\"selection_policy\":{\"id\":\"2494\"}},\"id\":\"1684\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2170\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1583\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1298\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1301\",\"type\":\"Grid\"},{\"attributes\":{\"below\":[{\"id\":\"1590\"}],\"center\":[{\"id\":\"1593\"},{\"id\":\"1597\"}],\"height\":200,\"renderers\":[{\"id\":\"1706\"},{\"id\":\"1712\"},{\"id\":\"1718\"}],\"right\":[{\"id\":\"1594\"}],\"title\":{\"id\":\"1581\"},\"toolbar\":{\"id\":\"1606\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1583\"},\"x_scale\":{\"id\":\"1586\"},\"y_range\":{\"id\":\"1413\"},\"y_scale\":{\"id\":\"1588\"}},\"id\":\"1580\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1307\",\"type\":\"WheelZoomTool\"},{\"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\":\"1136\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1591\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1686\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1973\"},\"glyph\":{\"id\":\"1974\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1976\"},\"nonselection_glyph\":{\"id\":\"1975\"},\"view\":{\"id\":\"1978\"}},\"id\":\"1977\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1302\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1305\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"2441\"},\"selection_policy\":{\"id\":\"2440\"}},\"id\":\"1134\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"2301\"},\"group\":null,\"major_label_policy\":{\"id\":\"2302\"},\"ticker\":{\"id\":\"1303\"}},\"id\":\"1302\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1135\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2450\"},\"selection_policy\":{\"id\":\"2449\"}},\"id\":\"1862\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"below\":[{\"id\":\"1330\"}],\"center\":[{\"id\":\"1333\"},{\"id\":\"1337\"}],\"height\":200,\"left\":[{\"id\":\"1334\"}],\"renderers\":[{\"id\":\"1382\"},{\"id\":\"1388\"},{\"id\":\"1406\"}],\"title\":{\"id\":\"2198\"},\"toolbar\":{\"id\":\"1346\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1326\"},\"y_range\":{\"id\":\"1324\"},\"y_scale\":{\"id\":\"1328\"}},\"id\":\"1322\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1981\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1586\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1303\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1590\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1593\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1847\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2226\"},\"selection_policy\":{\"id\":\"2225\"}},\"id\":\"1973\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2230\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2404\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1588\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1845\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2405\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1311\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":320.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":160.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1105\",\"type\":\"Rect\"},{\"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\":\"1604\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"black\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":30.0},\"line_alpha\":{\"value\":0.1},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1975\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1306\",\"type\":\"PanTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1632\"},{\"id\":\"1633\"},{\"id\":\"1634\"},{\"id\":\"1635\"},{\"id\":\"1636\"},{\"id\":\"1637\"},{\"id\":\"1639\"}]},\"id\":\"1640\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"black\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":30.0},\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1976\",\"type\":\"Rect\"},{\"attributes\":{\"overlay\":{\"id\":\"1312\"}},\"id\":\"1308\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2413\"},\"group\":null,\"major_label_policy\":{\"id\":\"2414\"},\"ticker\":{\"id\":\"1591\"}},\"id\":\"1590\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"SaveTool\"},{\"attributes\":{\"source\":{\"id\":\"1113\"}},\"id\":\"1118\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2448\"},\"selection_policy\":{\"id\":\"2447\"}},\"id\":\"1844\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1979\"},\"glyph\":{\"id\":\"1980\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1982\"},\"nonselection_glyph\":{\"id\":\"1981\"},\"view\":{\"id\":\"1984\"}},\"id\":\"1983\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2410\"},\"group\":null,\"major_label_policy\":{\"id\":\"2411\"},\"ticker\":{\"id\":\"1595\"}},\"id\":\"1594\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2407\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1310\",\"type\":\"ResetTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1830\"},{\"id\":\"1831\"},{\"id\":\"1832\"},{\"id\":\"1833\"},{\"id\":\"1834\"},{\"id\":\"1835\"}]},\"id\":\"1837\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2408\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1973\"}},\"id\":\"1978\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1844\"}},\"id\":\"1849\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1661\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"Fixed \\nelement\"],\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2228\"},\"selection_policy\":{\"id\":\"2227\"}},\"id\":\"1979\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1104\"},\"glyph\":{\"id\":\"1105\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1107\"},\"nonselection_glyph\":{\"id\":\"1106\"},\"view\":{\"id\":\"1109\"}},\"id\":\"1108\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1603\",\"type\":\"HelpTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1598\"},{\"id\":\"1599\"},{\"id\":\"1600\"},{\"id\":\"1601\"},{\"id\":\"1602\"},{\"id\":\"1603\"},{\"id\":\"1605\"}]},\"id\":\"1606\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1846\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2468\"},\"selection_policy\":{\"id\":\"2467\"}},\"id\":\"1648\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1979\"}},\"id\":\"1984\",\"type\":\"CDSView\"},{\"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\":\"1312\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1865\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[120],\"y\":[0]},\"selected\":{\"id\":\"2230\"},\"selection_policy\":{\"id\":\"2229\"}},\"id\":\"1985\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1684\"},\"glyph\":{\"id\":\"1685\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1687\"},\"nonselection_glyph\":{\"id\":\"1686\"},\"view\":{\"id\":\"1689\"}},\"id\":\"1688\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2435\"},\"selection_policy\":{\"id\":\"2434\"}},\"id\":\"1104\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"black\"},\"height\":{\"value\":30.0},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1986\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1324\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1655\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1657\"},\"nonselection_glyph\":{\"id\":\"1656\"},\"view\":{\"id\":\"1659\"}},\"id\":\"1658\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1982\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1850\"},\"glyph\":{\"id\":\"1851\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1853\"},\"nonselection_glyph\":{\"id\":\"1852\"},\"view\":{\"id\":\"1855\"}},\"id\":\"1854\",\"type\":\"GlyphRenderer\"},{\"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\":\"1114\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2000\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1648\"},\"glyph\":{\"id\":\"1649\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1651\"},\"nonselection_glyph\":{\"id\":\"1650\"},\"view\":{\"id\":\"1653\"}},\"id\":\"1652\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1876\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1651\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1656\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1851\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"black\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":30.0},\"line_alpha\":{\"value\":0.1},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1987\",\"type\":\"Rect\"},{\"attributes\":{\"below\":[{\"id\":\"1624\"}],\"center\":[{\"id\":\"1627\"},{\"id\":\"1631\"}],\"height\":200,\"renderers\":[{\"id\":\"1724\"},{\"id\":\"1730\"},{\"id\":\"1736\"}],\"right\":[{\"id\":\"1628\"}],\"title\":{\"id\":\"1615\"},\"toolbar\":{\"id\":\"1640\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1617\"},\"x_scale\":{\"id\":\"1620\"},\"y_range\":{\"id\":\"1550\"},\"y_scale\":{\"id\":\"1622\"}},\"id\":\"1614\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data\":{\"x\":[0,-0.0,-0.0,-0.0,-0.0,-0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2478\"},\"selection_policy\":{\"id\":\"2477\"}},\"id\":\"1666\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1993\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1650\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-3.0,3.0],\"y\":[0,0]},\"selected\":{\"id\":\"2470\"},\"selection_policy\":{\"id\":\"2469\"}},\"id\":\"1660\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1985\"},\"glyph\":{\"id\":\"1986\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1988\"},\"nonselection_glyph\":{\"id\":\"1987\"},\"view\":{\"id\":\"1990\"}},\"id\":\"1989\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2231\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1673\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1675\"},\"nonselection_glyph\":{\"id\":\"1674\"},\"view\":{\"id\":\"1677\"}},\"id\":\"1676\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"black\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":30.0},\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":2},\"width\":{\"value\":30.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1988\",\"type\":\"Rect\"},{\"attributes\":{\"below\":[{\"id\":\"1789\"}],\"center\":[{\"id\":\"1792\"},{\"id\":\"1796\"},{\"id\":\"1857\"}],\"height\":200,\"left\":[{\"id\":\"1793\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1848\"},{\"id\":\"1867\"},{\"id\":\"1873\"},{\"id\":\"1879\"},{\"id\":\"1885\"}],\"title\":{\"id\":\"1779\"},\"toolbar\":{\"id\":\"1804\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1781\"},\"x_scale\":{\"id\":\"1785\"},\"y_range\":{\"id\":\"1783\"},\"y_scale\":{\"id\":\"1787\"}},\"id\":\"1778\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"tools\":[{\"id\":\"1090\"},{\"id\":\"1091\"},{\"id\":\"1092\"},{\"id\":\"1093\"},{\"id\":\"1094\"},{\"id\":\"1095\"}]},\"id\":\"1097\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1991\"},\"glyph\":{\"id\":\"1992\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1994\"},\"nonselection_glyph\":{\"id\":\"1993\"},\"view\":{\"id\":\"1996\"}},\"id\":\"1995\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1104\"}},\"id\":\"1109\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2452\"},\"selection_policy\":{\"id\":\"2451\"}},\"id\":\"1869\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1992\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2232\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":320.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":160.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1107\",\"type\":\"Rect\"},{\"attributes\":{\"end_angle\":{\"value\":0},\"line_color\":{\"value\":\"gray\"},\"line_dash\":{\"value\":\"2 5\"},\"radius\":{\"value\":60},\"start_angle\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2004\",\"type\":\"Arc\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1856\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2386\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1857\",\"type\":\"Arrow\"},{\"attributes\":{\"interval\":50},\"id\":\"1110\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{\"source\":{\"id\":\"1985\"}},\"id\":\"1990\",\"type\":\"CDSView\"},{\"attributes\":{\"end\":400,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2137\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1121\",\"type\":\"Slider\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1864\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"Rotating \\nelement\"],\"x\":[120],\"y\":[0]},\"selected\":{\"id\":\"2232\"},\"selection_policy\":{\"id\":\"2231\"}},\"id\":\"1991\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1666\"},\"glyph\":{\"id\":\"1667\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1669\"},\"nonselection_glyph\":{\"id\":\"1668\"},\"view\":{\"id\":\"1671\"}},\"id\":\"1670\",\"type\":\"GlyphRenderer\"},{\"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\":\"1116\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1999\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1859\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2421\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1860\",\"type\":\"Arrow\"},{\"attributes\":{\"source\":{\"id\":\"1660\"}},\"id\":\"1665\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1997\"}},\"id\":\"2002\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1862\"}},\"id\":\"1868\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1659\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1991\"}},\"id\":\"1996\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1122\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2352\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1123\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1660\"},\"glyph\":{\"id\":\"1661\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1663\"},\"nonselection_glyph\":{\"id\":\"1662\"},\"view\":{\"id\":\"1665\"}},\"id\":\"1664\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,150.0],\"y\":[0,0]},\"selected\":{\"id\":\"2234\"},\"selection_policy\":{\"id\":\"2233\"}},\"id\":\"1997\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"tools\":[{\"id\":\"1306\"},{\"id\":\"1307\"},{\"id\":\"1308\"},{\"id\":\"1309\"},{\"id\":\"1310\"},{\"id\":\"1311\"},{\"id\":\"1313\"}]},\"id\":\"1314\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1862\"},\"glyph\":{\"id\":\"1864\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1866\"},\"nonselection_glyph\":{\"id\":\"1865\"},\"view\":{\"id\":\"1868\"}},\"id\":\"1867\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_align\":{\"value\":\"center\"},\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"14px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1994\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1122\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1871\",\"type\":\"Scatter\"},{\"attributes\":{\"line_dash\":[4,4],\"line_width\":0.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1998\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1663\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1997\"},\"glyph\":{\"id\":\"1998\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2000\"},\"nonselection_glyph\":{\"id\":\"1999\"},\"view\":{\"id\":\"2002\"}},\"id\":\"2001\",\"type\":\"GlyphRenderer\"}],\"root_ids\":[\"2162\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"4091ddde-7c54-4fd2-a6a6-4bb0c025871d\",\"root_ids\":[\"2162\"],\"roots\":{\"2162\":\"2e089feb-3b1b-4ecc-9884-faba18e88063\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "2162" + } + }, + "output_type": "display_data" } ], "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout),\n", - " slider_b,\n", - " slider_h,\n", - " # row(div_geo, div_forces),\n", - " slider_y,\n", - " slider_theta_element,\n", - " Spacer(height=padding_layout),\n", - " slider_position,\n", - " slider_q,\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M)),\n", - " row(column(\n", - " row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma),\n", - " row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau),\n", - " ))\n", - " ),\n", - " column(fig_Mohr_circle, fig_stress_state)\n", - " ],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_plastic.ipynb b/Simple Beam DEMOs/sb_plastic.ipynb index f43e5d2..212d0d9 100644 --- a/Simple Beam DEMOs/sb_plastic.ipynb +++ b/Simple Beam DEMOs/sb_plastic.ipynb @@ -1,1341 +1,487 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Plastic Analysis\n", "In this first notebook, the plastic analysis is presented." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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 bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\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\n", - "from cienpy import models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "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", - "# h = 220.6265 # [mm]\n", "b = 100 # [mm]\n", "q = 4; # [kN/m]\n", "P = 10; # [kN]\n", - "# P = 587.418; # [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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "yG = beam_section.compute_centroid_y(h)\n", "y_n_axis = ststel.compute_neutral_axis(N, A, Iy, M, yG)\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_Q = q/4*5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "data_section_scheme = dict(\n", - " x=[0, 0], \n", - " y=[0, h]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " E=[E],\n", - " fy=[fy],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " yG=[yG],\n", - " y_n_axis=[y_n_axis],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source_section_scheme = ColumnDataSource(data_section_scheme)\n", - "source = ColumnDataSource(data)" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Create the figures, the plots and the widgets (same of Notebook 3 - Diagrams):" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO, \n", - " text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(width=DIV_B_FORCES, \n", - " text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))\n", - "\n", - "\n", - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)\n", - "\n", - "\n", - "# figures for the stresses and strains\n", - "FIG_B_ss = 200\n", - "FIG_H_ss = 200\n", - "options_stress_strain = dict(\n", - " toolbar_location=None,\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_height=FIG_H_ss\n", - ")\n", - "fig_stress_N = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2099 [MPa]\")\n", - "fig_stress_N.yaxis.visible = False\n", - "fig_axial_strain = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2099 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_axial_strain.yaxis.visible = False\n", - "fig_stress_M = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending stress and centroid\",\n", - " y_range=fig_stress_N.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2098 [MPa]\")\n", - "fig_stress_M.yaxis.visible = False\n", - "fig_bending_strain = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2098 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_bending_strain.yaxis.visible = False\n", - "fig_stress_V = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Shear stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\u1d65 [MPa]\")\n", - "fig_stress_V.yaxis.visible = False\n", - "fig_stress_sigma = figure(**options_stress_strain,\n", - " plot_width=int(FIG_B_ss*1.2),\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress (green=yield) and N.A.\",\n", - " y_range=fig_stress_N.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\")\n", - "fig_stress_tau = figure(**options_stress_strain,\n", - " plot_width=int(FIG_B_ss*1.2),\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER TAU}\",\n", - " y_range=fig_stress_V.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\")\n", - "\n", - "# plot stress N V M\n", - "discr_stress_strain = 10\n", - "scale_x = 25\n", - "y_discr = np.linspace(0, h, discr_stress_strain)\n", - "sigma_N = ststel.compute_sigma_axial(y_discr, 0, A)\n", - "N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h,\n", - " source_section_scheme, scale_x=scale_x/10)\n", - "sigma_M = ststel.compute_sigma_bending(y_discr, 0, Iy, yG)\n", - "(M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h,\n", - " source_section_scheme, True, yG, scale_x=scale_x)\n", - "S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG)\n", - "tau_V = ststel.compute_tau_shear(y_discr, 0, S_rect, Iy, b)\n", - "V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1)\n", - "\n", - "# plot stress sigma (moved below) and tau\n", - "tau_total = tau_V\n", - "tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h,\n", - " source_section_scheme, scale_x=1)\n", - "\n", - "# plot strain N M\n", - "strain_axial = ststel.compute_epsilon_axial(y_discr, sigma_N, E)\n", - "axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme)\n", - "strain_bending = ststel.compute_epsilon_bending(y_discr, sigma_M, E)\n", - "bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme)\n", - "\n", - "\n", - "# figures for NVM\n", - "fig_NM_section = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " title=\"N and M at position x\",\n", - " match_aspect=True)\n", - "fig_NM_section.axis.visible = False\n", - "fig_NM_section.grid.grid_line_alpha = 0\n", - "\n", - "fig_V_section = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " title=\"V at position x\",\n", - " match_aspect=True)\n", - "fig_V_section.axis.visible = False\n", - "fig_V_section.grid.grid_line_alpha = 0\n", - "\n", - "# section with NVM\n", - "models.section_diagram(fig_NM_section)\n", - "models.section_diagram(fig_V_section)\n", - "\n", - "# NVM in section\n", - "section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red')\n", - "section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red')\n", - "(section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0)\n", - "\n", - "# NVM label in section\n", - "OFFSET_N = 1\n", - "label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[\"\"], text_color=\"red\", text_baseline='bottom')\n", - "label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[\"\"], text_color=\"red\", text_baseline='top')\n", - "label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[\"\"], text_color=\"red\", text_baseline='middle')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [], - "source": [ - "# choose different elastic modulus\n", - "E_wood = 8e3 # [MPa]\n", - "E_concrete = 26e3 # [MPa]\n", - "E_ceramic = 300e3 # [MPa]\n", - "slider_elastic = Slider(\n", - " title=\"Change the elastic modulus [MPa]\",\n", - " start=E_wood,\n", - " end=E_ceramic,\n", - " step=1e3,\n", - " value=E,\n", - " margin=(5, 5, 0, 5)\n", - ")\n", - "\n", - "\n", - "# show values of E\n", - "div_E = Div(margin=(0, 5, 0, 5),\n", - " text=f\"\"\"\n", - "

\n", - " Ewood = {math.trunc(E_wood/1e3)} GPa; Econcrete = {math.trunc(E_concrete/1e3)} GPa
\n", - " Esteel = {math.trunc(E_steel/1e3)} GPa; Eceramic = {math.trunc(E_ceramic/1e3)} GPa

\n", - " \"\"\")\n", - "\n", - "\n", - "# choose different yield strength\n", - "fy_wood = 16 # [MPa] (bending)\n", - "fy_concrete = 25 # [MPa]\n", - "fy_glass = 1000 # [MPa] (compressive)\n", - "slider_yield = Slider(\n", - " title=\"Change the yield strength [MPa]\",\n", - " start=fy_wood,\n", - " end=fy_glass,\n", - " step=1,\n", - " value=fy,\n", - " margin=(0, 5, 0, 5)\n", - ")\n", - "\n", - "\n", - "# show values of fy\n", - "div_fy = Div(margin=(0, 5, 0, 5),\n", - " text=f\"\"\"\n", - "

\n", - " fy,wood = {math.trunc(fy_wood)} MPa; fy,concrete = {math.trunc(fy_concrete)} MPa
\n", - " fy,steel = {math.trunc(fy_steel)} MPa; fy,glass = {math.trunc(fy_glass)} MPa

\n", - " \"\"\")\n", - "\n", - "\n", - "# add total strain epsilon\n", - "fig_total_strain = figure(**options_stress_strain,\n", - " plot_width=FIG_B_ss,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total strain (green=yield)\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON} [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_total_strain.yaxis.visible = False\n", - "\n", - "\n", - "# add the strain and stress with yield implemented\n", - "# plastic\n", - "discr_pl = 2000\n", - "(stress_pl, strain_pl, y_discr_pl, yNA_pl) = ststpl.compute_total_stress_strain(discr_pl, h, fy, E, N, M, A, Iy, yG)\n", - "tmp_y = np.linspace(0, h, len(stress_pl))\n", - "total_stress_pl_diag = fig_stress_sigma.line([0, *stress_pl, 0], [0, *tmp_y, h], color='green')\n", - "total_strain_pl_diag = fig_total_strain.line(strain_pl*0, y_discr_pl, color='green')\n", - "# elastic\n", - "total_strain = ststel.compute_total_epsilon(strain_axial, strain_bending)\n", - "total_strain_diag = models.strain_diagram(fig_total_strain, total_strain, h, source_section_scheme)\n", - "# (moved from above, total stress sigma elastic)\n", - "sigma_total = sigma_M + sigma_N\n", - "(sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h,\n", - " source_section_scheme,True, yG, scale_x=scale_x)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " discr_stress=discr_stress_strain,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{ststel.implement_compute_tau_shearJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_total_sigmaJS()}\n", - "{ststel.implement_compute_total_tauJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{ststel.implement_compute_total_sigmaJS()}\n", - "{ststel.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{ststel.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b, code=code_change_b)\n", - "\n", - "\n", - "args_slider_h = dict(source=source,\n", - " s_b=source_beam,\n", - " s_ss=source_section_scheme,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const data_ss = s_ss.data\n", - "const b = db['b'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "const yG = compute_centroid_y(h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['yG'][0] = yG\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "data_ss['y'][1] = h // change the height of the section in the diagrams\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_ss.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{ststel.implement_compute_total_sigmaJS()}\n", - "{ststel.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{ststel.implement_compute_tau_shearJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{ststel.implement_compute_total_sigmaJS()}\n", - "{ststel.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{ststel.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{ststel.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{ststel.implement_compute_total_sigmaJS()}\n", - "{ststel.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{ststel.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "args_slider_yield = dict(source=source,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_slider_yield = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const fy = cb_obj.value\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['fy'][0] = fy\n", - "\n", - "// update\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "{js.implement_linspaceJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "\"\"\"\n", - "update_slider_yield = CustomJS(args=args_slider_yield, code=code_slider_yield)\n", - "\n", - "# for the implementation in the other nbs!!!\n", - "# args_slider_elastic = dict(source=source,\n", - "# N_stress_diag=N_stress_diag,\n", - "# axial_strain_diag=axial_strain_diag,\n", - "# M_stress_diag=M_stress_diag,\n", - "# bending_strain_diag=bending_strain_diag,\n", - "# centroid=centroid)\n", - "# code_slider_elastic = f\"\"\"\n", - "# // retrieve data\n", - "# const db = source.data\n", - "# const E = cb_obj.value\n", - "\n", - "# // update E\n", - "# db['E'][0] = E\n", - "\n", - "# // update\n", - "# update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "# update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "\n", - "# // apply changes\n", - "# source.change.emit()\n", - "\n", - "# // declare functions\n", - "# {js.implement_linspaceJS()}\n", - "# {sb.implement_compute_NJS()}\n", - "# {js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "# {js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "# {ststel.implement_compute_epsilon_bendingJS()}\n", - "# {ststel.implement_compute_epsilon_axialJS()}\n", - "# {ststel.implement_compute_sigma_axialJS()}\n", - "# {js.implement_update_stress_diagramJS()}\n", - "# {js.implement_update_strain_diagramJS()}\n", - "# {ststel.implement_compute_sigma_bendingJS()}\n", - "# \"\"\"\n", - "# update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic)\n", - "\n", - "# slider_elastic.js_on_change('value', update_slider_elastic)\n", - "\n", - "args_slider_elastic = dict(source=source,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " centroid=centroid,\n", - " total_strain_diag=total_strain_diag,\n", - " total_stress_pl_diag=total_stress_pl_diag,\n", - " total_strain_pl_diag=total_strain_pl_diag)\n", - "code_slider_elastic = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const E = cb_obj.value\n", - "\n", - "// update E\n", - "db['E'][0] = E\n", - "\n", - "// update\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_linspaceJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{ststel.implement_compute_epsilon_bendingJS()}\n", - "{ststel.implement_compute_epsilon_axialJS()}\n", - "{ststel.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{ststel.implement_compute_sigma_bendingJS()}\n", - "{js.implement_update_plastic_stress_strainJS(discr_pl)}\n", - "{ststpl.implement_compute_NyJS()}\n", - "{ststpl.implement_compute_MyJS()}\n", - "{ststpl.implement_compute_total_stress_strainJS()}\n", - "{ststpl.implement_support_function_plasticJS()}\n", - "{ststel.implement_compute_total_epsilonJS()}\n", - "\"\"\"\n", - "update_slider_elastic = CustomJS(args=args_slider_elastic, code=code_slider_elastic)\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)\n", - "slider_elastic.js_on_change('value', update_slider_elastic)\n", - "slider_yield.js_on_change('value', update_slider_yield)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "Opening in existing browser session.\n" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "name": "stderr", - "output_type": "stream", - "text": [ - "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\n" - ] + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"cf03a18f-f85a-4414-bd96-45e97dc6b718\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"4487\"}]},\"id\":\"4488\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"4763\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"3812\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"4744\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"3806\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"4773\"},\"group\":null,\"major_label_policy\":{\"id\":\"4774\"},\"ticker\":{\"id\":\"3802\"}},\"id\":\"3801\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4764\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"3801\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3804\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3802\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4881\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3810\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"4882\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3805\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"3811\"}},\"id\":\"3807\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"3808\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4883\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3809\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4841\"},\"selection_policy\":{\"id\":\"4840\"}},\"id\":\"4765\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4884\",\"type\":\"AllLabels\"},{\"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\":\"3811\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"3994\"},{\"id\":\"3995\"},{\"id\":\"3996\"},{\"id\":\"3997\"},{\"id\":\"3998\"},{\"id\":\"3999\"},{\"id\":\"4001\"}]},\"id\":\"4002\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4852\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4853\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3838\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4855\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4840\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"3805\"},{\"id\":\"3806\"},{\"id\":\"3807\"},{\"id\":\"3808\"},{\"id\":\"3809\"},{\"id\":\"3810\"},{\"id\":\"3812\"}]},\"id\":\"3813\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4856\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4841\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4842\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3823\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3827\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4843\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4910\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"3829\"}],\"center\":[{\"id\":\"3832\"},{\"id\":\"3836\"}],\"height\":200,\"left\":[{\"id\":\"3833\"}],\"renderers\":[{\"id\":\"3881\"},{\"id\":\"3887\"},{\"id\":\"3905\"}],\"title\":{\"id\":\"4744\"},\"toolbar\":{\"id\":\"3845\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"3504\"},\"x_scale\":{\"id\":\"3825\"},\"y_range\":{\"id\":\"3823\"},\"y_scale\":{\"id\":\"3827\"}},\"id\":\"3821\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4767\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3825\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4911\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4768\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4935\"},\"selection_policy\":{\"id\":\"4934\"}},\"id\":\"4857\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"4782\"},\"group\":null,\"major_label_policy\":{\"id\":\"4783\"},\"ticker\":{\"id\":\"3830\"}},\"id\":\"3829\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4770\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3830\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"3829\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3832\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4771\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4886\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4779\"},\"group\":null,\"major_label_policy\":{\"id\":\"4780\"},\"ticker\":{\"id\":\"3834\"}},\"id\":\"3833\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4887\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"3833\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3836\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3834\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4889\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4747\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"tools\":[{\"id\":\"3837\"},{\"id\":\"3838\"},{\"id\":\"3839\"},{\"id\":\"3840\"},{\"id\":\"3841\"},{\"id\":\"3842\"},{\"id\":\"3844\"}]},\"id\":\"3845\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4890\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3837\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4748\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"3843\"}},\"id\":\"3839\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"3840\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4912\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3841\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"4750\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4913\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4751\",\"type\":\"AllLabels\"},{\"attributes\":{\"below\":[{\"id\":\"4020\"}],\"center\":[{\"id\":\"4023\"},{\"id\":\"4027\"}],\"height\":200,\"left\":[{\"id\":\"4024\"}],\"renderers\":[{\"id\":\"4243\"},{\"id\":\"4249\"},{\"id\":\"4255\"}],\"title\":{\"id\":\"4011\"},\"toolbar\":{\"id\":\"4036\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"4013\"},\"x_scale\":{\"id\":\"4016\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"4018\"}},\"id\":\"4010\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4859\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4810\"},\"selection_policy\":{\"id\":\"4809\"}},\"id\":\"4752\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4973\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4860\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4923\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4924\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4811\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4018\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4295\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3927\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4812\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3926\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4016\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4297\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4813\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4299\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"3967\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"4895\"},\"group\":null,\"major_label_policy\":{\"id\":\"4896\"},\"ticker\":{\"id\":\"4304\"},\"visible\":false},\"id\":\"4303\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4948\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4892\"},\"group\":null,\"major_label_policy\":{\"id\":\"4893\"},\"ticker\":{\"id\":\"4308\"},\"visible\":false},\"id\":\"4307\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4814\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4312\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4949\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"4303\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"4306\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4925\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"V at position x\"},\"id\":\"4293\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"4815\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4304\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"4307\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"4310\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4926\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3948\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4301\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4816\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4325\"},\"glyph\":{\"id\":\"4326\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4328\"},\"nonselection_glyph\":{\"id\":\"4327\"},\"view\":{\"id\":\"4330\"}},\"id\":\"4329\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4308\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4817\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4316\",\"type\":\"HelpTool\"},{\"attributes\":{\"tools\":[{\"id\":\"3926\"},{\"id\":\"3927\"},{\"id\":\"3928\"},{\"id\":\"3929\"},{\"id\":\"3930\"},{\"id\":\"3931\"},{\"id\":\"3933\"}]},\"id\":\"3934\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4311\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"3945\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"4317\"}},\"id\":\"4313\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4246\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4248\"},\"nonselection_glyph\":{\"id\":\"4247\"},\"view\":{\"id\":\"4250\"}},\"id\":\"4249\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4818\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4314\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4315\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"3964\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial strain\"},\"id\":\"3943\",\"type\":\"Title\"},{\"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\":\"4317\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"3952\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3955\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4819\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4927\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3961\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"3950\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4820\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4928\",\"type\":\"Selection\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4357\",\"type\":\"Text\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2099 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"4861\"},\"group\":null,\"major_label_policy\":{\"id\":\"4862\"},\"ticker\":{\"id\":\"4237\"}},\"id\":\"3952\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4859\"},\"group\":null,\"major_label_policy\":{\"id\":\"4860\"},\"ticker\":{\"id\":\"3957\"},\"visible\":false},\"id\":\"3956\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4358\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"3956\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3959\",\"type\":\"Grid\"},{\"attributes\":{\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4363\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"3957\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4950\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4356\"},\"glyph\":{\"id\":\"4357\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4359\"},\"nonselection_glyph\":{\"id\":\"4358\"},\"view\":{\"id\":\"4361\"}},\"id\":\"4360\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3965\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"4951\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"4356\"}},\"id\":\"4361\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3960\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"3966\"}},\"id\":\"3962\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"3963\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4334\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"3986\"}],\"center\":[{\"id\":\"3989\"},{\"id\":\"3993\"}],\"height\":200,\"left\":[{\"id\":\"3990\"}],\"renderers\":[{\"id\":\"4169\"},{\"id\":\"4175\"},{\"id\":\"4181\"}],\"title\":{\"id\":\"3977\"},\"toolbar\":{\"id\":\"4002\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"3979\"},\"x_scale\":{\"id\":\"3982\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"3984\"}},\"id\":\"3976\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"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\":\"3966\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4343\"},\"glyph\":{\"id\":\"4345\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4347\"},\"nonselection_glyph\":{\"id\":\"4346\"},\"view\":{\"id\":\"4349\"}},\"id\":\"4348\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4929\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4930\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4328\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4326\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4013\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"4924\"},\"selection_policy\":{\"id\":\"4923\"}},\"id\":\"4325\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"tools\":[{\"id\":\"4311\"},{\"id\":\"4312\"},{\"id\":\"4313\"},{\"id\":\"4314\"},{\"id\":\"4315\"},{\"id\":\"4316\"}]},\"id\":\"4318\",\"type\":\"Toolbar\"},{\"attributes\":{\"source\":{\"id\":\"4325\"}},\"id\":\"4330\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4821\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"4973\"},\"selection_policy\":{\"id\":\"4972\"}},\"id\":\"4331\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4327\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4794\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4822\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4931\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"4926\"},\"selection_policy\":{\"id\":\"4925\"}},\"id\":\"4343\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4331\"},\"glyph\":{\"id\":\"4332\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4334\"},\"nonselection_glyph\":{\"id\":\"4333\"},\"view\":{\"id\":\"4336\"}},\"id\":\"4335\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4795\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4823\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4932\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4332\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4333\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4824\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"4331\"}},\"id\":\"4336\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"3960\"},{\"id\":\"3961\"},{\"id\":\"3962\"},{\"id\":\"3963\"},{\"id\":\"3964\"},{\"id\":\"3965\"},{\"id\":\"3967\"}]},\"id\":\"3968\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"4340\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"4340\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"4897\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"4341\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"3979\",\"type\":\"DataRange1d\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4359\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"4337\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"4857\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"4338\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4812\"},\"selection_policy\":{\"id\":\"4811\"}},\"id\":\"4753\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4221\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4871\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4814\"},\"selection_policy\":{\"id\":\"4813\"}},\"id\":\"4754\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4831\",\"type\":\"UnionRenderers\"},{\"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\":\"4284\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"4219\"}},\"id\":\"4224\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4222\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4872\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4832\",\"type\":\"Selection\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"4237\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{},\"id\":\"4960\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4227\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4981\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4816\"},\"selection_policy\":{\"id\":\"4815\"}},\"id\":\"4755\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4226\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4873\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4848\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4961\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4982\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4849\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4228\",\"type\":\"Line\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4818\"},\"selection_policy\":{\"id\":\"4817\"}},\"id\":\"4756\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4234\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4230\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4232\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"4941\"},\"selection_policy\":{\"id\":\"4940\"}},\"id\":\"4231\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4820\"},\"selection_policy\":{\"id\":\"4819\"}},\"id\":\"4757\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4231\"},\"glyph\":{\"id\":\"4232\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4234\"},\"nonselection_glyph\":{\"id\":\"4233\"},\"view\":{\"id\":\"4236\"}},\"id\":\"4235\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4240\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4233\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4239\"},\"glyph\":{\"id\":\"4240\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4242\"},\"nonselection_glyph\":{\"id\":\"4241\"},\"view\":{\"id\":\"4244\"}},\"id\":\"4243\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"4231\"}},\"id\":\"4236\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4833\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"4239\"}},\"id\":\"4244\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"4949\"},\"selection_policy\":{\"id\":\"4948\"}},\"id\":\"4239\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"4257\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{},\"id\":\"4834\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4241\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4246\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4242\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4247\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4283\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"4266\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4248\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4254\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4962\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4250\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4252\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4963\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"4951\"},\"selection_policy\":{\"id\":\"4950\"}},\"id\":\"4251\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4251\"},\"glyph\":{\"id\":\"4252\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4254\"},\"nonselection_glyph\":{\"id\":\"4253\"},\"view\":{\"id\":\"4256\"}},\"id\":\"4255\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4875\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4262\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4253\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"4270\"}],\"center\":[{\"id\":\"4273\"},{\"id\":\"4277\"},{\"id\":\"4338\"}],\"height\":200,\"left\":[{\"id\":\"4274\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"4329\"},{\"id\":\"4348\"},{\"id\":\"4354\"},{\"id\":\"4360\"},{\"id\":\"4366\"}],\"title\":{\"id\":\"4260\"},\"toolbar\":{\"id\":\"4285\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"4262\"},\"x_scale\":{\"id\":\"4266\"},\"y_range\":{\"id\":\"4264\"},\"y_scale\":{\"id\":\"4268\"}},\"id\":\"4259\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4835\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4876\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"4251\"}},\"id\":\"4256\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4984\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4264\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4836\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4878\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"4855\"},\"group\":null,\"major_label_policy\":{\"id\":\"4856\"},\"ticker\":{\"id\":\"4271\"},\"visible\":false},\"id\":\"4270\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4985\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4852\"},\"group\":null,\"major_label_policy\":{\"id\":\"4853\"},\"ticker\":{\"id\":\"4275\"},\"visible\":false},\"id\":\"4274\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4879\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"4270\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"4273\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N and M at position x\"},\"id\":\"4260\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"4271\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"4274\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"4277\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4268\",\"type\":\"LinearScale\"},{\"attributes\":{\"below\":[{\"id\":\"4303\"}],\"center\":[{\"id\":\"4306\"},{\"id\":\"4310\"},{\"id\":\"4341\"}],\"height\":200,\"left\":[{\"id\":\"4307\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"4335\"},{\"id\":\"4372\"}],\"title\":{\"id\":\"4293\"},\"toolbar\":{\"id\":\"4318\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"4295\"},\"x_scale\":{\"id\":\"4299\"},\"y_range\":{\"id\":\"4297\"},\"y_scale\":{\"id\":\"4301\"}},\"id\":\"4292\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4837\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4275\",\"type\":\"BasicTicker\"},{\"attributes\":{\"tools\":[{\"id\":\"4278\"},{\"id\":\"4279\"},{\"id\":\"4280\"},{\"id\":\"4281\"},{\"id\":\"4282\"},{\"id\":\"4283\"}]},\"id\":\"4285\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4838\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4278\",\"type\":\"PanTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4365\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[6],\"y\":[-5]},\"selected\":{\"id\":\"4932\"},\"selection_policy\":{\"id\":\"4931\"}},\"id\":\"4362\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4362\"},\"glyph\":{\"id\":\"4363\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4365\"},\"nonselection_glyph\":{\"id\":\"4364\"},\"view\":{\"id\":\"4367\"}},\"id\":\"4366\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4965\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4364\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"4986\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4760\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4966\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4987\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4761\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3498\"},\"glyph\":{\"id\":\"3712\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3714\"},\"nonselection_glyph\":{\"id\":\"3713\"},\"view\":{\"id\":\"3716\"}},\"id\":\"3715\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[{\"id\":\"4259\"},{\"id\":\"3942\"},{\"id\":\"3907\"},{\"id\":\"4010\"},{\"id\":\"3976\"},{\"id\":\"4378\"},{\"id\":\"4079\"}]},\"id\":\"4478\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3717\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"4752\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3718\",\"type\":\"Arrow\"},{\"attributes\":{\"children\":[{\"id\":\"4474\"},{\"id\":\"4476\"}]},\"id\":\"4477\",\"type\":\"Row\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"3720\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"4843\"},\"selection_policy\":{\"id\":\"4842\"}},\"id\":\"3853\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"children\":[{\"id\":\"4292\"},{\"id\":\"4479\"},{\"id\":\"4044\"},{\"id\":\"4480\"},{\"id\":\"4481\"},{\"id\":\"4482\"},{\"id\":\"4113\"}]},\"id\":\"4483\",\"type\":\"Row\"},{\"attributes\":{\"source\":{\"id\":\"3498\"}},\"id\":\"3716\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"3723\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3878\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3853\"},\"glyph\":{\"id\":\"3854\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3856\"},\"nonselection_glyph\":{\"id\":\"3855\"},\"view\":{\"id\":\"3858\"}},\"id\":\"3857\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"3717\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"3729\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3856\",\"type\":\"Line\"},{\"attributes\":{\"width\":200},\"id\":\"4482\",\"type\":\"Spacer\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"3726\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3854\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3729\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"4756\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3730\",\"type\":\"Arrow\"},{\"attributes\":{\"below\":[{\"id\":\"3952\"}],\"center\":[{\"id\":\"3955\"},{\"id\":\"3959\"}],\"height\":200,\"left\":[{\"id\":\"3956\"}],\"renderers\":[{\"id\":\"4223\"},{\"id\":\"4229\"},{\"id\":\"4235\"}],\"title\":{\"id\":\"3943\"},\"toolbar\":{\"id\":\"3968\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"3945\"},\"x_scale\":{\"id\":\"3948\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"3950\"}},\"id\":\"3942\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3720\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"4753\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"3721\",\"type\":\"Arrow\"},{\"attributes\":{\"width\":200},\"id\":\"4479\",\"type\":\"Spacer\"},{\"attributes\":{\"source\":{\"id\":\"3853\"}},\"id\":\"3858\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3732\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"4757\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3733\",\"type\":\"Arrow\"},{\"attributes\":{\"width\":200},\"id\":\"4481\",\"type\":\"Spacer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3855\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3723\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"4754\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"3724\",\"type\":\"Arrow\"},{\"attributes\":{\"width\":200},\"id\":\"4480\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"4478\"},{\"id\":\"4483\"}]},\"id\":\"4484\",\"type\":\"Column\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"3732\",\"type\":\"VeeHead\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3861\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3726\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"4755\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3727\",\"type\":\"Arrow\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3862\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3860\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3496\"},\"glyph\":{\"id\":\"3872\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3874\"},\"nonselection_glyph\":{\"id\":\"3873\"},\"view\":{\"id\":\"3876\"}},\"id\":\"3875\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[{\"id\":\"4484\"}]},\"id\":\"4485\",\"type\":\"Row\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"4805\"},\"selection_policy\":{\"id\":\"4804\"}},\"id\":\"3735\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3868\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"4807\"},\"selection_policy\":{\"id\":\"4806\"}},\"id\":\"3742\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"3496\"}},\"id\":\"3864\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4804\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"4477\"},{\"id\":\"4485\"}]},\"id\":\"4486\",\"type\":\"Column\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3735\"},\"glyph\":{\"id\":\"3737\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3739\"},\"nonselection_glyph\":{\"id\":\"3738\"},\"view\":{\"id\":\"3741\"}},\"id\":\"3740\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3866\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3738\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4805\",\"type\":\"Selection\"},{\"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\":\"3932\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"4846\"},\"selection_policy\":{\"id\":\"4845\"}},\"id\":\"3865\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3737\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4905\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"children\":[{\"id\":\"4486\"}]},\"id\":\"4487\",\"type\":\"Row\"},{\"attributes\":{\"axis\":{\"id\":\"3765\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3768\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3865\"},\"glyph\":{\"id\":\"3866\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3868\"},\"nonselection_glyph\":{\"id\":\"3867\"},\"view\":{\"id\":\"3870\"}},\"id\":\"3869\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3739\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"3865\"}},\"id\":\"3870\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4943\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3867\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4906\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"3735\"}},\"id\":\"3741\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3766\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3873\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4944\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3874\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4908\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"3756\",\"type\":\"Title\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3872\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"4770\"},\"group\":null,\"major_label_policy\":{\"id\":\"4771\"},\"ticker\":{\"id\":\"3766\"},\"visible\":false},\"id\":\"3765\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3496\"},\"glyph\":{\"id\":\"3884\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3886\"},\"nonselection_glyph\":{\"id\":\"3885\"},\"view\":{\"id\":\"3888\"}},\"id\":\"3887\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4909\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"4767\"},\"group\":null,\"major_label_policy\":{\"id\":\"4768\"},\"ticker\":{\"id\":\"3770\"}},\"id\":\"3769\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3880\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"3774\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"3496\"}},\"id\":\"3876\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"3780\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"3877\"}},\"id\":\"3882\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3778\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3885\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4806\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3773\",\"type\":\"PanTool\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"4849\"},\"selection_policy\":{\"id\":\"4848\"}},\"id\":\"3877\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"overlay\":{\"id\":\"3779\"}},\"id\":\"3775\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3877\"},\"glyph\":{\"id\":\"3878\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3880\"},\"nonselection_glyph\":{\"id\":\"3879\"},\"view\":{\"id\":\"3882\"}},\"id\":\"3881\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3776\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4807\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3777\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3879\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3886\",\"type\":\"Line\"},{\"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\":\"3779\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3884\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"3890\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"3896\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3500\"},\"glyph\":{\"id\":\"3890\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3892\"},\"nonselection_glyph\":{\"id\":\"3891\"},\"view\":{\"id\":\"3894\"}},\"id\":\"3893\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"3496\"}},\"id\":\"3888\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"3844\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"3500\"}},\"id\":\"3894\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"3891\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"3933\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3496\"},\"glyph\":{\"id\":\"3860\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3862\"},\"nonselection_glyph\":{\"id\":\"3861\"},\"view\":{\"id\":\"3864\"}},\"id\":\"3863\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3930\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"3892\",\"type\":\"Circle\"},{\"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\":\"3843\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3500\"},\"glyph\":{\"id\":\"3896\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3898\"},\"nonselection_glyph\":{\"id\":\"3897\"},\"view\":{\"id\":\"3900\"}},\"id\":\"3899\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"3897\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4945\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3842\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"3929\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"3932\"}},\"id\":\"3928\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"3902\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4946\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"3797\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3800\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"3500\"}},\"id\":\"3900\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"3898\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3500\"},\"glyph\":{\"id\":\"3902\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3904\"},\"nonselection_glyph\":{\"id\":\"3903\"},\"view\":{\"id\":\"3906\"}},\"id\":\"3905\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"3903\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"3931\",\"type\":\"HelpTool\"},{\"attributes\":{\"tools\":[{\"id\":\"3773\"},{\"id\":\"3774\"},{\"id\":\"3775\"},{\"id\":\"3776\"},{\"id\":\"3777\"},{\"id\":\"3778\"},{\"id\":\"3780\"}]},\"id\":\"3781\",\"type\":\"Toolbar\"},{\"attributes\":{\"below\":[{\"id\":\"3918\"}],\"center\":[{\"id\":\"3921\"},{\"id\":\"3925\"}],\"height\":200,\"left\":[{\"id\":\"3922\"}],\"renderers\":[{\"id\":\"4151\"},{\"id\":\"4157\"},{\"id\":\"4163\"}],\"title\":{\"id\":\"3908\"},\"toolbar\":{\"id\":\"3934\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"3910\"},\"x_scale\":{\"id\":\"3914\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"3916\"}},\"id\":\"3907\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"3500\"}},\"id\":\"3906\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"3904\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"4776\"},\"group\":null,\"major_label_policy\":{\"id\":\"4777\"},\"ticker\":{\"id\":\"3798\"},\"visible\":false},\"id\":\"3797\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3910\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3916\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3919\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"3791\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3912\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial stress\"},\"id\":\"3908\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"4742\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4864\"},\"group\":null,\"major_label_policy\":{\"id\":\"4865\"},\"ticker\":{\"id\":\"3923\"},\"visible\":false},\"id\":\"3922\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"3797\"}],\"center\":[{\"id\":\"3800\"},{\"id\":\"3804\"}],\"height\":160,\"left\":[{\"id\":\"3801\"}],\"renderers\":[{\"id\":\"3869\"},{\"id\":\"3875\"},{\"id\":\"3899\"}],\"title\":{\"id\":\"4742\"},\"toolbar\":{\"id\":\"3813\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"3504\"},\"x_scale\":{\"id\":\"3793\"},\"y_range\":{\"id\":\"3791\"},\"y_scale\":{\"id\":\"3795\"}},\"id\":\"3789\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"3918\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3921\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3793\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3914\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4809\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2099 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"4867\"},\"group\":null,\"major_label_policy\":{\"id\":\"4868\"},\"ticker\":{\"id\":\"3919\"}},\"id\":\"3918\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3923\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4810\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3795\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3798\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"3922\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3925\",\"type\":\"Grid\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4345\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4352\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"4098\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4773\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4886\"},\"group\":null,\"major_label_policy\":{\"id\":\"4887\"},\"ticker\":{\"id\":\"4094\"}},\"id\":\"4093\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"4928\"},\"selection_policy\":{\"id\":\"4927\"}},\"id\":\"4350\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"4093\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4096\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4346\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4094\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4369\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"4774\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4183\"},\"glyph\":{\"id\":\"4184\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4186\"},\"nonselection_glyph\":{\"id\":\"4185\"},\"view\":{\"id\":\"4188\"}},\"id\":\"4187\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4347\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4343\"}},\"id\":\"4349\",\"type\":\"CDSView\"},{\"attributes\":{\"end\":1000,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4468\"}]},\"margin\":[0,5,0,5],\"start\":16,\"title\":\"Change the yield strength [MPa]\",\"value\":355},\"id\":\"4376\",\"type\":\"Slider\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"4828\"},\"selection_policy\":{\"id\":\"4827\"}},\"id\":\"3496\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4776\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4353\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"4097\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"4103\"}},\"id\":\"4099\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[5],\"y\":[0]},\"selected\":{\"id\":\"4975\"},\"selection_policy\":{\"id\":\"4974\"}},\"id\":\"4368\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"4799\"},\"selection_policy\":{\"id\":\"4798\"}},\"id\":\"3497\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4777\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4351\",\"type\":\"Scatter\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"3504\",\"type\":\"Range1d\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4370\",\"type\":\"Text\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4184\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[11.0],\"y\":[1]},\"selected\":{\"id\":\"4930\"},\"selection_policy\":{\"id\":\"4929\"}},\"id\":\"4356\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4350\"},\"glyph\":{\"id\":\"4351\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4353\"},\"nonselection_glyph\":{\"id\":\"4352\"},\"view\":{\"id\":\"4355\"}},\"id\":\"4354\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4190\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4192\"},\"nonselection_glyph\":{\"id\":\"4191\"},\"view\":{\"id\":\"4194\"}},\"id\":\"4193\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4974\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"4350\"}},\"id\":\"4355\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"4980\"},\"selection_policy\":{\"id\":\"4979\"}},\"id\":\"4183\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"4362\"}},\"id\":\"4367\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4975\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4179\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4371\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"4368\"}},\"id\":\"4373\",\"type\":\"CDSView\"},{\"attributes\":{\"margin\":[0,5,0,5],\"text\":\"\\n

\\n Ewood = 8 GPa; Econcrete = 26 GPa
\\n Esteel = 200 GPa; Eceramic = 300 GPa

\\n \"},\"id\":\"4375\",\"type\":\"Div\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c4\"},\"id\":\"4114\",\"type\":\"Title\"},{\"attributes\":{\"below\":[{\"id\":\"4388\"}],\"center\":[{\"id\":\"4391\"},{\"id\":\"4395\"}],\"height\":200,\"left\":[{\"id\":\"4392\"}],\"renderers\":[{\"id\":\"4422\"},{\"id\":\"4428\"},{\"id\":\"4434\"},{\"id\":\"4440\"}],\"title\":{\"id\":\"4379\"},\"toolbar\":{\"id\":\"4404\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"4381\"},\"x_scale\":{\"id\":\"4384\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"4386\"}},\"id\":\"4378\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4368\"},\"glyph\":{\"id\":\"4369\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4371\"},\"nonselection_glyph\":{\"id\":\"4370\"},\"view\":{\"id\":\"4373\"}},\"id\":\"4372\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4381\",\"type\":\"DataRange1d\"},{\"attributes\":{\"margin\":[0,5,0,5],\"text\":\"\\n

\\n fy,wood = 16 MPa; fy,concrete = 25 MPa
\\n fy,steel = 355 MPa; fy,glass = 1000 MPa

\\n \"},\"id\":\"4377\",\"type\":\"Div\"},{\"attributes\":{\"end\":300000.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4469\"}]},\"margin\":[5,5,0,5],\"start\":8000.0,\"step\":1000.0,\"title\":\"Change the elastic modulus [MPa]\",\"value\":200000.0},\"id\":\"4374\",\"type\":\"Slider\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"4138\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4451\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4453\"},\"nonselection_glyph\":{\"id\":\"4452\"},\"view\":{\"id\":\"4455\"}},\"id\":\"4454\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4124\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4384\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"4403\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"3763\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total strain (green=yield)\"},\"id\":\"4379\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"4388\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4391\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3761\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4116\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4397\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"4803\"},\"selection_policy\":{\"id\":\"4802\"}},\"id\":\"3498\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4219\"},\"glyph\":{\"id\":\"4220\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4222\"},\"nonselection_glyph\":{\"id\":\"4221\"},\"view\":{\"id\":\"4224\"}},\"id\":\"4223\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4386\",\"type\":\"LinearScale\"},{\"attributes\":{\"tools\":[{\"id\":\"4097\"},{\"id\":\"4098\"},{\"id\":\"4099\"},{\"id\":\"4100\"},{\"id\":\"4101\"},{\"id\":\"4102\"},{\"id\":\"4104\"}]},\"id\":\"4105\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"4883\"},\"group\":null,\"major_label_policy\":{\"id\":\"4884\"},\"ticker\":{\"id\":\"4442\"}},\"id\":\"4388\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"4123\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4126\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4881\"},\"group\":null,\"major_label_policy\":{\"id\":\"4882\"},\"ticker\":{\"id\":\"4393\"},\"visible\":false},\"id\":\"4392\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"4392\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4395\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4393\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4119\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4132\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4121\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4401\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"4779\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4396\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"4908\"},\"group\":null,\"major_label_policy\":{\"id\":\"4909\"},\"ticker\":{\"id\":\"4124\"}},\"id\":\"4123\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"4402\"}},\"id\":\"4398\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4905\"},\"group\":null,\"major_label_policy\":{\"id\":\"4906\"},\"ticker\":{\"id\":\"4128\"}},\"id\":\"4127\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4399\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4780\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4400\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"3660\"}},\"id\":\"3665\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4154\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4156\"},\"nonselection_glyph\":{\"id\":\"4155\"},\"view\":{\"id\":\"4158\"}},\"id\":\"4157\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3513\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"4127\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4130\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4782\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4128\",\"type\":\"BasicTicker\"},{\"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\":\"4402\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"4977\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"4396\"},{\"id\":\"4397\"},{\"id\":\"4398\"},{\"id\":\"4399\"},{\"id\":\"4400\"},{\"id\":\"4401\"},{\"id\":\"4403\"}]},\"id\":\"4404\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4783\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[0,0],\"y\":[0,200]},\"selected\":{\"id\":\"4939\"},\"selection_policy\":{\"id\":\"4938\"}},\"id\":\"3499\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4136\",\"type\":\"HelpTool\"},{\"attributes\":{\"data\":{\"A\":[20000],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"fy\":[355],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0],\"yG\":[100.0],\"y_n_axis\":[100.0]},\"selected\":{\"id\":\"4797\"},\"selection_policy\":{\"id\":\"4796\"}},\"id\":\"3500\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4131\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4978\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"3512\"}],\"center\":[{\"id\":\"3515\"},{\"id\":\"3519\"},{\"id\":\"3673\"}],\"height\":200,\"left\":[{\"id\":\"3516\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"3580\"},{\"id\":\"3586\"},{\"id\":\"3592\"},{\"id\":\"3664\"},{\"id\":\"3670\"},{\"id\":\"3679\"},{\"id\":\"3685\"}],\"title\":{\"id\":\"3502\"},\"toolbar\":{\"id\":\"3527\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"3504\"},\"x_scale\":{\"id\":\"3508\"},\"y_range\":{\"id\":\"3506\"},\"y_scale\":{\"id\":\"3510\"}},\"id\":\"3501\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4446\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"4137\"}},\"id\":\"4133\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"below\":[{\"id\":\"3545\"}],\"center\":[{\"id\":\"3548\"},{\"id\":\"3552\"},{\"id\":\"3604\"},{\"id\":\"3613\"}],\"left\":[{\"id\":\"3549\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"3571\"},{\"id\":\"3598\"},{\"id\":\"3610\"},{\"id\":\"3619\"}],\"title\":{\"id\":\"3535\"},\"toolbar\":{\"id\":\"3560\"},\"toolbar_location\":null,\"width\":300,\"x_range\":{\"id\":\"3537\"},\"x_scale\":{\"id\":\"3541\"},\"y_range\":{\"id\":\"3539\"},\"y_scale\":{\"id\":\"3543\"}},\"id\":\"3534\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4979\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3508\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4134\",\"type\":\"SaveTool\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"3506\",\"type\":\"Range1d\"},{\"attributes\":{\"source\":{\"id\":\"4444\"}},\"id\":\"4449\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4135\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"3502\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"4980\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4445\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"3512\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"3515\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4444\"},\"glyph\":{\"id\":\"4445\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4447\"},\"nonselection_glyph\":{\"id\":\"4446\"},\"view\":{\"id\":\"4449\"}},\"id\":\"4448\",\"type\":\"GlyphRenderer\"},{\"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\":\"4137\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"3510\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"4763\"},\"group\":null,\"major_label_policy\":{\"id\":\"4764\"},\"ticker\":{\"id\":\"3513\"}},\"id\":\"3512\",\"type\":\"LinearAxis\"},{\"attributes\":{\"tools\":[{\"id\":\"4131\"},{\"id\":\"4132\"},{\"id\":\"4133\"},{\"id\":\"4134\"},{\"id\":\"4135\"},{\"id\":\"4136\"},{\"id\":\"4138\"}]},\"id\":\"4139\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4447\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"3525\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"4760\"},\"group\":null,\"major_label_policy\":{\"id\":\"4761\"},\"ticker\":{\"id\":\"3517\"},\"visible\":false},\"id\":\"3516\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4431\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4433\"},\"nonselection_glyph\":{\"id\":\"4432\"},\"view\":{\"id\":\"4435\"}},\"id\":\"4434\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"3516\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"3519\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3517\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3568\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"4177\"}},\"id\":\"4182\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3521\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"3520\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4180\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"3526\"}},\"id\":\"3522\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"3523\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4178\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"3524\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4177\"},\"glyph\":{\"id\":\"4178\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4180\"},\"nonselection_glyph\":{\"id\":\"4179\"},\"view\":{\"id\":\"4182\"}},\"id\":\"4181\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4412\"},\"glyph\":{\"id\":\"4413\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4415\"},\"nonselection_glyph\":{\"id\":\"4414\"},\"view\":{\"id\":\"4417\"}},\"id\":\"4416\",\"type\":\"GlyphRenderer\"},{\"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\":\"3526\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"3520\"},{\"id\":\"3521\"},{\"id\":\"3522\"},{\"id\":\"3523\"},{\"id\":\"3524\"},{\"id\":\"3525\"}]},\"id\":\"3527\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4861\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4862\",\"type\":\"AllLabels\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"3752\",\"type\":\"Div\"},{\"attributes\":{\"source\":{\"id\":\"3654\"}},\"id\":\"3659\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4892\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4047\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4893\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"4028\"},{\"id\":\"4029\"},{\"id\":\"4030\"},{\"id\":\"4031\"},{\"id\":\"4032\"},{\"id\":\"4033\"},{\"id\":\"4035\"}]},\"id\":\"4036\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3654\"},\"glyph\":{\"id\":\"3655\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3657\"},\"nonselection_glyph\":{\"id\":\"3656\"},\"view\":{\"id\":\"3659\"}},\"id\":\"3658\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4895\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4056\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4053\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4049\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4896\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Shear stress\"},\"id\":\"4045\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3661\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"4055\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4058\",\"type\":\"Grid\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3667\",\"type\":\"Text\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"3672\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"4051\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[0.6]},\"selected\":{\"id\":\"4834\"},\"selection_policy\":{\"id\":\"4833\"}},\"id\":\"3660\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u1d65 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"4902\"},\"group\":null,\"major_label_policy\":{\"id\":\"4903\"},\"ticker\":{\"id\":\"4056\"}},\"id\":\"4055\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"4070\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3660\"},\"glyph\":{\"id\":\"3661\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3663\"},\"nonselection_glyph\":{\"id\":\"3662\"},\"view\":{\"id\":\"3665\"}},\"id\":\"3664\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4064\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3662\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"4934\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3672\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"4765\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3673\",\"type\":\"Arrow\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4899\"},\"group\":null,\"major_label_policy\":{\"id\":\"4900\"},\"ticker\":{\"id\":\"4060\"},\"visible\":false},\"id\":\"4059\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3663\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"4059\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4062\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3666\"},\"glyph\":{\"id\":\"3667\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3669\"},\"nonselection_glyph\":{\"id\":\"3668\"},\"view\":{\"id\":\"3671\"}},\"id\":\"3670\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4978\"},\"selection_policy\":{\"id\":\"4977\"}},\"id\":\"4897\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4060\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[0.4]},\"selected\":{\"id\":\"4836\"},\"selection_policy\":{\"id\":\"4835\"}},\"id\":\"3666\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4935\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"3666\"}},\"id\":\"3671\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4936\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4068\",\"type\":\"HelpTool\"},{\"attributes\":{\"source\":{\"id\":\"3675\"}},\"id\":\"3680\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4063\",\"type\":\"PanTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3668\",\"type\":\"Text\"},{\"attributes\":{\"overlay\":{\"id\":\"4069\"}},\"id\":\"4065\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"4937\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3682\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4864\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4066\",\"type\":\"SaveTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3669\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"4067\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3500\"},\"glyph\":{\"id\":\"3688\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3690\"},\"nonselection_glyph\":{\"id\":\"3689\"},\"view\":{\"id\":\"3692\"}},\"id\":\"3691\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3675\"},\"glyph\":{\"id\":\"3676\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3678\"},\"nonselection_glyph\":{\"id\":\"3677\"},\"view\":{\"id\":\"3680\"}},\"id\":\"3679\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4865\",\"type\":\"AllLabels\"},{\"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\":\"4069\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"4838\"},\"selection_policy\":{\"id\":\"4837\"}},\"id\":\"3675\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3676\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"4867\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3500\"},\"glyph\":{\"id\":\"3682\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3684\"},\"nonselection_glyph\":{\"id\":\"3683\"},\"view\":{\"id\":\"3686\"}},\"id\":\"3685\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3677\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3683\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4868\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4101\",\"type\":\"ResetTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3678\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"3742\"}},\"id\":\"3747\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3684\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"4104\",\"type\":\"HoverTool\"},{\"attributes\":{\"source\":{\"id\":\"3500\"}},\"id\":\"3686\",\"type\":\"CDSView\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"4466\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"3751\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{},\"id\":\"4938\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4462\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"3749\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"4100\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"3689\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4939\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"3688\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4102\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3745\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3497\"},\"glyph\":{\"id\":\"3694\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3696\"},\"nonselection_glyph\":{\"id\":\"3695\"},\"view\":{\"id\":\"3698\"}},\"id\":\"3697\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"3500\"}},\"id\":\"3692\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"3690\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3699\"},\"glyph\":{\"id\":\"3700\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3702\"},\"nonselection_glyph\":{\"id\":\"3701\"},\"view\":{\"id\":\"3704\"}},\"id\":\"3703\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3694\",\"type\":\"Line\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"3750\",\"type\":\"Div\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3695\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4899\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"3712\",\"type\":\"Patch\"},{\"attributes\":{\"tools\":[{\"id\":\"4063\"},{\"id\":\"4064\"},{\"id\":\"4065\"},{\"id\":\"4066\"},{\"id\":\"4067\"},{\"id\":\"4068\"},{\"id\":\"4070\"}]},\"id\":\"4071\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3696\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"3498\"}},\"id\":\"3710\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4900\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"3497\"}},\"id\":\"3698\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"3699\"}},\"id\":\"3704\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4902\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4940\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3700\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3702\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"4801\"},\"selection_policy\":{\"id\":\"4800\"}},\"id\":\"3699\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4903\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4941\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3701\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3707\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"4082\",\"type\":\"DataRange1d\"},{\"attributes\":{\"below\":[{\"id\":\"4089\"}],\"center\":[{\"id\":\"4092\"},{\"id\":\"4096\"}],\"height\":200,\"renderers\":[{\"id\":\"4416\"},{\"id\":\"4448\"},{\"id\":\"4454\"},{\"id\":\"4460\"}],\"right\":[{\"id\":\"4093\"}],\"title\":{\"id\":\"4080\"},\"toolbar\":{\"id\":\"4105\"},\"toolbar_location\":null,\"width\":240,\"x_range\":{\"id\":\"4082\"},\"x_scale\":{\"id\":\"4085\"},\"y_range\":{\"id\":\"3912\"},\"y_scale\":{\"id\":\"4087\"}},\"id\":\"4079\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3744\",\"type\":\"Scatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3743\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"4090\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3706\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3498\"},\"glyph\":{\"id\":\"3706\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3708\"},\"nonselection_glyph\":{\"id\":\"3707\"},\"view\":{\"id\":\"3710\"}},\"id\":\"3709\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"4089\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4092\",\"type\":\"Grid\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4467\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"3748\",\"type\":\"Slider\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"4889\"},\"group\":null,\"major_label_policy\":{\"id\":\"4890\"},\"ticker\":{\"id\":\"4090\"}},\"id\":\"4089\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"3714\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress (green=yield) and N.A.\"},\"id\":\"4080\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3708\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"4085\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4870\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"3713\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3742\"},\"glyph\":{\"id\":\"3743\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3745\"},\"nonselection_glyph\":{\"id\":\"3744\"},\"view\":{\"id\":\"3747\"}},\"id\":\"3746\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4087\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3982\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4914\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4953\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3583\",\"type\":\"Patch\"},{\"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\":\"3590\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"3987\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4915\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3579\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4954\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"3496\"}},\"id\":\"3581\",\"type\":\"CDSView\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4875\"},\"group\":null,\"major_label_policy\":{\"id\":\"4876\"},\"ticker\":{\"id\":\"3991\"},\"visible\":false},\"id\":\"3990\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending stress and centroid\"},\"id\":\"3977\",\"type\":\"Title\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4920\"},\"selection_policy\":{\"id\":\"4919\"}},\"id\":\"4825\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"3582\"}},\"id\":\"3587\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"3986\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3989\",\"type\":\"Grid\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4464\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"3602\",\"type\":\"Slider\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"4001\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"3984\",\"type\":\"LinearScale\"},{\"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\":\"3595\",\"type\":\"Rect\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3584\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"4796\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"4922\"},\"selection_policy\":{\"id\":\"4921\"}},\"id\":\"4826\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"4830\"},\"selection_policy\":{\"id\":\"4829\"}},\"id\":\"3582\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2098 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"4878\"},\"group\":null,\"major_label_policy\":{\"id\":\"4879\"},\"ticker\":{\"id\":\"3987\"}},\"id\":\"3986\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3995\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4797\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"3549\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3552\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"4913\"},\"selection_policy\":{\"id\":\"4912\"}},\"id\":\"3594\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"4832\"},\"selection_policy\":{\"id\":\"4831\"}},\"id\":\"3588\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3589\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"3990\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3993\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"3594\"}},\"id\":\"3599\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3991\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4916\",\"type\":\"UnionRenderers\"},{\"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\":\"3591\",\"type\":\"Circle\"},{\"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\":\"3596\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"3539\",\"type\":\"DataRange1d\"},{\"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\":\"3597\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"3999\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"3994\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4917\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3588\"},\"glyph\":{\"id\":\"3589\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3591\"},\"nonselection_glyph\":{\"id\":\"3590\"},\"view\":{\"id\":\"3593\"}},\"id\":\"3592\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"4000\"}},\"id\":\"3996\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"3588\"}},\"id\":\"3593\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3997\",\"type\":\"SaveTool\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"4463\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"3601\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"3554\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4845\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3537\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3594\"},\"glyph\":{\"id\":\"3595\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3597\"},\"nonselection_glyph\":{\"id\":\"3596\"},\"view\":{\"id\":\"3599\"}},\"id\":\"3598\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3998\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"3603\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"4846\",\"type\":\"Selection\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\",\"width\":170},\"id\":\"3600\",\"type\":\"Div\"},{\"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\":\"4000\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3603\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"4825\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"3604\",\"type\":\"Arrow\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"4911\"},\"selection_policy\":{\"id\":\"4910\"}},\"id\":\"3567\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"4795\"},\"selection_policy\":{\"id\":\"4794\"}},\"id\":\"3654\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"4035\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"3541\",\"type\":\"LinearScale\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3607\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3606\"},\"glyph\":{\"id\":\"3607\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3609\"},\"nonselection_glyph\":{\"id\":\"3608\"},\"view\":{\"id\":\"3611\"}},\"id\":\"3610\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4870\"},\"group\":null,\"major_label_policy\":{\"id\":\"4871\"},\"ticker\":{\"id\":\"4025\"},\"visible\":false},\"id\":\"4024\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4798\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"3535\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"3606\"}},\"id\":\"3611\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4955\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4823\"},\"group\":null,\"major_label_policy\":{\"id\":\"4824\"},\"ticker\":{\"id\":\"3573\"}},\"id\":\"3545\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4799\",\"type\":\"Selection\"},{\"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\":\"3608\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"3545\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3548\",\"type\":\"Grid\"},{\"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\":\"3609\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"4025\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"4915\"},\"selection_policy\":{\"id\":\"4914\"}},\"id\":\"3606\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4956\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"4821\"},\"group\":null,\"major_label_policy\":{\"id\":\"4822\"},\"ticker\":{\"id\":\"3573\"}},\"id\":\"3549\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"3615\"}},\"id\":\"3620\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3543\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"4024\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4027\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"3612\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"3612\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"4826\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"3613\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3569\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3578\",\"type\":\"Line\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3616\",\"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\":\"3618\",\"type\":\"Text\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3577\",\"type\":\"Line\"},{\"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\":\"3617\",\"type\":\"Text\"},{\"attributes\":{\"overlay\":{\"id\":\"4034\"}},\"id\":\"4030\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"4917\"},\"selection_policy\":{\"id\":\"4916\"}},\"id\":\"3615\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3615\"},\"glyph\":{\"id\":\"3616\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3618\"},\"nonselection_glyph\":{\"id\":\"3617\"},\"view\":{\"id\":\"3620\"}},\"id\":\"3619\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"3558\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3655\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"3553\",\"type\":\"PanTool\"},{\"attributes\":{\"below\":[{\"id\":\"3632\"}],\"center\":[{\"id\":\"3635\"},{\"id\":\"3639\"},{\"id\":\"3718\"},{\"id\":\"3721\"},{\"id\":\"3724\"},{\"id\":\"3727\"},{\"id\":\"3730\"},{\"id\":\"3733\"}],\"height\":200,\"left\":[{\"id\":\"3636\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"3658\"},{\"id\":\"3691\"},{\"id\":\"3697\"},{\"id\":\"3703\"},{\"id\":\"3709\"},{\"id\":\"3715\"},{\"id\":\"3740\"},{\"id\":\"3746\"}],\"title\":{\"id\":\"3622\"},\"toolbar\":{\"id\":\"3647\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"3624\"},\"x_scale\":{\"id\":\"3628\"},\"y_range\":{\"id\":\"3626\"},\"y_scale\":{\"id\":\"3630\"}},\"id\":\"3621\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"3559\"}},\"id\":\"3555\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3656\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"4800\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3556\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"3624\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"4020\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4023\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3557\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"3626\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4827\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4828\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3628\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4801\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"4750\"},\"group\":null,\"major_label_policy\":{\"id\":\"4751\"},\"ticker\":{\"id\":\"3633\"},\"visible\":false},\"id\":\"3632\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"4747\"},\"group\":null,\"major_label_policy\":{\"id\":\"4748\"},\"ticker\":{\"id\":\"3637\"},\"visible\":false},\"id\":\"3636\",\"type\":\"LinearAxis\"},{\"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\":\"3559\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2098 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"4872\"},\"group\":null,\"major_label_policy\":{\"id\":\"4873\"},\"ticker\":{\"id\":\"4257\"}},\"id\":\"4020\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4919\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3496\"},\"glyph\":{\"id\":\"3577\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3579\"},\"nonselection_glyph\":{\"id\":\"3578\"},\"view\":{\"id\":\"3581\"}},\"id\":\"3580\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"3632\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"3635\",\"type\":\"Grid\"},{\"attributes\":{\"interval\":50},\"id\":\"3573\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"3630\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4920\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"3622\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"3759\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"3636\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"3639\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending strain\"},\"id\":\"4011\",\"type\":\"Title\"},{\"attributes\":{\"below\":[{\"id\":\"3765\"}],\"center\":[{\"id\":\"3768\"},{\"id\":\"3772\"}],\"height\":160,\"left\":[{\"id\":\"3769\"}],\"renderers\":[{\"id\":\"3857\"},{\"id\":\"3863\"},{\"id\":\"3893\"}],\"title\":{\"id\":\"3756\"},\"toolbar\":{\"id\":\"3781\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"3504\"},\"x_scale\":{\"id\":\"3761\"},\"y_range\":{\"id\":\"3759\"},\"y_scale\":{\"id\":\"3763\"}},\"id\":\"3755\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"3645\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"4029\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"3633\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4033\",\"type\":\"HelpTool\"},{\"attributes\":{\"source\":{\"id\":\"3567\"}},\"id\":\"3572\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"4337\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"4921\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3637\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4028\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3657\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"4829\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4031\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4922\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3641\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4802\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4032\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"3640\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"3646\"}},\"id\":\"3642\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"4830\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3643\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4803\",\"type\":\"Selection\"},{\"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\":\"4034\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"4055\"}],\"center\":[{\"id\":\"4058\"},{\"id\":\"4062\"}],\"height\":200,\"left\":[{\"id\":\"4059\"}],\"renderers\":[{\"id\":\"4187\"},{\"id\":\"4193\"},{\"id\":\"4199\"}],\"title\":{\"id\":\"4045\"},\"toolbar\":{\"id\":\"4071\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"4047\"},\"x_scale\":{\"id\":\"4051\"},\"y_range\":{\"id\":\"4049\"},\"y_scale\":{\"id\":\"4053\"}},\"id\":\"4044\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"3644\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"4958\",\"type\":\"UnionRenderers\"},{\"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\":\"3646\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3570\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"4959\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"3640\"},{\"id\":\"3641\"},{\"id\":\"3642\"},{\"id\":\"3643\"},{\"id\":\"3644\"},{\"id\":\"3645\"}]},\"id\":\"3647\",\"type\":\"Toolbar\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"4465\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"3753\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"below\":[{\"id\":\"4123\"}],\"center\":[{\"id\":\"4126\"},{\"id\":\"4130\"}],\"height\":200,\"renderers\":[{\"id\":\"4205\"},{\"id\":\"4211\"},{\"id\":\"4217\"}],\"right\":[{\"id\":\"4127\"}],\"title\":{\"id\":\"4114\"},\"toolbar\":{\"id\":\"4139\"},\"toolbar_location\":null,\"width\":240,\"x_range\":{\"id\":\"4116\"},\"x_scale\":{\"id\":\"4119\"},\"y_range\":{\"id\":\"4049\"},\"y_scale\":{\"id\":\"4121\"}},\"id\":\"4113\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \",\"width\":170},\"id\":\"3754\",\"type\":\"Div\"},{\"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\":\"4103\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"3553\"},{\"id\":\"3554\"},{\"id\":\"3555\"},{\"id\":\"3556\"},{\"id\":\"3557\"},{\"id\":\"3558\"}]},\"id\":\"3560\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3567\"},\"glyph\":{\"id\":\"3568\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3570\"},\"nonselection_glyph\":{\"id\":\"3569\"},\"view\":{\"id\":\"3572\"}},\"id\":\"3571\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0],\"y\":[0,0.0,0.10005002501250625,0.2001000500250125,0.3001500750375187,0.400200100050025,0.5002501250625312,0.6003001500750375,0.7003501750875437,0.80040020010005,0.9004502251125562,1.0005002501250624,1.1005502751375686,1.200600300150075,1.3006503251625812,1.4007003501750874,1.5007503751875937,1.6008004002001,1.7008504252126062,1.8009004502251125,1.9009504752376187,2.0010005002501248,2.101050525262631,2.2011005502751373,2.3011505752876436,2.40120060030015,2.501250625312656,2.6013006503251623,2.7013506753376686,2.801400700350175,2.901450725362681,3.0015007503751874,3.1015507753876936,3.2016008004002,3.301650825412706,3.4017008504252124,3.5017508754377187,3.601800900450225,3.701850925462731,3.8019009504752375,3.9019509754877437,4.0020010005002495,4.102051025512756,4.202101050525262,4.302151075537768,4.402201100550275,4.502251125562781,4.602301150575287,4.702351175587793,4.8024012006003,4.902451225612806,5.002501250625312,5.102551275637818,5.202601300650325,5.302651325662831,5.402701350675337,5.5027513756878434,5.60280140070035,5.702851425712856,5.802901450725362,5.9029514757378685,6.003001500750375,6.103051525762881,6.203101550775387,6.3031515757878935,6.4032016008004,6.503251625812906,6.603301650825412,6.703351675837919,6.803401700850425,6.903451725862931,7.003501750875437,7.103551775887944,7.20360180090045,7.303651825912956,7.403701850925462,7.503751875937969,7.603801900950475,7.703851925962981,7.8039019509754874,7.903951975987994,8.004002001000499,8.104052026013006,8.204102051025512,8.304152076038019,8.404202101050524,8.504252126063031,8.604302151075537,8.704352176088044,8.80440220110055,8.904452226113056,9.004502251125562,9.104552276138069,9.204602301150574,9.304652326163081,9.404702351175587,9.504752376188094,9.6048024012006,9.704852426213106,9.804902451225612,9.904952476238119,10.005002501250624,10.105052526263131,10.205102551275637,10.305152576288144,10.40520260130065,10.505252626313156,10.605302651325662,10.705352676338169,10.805402701350674,10.905452726363182,11.005502751375687,11.105552776388194,11.2056028014007,11.305652826413207,11.405702851425712,11.505752876438219,11.605802901450724,11.705852926463232,11.805902951475737,11.905952976488244,12.00600300150075,12.106053026513257,12.206103051525762,12.30615307653827,12.406203101550775,12.506253126563282,12.606303151575787,12.706353176588294,12.8064032016008,12.906453226613305,13.006503251625812,13.106553276638317,13.206603301650825,13.30665332666333,13.406703351675837,13.506753376688343,13.60680340170085,13.706853426713355,13.806903451725862,13.906953476738368,14.007003501750875,14.10705352676338,14.207103551775887,14.307153576788393,14.4072036018009,14.507253626813405,14.607303651825912,14.707353676838418,14.807403701850925,14.90745372686343,15.007503751875937,15.107553776888443,15.20760380190095,15.307653826913455,15.407703851925962,15.507753876938468,15.607803901950975,15.70785392696348,15.807903951975987,15.907953976988493,16.008004002000998,16.108054027013505,16.208104052026012,16.30815407703852,16.408204102051023,16.50825412706353,16.608304152076037,16.708354177088545,16.80840420210105,16.908454227113555,17.008504252126063,17.10855427713857,17.208604302151073,17.30865432716358,17.408704352176088,17.508754377188595,17.6088044022011,17.708854427213605,17.808904452226113,17.90895447723862,18.009004502251123,18.10905452726363,18.209104552276138,18.309154577288645,18.40920460230115,18.509254627313656,18.609304652326163,18.70935467733867,18.809404702351173,18.90945472736368,19.009504752376188,19.109554777388695,19.2096048024012,19.309654827413706,19.409704852426213,19.509754877438716,19.609804902451224,19.70985492746373,19.809904952476238,19.90995497748874,20.01000500250125,20.110055027513756,20.210105052526263,20.310155077538766,20.410205102551274,20.51025512756378,20.610305152576288,20.71035517758879,20.8104052026013,20.910455227613806,21.010505252626313,21.110555277638817,21.210605302651324,21.31065532766383,21.410705352676338,21.51075537768884,21.61080540270135,21.710855427713856,21.810905452726363,21.910955477738867,22.011005502751374,22.11105552776388,22.211105552776388,22.31115557778889,22.4112056028014,22.511255627813906,22.611305652826413,22.711355677838917,22.811405702851424,22.91145572786393,23.011505752876438,23.11155577788894,23.21160580290145,23.311655827913956,23.411705852926463,23.511755877938967,23.611805902951474,23.71185592796398,23.81190595297649,23.911955977988992,24.0120060030015,24.112056028014006,24.212106053026513,24.312156078039017,24.412206103051524,24.51225612806403,24.61230615307654,24.712356178089042,24.81240620310155,24.912456228114056,25.012506253126563,25.112556278139067,25.212606303151574,25.31265632816408,25.41270635317659,25.512756378189092,25.6128064032016,25.712856428214106,25.81290645322661,25.912956478239117,26.013006503251624,26.11305652826413,26.213106553276635,26.313156578289142,26.41320660330165,26.513256628314156,26.61330665332666,26.713356678339167,26.813406703351674,26.91345672836418,27.013506753376685,27.113556778389192,27.2136068034017,27.313656828414207,27.41370685342671,27.513756878439217,27.613806903451724,27.71385692846423,27.813906953476735,27.913956978489242,28.01400700350175,28.114057028514257,28.21410705352676,28.314157078539267,28.414207103551774,28.51425712856428,28.614307153576785,28.714357178589292,28.8144072036018,28.914457228614307,29.01450725362681,29.114557278639317,29.214607303651825,29.31465732866433,29.414707353676835,29.514757378689342,29.61480740370185,29.714857428714357,29.81490745372686,29.914957478739368,30.015007503751875,30.115057528764382,30.215107553776885,30.315157578789393,30.4152076038019,30.515257628814407,30.61530765382691,30.715357678839418,30.815407703851925,30.915457728864432,31.015507753876935,31.115557778889443,31.21560780390195,31.315657828914457,31.41570785392696,31.515757878939468,31.615807903951975,31.715857928964482,31.815907953976986,31.915957978989493,32.016008004001996,32.1160580290145,32.21610805402701,32.31615807903952,32.416208104052025,32.51625812906453,32.61630815407704,32.71635817908954,32.816408204102046,32.91645822911455,33.01650825412706,33.11655827913957,33.216608304152075,33.31665832916458,33.41670835417709,33.51675837918959,33.6168084042021,33.716858429214604,33.81690845422711,33.91695847923962,34.017008504252125,34.11705852926463,34.21710855427714,34.31715857928964,34.41720860430215,34.517258629314654,34.61730865432716,34.71735867933967,34.817408704352175,34.91745872936468,35.01750875437719,35.11755877938969,35.2176088044022,35.317658829414704,35.41770885442721,35.51775887943972,35.617808904452225,35.71785892946473,35.81790895447724,35.91795897948974,36.01800900450225,36.118059029514754,36.21810905452726,36.31815907953977,36.418209104552275,36.51825912956478,36.61830915457729,36.71835917958979,36.8184092046023,36.918459229614804,37.01850925462731,37.11855927963982,37.218609304652325,37.31865932966483,37.41870935467734,37.51875937968984,37.61880940470235,37.718859429714854,37.81890945472736,37.91895947973987,38.019009504752376,38.11905952976488,38.21910955477739,38.31915957978989,38.4192096048024,38.519259629814904,38.61930965482741,38.71935967983992,38.819409704852426,38.91945972986493,39.01950975487743,39.11955977988994,39.21960980490245,39.319659829914954,39.41970985492746,39.51975987993997,39.619809904952476,39.71985992996498,39.81990995497748,39.91995997998999,40.0200100050025,40.120060030015004,40.22011005502751,40.32016008004002,40.420210105052526,40.52026013006503,40.62031015507753,40.72036018009004,40.82041020510255,40.920460230115054,41.02051025512756,41.12056028014007,41.220610305152576,41.32066033016508,41.42071035517758,41.52076038019009,41.6208104052026,41.720860430215104,41.82091045522761,41.92096048024012,42.021010505252626,42.12106053026513,42.22111055527763,42.32116058029014,42.42121060530265,42.521260630315155,42.62131065532766,42.72136068034017,42.821410705352676,42.92146073036518,43.02151075537768,43.12156078039019,43.2216108054027,43.321660830415205,43.42171085542771,43.52176088044022,43.621810905452726,43.72186093046523,43.82191095547773,43.92196098049024,44.02201100550275,44.122061030515255,44.22211105552776,44.32216108054027,44.422211105552776,44.52226113056528,44.62231115557778,44.72236118059029,44.8224112056028,44.922461230615305,45.02251125562781,45.12256128064032,45.222611305652826,45.322661330665326,45.42271135567783,45.52276138069034,45.62281140570285,45.722861430715355,45.82291145572786,45.92296148074037,46.023011505752876,46.123061530765376,46.22311155577788,46.32316158079039,46.4232116058029,46.523261630815405,46.62331165582791,46.72336168084042,46.823411705852926,46.92346173086543,47.023511755877934,47.12356178089044,47.22361180590295,47.323661830915455,47.42371185592796,47.52376188094047,47.62381190595298,47.72386193096548,47.823911955977984,47.92396198099049,48.024012006003,48.124062031015505,48.22411205602801,48.32416208104052,48.42421210605303,48.52426213106553,48.624312156078034,48.72436218109054,48.82441220610305,48.924462231115555,49.02451225612806,49.12456228114057,49.22461230615308,49.32466233116558,49.424712356178084,49.52476238119059,49.6248124062031,49.724862431215605,49.82491245622811,49.92496248124062,50.02501250625313,50.12506253126563,50.225112556278134,50.32516258129064,50.42521260630315,50.525262631315655,50.62531265632816,50.72536268134067,50.82541270635318,50.92546273136568,51.025512756378184,51.12556278139069,51.2256128064032,51.325662831415706,51.42571285642821,51.52576288144072,51.62581290645322,51.72586293146573,51.825912956478234,51.92596298149074,52.02601300650325,52.126063031515756,52.22611305652826,52.32616308154077,52.42621310655327,52.52626313156578,52.626313156578284,52.72636318159079,52.8264132066033,52.926463231615806,53.02651325662831,53.12656328164082,53.22661330665332,53.32666333166583,53.426713356678334,53.52676338169084,53.62681340670335,53.726863431715856,53.82691345672836,53.92696348174087,54.02701350675337,54.12706353176588,54.227113556778384,54.32716358179089,54.4272136068034,54.527263631815906,54.62731365682841,54.72736368184092,54.82741370685342,54.92746373186593,55.027513756878434,55.12756378189094,55.22761380690345,55.327663831915956,55.42771385692846,55.52776388194097,55.62781390695347,55.72786393196598,55.827913956978485,55.92796398199099,56.0280140070035,56.128064032016006,56.22811405702851,56.32816408204102,56.42821410705352,56.52826413206603,56.628314157078535,56.72836418209104,56.82841420710355,56.928464232116056,57.02851425712856,57.12856428214107,57.22861430715357,57.32866433216608,57.428714357178585,57.52876438219109,57.6288144072036,57.728864432216106,57.82891445722861,57.92896448224111,58.02901450725362,58.12906453226613,58.229114557278635,58.32916458229114,58.42921460730365,58.529264632316156,58.62931465732866,58.72936468234116,58.82941470735367,58.92946473236618,59.029514757378685,59.12956478239119,59.2296148074037,59.329664832416206,59.42971485742871,59.529764882441214,59.62981490745372,59.72986493246623,59.829914957478735,59.92996498249124,60.03001500750375,60.13006503251626,60.230115057528764,60.330165082541264,60.43021510755377,60.53026513256628,60.630315157578785,60.73036518259129,60.8304152076038,60.93046523261631,61.030515257628814,61.130565282641314,61.23061530765382,61.33066533266633,61.430715357678835,61.53076538269134,61.63081540770385,61.73086543271636,61.830915457728864,61.930965482741364,62.03101550775387,62.13106553276638,62.231115557778885,62.33116558279139,62.4312156078039,62.53126563281641,62.631315657828914,62.731365682841414,62.83141570785392,62.93146573286643,63.031515757878935,63.13156578289144,63.23161580790395,63.33166583291646,63.431715857928964,63.531765882941464,63.63181590795397,63.73186593296648,63.831915957978985,63.93196598299149,64.03201600800399,64.1320660330165,64.232116058029,64.33216608304151,64.43221610805402,64.53226613306653,64.63231615807904,64.73236618309154,64.83241620810405,64.93246623311656,65.03251625812906,65.13256628314157,65.23261630815408,65.33266633316659,65.43271635817908,65.53276638319159,65.63281640820409,65.7328664332166,65.8329164582291,65.93296648324161,66.03301650825412,66.13306653326663,66.23311655827914,66.33316658329164,66.43321660830415,66.53326663331666,66.63331665832916,66.73336668334167,66.83341670835418,66.93346673336669,67.03351675837918,67.13356678339169,67.2336168084042,67.3336668334167,67.43371685842921,67.53376688344171,67.63381690845422,67.73386693346673,67.83391695847924,67.93396698349174,68.03401700850425,68.13406703351676,68.23411705852926,68.33416708354177,68.43421710855428,68.53426713356679,68.63431715857928,68.73436718359179,68.8344172086043,68.9344672336168,69.03451725862931,69.13456728364181,69.23461730865432,69.33466733366683,69.43471735867934,69.53476738369184,69.63481740870435,69.73486743371686,69.83491745872936,69.93496748374187,70.03501750875438,70.13506753376689,70.23511755877938,70.33516758379189,70.4352176088044,70.5352676338169,70.63531765882941,70.73536768384191,70.83541770885442,70.93546773386693,71.03551775887944,71.13556778389194,71.23561780890445,71.33566783391696,71.43571785892946,71.53576788394197,71.63581790895448,71.73586793396697,71.83591795897948,71.93596798399199,72.0360180090045,72.136068034017,72.23611805902951,72.33616808404201,72.43621810905452,72.53626813406703,72.63631815907954,72.73636818409204,72.83641820910455,72.93646823411706,73.03651825912956,73.13656828414207,73.23661830915458,73.33666833416707,73.43671835917958,73.53676838419209,73.6368184092046,73.7368684342171,73.83691845922961,73.93696848424212,74.03701850925462,74.13706853426713,74.23711855927964,74.33716858429214,74.43721860930465,74.53726863431716,74.63731865932967,74.73736868434217,74.83741870935468,74.93746873436717,75.03751875937968,75.13756878439219,75.2376188094047,75.3376688344172,75.43771885942971,75.53776888444222,75.63781890945472,75.73786893446723,75.83791895947974,75.93796898449224,76.03801900950475,76.13806903451726,76.23811905952977,76.33816908454227,76.43821910955478,76.53826913456727,76.63831915957978,76.73836918459229,76.8384192096048,76.9384692346173,77.03851925962981,77.13856928464232,77.23861930965482,77.33866933466733,77.43871935967984,77.53876938469234,77.63881940970485,77.73886943471736,77.83891945972987,77.93896948474237,78.03901950975487,78.13906953476737,78.23911955977988,78.33916958479239,78.4392196098049,78.5392696348174,78.63931965982991,78.73936968484242,78.83941970985492,78.93946973486743,79.03951975987994,79.13956978489244,79.23961980990495,79.33966983491746,79.43971985992997,79.53976988494247,79.63981990995497,79.73986993496747,79.83991995997998,79.93996998499249,80.040020010005,80.1400700350175,80.24012006003001,80.34017008504252,80.44022011005502,80.54027013506753,80.64032016008004,80.74037018509254,80.84042021010505,80.94047023511756,81.04052026013007,81.14057028514257,81.24062031015507,81.34067033516757,81.44072036018008,81.54077038519259,81.6408204102051,81.7408704352176,81.84092046023011,81.94097048524262,82.04102051025512,82.14107053526763,82.24112056028014,82.34117058529264,82.44122061030515,82.54127063531766,82.64132066033017,82.74137068534267,82.84142071035517,82.94147073536767,83.04152076038018,83.14157078539269,83.2416208104052,83.3416708354177,83.44172086043021,83.54177088544272,83.64182091045522,83.74187093546773,83.84192096048024,83.94197098549274,84.04202101050525,84.14207103551776,84.24212106053027,84.34217108554276,84.44222111055527,84.54227113556777,84.64232116058028,84.74237118559279,84.8424212106053,84.9424712356178,85.04252126063031,85.14257128564282,85.24262131065532,85.34267133566783,85.44272136068034,85.54277138569284,85.64282141070535,85.74287143571786,85.84292146073037,85.94297148574286,86.04302151075537,86.14307153576787,86.24312156078038,86.34317158579289,86.4432216108054,86.5432716358179,86.64332166083041,86.74337168584292,86.84342171085542,86.94347173586793,87.04352176088044,87.14357178589295,87.24362181090545,87.34367183591796,87.44372186093047,87.54377188594296,87.64382191095547,87.74387193596797,87.84392196098048,87.94397198599299,88.0440220110055,88.144072036018,88.24412206103051,88.34417208604302,88.44422211105552,88.54427213606803,88.64432216108054,88.74437218609305,88.84442221110555,88.94447223611806,89.04452226113057,89.14457228614306,89.24462231115557,89.34467233616807,89.44472236118058,89.54477238619309,89.6448224112056,89.7448724362181,89.84492246123061,89.94497248624312,90.04502251125562,90.14507253626813,90.24512256128064,90.34517258629315,90.44522261130565,90.54527263631816,90.64532266133065,90.74537268634316,90.84542271135567,90.94547273636817,91.04552276138068,91.14557278639319,91.2456228114057,91.3456728364182,91.44572286143071,91.54577288644322,91.64582291145572,91.74587293646823,91.84592296148074,91.94597298649325,92.04602301150575,92.14607303651826,92.24612306153075,92.34617308654326,92.44622311155577,92.54627313656827,92.64632316158078,92.74637318659329,92.8464232116058,92.9464732366183,93.04652326163081,93.14657328664332,93.24662331165582,93.34667333666833,93.44672336168084,93.54677338669335,93.64682341170585,93.74687343671836,93.84692346173085,93.94697348674336,94.04702351175587,94.14707353676837,94.24712356178088,94.34717358679339,94.4472236118059,94.5472736368184,94.64732366183091,94.74737368684342,94.84742371185592,94.94747373686843,95.04752376188094,95.14757378689345,95.24762381190595,95.34767383691846,95.44772386193095,95.54777388694346,95.64782391195597,95.74787393696847,95.84792396198098,95.94797398699349,96.048024012006,96.1480740370185,96.24812406203101,96.34817408704352,96.44822411205602,96.54827413706853,96.64832416208104,96.74837418709355,96.84842421210605,96.94847423711855,97.04852426213105,97.14857428714356,97.24862431215607,97.34867433716857,97.44872436218108,97.54877438719359,97.6488244122061,97.7488744372186,97.84892446223111,97.94897448724362,98.04902451225612,98.14907453726863,98.24912456228114,98.34917458729365,98.44922461230615,98.54927463731865,98.64932466233115,98.74937468734366,98.84942471235617,98.94947473736867,99.04952476238118,99.14957478739369,99.2496248124062,99.3496748374187,99.44972486243121,99.54977488744372,99.64982491245622,99.74987493746873,99.84992496248124,99.94997498749375,100.05002501250625,100.15007503751875,100.25012506253125,100.35017508754376,100.45022511255627,100.55027513756878,100.65032516258128,100.75037518759379,100.8504252126063,100.9504752376188,101.05052526263131,101.15057528764382,101.25062531265633,101.35067533766883,101.45072536268134,101.55077538769385,101.65082541270635,101.75087543771885,101.85092546273135,101.95097548774386,102.05102551275637,102.15107553776888,102.25112556278138,102.35117558779389,102.4512256128064,102.5512756378189,102.65132566283141,102.75137568784392,102.85142571285643,102.95147573786893,103.05152576288144,103.15157578789395,103.25162581290644,103.35167583791895,103.45172586293145,103.55177588794396,103.65182591295647,103.75187593796898,103.85192596298148,103.95197598799399,104.0520260130065,104.152076038019,104.25212606303151,104.35217608804402,104.45222611305653,104.55227613806903,104.65232616308154,104.75237618809405,104.85242621310654,104.95247623811905,105.05252626313155,105.15257628814406,105.25262631315657,105.35267633816908,105.45272636318158,105.55277638819409,105.6528264132066,105.7528764382191,105.85292646323161,105.95297648824412,106.05302651325663,106.15307653826913,106.25312656328164,106.35317658829415,106.45322661330664,106.55327663831915,106.65332666333165,106.75337668834416,106.85342671335667,106.95347673836918,107.05352676338168,107.15357678839419,107.2536268134067,107.3536768384192,107.45372686343171,107.55377688844422,107.65382691345673,107.75387693846923,107.85392696348174,107.95397698849425,108.05402701350674,108.15407703851925,108.25412706353175,108.35417708854426,108.45422711355677,108.55427713856928,108.65432716358178,108.75437718859429,108.8544272136068,108.9544772386193,109.05452726363181,109.15457728864432,109.25462731365683,109.35467733866933,109.45472736368184,109.55477738869433,109.65482741370684,109.75487743871935,109.85492746373185,109.95497748874436,110.05502751375687,110.15507753876938,110.25512756378188,110.35517758879439,110.4552276138069,110.5552776388194,110.65532766383191,110.75537768884442,110.85542771385693,110.95547773886943,111.05552776388194,111.15557778889443,111.25562781390694,111.35567783891945,111.45572786393195,111.55577788894446,111.65582791395697,111.75587793896948,111.85592796398198,111.95597798899449,112.056028014007,112.1560780390195,112.25612806403201,112.35617808904452,112.45622811405703,112.55627813906953,112.65632816408204,112.75637818909453,112.85642821410704,112.95647823911955,113.05652826413206,113.15657828914456,113.25662831415707,113.35667833916958,113.45672836418208,113.55677838919459,113.6568284142071,113.7568784392196,113.85692846423211,113.95697848924462,114.05702851425713,114.15707853926963,114.25712856428214,114.35717858929463,114.45722861430714,114.55727863931965,114.65732866433216,114.75737868934466,114.85742871435717,114.95747873936968,115.05752876438218,115.15757878939469,115.2576288144072,115.3576788394197,115.45772886443221,115.55777888944472,115.65782891445723,115.75787893946973,115.85792896448223,115.95797898949473,116.05802901450724,116.15807903951975,116.25812906453226,116.35817908954476,116.45822911455727,116.55827913956978,116.65832916458228,116.75837918959479,116.8584292146073,116.9584792396198,117.05852926463231,117.15857928964482,117.25862931465733,117.35867933966983,117.45872936468233,117.55877938969483,117.65882941470734,117.75887943971985,117.85892946473236,117.95897948974486,118.05902951475737,118.15907953976988,118.25912956478238,118.35917958979489,118.4592296148074,118.5592796398199,118.65932966483241,118.75937968984492,118.85942971485743,118.95947973986993,119.05952976488243,119.15957978989493,119.25962981490744,119.35967983991995,119.45972986493246,119.55977988994496,119.65982991495747,119.75987993996998,119.85992996498248,119.95997998999499,120.0600300150075,120.16008004002,120.26013006503251,120.36018009004502,120.46023011505753,120.56028014007003,120.66033016508253,120.76038019009503,120.86043021510754,120.96048024012005,121.06053026513256,121.16058029014506,121.26063031515757,121.36068034017008,121.46073036518258,121.56078039019509,121.6608304152076,121.7608804402201,121.86093046523261,121.96098049024512,122.06103051525763,122.16108054027012,122.26113056528263,122.36118059029513,122.46123061530764,122.56128064032015,122.66133066533266,122.76138069034516,122.86143071535767,122.96148074037018,123.06153076538268,123.16158079039519,123.2616308154077,123.3616808404202,123.46173086543271,123.56178089044522,123.66183091545773,123.76188094047022,123.86193096548273,123.96198099049523,124.06203101550774,124.16208104052025,124.26213106553276,124.36218109054526,124.46223111555777,124.56228114057028,124.66233116558278,124.76238119059529,124.8624312156078,124.9624812406203,125.06253126563281,125.16258129064532,125.26263131565783,125.36268134067032,125.46273136568283,125.56278139069533,125.66283141570784,125.76288144072035,125.86293146573286,125.96298149074536,126.06303151575787,126.16308154077038,126.26313156578288,126.36318159079539,126.4632316158079,126.5632816408204,126.66333166583291,126.76338169084542,126.86343171585793,126.96348174087042,127.06353176588293,127.16358179089544,127.26363181590794,127.36368184092045,127.46373186593296,127.56378189094546,127.66383191595797,127.76388194097048,127.86393196598299,127.96398199099549,128.06403201600799,128.1640820410205,128.264132066033,128.3641820910455,128.464232116058,128.56428214107052,128.66433216608303,128.76438219109554,128.86443221610804,128.96448224112055,129.06453226613306,129.16458229114556,129.26463231615807,129.36468234117058,129.46473236618309,129.5647823911956,129.6648324162081,129.7648824412206,129.8649324662331,129.96498249124562,130.06503251625813,130.16508254127064,130.26513256628314,130.36518259129565,130.46523261630816,130.56528264132066,130.66533266633317,130.76538269134568,130.86543271635816,130.96548274137066,131.06553276638317,131.16558279139568,131.26563281640819,131.3656828414207,131.4657328664332,131.5657828914457,131.6658329164582,131.76588294147072,131.86593296648323,131.96598299149574,132.06603301650824,132.16608304152075,132.26613306653326,132.36618309154576,132.46623311655827,132.56628314157078,132.66633316658329,132.7663831915958,132.8664332166083,132.9664832416208,133.06653326663331,133.16658329164582,133.26663331665833,133.36668334167084,133.46673336668334,133.56678339169585,133.66683341670836,133.76688344172086,133.86693346673337,133.96698349174588,134.06703351675836,134.16708354177086,134.26713356678337,134.36718359179588,134.4672336168084,134.5672836418209,134.6673336668334,134.7673836918459,134.86743371685841,134.96748374187092,135.06753376688343,135.16758379189594,135.26763381690844,135.36768384192095,135.46773386693346,135.56778389194596,135.66783391695847,135.76788394197098,135.8679339669835,135.967983991996,136.0680340170085,136.168084042021,136.26813406703351,136.36818409204602,136.46823411705853,136.56828414207104,136.66833416708354,136.76838419209605,136.86843421710856,136.96848424212106,137.06853426713357,137.16858429214605,137.26863431715856,137.36868434217106,137.46873436718357,137.56878439219608,137.6688344172086,137.7688844422211,137.8689344672336,137.9689844922461,138.06903451725861,138.16908454227112,138.26913456728363,138.36918459229614,138.46923461730864,138.56928464232115,138.66933466733366,138.76938469234616,138.86943471735867,138.96948474237118,139.0695347673837,139.1695847923962,139.2696348174087,139.3696848424212,139.46973486743371,139.56978489244622,139.66983491745873,139.76988494247124,139.86993496748374,139.96998499249625,140.07003501750876,140.17008504252126,140.27013506753377,140.37018509254625,140.47023511755876,140.57028514257127,140.67033516758377,140.77038519259628,140.8704352176088,140.9704852426213,141.0705352676338,141.1705852926463,141.27063531765882,141.37068534267132,141.47073536768383,141.57078539269634,141.67083541770884,141.77088544272135,141.87093546773386,141.97098549274637,142.07103551775887,142.17108554277138,142.2711355677839,142.3711855927964,142.4712356178089,142.5712856428214,142.67133566783392,142.77138569284642,142.87143571785893,142.97148574287144,143.07153576788394,143.17158579289645,143.27163581790896,143.37168584292147,143.47173586793394,143.57178589294645,143.67183591795896,143.77188594297147,143.87193596798397,143.97198599299648,144.072036018009,144.1720860430215,144.272136068034,144.3721860930465,144.47223611805902,144.57228614307152,144.67233616808403,144.77238619309654,144.87243621810904,144.97248624312155,145.07253626813406,145.17258629314657,145.27263631815907,145.37268634317158,145.4727363681841,145.5727863931966,145.6728364182091,145.7728864432216,145.87293646823412,145.97298649324662,146.07303651825913,146.17308654327164,146.27313656828414,146.37318659329665,146.47323661830916,146.57328664332167,146.67333666833414,146.77338669334665,146.87343671835916,146.97348674337167,147.07353676838417,147.17358679339668,147.2736368184092,147.3736868434217,147.4737368684342,147.5737868934467,147.67383691845922,147.77388694347172,147.87393696848423,147.97398699349674,148.07403701850924,148.17408704352175,148.27413706853426,148.37418709354677,148.47423711855927,148.57428714357178,148.6743371685843,148.7743871935968,148.8744372186093,148.9744872436218,149.07453726863432,149.17458729364682,149.27463731865933,149.37468734367184,149.47473736868434,149.57478739369685,149.67483741870936,149.77488744372184,149.87493746873434,149.97498749374685,150.07503751875936,150.17508754377187,150.27513756878437,150.37518759379688,150.4752376188094,150.5752876438219,150.6753376688344,150.7753876938469,150.87543771885942,150.97548774387192,151.07553776888443,151.17558779389694,151.27563781890944,151.37568784392195,151.47573786893446,151.57578789394697,151.67583791895947,151.77588794397198,151.8759379689845,151.975987993997,152.0760380190095,152.176088044022,152.27613806903452,152.37618809404702,152.47623811905953,152.57628814407204,152.67633816908454,152.77638819409705,152.87643821910956,152.97648824412204,153.07653826913455,153.17658829414705,153.27663831915956,153.37668834417207,153.47673836918457,153.57678839419708,153.6768384192096,153.7768884442221,153.8769384692346,153.9769884942471,154.07703851925962,154.17708854427212,154.27713856928463,154.37718859429714,154.47723861930965,154.57728864432215,154.67733866933466,154.77738869434717,154.87743871935967,154.97748874437218,155.0775387693847,155.1775887943972,155.2776388194097,155.3776888444222,155.47773886943472,155.57778889444722,155.67783891945973,155.77788894447224,155.87793896948475,155.97798899449725,156.07803901950973,156.17808904452224,156.27813906953475,156.37818909454725,156.47823911955976,156.57828914457227,156.67833916958477,156.77838919459728,156.8784392196098,156.9784892446223,157.0785392696348,157.1785892946473,157.27863931965982,157.37868934467232,157.47873936968483,157.57878939469734,157.67883941970985,157.77888944472235,157.87893946973486,157.97898949474737,158.07903951975987,158.17908954477238,158.2791395697849,158.3791895947974,158.4792396198099,158.5792896448224,158.67933966983492,158.77938969484742,158.87943971985993,158.97948974487244,159.07953976988495,159.17958979489745,159.27963981990993,159.37968984492244,159.47973986993495,159.57978989494745,159.67983991995996,159.77988994497247,159.87993996998497,159.97998999499748,160.08004002001,160.1800900450225,160.280140070035,160.3801900950475,160.48024012006002,160.58029014507252,160.68034017008503,160.78039019509754,160.88044022011005,160.98049024512255,161.08054027013506,161.18059029514757,161.28064032016007,161.38069034517258,161.4807403701851,161.5807903951976,161.6808404202101,161.7808904452226,161.88094047023512,161.98099049524762,162.08104052026013,162.18109054527264,162.28114057028515,162.38119059529762,162.48124062031013,162.58129064532264,162.68134067033515,162.78139069534765,162.88144072036016,162.98149074537267,163.08154077038517,163.18159079539768,163.2816408204102,163.3816908454227,163.4817408704352,163.5817908954477,163.68184092046022,163.78189094547272,163.88194097048523,163.98199099549774,164.08204102051025,164.18209104552275,164.28214107053526,164.38219109554777,164.48224112056027,164.58229114557278,164.6823411705853,164.7823911955978,164.8824412206103,164.9824912456228,165.08254127063532,165.18259129564782,165.28264132066033,165.38269134567284,165.48274137068535,165.58279139569783,165.68284142071033,165.78289144572284,165.88294147073535,165.98299149574785,166.08304152076036,166.18309154577287,166.28314157078538,166.38319159579788,166.4832416208104,166.5832916458229,166.6833416708354,166.7833916958479,166.88344172086042,166.98349174587293,167.08354177088543,167.18359179589794,167.28364182091045,167.38369184592295,167.48374187093546,167.58379189594797,167.68384192096048,167.78389194597298,167.8839419709855,167.983991995998,168.0840420210105,168.184092046023,168.28414207103552,168.38419209604803,168.48424212106053,168.58429214607304,168.68434217108552,168.78439219609803,168.88444222111053,168.98449224612304,169.08454227113555,169.18459229614805,169.28464232116056,169.38469234617307,169.48474237118558,169.58479239619808,169.6848424212106,169.7848924462231,169.8849424712356,169.9849924962481,170.08504252126062,170.18509254627313,170.28514257128563,170.38519259629814,170.48524262131065,170.58529264632315,170.68534267133566,170.78539269634817,170.88544272136068,170.98549274637318,171.0855427713857,171.1855927963982,171.2856428214107,171.3856928464232,171.48574287143572,171.58579289644823,171.68584292146073,171.78589294647324,171.88594297148572,171.98599299649823,172.08604302151073,172.18609304652324,172.28614307153575,172.38619309654825,172.48624312156076,172.58629314657327,172.68634317158578,172.78639319659828,172.8864432216108,172.9864932466233,173.0865432716358,173.1865932966483,173.28664332166082,173.38669334667333,173.48674337168583,173.58679339669834,173.68684342171085,173.78689344672335,173.88694347173586,173.98699349674837,174.08704352176088,174.18709354677338,174.2871435717859,174.3871935967984,174.4872436218109,174.5872936468234,174.68734367183592,174.78739369684843,174.88744372186093,174.9874937468734,175.08754377188592,175.18759379689843,175.28764382191093,175.38769384692344,175.48774387193595,175.58779389694845,175.68784392196096,175.78789394697347,175.88794397198598,175.98799399699848,176.088044022011,176.1880940470235,176.288144072036,176.3881940970485,176.48824412206102,176.58829414707353,176.68834417208603,176.78839419709854,176.88844422211105,176.98849424712355,177.08854427213606,177.18859429714857,177.28864432216108,177.38869434717358,177.4887443721861,177.5887943971986,177.6888444222111,177.7888944472236,177.88894447223612,177.98899449724863,178.08904452226113,178.1890945472736,178.28914457228612,178.38919459729863,178.48924462231113,178.58929464732364,178.68934467233615,178.78939469734865,178.88944472236116,178.98949474737367,179.08954477238618,179.18959479739868,179.2896448224112,179.3896948474237,179.4897448724362,179.5897948974487,179.68984492246122,179.78989494747373,179.88994497248623,179.98999499749874,180.09004502251125,180.19009504752376,180.29014507253626,180.39019509754877,180.49024512256128,180.59029514757378,180.6903451725863,180.7903951975988,180.8904452226113,180.9904952476238,181.09054527263632,181.19059529764883,181.2906453226613,181.3906953476738,181.49074537268632,181.59079539769883,181.69084542271133,181.79089544772384,181.89094547273635,181.99099549774886,182.09104552276136,182.19109554777387,182.29114557278638,182.39119559779888,182.4912456228114,182.5912956478239,182.6913456728364,182.7913956978489,182.89144572286142,182.99149574787393,183.09154577288643,183.19159579789894,183.29164582291145,183.39169584792396,183.49174587293646,183.59179589794897,183.69184592296148,183.79189594797398,183.8919459729865,183.991995997999,184.0920460230115,184.192096048024,184.29214607303652,184.39219609804903,184.4922461230615,184.592296148074,184.69234617308652,184.79239619809903,184.89244622311153,184.99249624812404,185.09254627313655,185.19259629814906,185.29264632316156,185.39269634817407,185.49274637318658,185.59279639819908,185.6928464232116,185.7928964482241,185.8929464732366,185.9929964982491,186.09304652326162,186.19309654827413,186.29314657328663,186.39319659829914,186.49324662331165,186.59329664832416,186.69334667333666,186.79339669834917,186.89344672336168,186.99349674837418,187.0935467733867,187.1935967983992,187.2936468234117,187.3936968484242,187.49374687343672,187.5937968984492,187.6938469234617,187.7938969484742,187.89394697348672,187.99399699849923,188.09404702351173,188.19409704852424,188.29414707353675,188.39419709854926,188.49424712356176,188.59429714857427,188.69434717358678,188.79439719859928,188.8944472236118,188.9944972486243,189.0945472736368,189.1945972986493,189.29464732366182,189.39469734867433,189.49474737368683,189.59479739869934,189.69484742371185,189.79489744872436,189.89494747373686,189.99499749874937,190.09504752376188,190.19509754877438,190.2951475737869,190.3951975987994,190.4952476238119,190.5952976488244,190.69534767383692,190.7953976988494,190.8954477238619,190.9954977488744,191.09554777388692,191.19559779889943,191.29564782391193,191.39569784892444,191.49574787393695,191.59579789894946,191.69584792396196,191.79589794897447,191.89594797398698,191.99599799899948,192.096048024012,192.1960980490245,192.296148074037,192.3961980990495,192.49624812406202,192.59629814907453,192.69634817408703,192.79639819909954,192.89644822411205,192.99649824912456,193.09654827413706,193.19659829914957,193.29664832416208,193.39669834917459,193.4967483741871,193.5967983991996,193.6968484242121,193.7968984492246,193.8969484742371,193.9969984992496,194.0970485242621,194.1970985492746,194.29714857428712,194.39719859929963,194.49724862431214,194.59729864932464,194.69734867433715,194.79739869934966,194.89744872436216,194.99749874937467,195.09754877438718,195.19759879939969,195.2976488244122,195.3976988494247,195.4977488744372,195.5977988994497,195.69784892446222,195.79789894947473,195.89794897448724,195.99799899949974,196.09804902451225,196.19809904952476,196.29814907453726,196.39819909954977,196.49824912456228,196.59829914957479,196.6983491745873,196.7983991995998,196.8984492246123,196.9984992496248,197.0985492746373,197.1985992996498,197.2986493246623,197.3986993496748,197.49874937468732,197.59879939969983,197.69884942471234,197.79889944972484,197.89894947473735,197.99899949974986,198.09904952476236,198.19909954977487,198.29914957478738,198.39919959979989,198.4992496248124,198.5992996498249,198.6993496748374,198.79939969984991,198.89944972486242,198.99949974987493,199.09954977488744,199.19959979989994,199.29964982491245,199.39969984992496,199.49974987493746,199.59979989994997,199.69984992496248,199.79989994997499,199.8999499749875,200.0,200]},\"selected\":{\"id\":\"4966\"},\"selection_policy\":{\"id\":\"4965\"}},\"id\":\"4412\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4413\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4148\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4419\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"4944\"},\"selection_policy\":{\"id\":\"4943\"}},\"id\":\"4147\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4415\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4412\"}},\"id\":\"4417\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4414\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4425\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4192\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAAgA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[2000]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAC/h2Th4Jy5P7+HZOHgnMk/z2ULqag10z+/h2Th4JzZP9fU3owMAuA/z2ULqag14z/H9jfFRGnmP7+HZOHgnOk/txiR/XzQ7D/X1N6MDALwP1Md9Zram/E/z2ULqag18z9LriG3ds/0P8f2N8VEafY/Qz9O0xID+D+/h2Th4Jz5PzvQeu+uNvs/txiR/XzQ/D8zYacLS2r+P9fU3owMAgBAFfnpk/POAEBTHfWa2psBQJFBAKLBaAJAz2ULqag1A0ANihawjwIEQEuuIbd2zwRAidIsvl2cBUDH9jfFRGkGQAUbQ8wrNgdAQz9O0xIDCECBY1na+c8IQL+HZOHgnAlA/atv6MdpCkA70HrvrjYLQHn0hfaVAwxAtxiR/XzQDED1PJwEZJ0NQDNhpwtLag5AcYWyEjI3D0DX1N6MDAIQQPZmZBCAaBBAFfnpk/POEEA0i28XZzURQFMd9ZramxFAcq96Hk4CEkCRQQCiwWgSQLDThSU1zxJAz2ULqag1E0Du95AsHJwTQA2KFrCPAhRALBycMwNpFEBLriG3ds8UQGpApzrqNRVAidIsvl2cFUCoZLJB0QIWQMf2N8VEaRZA5oi9SLjPFkAFG0PMKzYXQCStyE+fnBdAQz9O0xIDGEBi0dNWhmkYQIFjWdr5zxhAoPXeXW02GUC/h2Th4JwZQN4Z6mRUAxpA/atv6MdpGkAcPvVrO9AaQDvQeu+uNhtAWmIAcyKdG0B59IX2lQMcQJiGC3oJahxAtxiR/XzQHEDWqhaB8DYdQPU8nARknR1AFM8hiNcDHkAzYacLS2oeQFLzLI++0B5AcYWyEjI3H0CQFziWpZ0fQNfU3owMAiBA552hTkY1IED2ZmQQgGggQAYwJ9K5myBAFfnpk/POIEAlwqxVLQIhQDSLbxdnNSFARFQy2aBoIUBTHfWa2pshQGPmt1wUzyFAcq96Hk4CIkCCeD3ghzUiQJFBAKLBaCJAoQrDY/ubIkCw04UlNc8iQMCcSOduAiNAz2ULqag1I0DfLs5q4mgjQO73kCwcnCNA/sBT7lXPI0ANihawjwIkQB1T2XHJNSRALBycMwNpJEA85V71PJwkQEuuIbd2zyRAW3fkeLACJUBqQKc66jUlQHoJavwjaSVAidIsvl2cJUCZm+9/l88lQKhkskHRAiZAuC11Aws2JkDH9jfFRGkmQNe/+oZ+nCZA5oi9SLjPJkD2UYAK8gInQAUbQ8wrNidAFeQFjmVpJ0AkrchPn5wnQDR2ixHZzydAQz9O0xIDKEBTCBGVTDYoQGLR01aGaShAcpqWGMCcKECBY1na+c8oQJEsHJwzAylAoPXeXW02KUCwvqEfp2kpQL+HZOHgnClAzlAnoxrQKUDeGepkVAMqQO3irCaONipA/atv6MdpKkAMdTKqAZ0qQBw+9Ws70CpAKwe4LXUDK0A70HrvrjYrQEqZPbHoaStAWmIAcyKdK0BpK8M0XNArQHn0hfaVAyxAiL1IuM82LECYhgt6CWosQKdPzjtDnSxAtxiR/XzQLEDG4VO/tgMtQNaqFoHwNi1A5XPZQipqLUD1PJwEZJ0tQAQGX8ad0C1AFM8hiNcDLkAjmORJETcuQDNhpwtLai5AQipqzYSdLkBS8yyPvtAuQGG871D4Ay9AcYWyEjI3L0CATnXUa2ovQJAXOJalnS9An+D6V9/QL0DX1N6MDAIwQF85wG2pGzBA552hTkY1MEBvAoMv404wQPZmZBCAaDBAfstF8RyCMEAGMCfSuZswQI6UCLNWtTBAFfnpk/POMECdXct0kOgwQCXCrFUtAjFArSaONsobMUA0i28XZzUxQLzvUPgDTzFARFQy2aBoMUDMuBO6PYIxQFMd9ZramzFA24HWe3e1MUBj5rdcFM8xQOtKmT2x6DFAcq96Hk4CMkD6E1z/6hsyQIJ4PeCHNTJACt0ewSRPMkCRQQCiwWgyQBmm4YJegjJAoQrDY/ubMkApb6REmLUyQLDThSU1zzJAODhnBtLoMkDAnEjnbgIzQEgBKsgLHDNAz2ULqag1M0BXyuyJRU8zQN8uzmriaDNAZpOvS3+CM0Du95AsHJwzQHZccg25tTNA/sBT7lXPM0CFJTXP8ugzQA2KFrCPAjRAle73kCwcNEAdU9lxyTU0QKS3ulJmTzRALBycMwNpNEC0gH0UoII0QDzlXvU8nDRAw0lA1tm1NEBLriG3ds80QNMSA5gT6TRAW3fkeLACNUDi28VZTRw1QGpApzrqNTVA8qSIG4dPNUB6CWr8I2k1QAFuS93AgjVAidIsvl2cNUARNw6f+rU1QJmb73+XzzVAIADRYDTpNUCoZLJB0QI2QDDJkyJuHDZAuC11Aws2NkA/klbkp082QMf2N8VEaTZAT1sZpuGCNkDXv/qGfpw2QF4k3GcbtjZA5oi9SLjPNkBu7Z4pVek2QPZRgAryAjdAfbZh644cN0AFG0PMKzY3QI1/JK3ITzdAFeQFjmVpN0CcSOduAoM3QCStyE+fnDdArBGqMDy2N0A0dosR2c83QLvabPJ16TdAQz9O0xIDOEDLoy+0rxw4QFMIEZVMNjhA2mzydelPOEBi0dNWhmk4QOo1tTcjgzhAcpqWGMCcOED5/nf5XLY4QIFjWdr5zzhACcg6u5bpOECRLBycMwM5QBiR/XzQHDlAoPXeXW02OUAoWsA+ClA5QLC+oR+naTlANyODAESDOUC/h2Th4Jw5QEfsRcJ9tjlAzlAnoxrQOUBWtQiEt+k5QN4Z6mRUAzpAZn7LRfEcOkDt4qwmjjY6QHVHjgcrUDpA/atv6MdpOkCFEFHJZIM6QAx1MqoBnTpAlNkTi562OkAcPvVrO9A6QKSi1kzY6TpAKwe4LXUDO0Cza5kOEh07QDvQeu+uNjtAwzRc0EtQO0BKmT2x6Gk7QNL9HpKFgztAWmIAcyKdO0DixuFTv7Y7QGkrwzRc0DtA8Y+kFfnpO0B59IX2lQM8QAFZZ9cyHTxAiL1IuM82PEAQIiqZbFA8QJiGC3oJajxAIOvsWqaDPECnT847Q508QC+0rxzgtjxAtxiR/XzQPEA/fXLeGeo8QMbhU7+2Az1ATkY1oFMdPUDWqhaB8DY9QF4P+GGNUD1A5XPZQipqPUBt2Lojx4M9QPU8nARknT1AfaF95QC3PUAEBl/GndA9QIxqQKc66j1AFM8hiNcDPkCcMwNpdB0+QCOY5EkRNz5Aq/zFKq5QPkAzYacLS2o+QLvFiOzngz5AQipqzYSdPkDKjkuuIbc+QFLzLI++0D5A2lcOcFvqPkBhvO9Q+AM/QOkg0TGVHT9AcYWyEjI3P0D56ZPzzlA/QIBOddRraj9ACLNWtQiEP0CQFziWpZ0/QBh8GXdCtz9An+D6V9/QP0AnRdw4fOo/QNfU3owMAkBAG4dP/doOQEBfOcBtqRtAQKPrMN53KEBA552hTkY1QEArUBK/FEJAQG8Cgy/jTkBAsrTzn7FbQED2ZmQQgGhAQDoZ1YBOdUBAfstF8RyCQEDCfbZh645AQAYwJ9K5m0BASuKXQoioQECOlAizVrVAQNFGeSMlwkBAFfnpk/POQEBZq1oEwttAQJ1dy3SQ6EBA4Q885V71QEAlwqxVLQJBQGl0Hcb7DkFArSaONsobQUDw2P6mmChBQDSLbxdnNUFAeD3ghzVCQUC871D4A09BQACiwWjSW0FARFQy2aBoQUCIBqNJb3VBQMy4E7o9gkFAD2uEKgyPQUBTHfWa2ptBQJfPZQupqEFA24HWe3e1QUAfNEfsRcJBQGPmt1wUz0FAp5gozeLbQUDrSpk9sehBQC79Ca5/9UFAcq96Hk4CQkC2YeuOHA9CQPoTXP/qG0JAPsbMb7koQkCCeD3ghzVCQMYqrlBWQkJACt0ewSRPQkBNj48x81tCQJFBAKLBaEJA1fNwEpB1QkAZpuGCXoJCQF1YUvMsj0JAoQrDY/ubQkDlvDPUyahCQClvpESYtUJAbCEVtWbCQkCw04UlNc9CQPSF9pUD3EJAODhnBtLoQkB86td2oPVCQMCcSOduAkNABE+5Vz0PQ0BIASrICxxDQIuzmjjaKENAz2ULqag1Q0ATGHwZd0JDQFfK7IlFT0NAm3xd+hNcQ0DfLs5q4mhDQCPhPtuwdUNAZpOvS3+CQ0CqRSC8TY9DQO73kCwcnENAMqoBneqoQ0B2XHINubVDQLoO432HwkNA/sBT7lXPQ0BCc8ReJNxDQIUlNc/y6ENAydelP8H1Q0ANihawjwJEQFE8hyBeD0RAle73kCwcREDZoGgB+yhEQB1T2XHJNURAYQVK4pdCRECkt7pSZk9EQOhpK8M0XERALBycMwNpREBwzgyk0XVEQLSAfRSggkRA+DLuhG6PREA85V71PJxEQICXz2ULqURAw0lA1tm1REAH/LBGqMJEQEuuIbd2z0RAj2CSJ0XcREDTEgOYE+lEQBfFcwji9URAW3fkeLACRUCfKVXpfg9FQOLbxVlNHEVAJo42yhspRUBqQKc66jVFQK7yF6u4QkVA8qSIG4dPRUA2V/mLVVxFQHoJavwjaUVAvrvabPJ1RUABbkvdwIJFQEUgvE2Pj0VAidIsvl2cRUDNhJ0uLKlFQBE3Dp/6tUVAVel+D8nCRUCZm+9/l89FQN1NYPBl3EVAIADRYDTpRUBkskHRAvZFQKhkskHRAkZA7BYjsp8PRkAwyZMibhxGQHR7BJM8KUZAuC11Aws2RkD83+Vz2UJGQD+SVuSnT0ZAg0THVHZcRkDH9jfFRGlGQAupqDUTdkZAT1sZpuGCRkCTDYoWsI9GQNe/+oZ+nEZAGnJr90ypRkBeJNxnG7ZGQKLWTNjpwkZA5oi9SLjPRkAqOy65htxGQG7tnilV6UZAsp8PmiP2RkD2UYAK8gJHQDkE8XrAD0dAfbZh644cR0DBaNJbXSlHQAUbQ8wrNkdASc2zPPpCR0CNfyStyE9HQNExlR2XXEdAFeQFjmVpR0BYlnb+M3ZHQJxI524Cg0dA4PpX39CPR0AkrchPn5xHQGhfOcBtqUdArBGqMDy2R0DwwxqhCsNHQDR2ixHZz0dAdyj8gafcR0C72mzydelHQP+M3WJE9kdAQz9O0xIDSECH8b5D4Q9IQMujL7SvHEhAD1agJH4pSEBTCBGVTDZIQJa6gQUbQ0hA2mzydelPSEAeH2Pmt1xIQGLR01aGaUhApoNEx1R2SEDqNbU3I4NIQC7oJajxj0hAcpqWGMCcSEC1TAeJjqlIQPn+d/lctkhAPbHoaSvDSECBY1na+c9IQMUVykrI3EhACcg6u5bpSEBNeqsrZfZIQJEsHJwzA0lA1N6MDAIQSUAYkf180BxJQFxDbu2eKUlAoPXeXW02SUDkp0/OO0NJQChawD4KUElAbAwxr9hcSUCwvqEfp2lJQPNwEpB1dklANyODAESDSUB71fNwEpBJQL+HZOHgnElAAzrVUa+pSUBH7EXCfbZJQIuetjJMw0lAzlAnoxrQSUASA5gT6dxJQFa1CIS36UlAmmd59IX2SUDeGepkVANKQCLMWtUiEEpAZn7LRfEcSkCqMDy2vylKQO3irCaONkpAMZUdl1xDSkB1R44HK1BKQLn5/nf5XEpA/atv6MdpSkBBXuBYlnZKQIUQUclkg0pAycLBOTOQSkAMdTKqAZ1KQFAnoxrQqUpAlNkTi562SkDYi4T7bMNKQBw+9Ws70EpAYPBl3AndSkCkotZM2OlKQOhUR72m9kpAKwe4LXUDS0BvuSieQxBLQLNrmQ4SHUtA9x0Kf+ApS0A70HrvrjZLQH+C6199Q0tAwzRc0EtQS0AH58xAGl1LQEqZPbHoaUtAjkuuIbd2S0DS/R6ShYNLQBawjwJUkEtAWmIAcyKdS0CeFHHj8KlLQOLG4VO/tktAJnlSxI3DS0BpK8M0XNBLQK3dM6Uq3UtA8Y+kFfnpS0A1QhWGx/ZLQHn0hfaVA0xAvab2ZmQQTEABWWfXMh1MQEUL2EcBKkxAiL1IuM82TEDMb7konkNMQBAiKplsUExAVNSaCTtdTECYhgt6CWpMQNw4fOrXdkxAIOvsWqaDTEBknV3LdJBMQKdPzjtDnUxA6wE/rBGqTEAvtK8c4LZMQHNmII2uw0xAtxiR/XzQTED7ygFuS91MQD99ct4Z6kxAgi/jTuj2TEDG4VO/tgNNQAqUxC+FEE1ATkY1oFMdTUCS+KUQIipNQNaqFoHwNk1AGl2H8b5DTUBeD/hhjVBNQKHBaNJbXU1A5XPZQipqTUApJkqz+HZNQG3YuiPHg01AsYorlJWQTUD1PJwEZJ1NQDnvDHUyqk1AfaF95QC3TUDAU+5Vz8NNQAQGX8ad0E1ASLjPNmzdTUCMakCnOupNQNAcsRcJ901AFM8hiNcDTkBYgZL4pRBOQJwzA2l0HU5A3+Vz2UIqTkAjmORJETdOQGdKVbrfQ05Aq/zFKq5QTkDvrjabfF1OQDNhpwtLak5AdxMYfBl3TkC7xYjs54NOQP53+Vy2kE5AQipqzYSdTkCG3No9U6pOQMqOS64ht05ADkG8HvDDTkBS8yyPvtBOQJalnf+M3U5A2lcOcFvqTkAdCn/gKfdOQGG871D4A09ApW5gwcYQT0DpINExlR1PQC3TQaJjKk9AcYWyEjI3T0C1NyODAERPQPnpk/POUE9APJwEZJ1dT0CATnXUa2pPQMQA5kQ6d09ACLNWtQiET0BMZccl15BPQJAXOJalnU9A1MmoBnSqT0AYfBl3QrdPQFsuiucQxE9An+D6V9/QT0DjkmvIrd1PQCdF3Dh86k9Aa/dMqUr3T0DX1N6MDAJQQPktF8VzCFBAG4dP/doOUEA94Ic1QhVQQF85wG2pG1BAgZL4pRAiUECj6zDedyhQQMVEaRbfLlBA552hTkY1UEAJ99mGrTtQQCtQEr8UQlBATalK93tIUEBvAoMv405QQJFbu2dKVVBAsrTzn7FbUEDUDSzYGGJQQPZmZBCAaFBAGMCcSOduUEA6GdWATnVQQFxyDbm1e1BAfstF8RyCUECgJH4phIhQQMJ9tmHrjlBA5NbumVKVUEAGMCfSuZtQQCiJXwoholBASuKXQoioUEBsO9B6765QQI6UCLNWtVBAsO1A6727UEDRRnkjJcJQQPOfsVuMyFBAFfnpk/POUEA3UiLMWtVQQFmrWgTC21BAewSTPCniUECdXct0kOhQQL+2A6337lBA4Q885V71UEADaXQdxvtQQCXCrFUtAlFARxvljZQIUUBpdB3G+w5RQIvNVf5iFVFArSaONsobUUDPf8ZuMSJRQPDY/qaYKFFAEjI33/8uUUA0i28XZzVRQFbkp0/OO1FAeD3ghzVCUUCalhjAnEhRQLzvUPgDT1FA3kiJMGtVUUAAosFo0ltRQCL7+aA5YlFARFQy2aBoUUBmrWoRCG9RQIgGo0lvdVFAql/bgdZ7UUDMuBO6PYJRQO4RTPKkiFFAD2uEKgyPUUAxxLxic5VRQFMd9Zram1FAdXYt00GiUUCXz2ULqahRQLkonkMQr1FA24HWe3e1UUD92g603rtRQB80R+xFwlFAQY1/JK3IUUBj5rdcFM9RQIU/8JR71VFAp5gozeLbUUDJ8WAFSuJRQOtKmT2x6FFADKTRdRjvUUAu/Qmuf/VRQFBWQubm+1FAcq96Hk4CUkCUCLNWtQhSQLZh644cD1JA2Lojx4MVUkD6E1z/6htSQBxtlDdSIlJAPsbMb7koUkBgHwWoIC9SQIJ4PeCHNVJApNF1GO87UkDGKq5QVkJSQOiD5oi9SFJACt0ewSRPUkArNlf5i1VSQE2PjzHzW1JAb+jHaVpiUkCRQQCiwWhSQLOaONoob1JA1fNwEpB1UkD3TKlK93tSQBmm4YJeglJAO/8Zu8WIUkBdWFLzLI9SQH+xiiuUlVJAoQrDY/ubUkDDY/ubYqJSQOW8M9TJqFJABxZsDDGvUkApb6REmLVSQErI3Hz/u1JAbCEVtWbCUkCOek3tzchSQLDThSU1z1JA0iy+XZzVUkD0hfaVA9xSQBbfLs5q4lJAODhnBtLoUkBakZ8+Oe9SQHzq13ag9VJAnkMQrwf8UkDAnEjnbgJTQOL1gB/WCFNABE+5Vz0PU0AmqPGPpBVTQEgBKsgLHFNAaVpiAHMiU0CLs5o42ihTQK0M03BBL1NAz2ULqag1U0DxvkPhDzxTQBMYfBl3QlNANXG0Ud5IU0BXyuyJRU9TQHkjJcKsVVNAm3xd+hNcU0C91ZUye2JTQN8uzmriaFNAAYgGo0lvU0Aj4T7bsHVTQEU6dxMYfFNAZpOvS3+CU0CI7OeD5ohTQKpFILxNj1NAzJ5Y9LSVU0Du95AsHJxTQBBRyWSDolNAMqoBneqoU0BUAzrVUa9TQHZccg25tVNAmLWqRSC8U0C6DuN9h8JTQNxnG7buyFNA/sBT7lXPU0AgGowmvdVTQEJzxF4k3FNAZMz8loviU0CFJTXP8uhTQKd+bQda71NAydelP8H1U0DrMN53KPxTQA2KFrCPAlRAL+NO6PYIVEBRPIcgXg9UQHOVv1jFFVRAle73kCwcVEC3RzDJkyJUQNmgaAH7KFRA+/mgOWIvVEAdU9lxyTVUQD+sEaowPFRAYQVK4pdCVECDXoIa/0hUQKS3ulJmT1RAxhDzis1VVEDoaSvDNFxUQArDY/ubYlRALBycMwNpVEBOddRram9UQHDODKTRdVRAkidF3Dh8VEC0gH0UoIJUQNbZtUwHiVRA+DLuhG6PVEAajCa91ZVUQDzlXvU8nFRAXj6XLaSiVECAl89lC6lUQKLwB55yr1RAw0lA1tm1VEDlongOQbxUQAf8sEaowlRAKVXpfg/JVEBLriG3ds9UQG0HWu/d1VRAj2CSJ0XcVECxucpfrOJUQNMSA5gT6VRA9Ws70HrvVEAXxXMI4vVUQDkerEBJ/FRAW3fkeLACVUB90ByxFwlVQJ8pVel+D1VAwIKNIeYVVUDi28VZTRxVQAQ1/pG0IlVAJo42yhspVUBI524Cgy9VQGpApzrqNVVAjJnfclE8VUCu8heruEJVQNBLUOMfSVVA8qSIG4dPVUAU/sBT7lVVQDZX+YtVXFVAWLAxxLxiVUB6CWr8I2lVQJxiojSLb1VAvrvabPJ1VUDfFBOlWXxVQAFuS93AglVAI8eDFSiJVUBFILxNj49VQGd59IX2lVVAidIsvl2cVUCrK2X2xKJVQM2EnS4sqVVA793VZpOvVUARNw6f+rVVQDOQRtdhvFVAVel+D8nCVUB3QrdHMMlVQJmb73+Xz1VAu/QnuP7VVUDdTWDwZdxVQP6mmCjN4lVAIADRYDTpVUBCWQmZm+9VQGSyQdEC9lVAhgt6CWr8VUCoZLJB0QJWQMq96nk4CVZA7BYjsp8PVkAOcFvqBhZWQDDJkyJuHFZAUiLMWtUiVkB0ewSTPClWQJbUPMujL1ZAuC11Aws2VkDahq07cjxWQPzf5XPZQlZAHTkerEBJVkA/klbkp09WQGHrjhwPVlZAg0THVHZcVkClnf+M3WJWQMf2N8VEaVZA6U9w/atvVkALqag1E3ZWQC0C4W16fFZAT1sZpuGCVkBxtFHeSIlWQJMNihawj1ZAtWbCTheWVkDXv/qGfpxWQPkYM7/lolZAGnJr90ypVkA8y6MvtK9WQF4k3GcbtlZAgH0UoIK8VkCi1kzY6cJWQMQvhRBRyVZA5oi9SLjPVkAI4vWAH9ZWQCo7LrmG3FZATJRm8e3iVkBu7Z4pVelWQJBG12G871ZAsp8PmiP2VkDU+EfSivxWQPZRgAryAldAGKu4QlkJV0A5BPF6wA9XQFtdKbMnFldAfbZh644cV0CfD5oj9iJXQMFo0ltdKVdA48EKlMQvV0AFG0PMKzZXQCd0ewSTPFdASc2zPPpCV0BrJux0YUlXQI1/JK3IT1dAr9hc5S9WV0DRMZUdl1xXQPOKzVX+YldAFeQFjmVpV0A3PT7GzG9XQFiWdv4zdldAeu+uNpt8V0CcSOduAoNXQL6hH6dpiVdA4PpX39CPV0ACVJAXOJZXQCStyE+fnFdARgYBiAajV0BoXznAbalXQIq4cfjUr1dArBGqMDy2V0DOauJoo7xXQPDDGqEKw1dAEh1T2XHJV0A0dosR2c9XQFbPw0lA1ldAdyj8gafcV0CZgTS6DuNXQLvabPJ16VdA3TOlKt3vV0D/jN1iRPZXQCHmFZur/FdAQz9O0xIDWEBlmIYLeglYQIfxvkPhD1hAqUr3e0gWWEDLoy+0rxxYQO38Z+wWI1hAD1agJH4pWEAxr9hc5S9YQFMIEZVMNlhAdGFJzbM8WECWuoEFG0NYQLgTuj2CSVhA2mzydelPWED8xSquUFZYQB4fY+a3XFhAQHibHh9jWEBi0dNWhmlYQIQqDI/tb1hApoNEx1R2WEDI3Hz/u3xYQOo1tTcjg1hADI/tb4qJWEAu6CWo8Y9YQFBBXuBYllhAcpqWGMCcWECT885QJ6NYQLVMB4mOqVhA16U/wfWvWED5/nf5XLZYQBtYsDHEvFhAPbHoaSvDWEBfCiGikslYQIFjWdr5z1hAo7yREmHWWEDFFcpKyNxYQOduAoMv41hACcg6u5bpWEArIXPz/e9YQE16qytl9lhAb9PjY8z8WECRLBycMwNZQLKFVNSaCVlA1N6MDAIQWUD2N8VEaRZZQBiR/XzQHFlAOuo1tTcjWUBcQ27tnilZQH6cpiUGMFlAoPXeXW02WUDCTheW1DxZQOSnT847Q1lABgGIBqNJWUAoWsA+ClBZQEqz+HZxVllAbAwxr9hcWUCOZWnnP2NZQLC+oR+naVlA0RfaVw5wWUDzcBKQdXZZQBXKSsjcfFlANyODAESDWUBZfLs4q4lZQHvV83ASkFlAnS4sqXmWWUC/h2Th4JxZQOHgnBlIo1lAAzrVUa+pWUAlkw2KFrBZQEfsRcJ9tllAaUV++uS8WUCLnrYyTMNZQK337mqzyVlAzlAnoxrQWUDwqV/bgdZZQBIDmBPp3FlANFzQS1DjWUBWtQiEt+lZQHgOQbwe8FlAmmd59IX2WUC8wLEs7fxZQN4Z6mRUA1pAAHMinbsJWkAizFrVIhBaQEQlkw2KFlpAZn7LRfEcWkCI1wN+WCNaQKowPLa/KVpAzIl07iYwWkDt4qwmjjZaQA885V71PFpAMZUdl1xDWkBT7lXPw0laQHVHjgcrUFpAl6DGP5JWWkC5+f53+VxaQNtSN7BgY1pA/atv6MdpWkAfBaggL3BaQEFe4FiWdlpAY7cYkf18WkCFEFHJZINaQKdpiQHMiVpAycLBOTOQWkDrG/pxmpZaQAx1MqoBnVpALs5q4mijWkBQJ6Ma0KlaQHKA21I3sFpAlNkTi562WkC2MkzDBb1aQNiLhPtsw1pA+uS8M9TJWkAcPvVrO9BaQD6XLaSi1lpAYPBl3AndWkCCSZ4UceNaQKSi1kzY6VpAxvsOhT/wWkDoVEe9pvZaQAquf/UN/VpAKwe4LXUDW0BNYPBl3AlbQG+5KJ5DEFtAkRJh1qoWW0Cza5kOEh1bQNXE0UZ5I1tA9x0Kf+ApW0AZd0K3RzBbQDvQeu+uNltAXSmzJxY9W0B/gutffUNbQKHbI5jkSVtAwzRc0EtQW0DljZQIs1ZbQAfnzEAaXVtAKEAFeYFjW0BKmT2x6GlbQGzydelPcFtAjkuuIbd2W0CwpOZZHn1bQNL9HpKFg1tA9FZXyuyJW0AWsI8CVJBbQDgJyDq7lltAWmIAcyKdW0B8uziriaNbQJ4UcePwqVtAwG2pG1iwW0DixuFTv7ZbQAQgGowmvVtAJnlSxI3DW0BH0or89MlbQGkrwzRc0FtAi4T7bMPWW0Ct3TOlKt1bQM82bN2R41tA8Y+kFfnpW0AT6dxNYPBbQDVCFYbH9ltAV5tNvi79W0B59IX2lQNcQJtNvi79CVxAvab2ZmQQXEDf/y6fyxZcQAFZZ9cyHVxAI7KfD5ojXEBFC9hHASpcQGZkEIBoMFxAiL1IuM82XECqFoHwNj1cQMxvuSieQ1xA7sjxYAVKXEAQIiqZbFBcQDJ7YtHTVlxAVNSaCTtdXEB2LdNBomNcQJiGC3oJalxAut9DsnBwXEDcOHzq13ZcQP6RtCI/fVxAIOvsWqaDXEBCRCWTDYpcQGSdXct0kFxAhfaVA9yWXECnT847Q51cQMmoBnSqo1xA6wE/rBGqXEANW3fkeLBcQC+0rxzgtlxAUQ3oVEe9XEBzZiCNrsNcQJW/WMUVylxAtxiR/XzQXEDZcck15NZcQPvKAW5L3VxAHSQ6prLjXEA/fXLeGepcQGHWqhaB8FxAgi/jTuj2XECkiBuHT/1cQMbhU7+2A11A6DqM9x0KXUAKlMQvhRBdQCzt/GfsFl1ATkY1oFMdXUBwn23YuiNdQJL4pRAiKl1AtFHeSIkwXUDWqhaB8DZdQPgDT7lXPV1AGl2H8b5DXUA8tr8pJkpdQF4P+GGNUF1AgGgwmvRWXUChwWjSW11dQMMaoQrDY11A5XPZQipqXUAHzRF7kXBdQCkmSrP4dl1AS3+C6199XUBt2Lojx4NdQI8x81suil1AsYorlJWQXUDT42PM/JZdQPU8nARknV1AF5bUPMujXUA57wx1MqpdQFtIRa2ZsF1AfaF95QC3XUCf+rUdaL1dQMBT7lXPw11A4qwmjjbKXUAEBl/GndBdQCZfl/4E111ASLjPNmzdXUBqEQhv0+NdQIxqQKc66l1ArsN436HwXUDQHLEXCfddQPJ16U9w/V1AFM8hiNcDXkA2KFrAPgpeQFiBkvilEF5AetrKMA0XXkCcMwNpdB1eQL6MO6HbI15A3+Vz2UIqXkABP6wRqjBeQCOY5EkRN15ARfEcgng9XkBnSlW630NeQImjjfJGSl5Aq/zFKq5QXkDNVf5iFVdeQO+uNpt8XV5AEQhv0+NjXkAzYacLS2peQFW630OycF5AdxMYfBl3XkCZbFC0gH1eQLvFiOzng15A3B7BJE+KXkD+d/lctpBeQCDRMZUdl15AQipqzYSdXkBkg6IF7KNeQIbc2j1Tql5AqDUTdrqwXkDKjkuuIbdeQOzng+aIvV5ADkG8HvDDXkAwmvRWV8peQFLzLI++0F5AdExlxyXXXkCWpZ3/jN1eQLj+1Tf0415A2lcOcFvqXkD7sEaowvBeQB0Kf+Ap915AP2O3GJH9XkBhvO9Q+ANfQIMVKIlfCl9ApW5gwcYQX0DHx5j5LRdfQOkg0TGVHV9AC3oJavwjX0At00GiYypfQE8setrKMF9AcYWyEjI3X0CT3upKmT1fQLU3I4MARF9A15Bbu2dKX0D56ZPzzlBfQBpDzCs2V19APJwEZJ1dX0Be9TycBGRfQIBOddRral9AoqetDNNwX0DEAOZEOndfQOZZHn2hfV9ACLNWtQiEX0AqDI/tb4pfQExlxyXXkF9Abr7/XT6XX0CQFziWpZ1fQLJwcM4MpF9A1MmoBnSqX0D2IuE+27BfQBh8GXdCt19AOdVRr6m9X0BbLornEMRfQH2Hwh94yl9An+D6V9/QX0DBOTOQRtdfQOOSa8it3V9ABeyjABXkX0AnRdw4fOpfQEmeFHHj8F9Aa/dMqUr3X0CNUIXhsf1fQNfU3owMAmBAaAH7KEAFYED5LRfFcwhgQIpaM2GnC2BAG4dP/doOYECss2uZDhJgQD3ghzVCFWBAzgyk0XUYYEBfOcBtqRtgQPBl3AndHmBAgZL4pRAiYEASvxRCRCVgQKPrMN53KGBANBhNeqsrYEDFRGkW3y5gQFZxhbISMmBA552hTkY1YEB4yr3qeThgQAn32YatO2BAmiP2IuE+YEArUBK/FEJgQLx8LltIRWBATalK93tIYEDe1WaTr0tgQG8Cgy/jTmBAAC+fyxZSYECRW7tnSlVgQCKI1wN+WGBAsrTzn7FbYEBD4Q885V5gQNQNLNgYYmBAZTpIdExlYED2ZmQQgGhgQIeTgKyza2BAGMCcSOduYECp7LjkGnJgQDoZ1YBOdWBAy0XxHIJ4YEBccg25tXtgQO2eKVXpfmBAfstF8RyCYEAP+GGNUIVgQKAkfimEiGBAMVGaxbeLYEDCfbZh645gQFOq0v0ekmBA5NbumVKVYEB1Aws2hphgQAYwJ9K5m2BAl1xDbu2eYEAoiV8KIaJgQLm1e6ZUpWBASuKXQoioYEDbDrTeu6tgQGw70HrvrmBA/WfsFiOyYECOlAizVrVgQB/BJE+KuGBAsO1A6727YEBBGl2H8b5gQNFGeSMlwmBAYnOVv1jFYEDzn7FbjMhgQITMzfe/y2BAFfnpk/POYECmJQYwJ9JgQDdSIsxa1WBAyH4+aI7YYEBZq1oEwttgQOrXdqD13mBAewSTPCniYEAMMa/YXOVgQJ1dy3SQ6GBALornEMTrYEC/tgOt9+5gQFDjH0kr8mBA4Q885V71YEByPFiBkvhgQANpdB3G+2BAlJWQufn+YEAlwqxVLQJhQLbuyPFgBWFARxvljZQIYUDYRwEqyAthQGl0Hcb7DmFA+qA5Yi8SYUCLzVX+YhVhQBz6cZqWGGFArSaONsobYUA+U6rS/R5hQM9/xm4xImFAX6ziCmUlYUDw2P6mmChhQIEFG0PMK2FAEjI33/8uYUCjXlN7MzJhQDSLbxdnNWFAxbeLs5o4YUBW5KdPzjthQOcQxOsBP2FAeD3ghzVCYUAJavwjaUVhQJqWGMCcSGFAK8M0XNBLYUC871D4A09hQE0cbZQ3UmFA3kiJMGtVYUBvdaXMnlhhQACiwWjSW2FAkc7dBAZfYUAi+/mgOWJhQLMnFj1tZWFARFQy2aBoYUDVgE511GthQGatahEIb2FA99mGrTtyYUCIBqNJb3VhQBkzv+WieGFAql/bgdZ7YUA7jPcdCn9hQMy4E7o9gmFAXeUvVnGFYUDuEUzypIhhQH4+aI7Yi2FAD2uEKgyPYUCgl6DGP5JhQDHEvGJzlWFAwvDY/qaYYUBTHfWa2pthQORJETcOn2FAdXYt00GiYUAGo0lvdaVhQJfPZQupqGFAKPyBp9yrYUC5KJ5DEK9hQEpVut9DsmFA24HWe3e1YUBsrvIXq7hhQP3aDrTeu2FAjgcrUBK/YUAfNEfsRcJhQLBgY4h5xWFAQY1/JK3IYUDSuZvA4MthQGPmt1wUz2FA9BLU+EfSYUCFP/CUe9VhQBZsDDGv2GFAp5gozeLbYUA4xURpFt9hQMnxYAVK4mFAWh59oX3lYUDrSpk9sehhQHx3tdnk62FADKTRdRjvYUCd0O0RTPJhQC79Ca5/9WFAvykmSrP4YUBQVkLm5vthQOGCXoIa/2FAcq96Hk4CYkAD3Ja6gQViQJQIs1a1CGJAJTXP8ugLYkC2YeuOHA9iQEeOBytQEmJA2Lojx4MVYkBp5z9jtxhiQPoTXP/qG2JAi0B4mx4fYkAcbZQ3UiJiQK2ZsNOFJWJAPsbMb7koYkDP8ugL7StiQGAfBaggL2JA8UshRFQyYkCCeD3ghzViQBOlWXy7OGJApNF1GO87YkA1/pG0Ij9iQMYqrlBWQmJAV1fK7IlFYkDog+aIvUhiQHmwAiXxS2JACt0ewSRPYkCbCTtdWFJiQCs2V/mLVWJAvGJzlb9YYkBNj48x81tiQN67q80mX2JAb+jHaVpiYkAAFeQFjmViQJFBAKLBaGJAIm4cPvVrYkCzmjjaKG9iQETHVHZccmJA1fNwEpB1YkBmII2uw3hiQPdMqUr3e2JAiHnF5ip/YkAZpuGCXoJiQKrS/R6ShWJAO/8Zu8WIYkDMKzZX+YtiQF1YUvMsj2JA7oRuj2CSYkB/sYorlJViQBDepsfHmGJAoQrDY/ubYkAyN9//Lp9iQMNj+5tiomJAVJAXOJalYkDlvDPUyahiQHbpT3D9q2JABxZsDDGvYkCYQoioZLJiQClvpESYtWJAuZvA4Mu4YkBKyNx8/7tiQNv0+Bgzv2JAbCEVtWbCYkD9TTFRmsViQI56Te3NyGJAH6dpiQHMYkCw04UlNc9iQEEAosFo0mJA0iy+XZzVYkBjWdr5z9hiQPSF9pUD3GJAhbISMjffYkAW3y7OauJiQKcLS2qe5WJAODhnBtLoYkDJZIOiBexiQFqRnz4572JA67272mzyYkB86td2oPViQA0X9BLU+GJAnkMQrwf8YkAvcCxLO/9iQMCcSOduAmNAUclkg6IFY0Di9YAf1ghjQHMinbsJDGNABE+5Vz0PY0CVe9XzcBJjQCao8Y+kFWNAt9QNLNgYY0BIASrICxxjQNgtRmQ/H2NAaVpiAHMiY0D6hn6cpiVjQIuzmjjaKGNAHOC21A0sY0CtDNNwQS9jQD457wx1MmNAz2ULqag1Y0BgkidF3DhjQPG+Q+EPPGNAgutffUM/Y0ATGHwZd0JjQKREmLWqRWNANXG0Ud5IY0DGndDtEUxjQFfK7IlFT2NA6PYIJnlSY0B5IyXCrFVjQApQQV7gWGNAm3xd+hNcY0AsqXmWR19jQL3VlTJ7YmNATgKyzq5lY0DfLs5q4mhjQHBb6gYWbGNAAYgGo0lvY0CStCI/fXJjQCPhPtuwdWNAtA1bd+R4Y0BFOncTGHxjQNZmk69Lf2NAZpOvS3+CY0D3v8vnsoVjQIjs54PmiGNAGRkEIBqMY0CqRSC8TY9jQDtyPFiBkmNAzJ5Y9LSVY0Bdy3SQ6JhjQO73kCwcnGNAfyStyE+fY0AQUclkg6JjQKF95QC3pWNAMqoBneqoY0DD1h05HqxjQFQDOtVRr2NA5S9WcYWyY0B2XHINubVjQAeJjqnsuGNAmLWqRSC8Y0Ap4sbhU79jQLoO432HwmNASzv/GbvFY0DcZxu27shjQG2UN1IizGNA/sBT7lXPY0CP7W+KidJjQCAajCa91WNAsUaowvDYY0BCc8ReJNxjQNOf4PpX32NAZMz8loviY0D1+Bgzv+VjQIUlNc/y6GNAFlJRaybsY0Cnfm0HWu9jQDiriaON8mNAydelP8H1Y0BaBMLb9PhjQOsw3nco/GNAfF36E1z/Y0ANihawjwJkQJ62MkzDBWRAL+NO6PYIZEDAD2uEKgxkQFE8hyBeD2RA4mijvJESZEBzlb9YxRVkQATC2/T4GGRAle73kCwcZEAmGxQtYB9kQLdHMMmTImRASHRMZcclZEDZoGgB+yhkQGrNhJ0uLGRA+/mgOWIvZECMJr3VlTJkQB1T2XHJNWRArn/1Df04ZEA/rBGqMDxkQNDYLUZkP2RAYQVK4pdCZEDyMWZ+y0VkQINeghr/SGRAE4uetjJMZECkt7pSZk9kQDXk1u6ZUmRAxhDzis1VZEBXPQ8nAVlkQOhpK8M0XGRAeZZHX2hfZEAKw2P7m2JkQJvvf5fPZWRALBycMwNpZEC9SLjPNmxkQE511Gtqb2RA36HwB55yZEBwzgyk0XVkQAH7KEAFeWRAkidF3Dh8ZEAjVGF4bH9kQLSAfRSggmRARa2ZsNOFZEDW2bVMB4lkQGcG0ug6jGRA+DLuhG6PZECJXwohopJkQBqMJr3VlWRAq7hCWQmZZEA85V71PJxkQM0Re5Fwn2RAXj6XLaSiZEDvarPJ16VkQICXz2ULqWRAEcTrAT+sZECi8Aeecq9kQDIdJDqmsmRAw0lA1tm1ZEBUdlxyDblkQOWieA5BvGRAds+UqnS/ZEAH/LBGqMJkQJgozeLbxWRAKVXpfg/JZEC6gQUbQ8xkQEuuIbd2z2RA3No9U6rSZEBtB1rv3dVkQP4zdosR2WRAj2CSJ0XcZEAgja7DeN9kQLG5yl+s4mRAQubm+9/lZEDTEgOYE+lkQGQ/HzRH7GRA9Ws70HrvZECGmFdsrvJkQBfFcwji9WRAqPGPpBX5ZEA5HqxASfxkQMpKyNx8/2RAW3fkeLACZUDsowAV5AVlQH3QHLEXCWVADv04TUsMZUCfKVXpfg9lQDBWcYWyEmVAwIKNIeYVZUBRr6m9GRllQOLbxVlNHGVAcwji9YAfZUAENf6RtCJlQJVhGi7oJWVAJo42yhspZUC3ulJmTyxlQEjnbgKDL2VA2ROLnrYyZUBqQKc66jVlQPtsw9YdOWVAjJnfclE8ZUAdxvsOhT9lQK7yF6u4QmVAPx80R+xFZUDQS1DjH0llQGF4bH9TTGVA8qSIG4dPZUCD0aS3ulJlQBT+wFPuVWVApSrd7yFZZUA2V/mLVVxlQMeDFSiJX2VAWLAxxLxiZUDp3E1g8GVlQHoJavwjaWVACzaGmFdsZUCcYqI0i29lQC2PvtC+cmVAvrvabPJ1ZUBP6PYIJnllQN8UE6VZfGVAcEEvQY1/ZUABbkvdwIJlQJKaZ3n0hWVAI8eDFSiJZUC085+xW4xlQEUgvE2Pj2VA1kzY6cKSZUBnefSF9pVlQPilECIqmWVAidIsvl2cZUAa/0hakZ9lQKsrZfbEomVAPFiBkvilZUDNhJ0uLKllQF6xucpfrGVA793VZpOvZUCACvICx7JlQBE3Dp/6tWVAomMqOy65ZUAzkEbXYbxlQMS8YnOVv2VAVel+D8nCZUDmFZur/MVlQHdCt0cwyWVACG/T42PMZUCZm+9/l89lQCrICxzL0mVAu/QnuP7VZUBMIURUMtllQN1NYPBl3GVAbXp8jJnfZUD+ppgozeJlQI/TtMQA5mVAIADRYDTpZUCxLO38Z+xlQEJZCZmb72VA04UlNc/yZUBkskHRAvZlQPXeXW02+WVAhgt6CWr8ZUAXOJalnf9lQKhkskHRAmZAOZHO3QQGZkDKvep5OAlmQFvqBhZsDGZA7BYjsp8PZkB9Qz9O0xJmQA5wW+oGFmZAn5x3hjoZZkAwyZMibhxmQMH1r76hH2ZAUiLMWtUiZkDjTuj2CCZmQHR7BJM8KWZABaggL3AsZkCW1DzLoy9mQCcBWWfXMmZAuC11Aws2ZkBJWpGfPjlmQNqGrTtyPGZAa7PJ16U/ZkD83+Vz2UJmQIwMAhANRmZAHTkerEBJZkCuZTpIdExmQD+SVuSnT2ZA0L5ygNtSZkBh644cD1ZmQPIXq7hCWWZAg0THVHZcZkAUcePwqV9mQKWd/4zdYmZANsobKRFmZkDH9jfFRGlmQFgjVGF4bGZA6U9w/atvZkB6fIyZ33JmQAupqDUTdmZAnNXE0UZ5ZkAtAuFtenxmQL4u/Qmuf2ZAT1sZpuGCZkDghzVCFYZmQHG0Ud5IiWZAAuFtenyMZkCTDYoWsI9mQCQ6prLjkmZAtWbCTheWZkBGk97qSplmQNe/+oZ+nGZAaOwWI7KfZkD5GDO/5aJmQIpFT1sZpmZAGnJr90ypZkCrnoeTgKxmQDzLoy+0r2ZAzfe/y+eyZkBeJNxnG7ZmQO9Q+ANPuWZAgH0UoIK8ZkARqjA8tr9mQKLWTNjpwmZAMwNpdB3GZkDEL4UQUclmQFVcoayEzGZA5oi9SLjPZkB3tdnk69JmQAji9YAf1mZAmQ4SHVPZZkAqOy65htxmQLtnSlW632ZATJRm8e3iZkDdwIKNIeZmQG7tnilV6WZA/xm7xYjsZkCQRtdhvO9mQCFz8/3v8mZAsp8PmiP2ZkBDzCs2V/lmQNT4R9KK/GZAZSVkbr7/ZkD2UYAK8gJnQId+nKYlBmdAGKu4QlkJZ0Cp19TejAxnQDkE8XrAD2dAyjANF/QSZ0BbXSmzJxZnQOyJRU9bGWdAfbZh644cZ0AO432Hwh9nQJ8PmiP2ImdAMDy2vykmZ0DBaNJbXSlnQFKV7veQLGdA48EKlMQvZ0B07iYw+DJnQAUbQ8wrNmdAlkdfaF85Z0AndHsEkzxnQLigl6DGP2dASc2zPPpCZ0Da+c/YLUZnQGsm7HRhSWdA/FIIEZVMZ0CNfyStyE9nQB6sQEn8UmdAr9hc5S9WZ0BABXmBY1lnQNExlR2XXGdAYl6xucpfZ0Dzis1V/mJnQIS36fExZmdAFeQFjmVpZ0CmECIqmWxnQDc9PsbMb2dAx2laYgBzZ0BYlnb+M3ZnQOnCkppneWdAeu+uNpt8Z0ALHMvSzn9nQJxI524Cg2dALXUDCzaGZ0C+oR+naYlnQE/OO0OdjGdA4PpX39CPZ0BxJ3R7BJNnQAJUkBc4lmdAk4Css2uZZ0AkrchPn5xnQLXZ5OvSn2dARgYBiAajZ0DXMh0kOqZnQGhfOcBtqWdA+YtVXKGsZ0CKuHH41K9nQBvljZQIs2dArBGqMDy2Z0A9PsbMb7lnQM5q4mijvGdAX5f+BNe/Z0DwwxqhCsNnQIHwNj0+xmdAEh1T2XHJZ0CjSW91pcxnQDR2ixHZz2dAxaKnrQzTZ0BWz8NJQNZnQOb73+Vz2WdAdyj8gafcZ0AIVRge299nQJmBNLoO42dAKq5QVkLmZ0C72mzydelnQEwHiY6p7GdA3TOlKt3vZ0BuYMHGEPNnQP+M3WJE9mdAkLn5/nf5Z0Ah5hWbq/xnQLISMjff/2dAQz9O0xIDaEDUa2pvRgZoQGWYhgt6CWhA9sSip60MaECH8b5D4Q9oQBge298UE2hAqUr3e0gWaEA6dxMYfBloQMujL7SvHGhAXNBLUOMfaEDt/GfsFiNoQH4phIhKJmhAD1agJH4paECggrzAsSxoQDGv2FzlL2hAwtv0+BgzaEBTCBGVTDZoQOQ0LTGAOWhAdGFJzbM8aEAFjmVp5z9oQJa6gQUbQ2hAJ+edoU5GaEC4E7o9gkloQElA1tm1TGhA2mzydelPaEBrmQ4SHVNoQPzFKq5QVmhAjfJGSoRZaEAeH2Pmt1xoQK9Lf4LrX2hAQHibHh9jaEDRpLe6UmZoQGLR01aGaWhA8/3v8rlsaECEKgyP7W9oQBVXKCshc2hApoNEx1R2aEA3sGBjiHloQMjcfP+7fGhAWQmZm+9/aEDqNbU3I4NoQHti0dNWhmhADI/tb4qJaECduwkMvoxoQC7oJajxj2hAvxRCRCWTaEBQQV7gWJZoQOFtenyMmWhAcpqWGMCcaEADx7K0859oQJPzzlAno2hAJCDr7FqmaEC1TAeJjqloQEZ5IyXCrGhA16U/wfWvaEBo0ltdKbNoQPn+d/lctmhAiiuUlZC5aEAbWLAxxLxoQKyEzM33v2hAPbHoaSvDaEDO3QQGX8ZoQF8KIaKSyWhA8DY9PsbMaECBY1na+c9oQBKQdXYt02hAo7yREmHWaEA06a2ulNloQMUVykrI3GhAVkLm5vvfaEDnbgKDL+NoQHibHh9j5mhACcg6u5bpaECa9FZXyuxoQCshc/P972hAvE2PjzHzaEBNeqsrZfZoQN6mx8eY+WhAb9PjY8z8aEAAAAAAAABpQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[2000]}},\"selected\":{\"id\":\"4959\"},\"selection_policy\":{\"id\":\"4958\"}},\"id\":\"4418\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"4967\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4147\"},\"glyph\":{\"id\":\"4148\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4150\"},\"nonselection_glyph\":{\"id\":\"4149\"},\"view\":{\"id\":\"4152\"}},\"id\":\"4151\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4418\"},\"glyph\":{\"id\":\"4419\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4421\"},\"nonselection_glyph\":{\"id\":\"4420\"},\"view\":{\"id\":\"4423\"}},\"id\":\"4422\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4150\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4155\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4421\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4968\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"4147\"}},\"id\":\"4152\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3582\"},\"glyph\":{\"id\":\"3583\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3585\"},\"nonselection_glyph\":{\"id\":\"3584\"},\"view\":{\"id\":\"3587\"}},\"id\":\"3586\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4149\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4418\"}},\"id\":\"4423\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4172\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4174\"},\"nonselection_glyph\":{\"id\":\"4173\"},\"view\":{\"id\":\"4176\"}},\"id\":\"4175\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4420\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4154\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4431\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"4961\"},\"selection_policy\":{\"id\":\"4960\"}},\"id\":\"4424\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"3770\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"4985\"},\"selection_policy\":{\"id\":\"4984\"}},\"id\":\"4201\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4424\"},\"glyph\":{\"id\":\"4425\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4427\"},\"nonselection_glyph\":{\"id\":\"4426\"},\"view\":{\"id\":\"4429\"}},\"id\":\"4428\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,-0.0,-0.0,-0.0,-0.0,-0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"4954\"},\"selection_policy\":{\"id\":\"4953\"}},\"id\":\"4165\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4156\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4427\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4162\",\"type\":\"Line\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"4442\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3585\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4158\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"4424\"}},\"id\":\"4429\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"3769\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3772\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4174\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4426\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4160\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4279\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4455\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-3.0,3.0],\"y\":[0,0]},\"selected\":{\"id\":\"4946\"},\"selection_policy\":{\"id\":\"4945\"}},\"id\":\"4159\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4432\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4453\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4159\"},\"glyph\":{\"id\":\"4160\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4162\"},\"nonselection_glyph\":{\"id\":\"4161\"},\"view\":{\"id\":\"4164\"}},\"id\":\"4163\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4433\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4168\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4439\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4161\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4435\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4165\"},\"glyph\":{\"id\":\"4166\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4168\"},\"nonselection_glyph\":{\"id\":\"4167\"},\"view\":{\"id\":\"4170\"}},\"id\":\"4169\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4437\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4159\"}},\"id\":\"4164\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"4963\"},\"selection_policy\":{\"id\":\"4962\"}},\"id\":\"4436\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4166\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4436\"},\"glyph\":{\"id\":\"4437\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4439\"},\"nonselection_glyph\":{\"id\":\"4438\"},\"view\":{\"id\":\"4441\"}},\"id\":\"4440\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4173\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4165\"}},\"id\":\"4170\",\"type\":\"CDSView\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4451\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4167\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4438\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4281\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4452\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4172\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4436\"}},\"id\":\"4441\",\"type\":\"CDSView\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4457\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4969\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"4968\"},\"selection_policy\":{\"id\":\"4967\"}},\"id\":\"4444\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4208\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4210\"},\"nonselection_glyph\":{\"id\":\"4209\"},\"view\":{\"id\":\"4212\"}},\"id\":\"4211\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"4195\"}},\"id\":\"4200\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4970\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"4183\"}},\"id\":\"4188\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4176\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4459\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"4169\"},\"N_stress_diag\":{\"id\":\"4151\"},\"V_stress_diag\":{\"id\":\"4187\"},\"arr_head\":{\"id\":\"3746\"},\"axial_strain_diag\":{\"id\":\"4223\"},\"bending_strain_diag\":{\"id\":\"4243\"},\"centroid\":{\"id\":\"4181\"},\"discr_stress\":10,\"div_P\":{\"id\":\"3752\"},\"div_f\":{\"id\":\"3754\"},\"fN\":{\"id\":\"3730\"},\"fP\":{\"id\":\"3718\"},\"fRx\":{\"id\":\"3727\"},\"fRyl\":{\"id\":\"3724\"},\"fRyr\":{\"id\":\"3721\"},\"fV\":{\"id\":\"3733\"},\"label_M_section\":{\"id\":\"4366\"},\"label_N_section\":{\"id\":\"4360\"},\"label_V_section\":{\"id\":\"4372\"},\"neutral_axis\":{\"id\":\"4460\"},\"s_M\":{\"id\":\"3735\"},\"s_q\":{\"id\":\"3498\"},\"s_sb\":{\"id\":\"3497\"},\"s_section_M\":{\"id\":\"4343\"},\"section_M_head\":{\"id\":\"4354\"},\"section_N\":{\"id\":\"4338\"},\"section_V\":{\"id\":\"4341\"},\"sigma_stress_diag\":{\"id\":\"4448\"},\"source\":{\"id\":\"3500\"},\"tau_stress_diag\":{\"id\":\"4205\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \"},\"id\":\"4462\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4191\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4185\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"4956\"},\"selection_policy\":{\"id\":\"4955\"}},\"id\":\"4177\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"4970\"},\"selection_policy\":{\"id\":\"4969\"}},\"id\":\"4456\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4456\"},\"glyph\":{\"id\":\"4457\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4459\"},\"nonselection_glyph\":{\"id\":\"4458\"},\"view\":{\"id\":\"4461\"}},\"id\":\"4460\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4186\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4456\"}},\"id\":\"4461\",\"type\":\"CDSView\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4190\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4458\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4198\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"4169\"},\"N_stress_diag\":{\"id\":\"4151\"},\"V_stress_diag\":{\"id\":\"4187\"},\"axial_strain_diag\":{\"id\":\"4223\"},\"bending_strain_diag\":{\"id\":\"4243\"},\"centroid\":{\"id\":\"4181\"},\"div\":{\"id\":\"3600\"},\"neutral_axis\":{\"id\":\"4460\"},\"s_b\":{\"id\":\"3496\"},\"section\":{\"id\":\"3598\"},\"sigma_stress_diag\":{\"id\":\"4448\"},\"source\":{\"id\":\"3500\"},\"support_r\":{\"id\":\"3592\"},\"tau_stress_diag\":{\"id\":\"4205\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \"},\"id\":\"4463\",\"type\":\"CustomJS\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4194\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4196\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"4169\"},\"N_stress_diag\":{\"id\":\"4151\"},\"V_stress_diag\":{\"id\":\"4187\"},\"axial_strain_diag\":{\"id\":\"4223\"},\"bending_strain_diag\":{\"id\":\"4243\"},\"centroid\":{\"id\":\"4181\"},\"div\":{\"id\":\"3600\"},\"neutral_axis\":{\"id\":\"4460\"},\"s_b\":{\"id\":\"3496\"},\"s_ss\":{\"id\":\"3499\"},\"section\":{\"id\":\"3598\"},\"sigma_stress_diag\":{\"id\":\"4448\"},\"source\":{\"id\":\"3500\"},\"support_r\":{\"id\":\"3592\"},\"tau_stress_diag\":{\"id\":\"4205\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const data_ss = s_ss.data\\n const b = db['b'][0]\\n const h = cb_obj.value // value of the slider\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const N = db['N'][0]\\n const M = db['M'][0]\\n const yG = compute_centroid_y(h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['yG'][0] = yG\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n data_ss['y'][1] = h // change the height of the section in the diagrams\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // emit the changes\\n source.change.emit()\\n s_ss.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \"},\"id\":\"4464\",\"type\":\"CustomJS\"},{\"attributes\":{\"overlay\":{\"id\":\"4284\"}},\"id\":\"4280\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"4982\"},\"selection_policy\":{\"id\":\"4981\"}},\"id\":\"4195\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4195\"},\"glyph\":{\"id\":\"4196\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4198\"},\"nonselection_glyph\":{\"id\":\"4197\"},\"view\":{\"id\":\"4200\"}},\"id\":\"4199\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4204\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"N_diag\":{\"id\":\"3857\"},\"N_stress_diag\":{\"id\":\"4151\"},\"arr_head\":{\"id\":\"3746\"},\"axial_strain_diag\":{\"id\":\"4223\"},\"div_P\":{\"id\":\"3752\"},\"div_f\":{\"id\":\"3754\"},\"fN\":{\"id\":\"3730\"},\"fP\":{\"id\":\"3718\"},\"fRx\":{\"id\":\"3727\"},\"fRyl\":{\"id\":\"3724\"},\"fRyr\":{\"id\":\"3721\"},\"fV\":{\"id\":\"3733\"},\"label_M_section\":{\"id\":\"4366\"},\"label_N_section\":{\"id\":\"4360\"},\"label_V_section\":{\"id\":\"4372\"},\"neutral_axis\":{\"id\":\"4460\"},\"s_M\":{\"id\":\"3735\"},\"s_section_M\":{\"id\":\"4343\"},\"section_M_head\":{\"id\":\"4354\"},\"section_N\":{\"id\":\"4338\"},\"section_V\":{\"id\":\"4341\"},\"sigma_stress_diag\":{\"id\":\"4448\"},\"source\":{\"id\":\"3500\"},\"tau_stress_diag\":{\"id\":\"4205\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \"},\"id\":\"4465\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4197\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4201\"},\"glyph\":{\"id\":\"4202\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4204\"},\"nonselection_glyph\":{\"id\":\"4203\"},\"view\":{\"id\":\"4206\"}},\"id\":\"4205\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"3746\"},\"div_P\":{\"id\":\"3752\"},\"fN\":{\"id\":\"3730\"},\"fP\":{\"id\":\"3718\"},\"fRx\":{\"id\":\"3727\"},\"fRyl\":{\"id\":\"3724\"},\"fRyr\":{\"id\":\"3721\"},\"fV\":{\"id\":\"3733\"},\"label_M_section\":{\"id\":\"4366\"},\"label_N_section\":{\"id\":\"4360\"},\"label_V_section\":{\"id\":\"4372\"},\"s_M\":{\"id\":\"3735\"},\"s_q\":{\"id\":\"3498\"},\"s_sb\":{\"id\":\"3497\"},\"s_section_M\":{\"id\":\"4343\"},\"section_M_head\":{\"id\":\"4354\"},\"section_N\":{\"id\":\"4338\"},\"section_V\":{\"id\":\"4341\"},\"source\":{\"id\":\"3500\"},\"tau_stress_diag\":{\"id\":\"4205\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"4466\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4202\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"3881\"},\"M_stress_diag\":{\"id\":\"4169\"},\"V_diag\":{\"id\":\"3869\"},\"V_stress_diag\":{\"id\":\"4187\"},\"arr_head\":{\"id\":\"3746\"},\"bending_strain_diag\":{\"id\":\"4243\"},\"centroid\":{\"id\":\"4181\"},\"div_P\":{\"id\":\"3752\"},\"div_f\":{\"id\":\"3754\"},\"fN\":{\"id\":\"3730\"},\"fP\":{\"id\":\"3718\"},\"fRx\":{\"id\":\"3727\"},\"fRyl\":{\"id\":\"3724\"},\"fRyr\":{\"id\":\"3721\"},\"fV\":{\"id\":\"3733\"},\"label_M_section\":{\"id\":\"4366\"},\"label_N_section\":{\"id\":\"4360\"},\"label_V_section\":{\"id\":\"4372\"},\"neutral_axis\":{\"id\":\"4460\"},\"s_M\":{\"id\":\"3735\"},\"s_q\":{\"id\":\"3498\"},\"s_section_M\":{\"id\":\"4343\"},\"section_M_head\":{\"id\":\"4354\"},\"section_N\":{\"id\":\"4338\"},\"section_V\":{\"id\":\"4341\"},\"sigma_stress_diag\":{\"id\":\"4448\"},\"source\":{\"id\":\"3500\"},\"tau_stress_diag\":{\"id\":\"4205\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \"},\"id\":\"4467\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4209\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"4201\"}},\"id\":\"4206\",\"type\":\"CDSView\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"3500\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const fy = cb_obj.value\\n const L = db['L'][0]\\n\\n // update q\\n db['fy'][0] = fy\\n\\n // update\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \"},\"id\":\"4468\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4203\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3499\"},\"glyph\":{\"id\":\"4226\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4228\"},\"nonselection_glyph\":{\"id\":\"4227\"},\"view\":{\"id\":\"4230\"}},\"id\":\"4229\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"4169\"},\"N_stress_diag\":{\"id\":\"4151\"},\"axial_strain_diag\":{\"id\":\"4223\"},\"bending_strain_diag\":{\"id\":\"4243\"},\"centroid\":{\"id\":\"4181\"},\"source\":{\"id\":\"3500\"},\"total_strain_diag\":{\"id\":\"4428\"},\"total_strain_pl_diag\":{\"id\":\"4422\"},\"total_stress_pl_diag\":{\"id\":\"4416\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const E = cb_obj.value\\n\\n // update E\\n db['E'][0] = E\\n\\n // update\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_plastic_stress_strain(db, total_strain_diag, total_strain_pl_diag, total_stress_pl_diag)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function update_plastic_stress_strain(data, glyph_strain_el, glyph_strain_pl, glyph_sigma_pl, discr=2000) { \\n // define parameters\\n const h = data['h'][0]\\n const N = data['N'][0]\\n const M = data['M'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const E = data['E'][0]\\n const fy = data['fy'][0]\\n const y_discr = linspace(0, h, discr)\\n let total_epsilon = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var sigma_axial = compute_sigma_axial(N, A)\\n var sigma_bending = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n var epsilon_bending = compute_epsilon_bending(sigma_bending, E)\\n var epsilon_axial = compute_epsilon_axial(sigma_axial, E)\\n total_epsilon[i] = compute_total_epsilon(epsilon_axial, epsilon_bending)\\n }\\n let [stress_pl, strain_pl, y_discr_strain_pl, yNA] = compute_total_stress_strain(h, fy, E, N, M, A, Iy, yG, discr)\\n \\n \\n // change the diagrams\\n update_strain_diagram(glyph_strain_el, total_epsilon, y_discr)\\n update_stress_diagram(glyph_sigma_pl, stress_pl, y_discr)\\n update_strain_diagram(glyph_strain_pl, strain_pl, y_discr_strain_pl)\\n }\\n \\n \\n function compute_Ny(fy, A) {\\n return fy*A/1e3\\n }\\n \\n \\n function compute_My(fy, Iy, yG, H) {\\n if (yG >= H-yG) {\\n var extreme_fiber = yG\\n } else {\\n var extreme_fiber = H-yG\\n }\\n return Iy/extreme_fiber*fy/1e6\\n }\\n \\n \\n function compute_total_stress_strain(H, fy, E, N, M, A, Iy, yG, discr) {\\n // initialization\\n const scale_discr_o = 20\\n var y_discr = linspace(0, H, discr)\\n const Ny = compute_Ny(fy, A)\\n const My = compute_My(fy, Iy, yG, H)\\n const M_norm = __compute_M_norm(M, My)\\n const N_norm = __compute_N_norm(N, Ny)\\n const err_inside = new Array(discr).fill(1e30)\\n const err_outside = new Array(discr*scale_discr_o).fill(1e30)\\n\\n // compute state (elastic)\\n let strain_el = new Array(discr)\\n let stress_el = new Array(discr)\\n for (var i = 0; i < discr; i++) {\\n var sigma_N_el = compute_sigma_axial(N, A)\\n var sigma_M_el = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n stress_el[i] = sigma_M_el + sigma_N_el\\n strain_el[i] = compute_epsilon_axial(sigma_N_el, E)/100 + compute_epsilon_bending(sigma_M_el, E)/100\\n }\\n if (Math.abs(stress_el[0]) > fy || Math.abs(stress_el.slice(-1)[0]) > fy) {\\n if (__check_limit(M_norm, N_norm)) {\\n // double yield check\\n var h = __compute_h_2Y(N_norm)\\n var yNA = h*H\\n var k = __compute_k_2Y(M_norm, N_norm)\\n var chi = __compute_chi_2Y(k, fy, E, H, yNA)\\n var k_prime = __compute_k_prime_2Y(k, h)\\n if (k>=1 && k_prime>=1) {\\n // DOUBLE YIELD CASE\\n console.log(\\\"2 yield case\\\")\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n } else {\\n // one yield, yNA inside check\\n for (var i = 1; i < discr-1; i++) {\\n var yNA = y_discr[i]\\n var h = yNA/H\\n if (__check_validity_yNA(h, N_norm)) {\\n var k = __compute_k_1Y_in(h, N_norm)\\n err_inside[i] = __compute_err_1Y_in(h, k, M_norm, N_norm)\\n }\\n }\\n const index_min_i = err_inside.indexOf(Math.min(...err_inside))\\n var yNA = y_discr[index_min_i]\\n var k = __compute_k_1Y_in(yNA/H, N_norm)\\n var chi = __compute_chi_1Y_in(k, fy, E, H, yNA)\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F = -chi\\n } else {\\n var chi_F = chi\\n }\\n \\n if (index_min_i != 1) {\\n // ONE YIELD (YNA INSIDE) CASE\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // check if it's inside (edge case) or outside\\n const yNA_F_in = yNA_F\\n const chi_F_in = chi_F\\n const err_in = err_inside[index_min_i]\\n \\n const k_discr = linspace(1, 20, discr*scale_discr_o)\\n for (var i = 1; i < discr*scale_discr_o; i++) {\\n var k = k_discr[i]\\n var h = __compute_h_1Y_out(N_norm, k)\\n err_outside[i] = __compute_err_1Y_out(k, h, M_norm, N_norm)\\n }\\n const index_min_o = err_outside.indexOf(Math.min(...err_outside))\\n var k = k_discr[index_min_o]\\n var h = __compute_h_1Y_out(N_norm, k)\\n var yNA = h*H\\n var chi = __compute_chi_1Y_out(k, fy, E, H, yNA)\\n const err_o = err_outside[index_min_o]\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F_o = H+yNA\\n } else {\\n var yNA_F_o = -yNA\\n }\\n if ((N>=0 && M>0) || (N<0 && M>0)) {\\n var chi_F_o = -chi\\n } else {\\n var chi_F_o = chi\\n }\\n \\n if (err_in < err_o) {\\n // ONE YIELD (YNA INSIDE) CASE\\n console.log(\\\"1 yield, yNA in case\\\")\\n var yNA_F = yNA_F_in\\n var chi_F = chi_F_in\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n } else {\\n // ONE YIELD (YNA OUTSIDE) CASE\\n console.log(\\\"1 yield, yNA out case\\\")\\n var yNA_F = yNA_F_o\\n var chi_F = chi_F_o\\n var strain_pl = __compute_strain_pl(y_discr, yNA_F, chi_F)\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yNA_F]\\n \\n }\\n }\\n }\\n } else {\\n // PLASTIC LIMIT CASE\\n console.log(\\\"limit case\\\")\\n var yNA = __compute_h_2Y(N_norm)*H\\n if ((N>=0 && M<0) || (N<0 && M>0)) {\\n var yNA_F = H-yNA\\n } else {\\n var yNA_F = yNA\\n }\\n let strain_pl = new Array(discr)\\n if ((N>=0 && M>=0) || (N<0 && M>0)) {\\n for (var i = 0; i < discr; i++) {\\n if (y_discr[i]yNA_F) {\\n strain_pl[i] = -fy/E\\n } else {\\n strain_pl[i] = fy/E\\n }\\n }\\n }\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n var strain_pl_ = [Math.min(...strain_el)*100, Math.max(...strain_el)*100]\\n var y_discr = [yNA_F, yNA_F]\\n return [stress_pl, strain_pl_, y_discr, yNA_F]\\n }\\n }else {\\n // ELASTIC CASE\\n console.log(\\\"elastic case\\\")\\n var strain_pl = strain_el\\n var stress_pl = __compute_stress_pl(strain_pl, fy, E)\\n return [stress_pl, strain_pl.map(x => x*100), y_discr, yG]\\n }\\n }\\n \\n \\n function __check_limit(M_norm, N_norm) {\\n const tmp = 2/3*M_norm+N_norm**2\\n if (tmp>1) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_M_norm(M, My){\\n return Math.abs(M/My)\\n }\\n \\n function __compute_N_norm(N, Ny){\\n return Math.abs(N/Ny)\\n }\\n\\n function __compute_strain_pl(y, yNA, chi){\\n return y.map(x => -(x-yNA)*chi) \\n }\\n\\n function __compute_stress_pl(epsilon, fy, E){\\n const sigma = new Array(epsilon.length).fill(0)\\n for (var i = 0; i < epsilon.length; i++) {\\n var tmp = epsilon[i]*E\\n if (tmp > fy){\\n sigma[i] = fy\\n }else if (tmp < -fy){\\n sigma[i] = -fy\\n }else{\\n sigma[i] = tmp\\n }\\n }\\n return sigma\\n }\\n \\n // double yield\\n function __compute_h_2Y(N_norm){\\n return (1-N_norm)/2\\n }\\n \\n function __compute_k_2Y(M_norm, N_norm){\\n return Math.sqrt((1+2*N_norm+N_norm**2) / (3-3*N_norm**2-2*M_norm))\\n }\\n \\n function __compute_k_prime_2Y(k, h){\\n return k*h / (1-h)\\n }\\n\\n function __compute_chi_2Y(k, fy, E, H, yNA){\\n return k*fy/(E*(H-yNA))\\n }\\n\\n \\n // one yield (yNA inside)\\n function __check_validity_yNA(h, N_norm){\\n const tmp = (1-N_norm)**2 -2*h*(1-N_norm)\\n if (tmp<0) {\\n return false\\n }else{\\n return true\\n }\\n }\\n \\n function __compute_k_1Y_in(h, N_norm){\\n return (h-1)*( (h-1+N_norm) + Math.sqrt((1-N_norm)**2 -2*h*(1-N_norm)) ) / h**2\\n }\\n\\n function __compute_err_1Y_in(h, k, M_norm, N_norm){\\n return Math.abs(M_norm + 3*N_norm*(1-2*h) - 2*k*h**3/(1-h) - (3*k**2-1)/k**2*(1-h)**2)\\n }\\n \\n function __compute_chi_1Y_in(k, fy, E, H, yNA){\\n // unit: 1/mm\\n return k*fy/(E*(H-yNA))\\n }\\n\\n // one yield (yNA outside)\\n function __compute_h_1Y_out(N_norm, k){\\n return (k*(2-N_norm)-1-k*Math.sqrt((k-N_norm)**2-(k-1)**2)) / (k-1)**2\\n }\\n \\n function __compute_chi_1Y_out(k, fy, E, H, yNA){\\n return k*fy/(E*(H+yNA))\\n }\\n\\n function __compute_err_1Y_out(k, h, M_norm, N_norm){\\n return Math.abs( M_norm + 3*(N_norm-1) + (1+h-k*h)**3 / (k**2*(1+h)) )\\n }\\n \\n \\n function compute_total_epsilon(epsilon_axial, epsilon_bending) {\\n return epsilon_axial+epsilon_bending\\n }\\n \\n \"},\"id\":\"4469\",\"type\":\"CustomJS\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4208\",\"type\":\"Line\"},{\"attributes\":{\"width\":10},\"id\":\"4470\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"4282\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"4213\"}},\"id\":\"4218\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4210\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4216\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"3499\"}},\"id\":\"4212\",\"type\":\"CDSView\"},{\"attributes\":{\"children\":[{\"id\":\"3534\"},{\"id\":\"4470\"},{\"id\":\"4472\"}]},\"id\":\"4473\",\"type\":\"Row\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4214\",\"type\":\"Line\"},{\"attributes\":{\"children\":[{\"id\":\"3501\"},{\"id\":\"4475\"},{\"id\":\"3755\"},{\"id\":\"3789\"},{\"id\":\"3821\"}]},\"id\":\"4476\",\"type\":\"Column\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"4937\"},\"selection_policy\":{\"id\":\"4936\"}},\"id\":\"4219\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"height\":30},\"id\":\"4471\",\"type\":\"Spacer\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"4987\"},\"selection_policy\":{\"id\":\"4986\"}},\"id\":\"4213\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"children\":[{\"id\":\"4471\"},{\"id\":\"3601\"},{\"id\":\"3602\"},{\"id\":\"3749\"},{\"id\":\"3748\"},{\"id\":\"4374\"},{\"id\":\"4375\"},{\"id\":\"4376\"},{\"id\":\"4377\"},{\"id\":\"3750\"},{\"id\":\"3751\"},{\"id\":\"3752\"},{\"id\":\"3753\"}]},\"id\":\"4472\",\"type\":\"Column\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4213\"},\"glyph\":{\"id\":\"4214\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4216\"},\"nonselection_glyph\":{\"id\":\"4215\"},\"view\":{\"id\":\"4218\"}},\"id\":\"4217\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"height\":10},\"id\":\"4475\",\"type\":\"Spacer\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4220\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"4972\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4215\",\"type\":\"Line\"},{\"attributes\":{\"children\":[{\"id\":\"3621\"},{\"id\":\"4473\"}]},\"id\":\"4474\",\"type\":\"Column\"}],\"root_ids\":[\"4488\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"cf03a18f-f85a-4414-bd96-45e97dc6b718\",\"root_ids\":[\"4488\"],\"roots\":{\"4488\":\"3c8f723c-8402-4b2c-9417-8d4e32cea55f\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "4488" + } + }, + "output_type": "display_data" } ], "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3),\n", - " slider_b,\n", - " slider_h,\n", - " # row(div_geo, div_forces),\n", - " slider_position,\n", - " slider_q,\n", - " slider_elastic,\n", - " div_E,\n", - " slider_yield,\n", - " div_fy,\n", - " # Spacer(height=padding_layout),\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M)),\n", - " row(column(\n", - " row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_total_strain, fig_stress_sigma),\n", - " row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau),\n", - " ))\n", - " ),\n", - " ],\n", - "])\n", - "\n", - "show(layout1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "TODO:\n", - "- add slider E in some NB\n", - "- bigger N and M for plastic\n", - "- change EVERYWHERE neutral_axis with horizontal infinite line?" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_stress.ipynb b/Simple Beam DEMOs/sb_stress.ipynb index 2c043ba..0d43509 100644 --- a/Simple Beam DEMOs/sb_stress.ipynb +++ b/Simple Beam DEMOs/sb_stress.ipynb @@ -1,1051 +1,483 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Stress and Strain\n", "In this first notebook, the stresses and strains inside the element are presented." ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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_stress\n", "import math\n", - "import numpy as np \n", - "from bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\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 models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "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": 8, + "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", "Iy = beam_section.compute_inertia_y(b, h) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h) # [mm4] weak axis\n", "yG = beam_section.compute_centroid_y(h)\n", "y_n_axis = stst.compute_neutral_axis(N, A, Iy, M, yG)\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_Q = q/4*5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "data_section_scheme = dict(\n", - " x=[0, 0], \n", - " y=[0, h]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " E=[E],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " yG=[yG],\n", - " y_n_axis=[y_n_axis],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source_section_scheme = ColumnDataSource(data_section_scheme)\n", - "source = ColumnDataSource(data)" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Create the figures, the plots and the widgets (same of Notebook 3 - Diagrams):" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"2176674f-1649-400e-926b-89abf8d8156a\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1923\"}]},\"id\":\"1924\",\"type\":\"Column\"},{\"attributes\":{\"axis\":{\"id\":\"1799\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1802\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N and M at position x\"},\"id\":\"1785\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2037\"},\"group\":null,\"major_label_policy\":{\"id\":\"2038\"},\"ticker\":{\"id\":\"1800\"},\"visible\":false},\"id\":\"1799\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"1828\"}],\"center\":[{\"id\":\"1831\"},{\"id\":\"1835\"},{\"id\":\"1866\"}],\"height\":200,\"left\":[{\"id\":\"1832\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1860\"},{\"id\":\"1897\"}],\"title\":{\"id\":\"1818\"},\"toolbar\":{\"id\":\"1843\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1820\"},\"x_scale\":{\"id\":\"1824\"},\"y_range\":{\"id\":\"1822\"},\"y_scale\":{\"id\":\"1826\"}},\"id\":\"1817\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2107\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1995\"},\"selection_policy\":{\"id\":\"1994\"}},\"id\":\"1938\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1804\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2108\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1997\"},\"selection_policy\":{\"id\":\"1996\"}},\"id\":\"1939\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1994\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1808\",\"type\":\"HelpTool\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"1999\"},\"selection_policy\":{\"id\":\"1998\"}},\"id\":\"1940\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1995\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1803\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1809\"}},\"id\":\"1805\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1806\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1807\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2001\"},\"selection_policy\":{\"id\":\"2000\"}},\"id\":\"1941\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1996\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2066\",\"type\":\"BasicTickFormatter\"},{\"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\":\"1809\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1997\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2067\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2003\"},\"selection_policy\":{\"id\":\"2002\"}},\"id\":\"1942\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1858\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2069\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1998\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1856\"}},\"id\":\"1861\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2109\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2005\"},\"selection_policy\":{\"id\":\"2004\"}},\"id\":\"1943\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2070\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1999\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2125\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1862\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2042\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1863\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2110\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2143\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2126\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1859\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2144\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2000\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1837\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2111\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2001\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1822\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2002\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2075\"},\"group\":null,\"major_label_policy\":{\"id\":\"2076\"},\"ticker\":{\"id\":\"1829\"},\"visible\":false},\"id\":\"1828\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2003\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1820\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2112\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2145\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2004\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2146\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1803\"},{\"id\":\"1804\"},{\"id\":\"1805\"},{\"id\":\"1806\"},{\"id\":\"1807\"},{\"id\":\"1808\"}]},\"id\":\"1810\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2005\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2072\"},\"group\":null,\"major_label_policy\":{\"id\":\"2073\"},\"ticker\":{\"id\":\"1833\"},\"visible\":false},\"id\":\"1832\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1824\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1828\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1831\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"V at position x\"},\"id\":\"1818\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1829\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1832\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1835\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1850\"},\"glyph\":{\"id\":\"1851\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1853\"},\"nonselection_glyph\":{\"id\":\"1852\"},\"view\":{\"id\":\"1855\"}},\"id\":\"1854\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2072\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1826\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2144\"},\"selection_policy\":{\"id\":\"2143\"}},\"id\":\"1856\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1833\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2073\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1841\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2075\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2128\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1836\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1842\"}},\"id\":\"1838\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1839\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2076\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2129\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1840\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1857\",\"type\":\"Line\"},{\"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\":\"1842\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1836\"},{\"id\":\"1837\"},{\"id\":\"1838\"},{\"id\":\"1839\"},{\"id\":\"1840\"},{\"id\":\"1841\"}]},\"id\":\"1843\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2149\"},\"selection_policy\":{\"id\":\"2148\"}},\"id\":\"2077\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1856\"},\"glyph\":{\"id\":\"1857\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1859\"},\"nonselection_glyph\":{\"id\":\"1858\"},\"view\":{\"id\":\"1861\"}},\"id\":\"1860\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1223\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1221\",\"type\":\"Patch\"},{\"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\":\"1507\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"children\":[{\"id\":\"1041\"},{\"id\":\"1905\"},{\"id\":\"1909\"}]},\"id\":\"1910\",\"type\":\"Row\"},{\"attributes\":{\"below\":[{\"id\":\"1527\"}],\"center\":[{\"id\":\"1530\"},{\"id\":\"1534\"}],\"height\":200,\"left\":[{\"id\":\"1531\"}],\"renderers\":[{\"id\":\"1768\"},{\"id\":\"1774\"},{\"id\":\"1780\"}],\"title\":{\"id\":\"1518\"},\"toolbar\":{\"id\":\"1543\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1520\"},\"x_scale\":{\"id\":\"1523\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1525\"}},\"id\":\"1517\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1227\",\"type\":\"VeeHead\"},{\"attributes\":{\"children\":[{\"id\":\"1906\"},{\"id\":\"1108\"},{\"id\":\"1109\"},{\"id\":\"1907\"},{\"id\":\"1908\"},{\"id\":\"1256\"},{\"id\":\"1255\"},{\"id\":\"1257\"},{\"id\":\"1258\"},{\"id\":\"1259\"},{\"id\":\"1260\"}]},\"id\":\"1909\",\"type\":\"Column\"},{\"attributes\":{\"width\":200},\"id\":\"1916\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"1128\"},{\"id\":\"1910\"}]},\"id\":\"1911\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"2090\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"height\":10},\"id\":\"1912\",\"type\":\"Spacer\"},{\"attributes\":{\"children\":[{\"id\":\"1911\"},{\"id\":\"1913\"}]},\"id\":\"1914\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1489\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2091\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1008\"},{\"id\":\"1912\"},{\"id\":\"1262\"},{\"id\":\"1296\"},{\"id\":\"1328\"}]},\"id\":\"1913\",\"type\":\"Column\"},{\"attributes\":{\"width\":200},\"id\":\"1917\",\"type\":\"Spacer\"},{\"attributes\":{\"width\":200},\"id\":\"1918\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"2016\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"1817\"},{\"id\":\"1916\"},{\"id\":\"1551\"},{\"id\":\"1917\"},{\"id\":\"1918\"},{\"id\":\"1620\"}]},\"id\":\"1919\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1161\"},\"glyph\":{\"id\":\"1162\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1164\"},\"nonselection_glyph\":{\"id\":\"1163\"},\"view\":{\"id\":\"1166\"}},\"id\":\"1165\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1052\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1055\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1784\"},{\"id\":\"1449\"},{\"id\":\"1414\"},{\"id\":\"1517\"},{\"id\":\"1483\"},{\"id\":\"1586\"}]},\"id\":\"1915\",\"type\":\"Row\"},{\"attributes\":{\"source\":{\"id\":\"1161\"}},\"id\":\"1166\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2017\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1915\"},{\"id\":\"1919\"}]},\"id\":\"1920\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1046\",\"type\":\"DataRange1d\"},{\"attributes\":{\"children\":[{\"id\":\"1920\"}]},\"id\":\"1921\",\"type\":\"Row\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Rect\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2008\"},\"group\":null,\"major_label_policy\":{\"id\":\"2009\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1052\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1044\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[0.6]},\"selected\":{\"id\":\"2019\"},\"selection_policy\":{\"id\":\"2018\"}},\"id\":\"1167\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1182\"}},\"id\":\"1187\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1467\"},{\"id\":\"1468\"},{\"id\":\"1469\"},{\"id\":\"1470\"},{\"id\":\"1471\"},{\"id\":\"1472\"},{\"id\":\"1474\"}]},\"id\":\"1475\",\"type\":\"Toolbar\"},{\"attributes\":{\"children\":[{\"id\":\"1914\"},{\"id\":\"1921\"}]},\"id\":\"1922\",\"type\":\"Column\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1167\"},\"glyph\":{\"id\":\"1168\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1170\"},\"nonselection_glyph\":{\"id\":\"1169\"},\"view\":{\"id\":\"1172\"}},\"id\":\"1171\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1486\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Rect\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2091\"},\"selection_policy\":{\"id\":\"2090\"}},\"id\":\"1074\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2092\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1179\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1170\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2093\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1922\"}]},\"id\":\"1923\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1173\"},\"glyph\":{\"id\":\"1174\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1176\"},\"nonselection_glyph\":{\"id\":\"1175\"},\"view\":{\"id\":\"1178\"}},\"id\":\"1177\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[0.4]},\"selected\":{\"id\":\"2021\"},\"selection_policy\":{\"id\":\"2020\"}},\"id\":\"1173\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending stress and centroid\"},\"id\":\"1484\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1048\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1167\"}},\"id\":\"1172\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1217\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1042\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2066\"},\"group\":null,\"major_label_policy\":{\"id\":\"2067\"},\"ticker\":{\"id\":\"1601\"}},\"id\":\"1600\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2018\",\"type\":\"UnionRenderers\"},{\"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\":\"1066\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"1056\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1059\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2006\"},\"group\":null,\"major_label_policy\":{\"id\":\"2007\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1056\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1173\"}},\"id\":\"1178\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2019\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1179\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1951\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1180\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1050\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2037\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Text\"},{\"attributes\":{\"interval\":50},\"id\":\"1080\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"1539\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1122\"},\"glyph\":{\"id\":\"1123\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1125\"},\"nonselection_glyph\":{\"id\":\"1124\"},\"view\":{\"id\":\"1127\"}},\"id\":\"1126\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.2]},\"selected\":{\"id\":\"2023\"},\"selection_policy\":{\"id\":\"2022\"}},\"id\":\"1182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2038\",\"type\":\"AllLabels\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1176\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1596\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1599\",\"type\":\"Grid\"},{\"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\":\"1125\",\"type\":\"Text\"},{\"attributes\":{\"tools\":[{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"},{\"id\":\"1063\"},{\"id\":\"1064\"},{\"id\":\"1065\"}]},\"id\":\"1067\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2040\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1601\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1986\"},\"selection_policy\":{\"id\":\"1985\"}},\"id\":\"1206\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2025\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1206\"},\"glyph\":{\"id\":\"1207\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1209\"},\"nonselection_glyph\":{\"id\":\"1208\"},\"view\":{\"id\":\"1211\"}},\"id\":\"1210\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1065\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2041\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1182\"},\"glyph\":{\"id\":\"1183\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1185\"},\"nonselection_glyph\":{\"id\":\"1184\"},\"view\":{\"id\":\"1187\"}},\"id\":\"1186\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"PanTool\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1523\",\"type\":\"LinearScale\"},{\"attributes\":{\"overlay\":{\"id\":\"1066\"}},\"id\":\"1062\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1219\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1221\"},\"nonselection_glyph\":{\"id\":\"1220\"},\"view\":{\"id\":\"1223\"}},\"id\":\"1222\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1063\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2026\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1064\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2027\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1532\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1195\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1197\"},\"nonselection_glyph\":{\"id\":\"1196\"},\"view\":{\"id\":\"1199\"}},\"id\":\"1198\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1538\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2094\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2095\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2028\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1185\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2020\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1189\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1191\"},\"nonselection_glyph\":{\"id\":\"1190\"},\"view\":{\"id\":\"1193\"}},\"id\":\"1192\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1074\"},\"glyph\":{\"id\":\"1075\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1077\"},\"nonselection_glyph\":{\"id\":\"1076\"},\"view\":{\"id\":\"1079\"}},\"id\":\"1078\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1191\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2115\"},\"selection_policy\":{\"id\":\"2114\"}},\"id\":\"2042\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1193\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2021\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1536\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1224\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1938\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1225\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1862\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1504\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis\":{\"id\":\"1308\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1311\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1505\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1224\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"1507\"}},\"id\":\"1503\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1219\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2022\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1201\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1203\"},\"nonselection_glyph\":{\"id\":\"1202\"},\"view\":{\"id\":\"1205\"}},\"id\":\"1204\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1199\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1501\"},{\"id\":\"1502\"},{\"id\":\"1503\"},{\"id\":\"1504\"},{\"id\":\"1505\"},{\"id\":\"1506\"},{\"id\":\"1508\"}]},\"id\":\"1509\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1506\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1197\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1520\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1220\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1979\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1542\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis\":{\"id\":\"1497\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1500\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2097\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1209\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1980\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1535\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1203\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending strain\"},\"id\":\"1518\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1525\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1205\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1527\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1530\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1213\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1215\"},\"nonselection_glyph\":{\"id\":\"1214\"},\"view\":{\"id\":\"1217\"}},\"id\":\"1216\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1074\"}},\"id\":\"1079\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1206\"}},\"id\":\"1211\",\"type\":\"CDSView\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2098 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2057\"},\"group\":null,\"major_label_policy\":{\"id\":\"2058\"},\"ticker\":{\"id\":\"1782\"}},\"id\":\"1527\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2023\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"1541\"}},\"id\":\"1537\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1215\",\"type\":\"Patch\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1084\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1086\"},\"nonselection_glyph\":{\"id\":\"1085\"},\"view\":{\"id\":\"1088\"}},\"id\":\"1087\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2055\"},\"group\":null,\"major_label_policy\":{\"id\":\"2056\"},\"ticker\":{\"id\":\"1532\"},\"visible\":false},\"id\":\"1531\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1531\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1534\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1605\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1928\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1611\",\"type\":\"HoverTool\"},{\"attributes\":{\"tools\":[{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"},{\"id\":\"1032\"}]},\"id\":\"1034\",\"type\":\"Toolbar\"},{\"attributes\":{\"tools\":[{\"id\":\"1570\"},{\"id\":\"1571\"},{\"id\":\"1572\"},{\"id\":\"1573\"},{\"id\":\"1574\"},{\"id\":\"1575\"},{\"id\":\"1577\"}]},\"id\":\"1578\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"1930\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1609\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis\":{\"id\":\"1600\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1603\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1604\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1610\"}},\"id\":\"1606\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1607\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1608\",\"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\":\"1610\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1681\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1683\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1684\"},\"glyph\":{\"id\":\"1685\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1687\"},\"nonselection_glyph\":{\"id\":\"1686\"},\"view\":{\"id\":\"1689\"}},\"id\":\"1688\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1697\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1699\"},\"nonselection_glyph\":{\"id\":\"1698\"},\"view\":{\"id\":\"1701\"}},\"id\":\"1700\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1680\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1626\",\"type\":\"LinearScale\"},{\"attributes\":{\"tools\":[{\"id\":\"1604\"},{\"id\":\"1605\"},{\"id\":\"1606\"},{\"id\":\"1607\"},{\"id\":\"1608\"},{\"id\":\"1609\"},{\"id\":\"1611\"}]},\"id\":\"1612\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1631\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1623\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2103\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1630\"}],\"center\":[{\"id\":\"1633\"},{\"id\":\"1637\"}],\"height\":200,\"renderers\":[{\"id\":\"1730\"},{\"id\":\"1736\"},{\"id\":\"1742\"}],\"right\":[{\"id\":\"1634\"}],\"title\":{\"id\":\"1621\"},\"toolbar\":{\"id\":\"1646\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1623\"},\"x_scale\":{\"id\":\"1626\"},\"y_range\":{\"id\":\"1556\"},\"y_scale\":{\"id\":\"1628\"}},\"id\":\"1620\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c4\"},\"id\":\"1621\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2104\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1642\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1628\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1645\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis\":{\"id\":\"1630\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1633\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2088\"},\"group\":null,\"major_label_policy\":{\"id\":\"2089\"},\"ticker\":{\"id\":\"1631\"}},\"id\":\"1630\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1639\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2085\"},\"group\":null,\"major_label_policy\":{\"id\":\"2086\"},\"ticker\":{\"id\":\"1635\"}},\"id\":\"1634\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1634\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1637\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1933\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1635\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2105\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1934\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1643\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1638\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2106\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1679\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1681\"},\"nonselection_glyph\":{\"id\":\"1680\"},\"view\":{\"id\":\"1683\"}},\"id\":\"1682\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1936\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"1644\"}},\"id\":\"1640\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1641\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1937\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2136\"},\"selection_policy\":{\"id\":\"2135\"}},\"id\":\"1684\",\"type\":\"ColumnDataSource\"},{\"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\":\"1644\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1661\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1663\"},\"nonselection_glyph\":{\"id\":\"1662\"},\"view\":{\"id\":\"1665\"}},\"id\":\"1664\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"below\":[{\"id\":\"1019\"}],\"center\":[{\"id\":\"1022\"},{\"id\":\"1026\"},{\"id\":\"1180\"}],\"height\":200,\"left\":[{\"id\":\"1023\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1087\"},{\"id\":\"1093\"},{\"id\":\"1099\"},{\"id\":\"1171\"},{\"id\":\"1177\"},{\"id\":\"1186\"},{\"id\":\"1192\"}],\"title\":{\"id\":\"1009\"},\"toolbar\":{\"id\":\"1034\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1015\"},\"y_range\":{\"id\":\"1013\"},\"y_scale\":{\"id\":\"1017\"}},\"id\":\"1008\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2114\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2115\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2135\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"1019\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1022\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1693\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1772\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2116\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1075\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2136\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1298\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2117\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2151\"},\"selection_policy\":{\"id\":\"2150\"}},\"id\":\"1690\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1654\"}},\"id\":\"1659\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1280\"},{\"id\":\"1281\"},{\"id\":\"1282\"},{\"id\":\"1283\"},{\"id\":\"1284\"},{\"id\":\"1285\"},{\"id\":\"1287\"}]},\"id\":\"1288\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1962\"},\"group\":null,\"major_label_policy\":{\"id\":\"1963\"},\"ticker\":{\"id\":\"1305\"},\"visible\":false},\"id\":\"1304\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1959\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1300\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2055\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"A\":[20000],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[66666666.666666664],\"Iz\":[16666666.666666666],\"L\":[6],\"M\":[0.0],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"x\":[6],\"xF\":[60],\"y\":[0],\"yG\":[100.0],\"y_n_axis\":[100.0]},\"selected\":{\"id\":\"1982\"},\"selection_policy\":{\"id\":\"1981\"}},\"id\":\"1007\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1315\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1960\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1313\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"below\":[{\"id\":\"1052\"}],\"center\":[{\"id\":\"1055\"},{\"id\":\"1059\"},{\"id\":\"1111\"},{\"id\":\"1120\"}],\"left\":[{\"id\":\"1056\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1078\"},{\"id\":\"1105\"},{\"id\":\"1117\"},{\"id\":\"1126\"}],\"title\":{\"id\":\"1042\"},\"toolbar\":{\"id\":\"1067\"},\"toolbar_location\":null,\"width\":300,\"x_range\":{\"id\":\"1044\"},\"x_scale\":{\"id\":\"1048\"},\"y_range\":{\"id\":\"1046\"},\"y_scale\":{\"id\":\"1050\"}},\"id\":\"1041\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1302\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1655\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1305\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2056\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1317\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1962\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"1318\"}},\"id\":\"1314\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2057\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"1988\"},\"selection_policy\":{\"id\":\"1987\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1316\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1963\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1989\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,0],\"y\":[0,200]},\"selected\":{\"id\":\"2119\"},\"selection_policy\":{\"id\":\"2118\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2058\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2118\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1990\",\"type\":\"Selection\"},{\"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\":\"1318\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2124\"},\"selection_policy\":{\"id\":\"2123\"}},\"id\":\"1654\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2119\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2157\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1638\"},{\"id\":\"1639\"},{\"id\":\"1640\"},{\"id\":\"1641\"},{\"id\":\"1642\"},{\"id\":\"1643\"},{\"id\":\"1645\"}]},\"id\":\"1646\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1698\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2158\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1657\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1009\",\"type\":\"Title\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1393\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1654\"},\"glyph\":{\"id\":\"1655\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1657\"},\"nonselection_glyph\":{\"id\":\"1656\"},\"view\":{\"id\":\"1659\"}},\"id\":\"1658\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"2013\"},\"selection_policy\":{\"id\":\"2012\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1662\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1672\"},\"glyph\":{\"id\":\"1673\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1675\"},\"nonselection_glyph\":{\"id\":\"1674\"},\"view\":{\"id\":\"1677\"}},\"id\":\"1676\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1397\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1656\",\"type\":\"Line\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1013\",\"type\":\"Range1d\"},{\"attributes\":{\"data\":{\"x\":[0,-0.0,-0.0,-0.0,-0.0,-0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2134\"},\"selection_policy\":{\"id\":\"2133\"}},\"id\":\"1672\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2096\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1011\",\"type\":\"Range1d\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2060\"},\"group\":null,\"major_label_policy\":{\"id\":\"2061\"},\"ticker\":{\"id\":\"1498\"},\"visible\":false},\"id\":\"1497\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1661\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1395\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1691\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1663\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1015\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1991\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1710\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1667\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2120\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1665\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2138\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1992\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[-3.0,3.0],\"y\":[0,0]},\"selected\":{\"id\":\"2126\"},\"selection_policy\":{\"id\":\"2125\"}},\"id\":\"1666\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1690\"},\"glyph\":{\"id\":\"1691\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1693\"},\"nonselection_glyph\":{\"id\":\"1692\"},\"view\":{\"id\":\"1695\"}},\"id\":\"1694\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2121\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1669\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2139\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1666\"},\"glyph\":{\"id\":\"1667\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1669\"},\"nonselection_glyph\":{\"id\":\"1668\"},\"view\":{\"id\":\"1671\"}},\"id\":\"1670\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1077\",\"type\":\"Rect\"},{\"attributes\":{\"tools\":[{\"id\":\"1312\"},{\"id\":\"1313\"},{\"id\":\"1314\"},{\"id\":\"1315\"},{\"id\":\"1316\"},{\"id\":\"1317\"},{\"id\":\"1319\"}]},\"id\":\"1320\",\"type\":\"Toolbar\"},{\"attributes\":{\"source\":{\"id\":\"1708\"}},\"id\":\"1713\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1675\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1668\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1968\"},\"group\":null,\"major_label_policy\":{\"id\":\"1969\"},\"ticker\":{\"id\":\"1337\"}},\"id\":\"1336\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1032\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"SaveTool\"},{\"attributes\":{\"source\":{\"id\":\"1702\"}},\"id\":\"1707\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1946\"},\"group\":null,\"major_label_policy\":{\"id\":\"1947\"},\"ticker\":{\"id\":\"1024\"},\"visible\":false},\"id\":\"1023\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1666\"}},\"id\":\"1671\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1673\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1330\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1685\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1023\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1026\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1965\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1672\"}},\"id\":\"1677\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1674\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2060\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"below\":[{\"id\":\"1336\"}],\"center\":[{\"id\":\"1339\"},{\"id\":\"1343\"}],\"height\":200,\"left\":[{\"id\":\"1340\"}],\"renderers\":[{\"id\":\"1388\"},{\"id\":\"1394\"},{\"id\":\"1412\"}],\"title\":{\"id\":\"1930\"},\"toolbar\":{\"id\":\"1352\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1332\"},\"y_range\":{\"id\":\"1330\"},\"y_scale\":{\"id\":\"1334\"}},\"id\":\"1328\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1703\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1332\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1966\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1684\"}},\"id\":\"1689\",\"type\":\"CDSView\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1679\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2061\",\"type\":\"AllLabels\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"1351\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1968\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1686\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1334\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2063\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1690\"}},\"id\":\"1695\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1337\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1336\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1339\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1969\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1345\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1687\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2064\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1692\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1340\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1343\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2139\"},\"selection_policy\":{\"id\":\"2138\"}},\"id\":\"1708\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"1965\"},\"group\":null,\"major_label_policy\":{\"id\":\"1966\"},\"ticker\":{\"id\":\"1341\"}},\"id\":\"1340\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1697\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1391\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1393\"},\"nonselection_glyph\":{\"id\":\"1392\"},\"view\":{\"id\":\"1395\"}},\"id\":\"1394\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1341\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1771\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2140\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1701\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1349\",\"type\":\"HelpTool\"},{\"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\":\"1033\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1699\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1344\",\"type\":\"PanTool\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2153\"},\"selection_policy\":{\"id\":\"2152\"}},\"id\":\"1702\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2141\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"1350\"}},\"id\":\"1346\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1347\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1705\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"1033\"}},\"id\":\"1029\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1715\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1717\"},\"nonselection_glyph\":{\"id\":\"1716\"},\"view\":{\"id\":\"1719\"}},\"id\":\"1718\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1348\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1702\"},\"glyph\":{\"id\":\"1703\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1705\"},\"nonselection_glyph\":{\"id\":\"1704\"},\"view\":{\"id\":\"1707\"}},\"id\":\"1706\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1711\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2123\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1949\"},\"group\":null,\"major_label_policy\":{\"id\":\"1950\"},\"ticker\":{\"id\":\"1020\"}},\"id\":\"1019\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1708\"},\"glyph\":{\"id\":\"1709\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1711\"},\"nonselection_glyph\":{\"id\":\"1710\"},\"view\":{\"id\":\"1713\"}},\"id\":\"1712\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1367\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1369\"},\"nonselection_glyph\":{\"id\":\"1368\"},\"view\":{\"id\":\"1371\"}},\"id\":\"1370\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1704\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"1984\"},\"selection_policy\":{\"id\":\"1983\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"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\":\"1350\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1709\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2124\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1233\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1426\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1236\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1540\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1423\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1236\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1942\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1237\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial stress\"},\"id\":\"1415\",\"type\":\"Title\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1230\",\"type\":\"VeeHead\"},{\"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\":\"1541\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1227\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1939\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1228\",\"type\":\"Arrow\"},{\"attributes\":{\"axis\":{\"id\":\"1425\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1428\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1239\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"1943\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1240\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1421\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1230\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"1940\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1231\",\"type\":\"Arrow\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2099 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2052\"},\"group\":null,\"major_label_policy\":{\"id\":\"2053\"},\"ticker\":{\"id\":\"1426\"}},\"id\":\"1425\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1239\",\"type\":\"VeeHead\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1440\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1233\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"1941\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1234\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1594\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1434\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1959\"},\"group\":null,\"major_label_policy\":{\"id\":\"1960\"},\"ticker\":{\"id\":\"1309\"}},\"id\":\"1308\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2049\"},\"group\":null,\"major_label_policy\":{\"id\":\"2050\"},\"ticker\":{\"id\":\"1430\"},\"visible\":false},\"id\":\"1429\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"1992\"},\"selection_policy\":{\"id\":\"1991\"}},\"id\":\"1249\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1429\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1432\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1592\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"1990\"},\"selection_policy\":{\"id\":\"1989\"}},\"id\":\"1242\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2069\"},\"group\":null,\"major_label_policy\":{\"id\":\"2070\"},\"ticker\":{\"id\":\"1597\"}},\"id\":\"1596\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1242\"},\"glyph\":{\"id\":\"1244\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1246\"},\"nonselection_glyph\":{\"id\":\"1245\"},\"view\":{\"id\":\"1248\"}},\"id\":\"1247\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1438\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1433\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1246\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"1439\"}},\"id\":\"1435\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1250\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"1436\",\"type\":\"SaveTool\"},{\"attributes\":{\"source\":{\"id\":\"1242\"}},\"id\":\"1248\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1437\",\"type\":\"ResetTool\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1899\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1256\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"1556\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1249\"},\"glyph\":{\"id\":\"1250\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1252\"},\"nonselection_glyph\":{\"id\":\"1251\"},\"view\":{\"id\":\"1254\"}},\"id\":\"1253\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1251\",\"type\":\"Scatter\"},{\"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\":\"1439\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1904\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1255\",\"type\":\"Slider\"},{\"attributes\":{},\"id\":\"2033\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1257\",\"type\":\"Div\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1252\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1249\"}},\"id\":\"1254\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1535\"},{\"id\":\"1536\"},{\"id\":\"1537\"},{\"id\":\"1538\"},{\"id\":\"1539\"},{\"id\":\"1540\"},{\"id\":\"1542\"}]},\"id\":\"1543\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2034\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1493\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1496\",\"type\":\"Grid\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1903\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1258\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{},\"id\":\"1563\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1259\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1494\",\"type\":\"BasicTicker\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \",\"width\":170},\"id\":\"1261\",\"type\":\"Div\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2098 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2063\"},\"group\":null,\"major_label_policy\":{\"id\":\"2064\"},\"ticker\":{\"id\":\"1494\"}},\"id\":\"1493\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1491\",\"type\":\"LinearScale\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"1287\",\"type\":\"HoverTool\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"1902\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1260\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"below\":[{\"id\":\"1272\"}],\"center\":[{\"id\":\"1275\"},{\"id\":\"1279\"}],\"height\":160,\"left\":[{\"id\":\"1276\"}],\"renderers\":[{\"id\":\"1364\"},{\"id\":\"1370\"},{\"id\":\"1400\"}],\"title\":{\"id\":\"1263\"},\"toolbar\":{\"id\":\"1288\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1268\"},\"y_range\":{\"id\":\"1266\"},\"y_scale\":{\"id\":\"1270\"}},\"id\":\"1262\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1554\",\"type\":\"DataRange1d\"},{\"attributes\":{\"below\":[{\"id\":\"1562\"}],\"center\":[{\"id\":\"1565\"},{\"id\":\"1569\"}],\"height\":200,\"left\":[{\"id\":\"1566\"}],\"renderers\":[{\"id\":\"1694\"},{\"id\":\"1700\"},{\"id\":\"1706\"}],\"title\":{\"id\":\"1552\"},\"toolbar\":{\"id\":\"1578\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1554\"},\"x_scale\":{\"id\":\"1558\"},\"y_range\":{\"id\":\"1556\"},\"y_scale\":{\"id\":\"1560\"}},\"id\":\"1551\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1560\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1266\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1268\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1272\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1275\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1573\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"1263\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Shear stress\"},\"id\":\"1552\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1270\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1281\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1562\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1565\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"1956\"},\"group\":null,\"major_label_policy\":{\"id\":\"1957\"},\"ticker\":{\"id\":\"1273\"},\"visible\":false},\"id\":\"1272\",\"type\":\"LinearAxis\"},{\"attributes\":{\"tools\":[{\"id\":\"1433\"},{\"id\":\"1434\"},{\"id\":\"1435\"},{\"id\":\"1436\"},{\"id\":\"1437\"},{\"id\":\"1438\"},{\"id\":\"1440\"}]},\"id\":\"1441\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1558\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u1d65 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2082\"},\"group\":null,\"major_label_policy\":{\"id\":\"2083\"},\"ticker\":{\"id\":\"1563\"}},\"id\":\"1562\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1273\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1571\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1771\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1773\"},\"nonselection_glyph\":{\"id\":\"1772\"},\"view\":{\"id\":\"1775\"}},\"id\":\"1774\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1577\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"1953\"},\"group\":null,\"major_label_policy\":{\"id\":\"1954\"},\"ticker\":{\"id\":\"1277\"}},\"id\":\"1276\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1276\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1279\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1277\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2079\"},\"group\":null,\"major_label_policy\":{\"id\":\"2080\"},\"ticker\":{\"id\":\"1567\"},\"visible\":false},\"id\":\"1566\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1566\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1569\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1567\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1285\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1280\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1452\",\"type\":\"DataRange1d\"},{\"attributes\":{\"below\":[{\"id\":\"1459\"}],\"center\":[{\"id\":\"1462\"},{\"id\":\"1466\"}],\"height\":200,\"left\":[{\"id\":\"1463\"}],\"renderers\":[{\"id\":\"1748\"},{\"id\":\"1754\"},{\"id\":\"1760\"}],\"title\":{\"id\":\"1450\"},\"toolbar\":{\"id\":\"1475\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1452\"},\"x_scale\":{\"id\":\"1455\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1457\"}},\"id\":\"1449\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"1286\"}},\"id\":\"1282\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1575\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1283\",\"type\":\"SaveTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1474\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1284\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1570\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1576\"}},\"id\":\"1572\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1471\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial strain\"},\"id\":\"1450\",\"type\":\"Title\"},{\"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\":\"1286\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"1459\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1462\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1574\",\"type\":\"ResetTool\"},{\"attributes\":{\"below\":[{\"id\":\"1304\"}],\"center\":[{\"id\":\"1307\"},{\"id\":\"1311\"}],\"height\":160,\"left\":[{\"id\":\"1308\"}],\"renderers\":[{\"id\":\"1376\"},{\"id\":\"1382\"},{\"id\":\"1406\"}],\"title\":{\"id\":\"1928\"},\"toolbar\":{\"id\":\"1320\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1300\"},\"y_range\":{\"id\":\"1298\"},\"y_scale\":{\"id\":\"1302\"}},\"id\":\"1296\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1468\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1457\",\"type\":\"LinearScale\"},{\"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\":\"1576\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2099 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2046\"},\"group\":null,\"major_label_policy\":{\"id\":\"2047\"},\"ticker\":{\"id\":\"1762\"}},\"id\":\"1459\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"1596\"}],\"center\":[{\"id\":\"1599\"},{\"id\":\"1603\"}],\"height\":200,\"renderers\":[{\"id\":\"1712\"},{\"id\":\"1718\"},{\"id\":\"1724\"}],\"right\":[{\"id\":\"1600\"}],\"title\":{\"id\":\"1587\"},\"toolbar\":{\"id\":\"1612\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1589\"},\"x_scale\":{\"id\":\"1592\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1594\"}},\"id\":\"1586\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"1319\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2044\"},\"group\":null,\"major_label_policy\":{\"id\":\"2045\"},\"ticker\":{\"id\":\"1464\"},\"visible\":false},\"id\":\"1463\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1463\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1466\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1312\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1464\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1589\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1472\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis\":{\"id\":\"1304\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1307\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1467\",\"type\":\"PanTool\"},{\"attributes\":{\"below\":[{\"id\":\"1493\"}],\"center\":[{\"id\":\"1496\"},{\"id\":\"1500\"}],\"height\":200,\"left\":[{\"id\":\"1497\"}],\"renderers\":[{\"id\":\"1676\"},{\"id\":\"1682\"},{\"id\":\"1688\"}],\"title\":{\"id\":\"1484\"},\"toolbar\":{\"id\":\"1509\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1486\"},\"x_scale\":{\"id\":\"1489\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1491\"}},\"id\":\"1483\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"1473\"}},\"id\":\"1469\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c3 and neutral axis\"},\"id\":\"1587\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1470\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1597\",\"type\":\"BasicTicker\"},{\"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\":\"1473\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1088\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1085\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1870\",\"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\":\"1091\",\"type\":\"Patch\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1096\",\"type\":\"Circle\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1084\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1086\",\"type\":\"Line\"},{\"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\":\"1102\",\"type\":\"Rect\"},{\"attributes\":{\"source\":{\"id\":\"1089\"}},\"id\":\"1094\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1090\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"2015\"},\"selection_policy\":{\"id\":\"2014\"}},\"id\":\"1089\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1089\"},\"glyph\":{\"id\":\"1090\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1092\"},\"nonselection_glyph\":{\"id\":\"1091\"},\"view\":{\"id\":\"1094\"}},\"id\":\"1093\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1900\"}]},\"start\":10,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1108\",\"type\":\"Slider\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1851\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1092\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2093\"},\"selection_policy\":{\"id\":\"2092\"}},\"id\":\"1101\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2104\"},\"selection_policy\":{\"id\":\"2103\"}},\"id\":\"1850\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"2017\"},\"selection_policy\":{\"id\":\"2016\"}},\"id\":\"1095\",\"type\":\"ColumnDataSource\"},{\"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\":\"1097\",\"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\":\"1098\",\"type\":\"Circle\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1865\",\"type\":\"VeeHead\"},{\"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\":\"1103\",\"type\":\"Rect\"},{\"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\":\"1104\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1853\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1850\"}},\"id\":\"1855\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1095\"},\"glyph\":{\"id\":\"1096\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1098\"},\"nonselection_glyph\":{\"id\":\"1097\"},\"view\":{\"id\":\"1100\"}},\"id\":\"1099\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1852\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1095\"}},\"id\":\"1100\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1865\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2077\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1866\",\"type\":\"Arrow\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n L = 6 m
\\n A = 2.00e+04 mm2
\\n Iy = 6.67e+07 mm4
\\n Iz = 1.67e+07 mm4\",\"width\":170},\"id\":\"1107\",\"type\":\"Div\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2106\"},\"selection_policy\":{\"id\":\"2105\"}},\"id\":\"1868\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1113\"},\"glyph\":{\"id\":\"1114\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1116\"},\"nonselection_glyph\":{\"id\":\"1115\"},\"view\":{\"id\":\"1118\"}},\"id\":\"1117\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2108\"},\"selection_policy\":{\"id\":\"2107\"}},\"id\":\"1875\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1110\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1101\"},\"glyph\":{\"id\":\"1102\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1104\"},\"nonselection_glyph\":{\"id\":\"1103\"},\"view\":{\"id\":\"1106\"}},\"id\":\"1105\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1877\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1101\"}},\"id\":\"1106\",\"type\":\"CDSView\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"1901\"}]},\"start\":20,\"step\":20,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1109\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1868\"},\"glyph\":{\"id\":\"1870\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1872\"},\"nonselection_glyph\":{\"id\":\"1871\"},\"view\":{\"id\":\"1874\"}},\"id\":\"1873\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1110\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2010\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1111\",\"type\":\"Arrow\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1871\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1113\"}},\"id\":\"1118\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1872\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1131\",\"type\":\"DataRange1d\"},{\"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\":\"1115\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1868\"}},\"id\":\"1874\",\"type\":\"CDSView\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1114\",\"type\":\"Text\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1883\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1875\"},\"glyph\":{\"id\":\"1876\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1878\"},\"nonselection_glyph\":{\"id\":\"1877\"},\"view\":{\"id\":\"1880\"}},\"id\":\"1879\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"2095\"},\"selection_policy\":{\"id\":\"2094\"}},\"id\":\"1113\",\"type\":\"ColumnDataSource\"},{\"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\":\"1116\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[11.0],\"y\":[1]},\"selected\":{\"id\":\"2110\"},\"selection_policy\":{\"id\":\"2109\"}},\"id\":\"1881\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1119\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1876\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1119\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2011\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1120\",\"type\":\"Arrow\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1882\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1878\",\"type\":\"Scatter\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1123\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1875\"}},\"id\":\"1880\",\"type\":\"CDSView\"},{\"attributes\":{\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1888\",\"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\":\"1124\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1162\",\"type\":\"Rect\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1881\"},\"glyph\":{\"id\":\"1882\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1884\"},\"nonselection_glyph\":{\"id\":\"1883\"},\"view\":{\"id\":\"1886\"}},\"id\":\"1885\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1887\"},\"glyph\":{\"id\":\"1888\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1890\"},\"nonselection_glyph\":{\"id\":\"1889\"},\"view\":{\"id\":\"1892\"}},\"id\":\"1891\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"2097\"},\"selection_policy\":{\"id\":\"2096\"}},\"id\":\"1122\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"1980\"},\"selection_policy\":{\"id\":\"1979\"}},\"id\":\"1161\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1884\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1122\"}},\"id\":\"1127\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[6],\"y\":[-5]},\"selected\":{\"id\":\"2112\"},\"selection_policy\":{\"id\":\"2111\"}},\"id\":\"1887\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1163\",\"type\":\"Rect\"},{\"attributes\":{\"below\":[{\"id\":\"1139\"}],\"center\":[{\"id\":\"1142\"},{\"id\":\"1146\"},{\"id\":\"1225\"},{\"id\":\"1228\"},{\"id\":\"1231\"},{\"id\":\"1234\"},{\"id\":\"1237\"},{\"id\":\"1240\"}],\"height\":200,\"left\":[{\"id\":\"1143\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1165\"},{\"id\":\"1198\"},{\"id\":\"1204\"},{\"id\":\"1210\"},{\"id\":\"1216\"},{\"id\":\"1222\"},{\"id\":\"1247\"},{\"id\":\"1253\"}],\"title\":{\"id\":\"1129\"},\"toolbar\":{\"id\":\"1154\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1131\"},\"x_scale\":{\"id\":\"1135\"},\"y_range\":{\"id\":\"1133\"},\"y_scale\":{\"id\":\"1137\"}},\"id\":\"1128\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1881\"}},\"id\":\"1886\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1133\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1887\"}},\"id\":\"1892\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1135\",\"type\":\"LinearScale\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1889\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1936\"},\"group\":null,\"major_label_policy\":{\"id\":\"1937\"},\"ticker\":{\"id\":\"1140\"},\"visible\":false},\"id\":\"1139\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1893\"},\"glyph\":{\"id\":\"1894\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1896\"},\"nonselection_glyph\":{\"id\":\"1895\"},\"view\":{\"id\":\"1898\"}},\"id\":\"1897\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"1933\"},\"group\":null,\"major_label_policy\":{\"id\":\"1934\"},\"ticker\":{\"id\":\"1144\"},\"visible\":false},\"id\":\"1143\",\"type\":\"LinearAxis\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1890\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[5],\"y\":[0]},\"selected\":{\"id\":\"2146\"},\"selection_policy\":{\"id\":\"2145\"}},\"id\":\"1893\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1895\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1139\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1142\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1893\"}},\"id\":\"1898\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1137\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1129\",\"type\":\"Title\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1894\",\"type\":\"Text\"},{\"attributes\":{\"axis\":{\"id\":\"1143\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1146\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1152\",\"type\":\"HelpTool\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1896\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1140\",\"type\":\"BasicTicker\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"V_stress_diag\":{\"id\":\"1694\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div\":{\"id\":\"1107\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1099\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \"},\"id\":\"1900\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1144\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1164\",\"type\":\"Rect\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"V_stress_diag\":{\"id\":\"1694\"},\"arr_head\":{\"id\":\"1253\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div_P\":{\"id\":\"1259\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \"},\"id\":\"1899\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1153\"}},\"id\":\"1149\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"V_stress_diag\":{\"id\":\"1694\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div\":{\"id\":\"1107\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_b\":{\"id\":\"1003\"},\"s_ss\":{\"id\":\"1006\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1099\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const data_ss = s_ss.data\\n const b = db['b'][0]\\n const h = cb_obj.value // value of the slider\\n const A = compute_area(b, h)\\n const Iy = compute_inertia_y(b, h)\\n const N = db['N'][0]\\n const M = db['M'][0]\\n const yG = compute_centroid_y(h)\\n\\n // apply the changes\\n db['h'][0] = h\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h)\\n db['yG'][0] = yG\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n data_ss['y'][1] = h // change the height of the section in the diagrams\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n\\n // emit the changes\\n source.change.emit()\\n s_ss.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n glyph_section.glyph.width = data['b'][0]\\n glyph_section.glyph.height = data['h'][0]\\n }\\n \\n \\n function compute_area(b, h) {\\n return b*h\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h) {\\n return h*b**3/12\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \"},\"id\":\"1901\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"ResetTool\"},{\"attributes\":{\"args\":{\"N_diag\":{\"id\":\"1364\"},\"N_stress_diag\":{\"id\":\"1658\"},\"arr_head\":{\"id\":\"1253\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"div_P\":{\"id\":\"1259\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1902\",\"type\":\"CustomJS\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1253\"},\"div_P\":{\"id\":\"1259\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1903\",\"type\":\"CustomJS\"},{\"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\":\"1153\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"1388\"},\"M_stress_diag\":{\"id\":\"1676\"},\"V_diag\":{\"id\":\"1376\"},\"V_stress_diag\":{\"id\":\"1694\"},\"arr_head\":{\"id\":\"1253\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div_P\":{\"id\":\"1259\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=10) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n \\n total_tau[i] = compute_total_tau(tau_shear[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y, b, h, yG) {\\n return b/2*(h**2/4-(y-yG)**2)\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"1904\",\"type\":\"CustomJS\"},{\"attributes\":{\"tools\":[{\"id\":\"1147\"},{\"id\":\"1148\"},{\"id\":\"1149\"},{\"id\":\"1150\"},{\"id\":\"1151\"},{\"id\":\"1152\"}]},\"id\":\"1154\",\"type\":\"Toolbar\"},{\"attributes\":{\"width\":10},\"id\":\"1905\",\"type\":\"Spacer\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{\"height\":10},\"id\":\"1908\",\"type\":\"Spacer\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{\"children\":[{\"id\":\"1107\"},{\"id\":\"1261\"}]},\"id\":\"1907\",\"type\":\"Row\"},{\"attributes\":{\"height\":10},\"id\":\"1906\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"2006\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2148\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2007\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1946\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"below\":[{\"id\":\"1425\"}],\"center\":[{\"id\":\"1428\"},{\"id\":\"1432\"}],\"height\":200,\"left\":[{\"id\":\"1429\"}],\"renderers\":[{\"id\":\"1658\"},{\"id\":\"1664\"},{\"id\":\"1670\"}],\"title\":{\"id\":\"1415\"},\"toolbar\":{\"id\":\"1441\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1417\"},\"x_scale\":{\"id\":\"1421\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1423\"}},\"id\":\"1414\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2149\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1413\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2008\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1947\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2150\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1981\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2009\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1949\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2044\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2151\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1361\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1982\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1950\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2045\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2130\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2046\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2131\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"2028\"},\"selection_policy\":{\"id\":\"2027\"}},\"id\":\"1360\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2047\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2100\"},\"selection_policy\":{\"id\":\"2099\"}},\"id\":\"2010\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2026\"},\"selection_policy\":{\"id\":\"2025\"}},\"id\":\"1951\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2102\"},\"selection_policy\":{\"id\":\"2101\"}},\"id\":\"2011\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"tools\":[{\"id\":\"1344\"},{\"id\":\"1345\"},{\"id\":\"1346\"},{\"id\":\"1347\"},{\"id\":\"1348\"},{\"id\":\"1349\"},{\"id\":\"1351\"}]},\"id\":\"1352\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1360\"},\"glyph\":{\"id\":\"1361\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1363\"},\"nonselection_glyph\":{\"id\":\"1362\"},\"view\":{\"id\":\"1365\"}},\"id\":\"1364\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2079\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1983\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1363\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2080\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1372\"}},\"id\":\"1377\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1984\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1409\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1411\"},\"nonselection_glyph\":{\"id\":\"1410\"},\"view\":{\"id\":\"1413\"}},\"id\":\"1412\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1360\"}},\"id\":\"1365\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2082\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1362\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1502\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2152\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1368\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2083\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1367\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2030\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1369\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2153\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2031\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1373\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1371\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"2031\"},\"selection_policy\":{\"id\":\"2030\"}},\"id\":\"1372\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1405\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1375\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1985\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1379\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1381\"},\"nonselection_glyph\":{\"id\":\"1380\"},\"view\":{\"id\":\"1383\"}},\"id\":\"1382\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1372\"},\"glyph\":{\"id\":\"1373\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1375\"},\"nonselection_glyph\":{\"id\":\"1374\"},\"view\":{\"id\":\"1377\"}},\"id\":\"1376\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1953\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1409\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1986\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1411\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2049\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1374\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2133\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1954\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1380\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2050\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1381\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2134\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1956\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1379\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2052\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1501\",\"type\":\"PanTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1508\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1957\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1385\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2012\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2053\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1383\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"2034\"},\"selection_policy\":{\"id\":\"2033\"}},\"id\":\"1384\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2013\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1387\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1987\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1384\"},\"glyph\":{\"id\":\"1385\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1387\"},\"nonselection_glyph\":{\"id\":\"1386\"},\"view\":{\"id\":\"1389\"}},\"id\":\"1388\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1410\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1384\"}},\"id\":\"1389\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1988\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1386\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1403\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1405\"},\"nonselection_glyph\":{\"id\":\"1404\"},\"view\":{\"id\":\"1407\"}},\"id\":\"1406\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1392\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2085\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1398\",\"type\":\"Circle\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1391\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2086\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1401\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2155\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1397\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1399\"},\"nonselection_glyph\":{\"id\":\"1398\"},\"view\":{\"id\":\"1401\"}},\"id\":\"1400\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1403\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2014\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2088\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1399\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2156\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1404\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1407\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2015\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2089\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2131\"},\"selection_policy\":{\"id\":\"2130\"}},\"id\":\"1776\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1715\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1716\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1717\",\"type\":\"Line\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1721\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1719\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2141\"},\"selection_policy\":{\"id\":\"2140\"}},\"id\":\"1720\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1775\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1723\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1733\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1735\"},\"nonselection_glyph\":{\"id\":\"1734\"},\"view\":{\"id\":\"1737\"}},\"id\":\"1736\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1720\"},\"glyph\":{\"id\":\"1721\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1723\"},\"nonselection_glyph\":{\"id\":\"1722\"},\"view\":{\"id\":\"1725\"}},\"id\":\"1724\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1720\"}},\"id\":\"1725\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1722\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1734\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1727\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1726\"}},\"id\":\"1731\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1729\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1726\"},\"glyph\":{\"id\":\"1727\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1729\"},\"nonselection_glyph\":{\"id\":\"1728\"},\"view\":{\"id\":\"1731\"}},\"id\":\"1730\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,22.22222222222222,44.44444444444444,66.66666666666666,88.88888888888889,111.11111111111111,133.33333333333331,155.55555555555554,177.77777777777777,200.0,200]},\"selected\":{\"id\":\"2156\"},\"selection_policy\":{\"id\":\"2155\"}},\"id\":\"1726\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1728\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2099\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2117\"},\"selection_policy\":{\"id\":\"2116\"}},\"id\":\"1744\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1733\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2100\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1777\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1735\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1739\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1737\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2101\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2158\"},\"selection_policy\":{\"id\":\"2157\"}},\"id\":\"1738\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1773\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1741\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2102\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1751\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1753\"},\"nonselection_glyph\":{\"id\":\"1752\"},\"view\":{\"id\":\"1755\"}},\"id\":\"1754\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1738\"},\"glyph\":{\"id\":\"1739\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1741\"},\"nonselection_glyph\":{\"id\":\"1740\"},\"view\":{\"id\":\"1743\"}},\"id\":\"1742\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1747\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1740\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1744\"},\"glyph\":{\"id\":\"1745\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1747\"},\"nonselection_glyph\":{\"id\":\"1746\"},\"view\":{\"id\":\"1749\"}},\"id\":\"1748\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1738\"}},\"id\":\"1743\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1745\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1752\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1744\"}},\"id\":\"1749\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1746\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1767\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1751\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1076\",\"type\":\"Rect\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1753\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1757\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1755\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2121\"},\"selection_policy\":{\"id\":\"2120\"}},\"id\":\"1756\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1759\",\"type\":\"Line\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1762\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1756\"},\"glyph\":{\"id\":\"1757\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1759\"},\"nonselection_glyph\":{\"id\":\"1758\"},\"view\":{\"id\":\"1761\"}},\"id\":\"1760\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1765\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1758\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1764\"},\"glyph\":{\"id\":\"1765\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1767\"},\"nonselection_glyph\":{\"id\":\"1766\"},\"view\":{\"id\":\"1769\"}},\"id\":\"1768\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1756\"}},\"id\":\"1761\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1779\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAACO4ziO4zg2QI7jOI7jOEZAqqqqqqqqUECO4ziO4zhWQHIcx3Ecx1tAqqqqqqqqYEAcx3Ecx3FjQI7jOI7jOGZAAAAAAAAAaUA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2129\"},\"selection_policy\":{\"id\":\"2128\"}},\"id\":\"1764\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1764\"}},\"id\":\"1769\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1766\",\"type\":\"Line\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1782\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{},\"id\":\"1791\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1776\"},\"glyph\":{\"id\":\"1777\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1779\"},\"nonselection_glyph\":{\"id\":\"1778\"},\"view\":{\"id\":\"1781\"}},\"id\":\"1780\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1787\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1778\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1795\"}],\"center\":[{\"id\":\"1798\"},{\"id\":\"1802\"},{\"id\":\"1863\"}],\"height\":200,\"left\":[{\"id\":\"1799\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1854\"},{\"id\":\"1873\"},{\"id\":\"1879\"},{\"id\":\"1885\"},{\"id\":\"1891\"}],\"title\":{\"id\":\"1785\"},\"toolbar\":{\"id\":\"1810\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1787\"},\"x_scale\":{\"id\":\"1791\"},\"y_range\":{\"id\":\"1789\"},\"y_scale\":{\"id\":\"1793\"}},\"id\":\"1784\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1776\"}},\"id\":\"1781\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1789\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1796\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2040\"},\"group\":null,\"major_label_policy\":{\"id\":\"2041\"},\"ticker\":{\"id\":\"1796\"},\"visible\":false},\"id\":\"1795\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1793\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1795\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1798\",\"type\":\"Grid\"}],\"root_ids\":[\"1924\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"2176674f-1649-400e-926b-89abf8d8156a\",\"root_ids\":[\"1924\"],\"roots\":{\"1924\":\"4e288455-6575-4c67-b895-f85c8923ceaa\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": [ - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170\n", - "\n", - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO, \n", - " text=beam_section.div_text_geo(round(h), round(b), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=20,\n", - " end=MAX_H,\n", - " step=20,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/2], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(width=DIV_B_FORCES, \n", - " text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))\n", - "\n", - "\n", - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now define the new figures, renderers and widgets:" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "# figures for the stresses and strains\n", - "FIG_B_ss = 200\n", - "FIG_H_ss = 200\n", - "options_stress_strain = dict(\n", - " toolbar_location=None,\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_width=FIG_B_ss,\n", - " plot_height=FIG_H_ss\n", - ")\n", - "fig_stress_N = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2099 [MPa]\")\n", - "fig_stress_N.yaxis.visible = False\n", - "fig_axial_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2099 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_axial_strain.yaxis.visible = False\n", - "fig_stress_M = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending stress and centroid\",\n", - " y_range=fig_stress_N.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2098 [MPa]\")\n", - "fig_stress_M.yaxis.visible = False\n", - "fig_bending_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2098 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_bending_strain.yaxis.visible = False\n", - "fig_stress_V = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Shear stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\u1d65 [MPa]\")\n", - "fig_stress_V.yaxis.visible = False\n", - "fig_stress_sigma = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER SIGMA} and neutral axis\",\n", - " y_range=fig_stress_N.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\")\n", - "fig_stress_tau = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER TAU}\",\n", - " y_range=fig_stress_V.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\")\n", - "\n", - "# plot stress N V M\n", - "discr_stress_strain = 10\n", - "scale_x = 25\n", - "y_discr = np.linspace(0, h, discr_stress_strain)\n", - "sigma_N = stst.compute_sigma_axial(y_discr, 0, A)\n", - "N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h,\n", - " source_section_scheme, scale_x=scale_x/10)\n", - "sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG)\n", - "(M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h,\n", - " source_section_scheme, True, yG, scale_x=scale_x)\n", - "S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, yG)\n", - "tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b)\n", - "V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1)\n", - "\n", - "# plot stress sigma and tau\n", - "sigma_total = sigma_M + sigma_N\n", - "(sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h,\n", - " source_section_scheme,True, yG, scale_x=scale_x)\n", - "tau_total = tau_V\n", - "tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h,\n", - " source_section_scheme, scale_x=1)\n", - "\n", - "# plot strain N M\n", - "strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E)\n", - "axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme)\n", - "strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E)\n", - "bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme)\n", - "\n", - "\n", - "# figures for NVM\n", - "fig_NM_section = figure(**options_stress_strain,\n", - " title=\"N and M at position x\",\n", - " match_aspect=True)\n", - "fig_NM_section.axis.visible = False\n", - "fig_NM_section.grid.grid_line_alpha = 0\n", - "\n", - "fig_V_section = figure(**options_stress_strain,\n", - " title=\"V at position x\",\n", - " match_aspect=True)\n", - "fig_V_section.axis.visible = False\n", - "fig_V_section.grid.grid_line_alpha = 0\n", - "\n", - "# section with NVM\n", - "models.section_diagram(fig_NM_section)\n", - "models.section_diagram(fig_V_section)\n", - "\n", - "# NVM in section\n", - "section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red')\n", - "section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red')\n", - "(section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0)\n", - "\n", - "# NVM label in section\n", - "OFFSET_N = 1\n", - "label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[\"\"], text_color=\"red\", text_baseline='bottom')\n", - "label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[\"\"], text_color=\"red\", text_baseline='top')\n", - "label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[0], text=[\"\"], text_color=\"red\", text_baseline='middle')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b, code=code_change_b)\n", - "\n", - "\n", - "args_slider_h = dict(source=source,\n", - " s_b=source_beam,\n", - " s_ss=source_section_scheme,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag)\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const data_ss = s_ss.data\n", - "const b = db['b'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h)\n", - "const Iy = compute_inertia_y(b, h)\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "const yG = compute_centroid_y(h)\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h)\n", - "db['yG'][0] = yG\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "data_ss['y'][1] = h // change the height of the section in the diagrams\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_ss.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain)}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout),\n", - " slider_b,\n", - " slider_h,\n", - " row(div_geo, div_forces),\n", - " Spacer(height=padding_layout),\n", - " slider_position,\n", - " slider_q,\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M)),\n", - " row(column(\n", - " row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma),\n", - " row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), Spacer(width=FIG_B_ss), fig_stress_tau),\n", - " ))\n", - " )],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/Simple Beam DEMOs/sb_torsion.ipynb b/Simple Beam DEMOs/sb_torsion.ipynb index fd90504..e136c34 100644 --- a/Simple Beam DEMOs/sb_torsion.ipynb +++ b/Simple Beam DEMOs/sb_torsion.ipynb @@ -1,1353 +1,488 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Simple beam - Torsion\n", "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." ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "
\n", + " \n", + " Loading BokehJS ...\n", + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/javascript": [ + "\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", + " const JS_MIME_TYPE = 'application/javascript';\n", + " const HTML_MIME_TYPE = 'text/html';\n", + " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", + " const CLASS_NAME = 'output_bokeh rendered_html';\n", + "\n", + " /**\n", + " * Render data to the DOM node\n", + " */\n", + " function render(props, node) {\n", + " const script = document.createElement(\"script\");\n", + " node.appendChild(script);\n", + " }\n", + "\n", + " /**\n", + " * Handle when an output is cleared or removed\n", + " */\n", + " function handleClearOutput(event, handle) {\n", + " const cell = handle.cell;\n", + "\n", + " const id = cell.output_area._bokeh_element_id;\n", + " const server_id = cell.output_area._bokeh_server_id;\n", + " // Clean up Bokeh references\n", + " if (id != null && id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + "\n", + " if (server_id !== undefined) {\n", + " // Clean up Bokeh references\n", + " const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", + " cell.notebook.kernel.execute(cmd_clean, {\n", + " iopub: {\n", + " output: function(msg) {\n", + " const id = msg.content.text.trim();\n", + " if (id in Bokeh.index) {\n", + " Bokeh.index[id].model.document.clear();\n", + " delete Bokeh.index[id];\n", + " }\n", + " }\n", + " }\n", + " });\n", + " // Destroy server and session\n", + " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", + " cell.notebook.kernel.execute(cmd_destroy);\n", + " }\n", + " }\n", + "\n", + " /**\n", + " * Handle when a new output is added\n", + " */\n", + " function handleAddOutput(event, handle) {\n", + " const output_area = handle.output_area;\n", + " const output = handle.output;\n", + "\n", + " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", + " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", + " return\n", + " }\n", + "\n", + " const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", + "\n", + " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", + " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", + " // store reference to embed id on output_area\n", + " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", + " }\n", + " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", + " const bk_div = document.createElement(\"div\");\n", + " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", + " const script_attrs = bk_div.children[0].attributes;\n", + " for (let i = 0; i < script_attrs.length; i++) {\n", + " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", + " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", + " }\n", + " // store reference to server id on output_area\n", + " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", + " }\n", + " }\n", + "\n", + " function register_renderer(events, OutputArea) {\n", + "\n", + " function append_mime(data, metadata, element) {\n", + " // create a DOM node to render to\n", + " const toinsert = this.create_output_subarea(\n", + " metadata,\n", + " CLASS_NAME,\n", + " EXEC_MIME_TYPE\n", + " );\n", + " this.keyboard_manager.register_events(toinsert);\n", + " // Render to node\n", + " const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", + " render(props, toinsert[toinsert.length - 1]);\n", + " element.append(toinsert);\n", + " return toinsert\n", + " }\n", + "\n", + " /* Handle when an output is cleared or removed */\n", + " events.on('clear_output.CodeCell', handleClearOutput);\n", + " events.on('delete.Cell', handleClearOutput);\n", + "\n", + " /* Handle when a new output is added */\n", + " events.on('output_added.OutputArea', handleAddOutput);\n", + "\n", + " /**\n", + " * Register the mime type and append_mime function with output_area\n", + " */\n", + " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", + " /* Is output safe? */\n", + " safe: true,\n", + " /* Index of renderer in `output_area.display_order` */\n", + " index: 0\n", + " });\n", + " }\n", + "\n", + " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", + " if (root.Jupyter !== undefined) {\n", + " const events = require('base/js/events');\n", + " const OutputArea = require('notebook/js/outputarea').OutputArea;\n", + "\n", + " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", + " register_renderer(events, OutputArea);\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", + " \"
\\n\"+\n", + " \"

\\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", + " \"

\\n\"+\n", + " \"
    \\n\"+\n", + " \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n", + " \"
  • use INLINE resources instead, as so:
  • \\n\"+\n", + " \"
\\n\"+\n", + " \"\\n\"+\n", + " \"from bokeh.resources import INLINE\\n\"+\n", + " \"output_notebook(resources=INLINE)\\n\"+\n", + " \"\\n\"+\n", + " \"
\"}};\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));" + ], + "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 \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"
    \\n\"+\n \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\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_torsion\n", "import math\n", - "import numpy as np \n", - "from bokeh.layouts import layout, column, row\n", - "from bokeh.models.annotations import Label, Arrow\n", - "from bokeh.models.arrow_heads import VeeHead\n", - "from bokeh.models import Div, CustomJS, Slider, Spacer, Text\n", - "from bokeh.models.widgets import RadioButtonGroup, CheckboxButtonGroup\n", - "from bokeh.plotting import figure, show, ColumnDataSource\n", - "from bokeh.io import output_notebook\n", + "import numpy as np\n", "from cienpy import simplebeam as sb\n", "from cienpy import hollow_rectangular_section as beam_section\n", - "from cienpy import stress_strain_elastic as stst\n", - "from cienpy import models\n", - "from cienpy import javascriptcodes as js\n", - "\n", - "# output_notebook()" + "from cienpy import stress_strain_elastic as stst" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Define the geometry, uniform load and torsion. Both supports are fixed with respect to the torsion.\n", "Note that given the graphical nature of the notebook, extreme cases can cause the figures to not be displayed." ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Choose the dimensions\n", "L = 6 # [m]\n", "h = 200 # [mm]\n", "b = 100 # [mm]\n", "t = 10 # [mm]\n", "q = 4 # [kN/m]\n", "P = 10 # [kN]\n", "Mt = 100 # [kNm]\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", "T_discr = sb.compute_T(x_discr, Mt, L)\n", "N = N_discr[-1]\n", "V = V_discr[-1]\n", "M = M_discr[-1]\n", "T = T_discr[-1]\n", "\n", "# compute the parameters\n", "A = beam_section.compute_area(b, h, t) # [mm2]\n", "Iy = beam_section.compute_inertia_y(b, h, t) # [mm4] strong axis\n", "Iz = beam_section.compute_inertia_z(b, h, t) # [mm4] weak axis\n", "yG = beam_section.compute_centroid_y(h)\n", "y_n_axis = stst.compute_neutral_axis(N, A, Iy, M, yG)\n", "\n", "# compute the reactions\n", "Rx = sb.compute_Rx(P)\n", "Ry_l = sb.compute_Ry_l(q, L)\n", - "Ry_r = sb.compute_Ry_r(q, L)\n", - "\n", - "# constants for the visualisation\n", - "SCALE = 10\n", - "SCALE_T = 10\n", - "OFFSET_Q = q\n", - "MAX_B = 3*b\n", - "MAX_H = 3*h\n", - "MAX_T = 2*t\n", - "MAX_Q = q/4*5\n", - "\n", - "# store the values in a specific format\n", - "data_beam = dict(\n", - " x=[0, L],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_beam = dict(\n", - " x=[0, L*SCALE],\n", - " y=[0, 0]\n", - ")\n", - "\n", - "data_scheme_q = dict(\n", - " x=[0, 0, L*SCALE, L*SCALE],\n", - " y=[OFFSET_Q, OFFSET_Q+q, OFFSET_Q+q, OFFSET_Q],\n", - " x_fade=[0, 0, L*SCALE, L*SCALE]\n", - ")\n", - "\n", - "data_section_scheme = dict(\n", - " x=[0, 0], \n", - " y=[0, h]\n", - ")\n", - "\n", - "initial_position = L\n", - "initial_state = 'IDLE' # possible cases: IDLE, R_SEC, L_SEC\n", - "initial_FBD = 0 # right=0 left=1\n", - "data = dict( # stores every useful single variable\n", - " state=[initial_state], \n", - " FBD=[initial_FBD],\n", - " SCALE=[SCALE],\n", - " L=[L],\n", - " b=[b],\n", - " h=[h],\n", - " t=[t],\n", - " E=[E],\n", - " A=[A],\n", - " Iy=[Iy],\n", - " Iz=[Iz],\n", - " yG=[yG],\n", - " y_n_axis=[y_n_axis],\n", - " P=[P],\n", - " x=[initial_position],\n", - " y=[0],\n", - " q=[q],\n", - " Mt=[Mt],\n", - " Rx=[Rx],\n", - " Ry_l=[Ry_l],\n", - " Ry_r=[Ry_r],\n", - " N=[N],\n", - " V=[V],\n", - " M=[M],\n", - " T=[T],\n", - " xF=[L*SCALE]\n", - ")\n", - "\n", - "source_beam = ColumnDataSource(data_beam)\n", - "source_scheme_beam = ColumnDataSource(data_scheme_beam)\n", - "source_scheme_q = ColumnDataSource(data_scheme_q)\n", - "source_section_scheme = ColumnDataSource(data_section_scheme)\n", - "source = ColumnDataSource(data)\n", - "\n", - "# Constants\n", - "FIG_H_B = 200 # height figure beam\n", - "FIG_B_B = 700 # width figure beam\n", - "FIG_H_S = FIG_H_B # height figure scheme\n", - "FIG_B_S = FIG_B_B # width figure scheme\n", - "FIG_H_SEC = 600 # height figure section\n", - "DIV_B_GEO = 170\n", - "DIV_B_FORCES = 170" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Create the figures, the plots and the widgets (same of Notebook 4 - Stresses and Strains):" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "options = dict(\n", - " toolbar_location=None\n", - ")\n", - "\n", - "# figure for the beam\n", - "paddingx = 0.2*L\n", - "int_x_b = (0-paddingx, L+paddingx)\n", - "int_y_b = (-OFFSET_Q/SCALE, (MAX_Q+OFFSET_Q)/SCALE)\n", - "fig_beam = sb.define_fig_beam(int_x_b, int_y_b, options,\n", - " f_h=FIG_H_B, f_b=FIG_B_B)\n", - "\n", - "\n", - "# figure for the cross-section\n", - "fig_section = sb.define_fig_section(MAX_B*0.8, MAX_H*0.8, options, FIG_H_SEC)\n", - "\n", - "# Doge for scale (if not visualized, remove this part because the browser don't support it correctly)\n", - "h_img = 350 # mm\n", - "fig_section.image_url(url=['https://img-10.stickers.cloud/packs/9a805d22-5d64-42f0-ae3c-bf58e080a463/webp/71246027-2154-494f-adcc-eeb814c11dad.webp'], x=-h_img/2, y=-MAX_H/2*1.01, h=h_img, w=h_img)\n", - "fig_section.text(x=[0], y=[-MAX_H/2-h_img*1.05], text_align=\"center\", text=[f\"Doge for scale (h={h_img} mm)\"], text_font_size=\"10px\")\n", - "\n", - "\n", - "# beam\n", - "(beam, support_l, support_r) = sb.draw_beam(fig_beam, source_beam, L,\n", - " ratio = (int_y_b[1]-int_y_b[0])/FIG_H_B*100)\n", - "\n", - "# section\n", - "section = beam_section.draw_section(fig_section, b, h, t)\n", - "\n", - "\n", - "# show mechanical parameters\n", - "div_geo = Div(width= DIV_B_GEO, \n", - " text=beam_section.div_text_geo(round(h), round(b), round(t), round(L),\n", - " \"{:.2e}\".format(A),\n", - " \"{:.2e}\".format(Iy),\n", - " \"{:.2e}\".format(Iz)))\n", - "\n", - "\n", - "# change geometry\n", - "slider_b = Slider(\n", - " title=\"Change the width b [mm]\",\n", - " start=MAX_T*2+10,\n", - " end=MAX_B,\n", - " step=10,\n", - " value=b\n", - ")\n", - "slider_h = Slider(\n", - " title=\"Change the height h [mm]\",\n", - " start=MAX_T*2+10,\n", - " end=MAX_H,\n", - " step=10,\n", - " value=h\n", - ")\n", - "\n", - "# reference system\n", - "axis_arrow_length = 0.8\n", - "axis_arrow_scale = 100\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, 0, 0, axis_arrow_length*axis_arrow_scale*1.6, 'gray') # y axis\n", - "fig_section.text(x=[0], y=[axis_arrow_length*axis_arrow_scale*1.7], text=[\"y\"], text_color='gray', text_baseline='middle', angle=math.pi/2)\n", - "models.force_vector(fig_section, axis_arrow_length*10, 0, -axis_arrow_length*axis_arrow_scale, 0, 0, 'gray') # z axis\n", - "fig_section.text(x=[-axis_arrow_length*axis_arrow_scale*1.1], y=[0], text=[\"z\"], text_color='gray', text_align='right', text_baseline='middle')\n", - "\n", - "\n", - "# figure for the forces and moments\n", - "fig_scheme = sb.define_figure_scheme(L, SCALE, MAX_Q, OFFSET_Q, options, FIG_H_S, FIG_B_S)\n", - "\n", - "\n", - "# uniform load (beam)\n", - "u_load = fig_beam.rect([L/2], [(q/2+OFFSET_Q)/SCALE], width=L, height=q/SCALE,\n", - " fill_color='blue', color='navy', fill_alpha=0.6, alpha=0.6)\n", - "label_u_load = fig_beam.text(x=[-0.2], y=[OFFSET_Q/SCALE], text=[\"q\"], text_color=\"blue\")\n", - "\n", - "\n", - "# axial force (beam)\n", - "axial_force = models.force_vector(fig_beam, P, L+P/SCALE, L, 0, 0, 'green')\n", - "label_P_force = fig_beam.text(x=[L+P/2/SCALE], y=[OFFSET_Q/SCALE/4], text=[\"P\"], text_color=\"green\")\n", - "\n", - "\n", - "# position point\n", - "pos_opt = dict(\n", - " source=source,\n", - " size=10,\n", - " fill_alpha=0.5,\n", - " fill_color=\"magenta\",\n", - " color=\"magenta\",\n", - " alpha=0.5\n", - ")\n", - "beam_position = fig_beam.circle('x', 'y', **pos_opt)\n", - "forces_position = fig_scheme.circle('xF', 'y', **pos_opt)\n", - "\n", - "\n", - "# beam (scheme)\n", - "scheme_beam = fig_scheme.line('x', 'y', source=source_scheme_beam, line_width=2, color='black')\n", - "scheme_fade_beam = fig_scheme.line(x=[0, L*SCALE], y=[0, 0], line_width=2, color='black', alpha=0.2)\n", - "# uniform load (scheme)\n", - "scheme_u_load = fig_scheme.patch('x', 'y', source=source_scheme_q, fill_color='blue', color='navy',\n", - " fill_alpha=0.3, alpha=0.3)\n", - "scheme_fade_u_load = fig_scheme.patch('x_fade', 'y', source=source_scheme_q, fill_color='blue',\n", - " color='navy', fill_alpha=0.3, alpha=0.3)\n", - "# axial force (scheme)\n", - "scheme_axial_force = models.force_vector(fig_scheme, P, L*SCALE+P, L*SCALE, 0, 0, 'green')\n", - "# Reactions (scheme)\n", - "scheme_Ry_r = models.force_vector(fig_scheme, Ry_r, L*SCALE, L*SCALE, -Ry_r, 0, 'orange')\n", - "scheme_Ry_l = models.force_vector(fig_scheme, Ry_l, 0, 0, -Ry_l, 0, 'orange')\n", - "scheme_Rx_l = models.force_vector(fig_scheme, Rx, -Rx, 0, 0, 0, 'orange')\n", - "# force N\n", - "scheme_N = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# force V\n", - "scheme_V = models.force_vector(fig_scheme, 0, 0, 0, 0, 0, 'red')\n", - "# moment M\n", - "(scheme_M_line, scheme_M_head, source_M) = models.define_curvedArrow(fig_scheme, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# change the uniform load q\n", - "slider_q = Slider(\n", - " title=\"Change the uniform load q [kN/m]\",\n", - " start=0.1,\n", - " end=MAX_Q,\n", - " step=0.1,\n", - " value=q\n", - ")\n", - "\n", - "\n", - "# choose position of interest\n", - "slider_position = Slider(\n", - " title=\"Change the position x along the beam [m]\",\n", - " start=0,\n", - " end=L,\n", - " step=0.02,\n", - " value=L\n", - ")\n", - "\n", - "\n", - "# choose left or right FBD\n", - "div_rg_FBD = Div(text=\"Free-body diagram (FBD):\")\n", - "radiogroup_FBD = RadioButtonGroup(labels=['Right-hand', 'Left-hand'], active=initial_FBD)\n", - "\n", - "\n", - "# choose axial force or not\n", - "div_cb_P = Div(text=f\"Axial force P={P} kN (applied)\")\n", - "checkbox_P = CheckboxButtonGroup(labels=['Apply or remove axial force P'], active=[0])\n", - "\n", - "\n", - "# show values of forces and moments\n", - "div_forces = Div(width=DIV_B_FORCES, \n", - " text=sb.div_text_forces(P, P, Ry_l, Ry_r, \"No cross section analysed.\", 0, 0, 0))\n", - "\n", - "\n", - "# figures for the diagrams\n", - "options_diag = dict(\n", - " toolbar_location=None,\n", - " x_axis_label=\"Position [m]\",\n", - " plot_width=FIG_B_B,\n", - " x_range=fig_beam.x_range\n", - ")\n", - "fig_N = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Axial force\", \"@y kN\")],\n", - " y_axis_label=\"Axial force N [kN]\",\n", - " plot_height=int(FIG_H_B*0.8),\n", - " title=\"N V M Diagrams\")\n", - "fig_V = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Shear force\", \"@y kN\")],\n", - " y_axis_label=\"Shear force V [kN]\",\n", - " plot_height=int(FIG_H_B*0.8))\n", - "fig_M = figure(**options_diag,\n", - " tooltips= [(\"Position\", \"@x m\"),\n", - " (\"Bending moment\", \"@y kNm\")],\n", - " y_axis_label=\"Bending moment M [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "fig_N.xaxis.visible = False\n", - "fig_V.xaxis.visible = False\n", - "\n", - "\n", - "# plot N V M\n", - "N_diag = models.NVM_diagram(fig_N, x_discr, N_discr, L, source_beam)\n", - "V_diag = models.NVM_diagram(fig_V, x_discr, V_discr, L, source_beam)\n", - "M_diag = models.NVM_diagram(fig_M, x_discr, M_discr, L, source_beam)\n", - "\n", - "\n", - "# point that shows the position that it's analyzed\n", - "N_position = fig_N.circle('x', 'N', **pos_opt)\n", - "V_position = fig_V.circle('x', 'V', **pos_opt)\n", - "M_position = fig_M.circle('x', 'M', **pos_opt)\n", - "\n", - "\n", - "# figures for the stresses and strains\n", - "FIG_B_ss = 200\n", - "FIG_H_ss = 200\n", - "options_stress_strain = dict(\n", - " toolbar_location=None,\n", - " y_axis_label=\"Height h [mm]\",\n", - " plot_width=FIG_B_ss,\n", - " plot_height=FIG_H_ss,\n", - ")\n", - "fig_stress_N = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2099 [MPa]\")\n", - "fig_stress_N.yaxis.visible = False\n", - "fig_axial_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Axial strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2099 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_axial_strain.yaxis.visible = False\n", - "fig_stress_M = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending stress and centroid\",\n", - " y_range=fig_stress_N.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA}\\u2098 [MPa]\")\n", - "fig_stress_M.yaxis.visible = False\n", - "fig_bending_strain = figure(**options_stress_strain,\n", - " tooltips= [(\"Strain\", \"@x %\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Bending strain\",\n", - " x_axis_label=\"Strain \\N{GREEK SMALL LETTER EPSILON}\\u2098 [%]\",\n", - " y_range=fig_stress_N.y_range)\n", - "fig_bending_strain.yaxis.visible = False\n", - "fig_stress_V = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Shear stress\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\u1d65 [MPa]\")\n", - "fig_stress_V.yaxis.visible = False\n", - "fig_stress_sigma = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER SIGMA} and neutral axis\",\n", - " y_range=fig_stress_N.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER SIGMA} [MPa]\")\n", - "fig_stress_tau = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Total stress \\N{GREEK SMALL LETTER TAU}\",\n", - " y_range=fig_stress_V.y_range,\n", - " y_axis_location=\"right\",\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU} [MPa]\")\n", - "\n", - "\n", - "# plot stress N V M\n", - "discr_stress_strain = 50\n", - "scale_x = 25\n", - "y_discr = np.linspace(0, h, discr_stress_strain)\n", - "sigma_N = stst.compute_sigma_axial(y_discr, N, A)\n", - "N_stress_diag = models.stress_diagram(fig_stress_N, sigma_N, h,\n", - " source_section_scheme, scale_x=scale_x/10)\n", - "sigma_M = stst.compute_sigma_bending(y_discr, 0, Iy, yG)\n", - "(M_stress_diag, centroid) = models.stress_diagram(fig_stress_M, sigma_M, h,\n", - " source_section_scheme, True, yG, scale_x=scale_x)\n", - "S_rect = beam_section.compute_first_moment_of_area(y_discr, b, h, t, yG)\n", - "tau_V = stst.compute_tau_shear(y_discr, 0, S_rect, Iy, b)\n", - "V_stress_diag = models.stress_diagram(fig_stress_V, tau_V, h, source_section_scheme, scale_x=1)\n", - "\n", - "\n", - "# plot stress sigma and tau\n", - "sigma_total = sigma_M + sigma_N\n", - "(sigma_stress_diag, neutral_axis) = models.stress_diagram(fig_stress_sigma, sigma_total, h,\n", - " source_section_scheme,True, yG, scale_x=scale_x)\n", - "tau_total = tau_V\n", - "tau_stress_diag = models.stress_diagram(fig_stress_tau, tau_total, h,\n", - " source_section_scheme, scale_x=1)\n", - "\n", - "# plot strain N M\n", - "strain_axial = stst.compute_epsilon_axial(y_discr, sigma_N, E)\n", - "axial_strain_diag = models.strain_diagram(fig_axial_strain, strain_axial, h, source_section_scheme)\n", - "strain_bending = stst.compute_epsilon_bending(y_discr, sigma_M, E)\n", - "bending_strain_diag = models.strain_diagram(fig_bending_strain, strain_bending, h, source_section_scheme)\n", - "\n", - "\n", - "# figures for NVM\n", - "fig_NM_section = figure(**options_stress_strain,\n", - " title=\"N and M at position x\",\n", - " match_aspect=True)\n", - "fig_NM_section.axis.visible = False\n", - "fig_NM_section.grid.grid_line_alpha = 0\n", - "\n", - "fig_V_section = figure(**options_stress_strain,\n", - " title=\"V at position x\",\n", - " match_aspect=True)\n", - "fig_V_section.axis.visible = False\n", - "fig_V_section.grid.grid_line_alpha = 0\n", - "\n", - "\n", - "# section with NVM\n", - "models.section_diagram(fig_NM_section)\n", - "models.section_diagram(fig_V_section)\n", - "\n", - "\n", - "# NVM in section\n", - "section_N = models.force_vector(fig_NM_section, 0, 0, 0, 0, 0, 'red')\n", - "section_V = models.force_vector(fig_V_section, 0, 0, 0, 0, 0, 'red')\n", - "(section_M_line, section_M_head, source_section_M) = models.define_curvedArrow(fig_NM_section, 0, 0, 0, size_head=0)\n", - "\n", - "\n", - "# NVM label in section\n", - "OFFSET_N = 1\n", - "label_N_section = fig_NM_section.text(x=[P*1.1], y=[OFFSET_N], text=[\"\"], text_color=\"red\", text_baseline='bottom')\n", - "label_M_section = fig_NM_section.text(x=[OFFSET_N*6], y=[-OFFSET_N*5], text=[\"\"], text_color=\"red\", text_baseline='top')\n", - "label_V_section = fig_V_section.text(x=[OFFSET_N*5], y=[OFFSET_N*4], text=[\"\"], text_color=\"red\", text_baseline='middle')" + "Ry_r = sb.compute_Ry_r(q, L)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Now define the new figures, renderers and widgets:" + "Run the complex code for the interactive visualisation:" ] }, { "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], - "source": [ - "# applied torsion Mt\n", - "str_Mt = \"M\\N{LATIN SUBSCRIPT SMALL LETTER T}\"\n", - "div_cb_T = Div(text=f\"Torsion {str_Mt}={Mt} kNm (applied)\")\n", - "checkbox_T = CheckboxButtonGroup(labels=[f'Apply or remove torsion {str_Mt}'], active=[0])\n", - "\n", - "\n", - "# torsion diagram\n", - "fig_M.plot_height = int(FIG_H_B*0.8)\n", - "fig_M.xaxis.visible = False\n", - "fig_T = figure(**options_diag,\n", - " tooltips= [(\"Position:\", \"@x m\"),\n", - " (\"Torsion:\", \"@y kNm\")],\n", - " y_axis_label=\"Torsion T [kNm]\",\n", - " plot_height=FIG_H_B)\n", - "\n", - "\n", - "# change geometry (thickness)\n", - "slider_t = Slider(\n", - " title=\"Change the thicknes t [mm]\",\n", - " start=2,\n", - " end=MAX_T,\n", - " step=1,\n", - " value=t\n", - ")\n", - "\n", - "\n", - "# plot T\n", - "T_diag = models.NVM_diagram(fig_T, x_discr, T_discr, L, source_beam)\n", - "\n", - "\n", - "# point that shows the position that it's analyzed\n", - "T_position = fig_T.circle('x', 'T', **pos_opt)\n", - "\n", - "\n", - "# figure for the stress tau_T\n", - "fig_stress_T = figure(**options_stress_strain,\n", - " tooltips= [(\"Stress\", \"@x MPa\"),\n", - " (\"Height\", \"@y mm\")],\n", - " title=\"Torsional stress\",\n", - " y_range=fig_stress_V.y_range,\n", - " x_axis_label=\"Stress \\N{GREEK SMALL LETTER TAU}\\N{LATIN SUBSCRIPT SMALL LETTER T} [MPa]\")\n", - "fig_stress_T.yaxis.visible = False\n", - "\n", - "\n", - "# torsion in the section\n", - "(section_torsion_line, section_torsion_head, section_torsion_source) = models.define_curvedArrow(fig_section, 0, T*4/SCALE_T, abs(T*3/SCALE_T), size_head=20)\n", - "\n", - "\n", - "# moment Mt in beam\n", - "PIXEL2UNIT_BEAM = 100\n", - "(beam_torsion_line, beam_torsion_head, source_beam_torsion) = models.define_doubleArrow(fig_beam, L/2, L/2+Mt/SCALE/10, 0, 0,\n", - " arrow_color=\"green\", pixel2unit=PIXEL2UNIT_BEAM)\n", - "# label\n", - "label_Mt_force = fig_beam.text(x=[L/2+Mt/2/SCALE/SCALE_T], y=[OFFSET_Q/4/SCALE/SCALE_T], text=[str_Mt], text_color=\"green\")\n", - "\n", - "\n", - "# add torsion in section stress\n", - "T_DOUBLE_HEAD_SIZE = 10\n", - "(section_T_line, section_T_head, section_T_source) = models.define_doubleArrow(fig_V_section, OFFSET_N*4-T/SCALE_T, OFFSET_N*4, 0, 0, size_head=T_DOUBLE_HEAD_SIZE)\n", - "# label\n", - "label_T_section = fig_V_section.text(x=[Mt*1.1/SCALE_T], y=[OFFSET_N], text=[\"T\"], text_color=\"red\", text_baseline='bottom')\n", - "\n", - "\n", - "# tau stress torsion\n", - "tau_T = beam_section.compute_tau_torsion(y_discr, T, b, h, t)\n", - "T_stress_diag = models.stress_diagram(fig_stress_T, tau_T, h, source_section_scheme, scale_x=1)\n", - "\n", - "# Easter egg\n", - "EasterEgg1 = fig_N.text(x=[2], y=[-4], text=\"\", text_color=\"purple\", text_font_size=\"10px\", angle=math.pi/10)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Configure the logics:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "args_slider_pos = dict(source=source,\n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " s_M=source_M,\n", - " arr_head=scheme_M_head,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section,\n", - " section_T_line=section_T_line,\n", - " section_T_head=section_T_head,\n", - " section_T_source=section_T_source,\n", - " section_torsion_head=section_torsion_head,\n", - " section_torsion_source=section_torsion_source,\n", - " label_T_section=label_T_section,\n", - " div_T=div_cb_T,\n", - " T_stress_diag=T_stress_diag)\n", - "code_slider_pos = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const FBD = db['FBD'][0]\n", - "const pos = cb_obj.value\n", - "const q = db['q'][0]\n", - "const L = db['L'][0]\n", - "const Mt = db['Mt'][0]\n", - "\n", - "// update data\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['T'][0] = compute_T(pos, Mt, L)\n", - "db['x'][0] = pos\n", - "\n", - "// check state\n", - "check_state(db)\n", - "\n", - "// update:\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section)\n", - "update_torsional_stress(db, T_stress_diag)\n", - "\n", - "// apply the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{models.implement_check_stateJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{sb.implement_update_T_sectionJS(scale_T=SCALE_T)}\n", - "{js.implement_update_doubleArrowJS()}\n", - "{sb.implement_compute_TJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "{beam_section.implement_update_torsional_stressJS(discr_stress_strain)}\n", - "\"\"\"\n", - "updade_slider_pos = CustomJS(args=args_slider_pos, code=code_slider_pos)\n", - "\n", - "\n", - "args_slider_b = dict(source=source,\n", - " s_b=source_beam,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " T_stress_diag=T_stress_diag,\n", - " div_P=div_cb_P)\n", - "code_change_b = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const b = cb_obj.value // value of the slider\n", - "const h = db['h'][0]\n", - "const t = db['t'][0]\n", - "const A = compute_area(b, h, t)\n", - "const Iy = compute_inertia_y(b, h, t)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "\n", - "// Easter egg\n", - "const str_Doge = \" such width\"\n", - "const str_tmp = div_P.text\n", - "if (b == {MAX_B}) {{\n", - " div_P.text = str_tmp+str_Doge\n", - "}} else {{\n", - " div_P.text = str_tmp.replace(str_Doge, '')\n", - "}}\n", - "\n", - "// apply the changes\n", - "db['b'][0] = b\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h, t)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_torsional_stress(db, T_stress_diag)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "{beam_section.implement_update_torsional_stressJS(discr_stress_strain)}\n", - "\"\"\"\n", - "update_b = CustomJS(args=args_slider_b, code=code_change_b)\n", - "\n", - "\n", - "args_slider_h = dict(source=source,\n", - " s_b=source_beam,\n", - " s_ss=source_section_scheme,\n", - " div=div_geo, \n", - " section=section,\n", - " support_r=support_r,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " T_stress_diag=T_stress_diag,\n", - " div_T=div_cb_T,\n", - " EE1=EasterEgg1)\n", - "code_change_h = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const data_ss = s_ss.data\n", - "const b = db['b'][0]\n", - "const t = db['t'][0]\n", - "const h = cb_obj.value // value of the slider\n", - "const A = compute_area(b, h, t)\n", - "const Iy = compute_inertia_y(b, h, t)\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "const yG = compute_centroid_y(h)\n", - "\n", - "// Easter egg\n", - "/*const str_Doge = \" much wow\"\n", - "const str_tmp = div_T.text\n", - "if (h == {MAX_H}) {{\n", - " div_T.text = str_tmp+str_Doge\n", - "}} else {{\n", - " div_T.text = str_tmp.replace(str_Doge, '')\n", - "}}*/\n", - "if (h == {MAX_H}) {{\n", - " EE1.glyph.text = \"much wow\"\n", - "}} else {{\n", - " EE1.glyph.text = \"\"\n", - "}}\n", - "\n", - "// apply the changes\n", - "db['h'][0] = h\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h, t)\n", - "db['yG'][0] = yG\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "data_ss['y'][1] = h // change the height of the section in the diagrams\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_torsional_stress(db, T_stress_diag)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_ss.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "{beam_section.implement_update_torsional_stressJS(discr_stress_strain)}\n", - "\"\"\"\n", - "update_h = CustomJS(args=args_slider_h, code=code_change_h)\n", - "\n", - "\n", - "args_checkbox_P = dict(source=source,\n", - " s_M=source_M,\n", - " div_P=div_cb_P,\n", - " div_f=div_forces,\n", - " fP=scheme_axial_force, \n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r, \n", - " fN=scheme_N,\n", - " fV=scheme_V, \n", - " arr_head=scheme_M_head,\n", - " N_diag=N_diag,\n", - " neutral_axis=neutral_axis,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_checkbox_P = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox P\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "\n", - "// apply the changes\n", - "db['P'][0] = {P}*(1-f)\n", - "db['N'][0] = compute_N(db['P'][0])\n", - "db['Rx'][0] = compute_Rx(db['P'][0])\n", - "\n", - "// update\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_N_diagram(db, N_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_compute_RxJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_compute_NJS()}\n", - "{sb.implement_update_N_diagramJS(discr_NVM)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "\"\"\"\n", - "update_checkbox_P = CustomJS(args=args_checkbox_P, code=code_checkbox_P)\n", - "\n", - "\n", - "args_radiogroup_FBD = dict(source=source, \n", - " s_sb=source_scheme_beam,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M, \n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N, \n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " tau_stress_diag=tau_stress_diag)\n", - "code_radiogroup_FBD = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const FBD = cb_obj.active\n", - "const data_sb = s_sb.data\n", - "const data_q = s_q.data\n", - "const pos = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['FBD'][0] = FBD\n", - "\n", - "// update\n", - "check_state(db)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_scheme_position(db, data_sb, data_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "s_sb.change.emit()\n", - "s_q.change.emit()\n", - "\n", - "{models.implement_check_stateJS()}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{sb.implement_update_scheme_positionJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "\"\"\"\n", - "update_radiogroup_FBD = CustomJS(args=args_radiogroup_FBD, code=code_radiogroup_FBD)\n", - "\n", - "\n", - "args_slider_q = dict(source=source,\n", - " s_q=source_scheme_q,\n", - " s_M=source_M,\n", - " div_f=div_forces,\n", - " div_P=div_cb_P,\n", - " fP=scheme_axial_force,\n", - " fRx=scheme_Rx_l,\n", - " fRyl=scheme_Ry_l,\n", - " fRyr=scheme_Ry_r,\n", - " fN=scheme_N,\n", - " fV=scheme_V,\n", - " arr_head=scheme_M_head,\n", - " V_diag=V_diag,\n", - " M_diag=M_diag,\n", - " centroid=centroid,\n", - " neutral_axis=neutral_axis,\n", - " V_stress_diag=V_stress_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " section_N=section_N,\n", - " section_V=section_V,\n", - " section_M_head=section_M_head,\n", - " s_section_M=source_section_M,\n", - " label_N_section=label_N_section,\n", - " label_V_section=label_V_section,\n", - " label_M_section=label_M_section)\n", - "code_slider_q = f\"\"\"\n", - "// retrieve data\n", - "const db = source.data\n", - "const q = cb_obj.value\n", - "const pos = db['x'][0]\n", - "const L = db['L'][0]\n", - "\n", - "// update q\n", - "db['q'][0] = q\n", - "db['V'][0] = compute_V(pos, q, L)\n", - "db['M'][0] = compute_M(pos, q, L)\n", - "db['Ry_l'][0] = compute_Ry_l(q, L)\n", - "db['Ry_r'][0] = compute_Ry_r(q, L)\n", - "\n", - "// update\n", - "update_u_load(db, s_q)\n", - "update_reactions(db, fRx, fRyl, fRyr)\n", - "update_external_forces(db, fP, div_P)\n", - "update_V_diagram(db, V_diag)\n", - "update_M_diagram(db, M_diag)\n", - "update_internal_forces(db, fN, fV, arr_head, s_M)\n", - "update_div_forces(db, div_f)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\n", - "\n", - "// apply changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_arrowJS()}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_parabolaJS()}\n", - "{js.implement_arrow_alphaJS()}\n", - "{js.implement_update_arrowJS()}\n", - "{sb.implement_compute_VJS()}\n", - "{sb.implement_compute_MJS()}\n", - "{sb.implement_compute_Ry_lJS()}\n", - "{sb.implement_compute_Ry_rJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{sb.implement_update_V_diagramJS(discr_NVM)}\n", - "{sb.implement_update_M_diagramJS(discr_NVM)}\n", - "{sb.implement_update_reactionsJS()}\n", - "{sb.implement_update_external_forcesJS()}\n", - "{sb.implement_update_u_loadJS(OFFSET_Q)}\n", - "{sb.implement_update_internal_forcesJS()}\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{beam_section.implement_compute_centroid_yJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{sb.implement_update_div_forcesJS()}\n", - "{js.implement_update_NVM_sectionJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "\"\"\"\n", - "update_slider_q = CustomJS(args=args_slider_q, code=code_slider_q)\n", - "\n", - "\n", - "args_checkbox_T = dict(source=source,\n", - " T_diag=T_diag,\n", - " div_T=div_cb_T,\n", - " label_T_section=label_T_section,\n", - " section_T_line=section_T_line,\n", - " section_T_head=section_T_head,\n", - " section_T_source=section_T_source,\n", - " section_torsion_head=section_torsion_head,\n", - " section_torsion_source=section_torsion_source,\n", - " neutral_axis=neutral_axis,\n", - " sigma_stress_diag=sigma_stress_diag,\n", - " tau_stress_diag=tau_stress_diag,\n", - " T_stress_diag=T_stress_diag)\n", - "code_checkbox_T = f\"\"\"\n", - "// retrieve var from the object that uses callback\n", - "var f = cb_obj.active // checkbox Mt\n", - "if (f.length==0) f = [1]\n", - "const db = source.data\n", - "const L = db['L'][0]\n", - "const x = db['x'][0]\n", - "\n", - "// apply the changes\n", - "db['Mt'][0] = {Mt}*(1-f)\n", - "db['T'][0] = compute_T(x, db['Mt'][0], L)\n", - "\n", - "// update\n", - "update_torsional_stress(db, T_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "update_T_diagram(db, T_diag)\n", - "update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "// declare functions\n", - "{js.implement_update_curvedArrowJS()}\n", - "{js.implement_update_doubleArrowJS()}\n", - "{js.implement_arrow_growthJS()}\n", - "{sb.implement_update_T_sectionJS(scale_T=SCALE_T)}\n", - "{sb.implement_compute_TJS()}\n", - "{sb.implement_update_T_diagramJS(discr_NVM)}\n", - "{js.implement_linspaceJS()}\n", - "{js.implement_update_NVM_diagramJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{beam_section.implement_update_torsional_stressJS(discr_stress_strain)}\n", - "\"\"\"\n", - "update_checkbox_T = CustomJS(args=args_checkbox_T, code=code_checkbox_T)\n", - "\n", - "\n", - "args_slider_t = dict(source=source,\n", - " div=div_geo,\n", - " section=section,\n", - " N_stress_diag=N_stress_diag,\n", - " axial_strain_diag=axial_strain_diag,\n", - " M_stress_diag=M_stress_diag,\n", - " bending_strain_diag=bending_strain_diag,\n", - " centroid=centroid,\n", - " V_stress_diag=V_stress_diag,\n", - " sigma_stress_diag=sigma_stress_diag, \n", - " tau_stress_diag=tau_stress_diag,\n", - " neutral_axis=neutral_axis,\n", - " T_stress_diag=T_stress_diag)\n", - "code_change_t = f\"\"\"\n", - "// retrieve data used\n", - "const db = source.data\n", - "const t = cb_obj.value // value of the slider\n", - "const b = db['b'][0]\n", - "const h = db['h'][0]\n", - "const A = compute_area(b, h, t)\n", - "const Iy = compute_inertia_y(b, h, t)\n", - "const yG = db['yG'][0]\n", - "const N = db['N'][0]\n", - "const M = db['M'][0]\n", - "\n", - "// apply the changes\n", - "db['t'][0] = t\n", - "db['A'][0] = A\n", - "db['Iy'][0] = Iy\n", - "db['Iz'][0] = compute_inertia_z(b, h, t)\n", - "db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\n", - "\n", - "// update\n", - "update_div_geo(db, div)\n", - "update_section(db, section)\n", - "update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\n", - "update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\n", - "update_shear_stress(db, V_stress_diag)\n", - "update_torsional_stress(db, T_stress_diag)\n", - "update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\n", - "\n", - "// emit the changes\n", - "source.change.emit()\n", - "\n", - "{beam_section.implement_update_div_geoJS()}\n", - "{beam_section.implement_update_sectionJS()}\n", - "{beam_section.implement_compute_areaJS()}\n", - "{beam_section.implement_compute_inertia_yJS()}\n", - "{beam_section.implement_compute_inertia_zJS()}\n", - "{stst.implement_compute_neutral_axisJS()}\n", - "{js.implement_update_axial_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_bending_stress_strainJS(discr_stress_strain)}\n", - "{js.implement_update_shear_stressJS(discr_stress_strain, hollow_rectangular_section=True)}\n", - "{js.implement_update_total_stressJS(discr_stress_strain, T_opt=True, hollow_rectangular_section=True)}\n", - "{js.implement_linspaceJS()}\n", - "{stst.implement_compute_epsilon_axialJS()}\n", - "{stst.implement_compute_epsilon_bendingJS()}\n", - "{stst.implement_compute_sigma_axialJS()}\n", - "{js.implement_update_stress_diagramJS()}\n", - "{js.implement_update_strain_diagramJS()}\n", - "{stst.implement_compute_sigma_bendingJS()}\n", - "{stst.implement_compute_total_sigmaJS()}\n", - "{stst.implement_compute_total_tauJS()}\n", - "{beam_section.implement_compute_first_moment_of_areaJS()}\n", - "{beam_section.implement_compute_first_moment_of_area_implicitJS()}\n", - "{stst.implement_compute_tau_shearJS()}\n", - "{beam_section.implement_compute_tau_torsionJS()}\n", - "{beam_section.implement_update_torsional_stressJS(discr_stress_strain)}\n", - "\"\"\"\n", - "update_t = CustomJS(args=args_slider_t, code=code_change_t)\n", - "\n", - "\n", - "\n", - "# apply the logics\n", - "slider_b.js_on_change('value', update_b)\n", - "slider_h.js_on_change('value', update_h)\n", - "slider_position.js_on_change('value', updade_slider_pos)\n", - "checkbox_P.js_on_click(update_checkbox_P)\n", - "radiogroup_FBD.js_on_click(update_radiogroup_FBD)\n", - "slider_q.js_on_change('value', update_slider_q)\n", - "slider_t.js_on_change('value', update_t)\n", - "checkbox_T.js_on_click(update_checkbox_T)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Build the layout and show the figures. Note that the forces in the scheme are updated after moving the position of the point with the slider.\n", - "Note that the value of the forces and moments shown below represents the intensity, thus is always positive. The direction is given by the vector in the scheme." - ] - }, - { - "cell_type": "code", - "execution_count": 12, + "execution_count": 3, "metadata": {}, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "ERROR:bokeh.core.validation.check:E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name. This could either be due to a misspelling or typo, or due to an expected column being missing. : key \"text\" value \"\" [renderer: GlyphRenderer(id='6528', ...)]\n" - ] + "data": { + "text/html": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
\n" + ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "name": "stderr", - "output_type": "stream", - "text": [ - "libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Opening in existing browser session.\n" - ] + "data": { + "application/javascript": [ + "(function(root) {\n", + " function embed_document(root) {\n", + " \n", + " const docs_json = {\"59ecfd77-c705-4c8c-9c88-28bd01828977\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"2086\"}]},\"id\":\"2087\",\"type\":\"Column\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position:\",\"@x m\"],[\"Torsion:\",\"@y kNm\"]]},\"id\":\"1924\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2266\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2196\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2300\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2139\"},\"group\":null,\"major_label_policy\":{\"id\":\"2140\"},\"ticker\":{\"id\":\"1910\"}},\"id\":\"1909\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2301\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1903\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1392\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2172\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2197\",\"type\":\"Selection\"},{\"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\":\"1473\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1905\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2173\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1907\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1397\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1910\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1909\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1912\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2287\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1918\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2174\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Torsion T [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2136\"},\"group\":null,\"major_label_policy\":{\"id\":\"2137\"},\"ticker\":{\"id\":\"1914\"}},\"id\":\"1913\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1391\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2288\",\"type\":\"Selection\"},{\"attributes\":{\"axis\":{\"id\":\"1913\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1916\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1914\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2175\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1361\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2124\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1922\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1917\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1505\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2125\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"1923\"}},\"id\":\"1919\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2176\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1920\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2198\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1508\",\"type\":\"HoverTool\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,0]},\"selected\":{\"id\":\"2206\"},\"selection_policy\":{\"id\":\"2205\"}},\"id\":\"1360\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1921\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2302\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2127\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"1493\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1496\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2177\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2199\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2303\",\"type\":\"Selection\"},{\"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\":\"1923\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1494\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2128\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,-50.0,0]},\"selected\":{\"id\":\"2217\"},\"selection_policy\":{\"id\":\"2216\"}},\"id\":\"1934\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1501\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2289\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1943\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1502\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2290\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1344\"},{\"id\":\"1345\"},{\"id\":\"1346\"},{\"id\":\"1347\"},{\"id\":\"1348\"},{\"id\":\"1349\"},{\"id\":\"1351\"}]},\"id\":\"1352\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1360\"},\"glyph\":{\"id\":\"1361\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1363\"},\"nonselection_glyph\":{\"id\":\"1362\"},\"view\":{\"id\":\"1365\"}},\"id\":\"1364\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"T\"}},\"id\":\"1947\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2243\"},\"group\":null,\"major_label_policy\":{\"id\":\"2244\"},\"ticker\":{\"id\":\"1498\"},\"visible\":false},\"id\":\"1497\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1497\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1500\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2359\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1962\"}],\"center\":[{\"id\":\"1965\"},{\"id\":\"1969\"}],\"height\":200,\"left\":[{\"id\":\"1966\"}],\"renderers\":[{\"id\":\"2041\"},{\"id\":\"2047\"},{\"id\":\"2053\"}],\"title\":{\"id\":\"1953\"},\"toolbar\":{\"id\":\"1978\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1955\"},\"x_scale\":{\"id\":\"1958\"},\"y_range\":{\"id\":\"1556\"},\"y_scale\":{\"id\":\"1960\"}},\"id\":\"1952\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2268\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1363\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1941\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"1372\"}},\"id\":\"1377\",\"type\":\"CDSView\"},{\"attributes\":{\"overlay\":{\"id\":\"1507\"}},\"id\":\"1503\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2360\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1384\"}},\"id\":\"1389\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1506\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2269\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1360\"}},\"id\":\"1365\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1942\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1504\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1362\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2304\",\"type\":\"UnionRenderers\"},{\"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\":\"1576\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1386\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2271\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1368\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2200\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2305\",\"type\":\"Selection\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1367\",\"type\":\"Line\"},{\"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\":\"1507\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1369\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2201\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2272\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1411\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1379\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1381\"},\"nonselection_glyph\":{\"id\":\"1380\"},\"view\":{\"id\":\"1383\"}},\"id\":\"1382\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1917\"},{\"id\":\"1918\"},{\"id\":\"1919\"},{\"id\":\"1920\"},{\"id\":\"1921\"},{\"id\":\"1922\"},{\"id\":\"1924\"}]},\"id\":\"1925\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1375\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1525\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1371\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1373\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1934\"}},\"id\":\"1939\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-12.0,-11.757575757575758,-11.515151515151516,-11.272727272727273,-11.030303030303031,-10.787878787878787,-10.545454545454545,-10.303030303030303,-10.06060606060606,-9.818181818181818,-9.575757575757576,-9.333333333333332,-9.09090909090909,-8.848484848484848,-8.606060606060606,-8.363636363636363,-8.121212121212121,-7.878787878787879,-7.636363636363637,-7.393939393939394,-7.151515151515151,-6.909090909090909,-6.666666666666666,-6.424242424242424,-6.181818181818182,-5.9393939393939394,-5.696969696969697,-5.454545454545454,-5.212121212121212,-4.96969696969697,-4.727272727272727,-4.484848484848484,-4.242424242424242,-4.0,-3.757575757575758,-3.5151515151515156,-3.2727272727272734,-3.0303030303030294,-2.787878787878787,-2.545454545454545,-2.3030303030303028,-2.0606060606060606,-1.8181818181818183,-1.5757575757575761,-1.3333333333333321,-1.09090909090909,-0.8484848484848477,-0.6060606060606055,-0.3636363636363633,-0.1212121212121211,0.1212121212121211,0.3636363636363633,0.6060606060606055,0.8484848484848495,1.0909090909090917,1.333333333333334,1.5757575757575761,1.8181818181818183,2.0606060606060606,2.3030303030303028,2.5454545454545467,2.787878787878789,3.030303030303031,3.2727272727272734,3.5151515151515156,3.757575757575758,4.0,4.242424242424242,4.484848484848484,4.727272727272727,4.969696969696969,5.212121212121211,5.454545454545453,5.696969696969699,5.939393939393941,6.181818181818183,6.424242424242426,6.666666666666668,6.90909090909091,7.151515151515152,7.3939393939393945,7.636363636363637,7.878787878787879,8.121212121212121,8.363636363636363,8.606060606060606,8.848484848484848,9.09090909090909,9.333333333333336,9.575757575757578,9.81818181818182,10.060606060606062,10.303030303030305,10.545454545454547,10.787878787878789,11.030303030303031,11.272727272727273,11.515151515151516,11.757575757575758,12.0,0]},\"selected\":{\"id\":\"2211\"},\"selection_policy\":{\"id\":\"2210\"}},\"id\":\"1372\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2295\"},\"selection_policy\":{\"id\":\"2294\"}},\"id\":\"2183\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1409\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1411\"},\"nonselection_glyph\":{\"id\":\"1410\"},\"view\":{\"id\":\"1413\"}},\"id\":\"1412\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1372\"},\"glyph\":{\"id\":\"1373\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1375\"},\"nonselection_glyph\":{\"id\":\"1374\"},\"view\":{\"id\":\"1377\"}},\"id\":\"1376\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"below\":[{\"id\":\"1596\"}],\"center\":[{\"id\":\"1599\"},{\"id\":\"1603\"}],\"height\":200,\"renderers\":[{\"id\":\"1712\"},{\"id\":\"1718\"},{\"id\":\"1724\"}],\"right\":[{\"id\":\"1600\"}],\"title\":{\"id\":\"1587\"},\"toolbar\":{\"id\":\"1612\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1589\"},\"x_scale\":{\"id\":\"1592\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1594\"}},\"id\":\"1586\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1407\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1937\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1409\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1374\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"T\"],\"x\":[11.000000000000002],\"y\":[1]},\"selected\":{\"id\":\"2345\"},\"selection_policy\":{\"id\":\"2344\"}},\"id\":\"2031\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1941\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1943\"},\"nonselection_glyph\":{\"id\":\"1942\"},\"view\":{\"id\":\"1945\"}},\"id\":\"1944\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending strain\"},\"id\":\"1518\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1489\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1380\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1936\",\"type\":\"Line\"},{\"attributes\":{\"end\":20,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2068\"}]},\"start\":2,\"title\":\"Change the thicknes t [mm]\",\"value\":10},\"id\":\"1933\",\"type\":\"Slider\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1381\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2130\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2178\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1379\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1523\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"1962\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1965\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1404\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2131\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2179\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1947\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1949\"},\"nonselection_glyph\":{\"id\":\"1948\"},\"view\":{\"id\":\"1951\"}},\"id\":\"1950\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1403\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2098 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2240\"},\"group\":null,\"major_label_policy\":{\"id\":\"2241\"},\"ticker\":{\"id\":\"1782\"}},\"id\":\"1527\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1413\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1945\",\"type\":\"CDSView\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2032\",\"type\":\"Text\"},{\"attributes\":{\"below\":[{\"id\":\"1527\"}],\"center\":[{\"id\":\"1530\"},{\"id\":\"1534\"}],\"height\":200,\"left\":[{\"id\":\"1531\"}],\"renderers\":[{\"id\":\"1768\"},{\"id\":\"1774\"},{\"id\":\"1780\"}],\"title\":{\"id\":\"1518\"},\"toolbar\":{\"id\":\"1543\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1520\"},\"x_scale\":{\"id\":\"1523\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1525\"}},\"id\":\"1517\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2133\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1486\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1395\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1951\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2180\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1383\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"2025\"}},\"id\":\"2030\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2292\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1387\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2134\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"T\"}},\"id\":\"1948\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1401\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2181\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2293\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1501\"},{\"id\":\"1502\"},{\"id\":\"1503\"},{\"id\":\"1504\"},{\"id\":\"1505\"},{\"id\":\"1506\"},{\"id\":\"1508\"}]},\"id\":\"1509\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2025\"},\"glyph\":{\"id\":\"2026\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2028\"},\"nonselection_glyph\":{\"id\":\"2027\"},\"view\":{\"id\":\"2030\"}},\"id\":\"2029\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1397\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1399\"},\"nonselection_glyph\":{\"id\":\"1398\"},\"view\":{\"id\":\"1401\"}},\"id\":\"1400\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"T\"}},\"id\":\"1949\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1393\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1398\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1955\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1862\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2294\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1967\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"N\"}},\"id\":\"1399\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1963\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2307\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u209c [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2271\"},\"group\":null,\"major_label_policy\":{\"id\":\"2272\"},\"ticker\":{\"id\":\"1963\"}},\"id\":\"1962\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2274\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2295\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1403\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1405\"},\"nonselection_glyph\":{\"id\":\"1404\"},\"view\":{\"id\":\"1407\"}},\"id\":\"1406\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1958\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2203\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Torsional stress\"},\"id\":\"1953\",\"type\":\"Title\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2293\"},\"selection_policy\":{\"id\":\"2292\"}},\"id\":\"2182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2308\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"M\"}},\"id\":\"1410\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1960\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2275\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"V\"}},\"id\":\"1405\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1520\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2268\"},\"group\":null,\"major_label_policy\":{\"id\":\"2269\"},\"ticker\":{\"id\":\"1967\"},\"visible\":false},\"id\":\"1966\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1527\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1530\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2204\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1215\",\"type\":\"Patch\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1224\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"2111\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2210\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1220\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2112\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2211\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1589\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2114\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"tools\":[{\"id\":\"1570\"},{\"id\":\"1571\"},{\"id\":\"1572\"},{\"id\":\"1573\"},{\"id\":\"1574\"},{\"id\":\"1575\"},{\"id\":\"1577\"}]},\"id\":\"1578\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2115\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"1596\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1599\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1597\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.6},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.6},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1168\",\"type\":\"Rect\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1611\",\"type\":\"HoverTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c3 and neutral axis\"},\"id\":\"1587\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1028\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1592\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1030\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1605\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1594\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2252\"},\"group\":null,\"major_label_policy\":{\"id\":\"2253\"},\"ticker\":{\"id\":\"1597\"}},\"id\":\"1596\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2204\"},\"selection_policy\":{\"id\":\"2203\"}},\"id\":\"2116\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2249\"},\"group\":null,\"major_label_policy\":{\"id\":\"2250\"},\"ticker\":{\"id\":\"1601\"}},\"id\":\"1600\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"1161\"}},\"id\":\"1166\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1600\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1603\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1601\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1179\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2116\"},\"start\":null,\"x_end\":{\"value\":6},\"x_start\":{\"value\":7.0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1180\",\"type\":\"Arrow\"},{\"attributes\":{\"overlay\":{\"id\":\"1033\"}},\"id\":\"1029\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1161\"},\"glyph\":{\"id\":\"1162\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1164\"},\"nonselection_glyph\":{\"id\":\"1163\"},\"view\":{\"id\":\"1166\"}},\"id\":\"1165\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[3.0],\"y\":[0.6]},\"selected\":{\"id\":\"2191\"},\"selection_policy\":{\"id\":\"2190\"}},\"id\":\"1167\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1075\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1609\",\"type\":\"HelpTool\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1183\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1604\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1167\"},\"glyph\":{\"id\":\"1168\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1170\"},\"nonselection_glyph\":{\"id\":\"1169\"},\"view\":{\"id\":\"1172\"}},\"id\":\"1171\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"1610\"}},\"id\":\"1606\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1169\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1607\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1179\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1608\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"blue\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"navy\"},\"height\":{\"value\":0.4},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"navy\"},\"width\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1170\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1027\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1173\"},\"glyph\":{\"id\":\"1174\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1176\"},\"nonselection_glyph\":{\"id\":\"1175\"},\"view\":{\"id\":\"1178\"}},\"id\":\"1177\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"q\"],\"x\":[-0.2],\"y\":[0.4]},\"selected\":{\"id\":\"2193\"},\"selection_policy\":{\"id\":\"2192\"}},\"id\":\"1173\",\"type\":\"ColumnDataSource\"},{\"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\":\"1610\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"1167\"}},\"id\":\"1172\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1227\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"2104\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":60},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1228\",\"type\":\"Arrow\"},{\"attributes\":{\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1174\",\"type\":\"Text\"},{\"attributes\":{\"source\":{\"id\":\"1173\"}},\"id\":\"1178\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1669\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1195\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1197\"},\"nonselection_glyph\":{\"id\":\"1196\"},\"view\":{\"id\":\"1199\"}},\"id\":\"1198\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2336\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1175\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1667\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"blue\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1176\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1224\"},\"group\":null,\"line_color\":{\"value\":\"green\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2103\"},\"start\":null,\"x_end\":{\"value\":60},\"x_start\":{\"value\":70},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1225\",\"type\":\"Arrow\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1668\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1182\"},\"glyph\":{\"id\":\"1183\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1185\"},\"nonselection_glyph\":{\"id\":\"1184\"},\"view\":{\"id\":\"1187\"}},\"id\":\"1186\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1666\"}},\"id\":\"1671\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"P\"],\"x\":[6.5],\"y\":[0.1]},\"selected\":{\"id\":\"2195\"},\"selection_policy\":{\"id\":\"2194\"}},\"id\":\"1182\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1219\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1221\"},\"nonselection_glyph\":{\"id\":\"1220\"},\"view\":{\"id\":\"1223\"}},\"id\":\"1222\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1666\"},\"glyph\":{\"id\":\"1667\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1669\"},\"nonselection_glyph\":{\"id\":\"1668\"},\"view\":{\"id\":\"1671\"}},\"id\":\"1670\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1189\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1182\"}},\"id\":\"1187\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Total stress \\u03c4\"},\"id\":\"1621\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1007\"},\"glyph\":{\"id\":\"1189\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1191\"},\"nonselection_glyph\":{\"id\":\"1190\"},\"view\":{\"id\":\"1193\"}},\"id\":\"1192\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1184\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1190\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2118\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1185\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2052\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1005\"},\"glyph\":{\"id\":\"1213\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1215\"},\"nonselection_glyph\":{\"id\":\"1214\"},\"view\":{\"id\":\"1217\"}},\"id\":\"1216\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1604\"},{\"id\":\"1605\"},{\"id\":\"1606\"},{\"id\":\"1607\"},{\"id\":\"1608\"},{\"id\":\"1609\"},{\"id\":\"1611\"}]},\"id\":\"1612\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1191\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2119\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1193\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1280\"},{\"id\":\"1281\"},{\"id\":\"1282\"},{\"id\":\"1283\"},{\"id\":\"1284\"},{\"id\":\"1285\"},{\"id\":\"1287\"}]},\"id\":\"1288\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1631\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1213\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2121\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1196\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.5},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.5},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1195\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2122\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"blue\",\"hatch_alpha\":0.1,\"hatch_color\":\"navy\",\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1214\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1623\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"1007\"}},\"id\":\"1199\",\"type\":\"CDSView\"},{\"attributes\":{\"below\":[{\"id\":\"1630\"}],\"center\":[{\"id\":\"1633\"},{\"id\":\"1637\"}],\"height\":200,\"renderers\":[{\"id\":\"1730\"},{\"id\":\"1736\"},{\"id\":\"1742\"}],\"right\":[{\"id\":\"1634\"}],\"title\":{\"id\":\"1621\"},\"toolbar\":{\"id\":\"1646\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1623\"},\"x_scale\":{\"id\":\"1626\"},\"y_range\":{\"id\":\"1556\"},\"y_scale\":{\"id\":\"1628\"}},\"id\":\"1620\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"magenta\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"magenta\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"magenta\"},\"size\":{\"value\":10},\"x\":{\"field\":\"xF\"},\"y\":{\"field\":\"y\"}},\"id\":\"1197\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"1206\"}},\"id\":\"1211\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1628\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1202\",\"type\":\"Line\"},{\"attributes\":{\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1201\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"2158\"},\"selection_policy\":{\"id\":\"2157\"}},\"id\":\"1206\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2213\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1635\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1203\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1626\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":0.3,\"fill_color\":\"blue\",\"hatch_alpha\":0.3,\"hatch_color\":\"navy\",\"line_alpha\":0.3,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1219\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"1638\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1207\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2214\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1217\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1630\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1633\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1208\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2277\"},\"group\":null,\"major_label_policy\":{\"id\":\"2278\"},\"ticker\":{\"id\":\"1631\"}},\"id\":\"1630\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1209\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1206\"},\"glyph\":{\"id\":\"1207\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1209\"},\"nonselection_glyph\":{\"id\":\"1208\"},\"view\":{\"id\":\"1211\"}},\"id\":\"1210\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1005\"}},\"id\":\"1223\",\"type\":\"CDSView\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1645\",\"type\":\"HoverTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1227\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2274\"},\"group\":null,\"major_label_policy\":{\"id\":\"2275\"},\"ticker\":{\"id\":\"1635\"}},\"id\":\"1634\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"blue\",\"hatch_alpha\":0.2,\"hatch_color\":\"navy\",\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x_fade\"},\"y\":{\"field\":\"y\"}},\"id\":\"1221\",\"type\":\"Patch\"},{\"attributes\":{\"axis\":{\"id\":\"1634\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1637\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1298\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2223\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1777\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2127\"},\"group\":null,\"major_label_policy\":{\"id\":\"2128\"},\"ticker\":{\"id\":\"1305\"},\"visible\":false},\"id\":\"1304\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2224\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1779\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1791\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2020\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2033\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2324\"},\"selection_policy\":{\"id\":\"2323\"}},\"id\":\"1776\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0.14619883040935672,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2355\"},\"selection_policy\":{\"id\":\"2354\"}},\"id\":\"2037\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2040\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2031\"},\"glyph\":{\"id\":\"2032\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2034\"},\"nonselection_glyph\":{\"id\":\"2033\"},\"view\":{\"id\":\"2036\"}},\"id\":\"2035\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2034\",\"type\":\"Text\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Shear force\",\"@y kN\"]]},\"id\":\"1319\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1787\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1300\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1778\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1795\"}],\"center\":[{\"id\":\"1798\"},{\"id\":\"1802\"},{\"id\":\"1863\"}],\"height\":200,\"left\":[{\"id\":\"1799\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1854\"},{\"id\":\"1873\"},{\"id\":\"1879\"},{\"id\":\"1885\"},{\"id\":\"1891\"}],\"title\":{\"id\":\"1785\"},\"toolbar\":{\"id\":\"1810\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1787\"},\"x_scale\":{\"id\":\"1791\"},\"y_range\":{\"id\":\"1789\"},\"y_scale\":{\"id\":\"1793\"}},\"id\":\"1784\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1302\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"1776\"}},\"id\":\"1781\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2038\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1304\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1307\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1789\",\"type\":\"DataRange1d\"},{\"attributes\":{\"source\":{\"id\":\"2031\"}},\"id\":\"2036\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1305\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"2044\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2046\"},\"nonselection_glyph\":{\"id\":\"2045\"},\"view\":{\"id\":\"2048\"}},\"id\":\"2047\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1313\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2223\"},\"group\":null,\"major_label_policy\":{\"id\":\"2224\"},\"ticker\":{\"id\":\"1796\"},\"visible\":false},\"id\":\"1795\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2037\"},\"glyph\":{\"id\":\"2038\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2040\"},\"nonselection_glyph\":{\"id\":\"2039\"},\"view\":{\"id\":\"2042\"}},\"id\":\"2041\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2190\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2308\"},\"selection_policy\":{\"id\":\"2307\"}},\"id\":\"2225\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2045\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Shear force V [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"2124\"},\"group\":null,\"major_label_policy\":{\"id\":\"2125\"},\"ticker\":{\"id\":\"1309\"}},\"id\":\"1308\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2220\"},\"group\":null,\"major_label_policy\":{\"id\":\"2221\"},\"ticker\":{\"id\":\"1800\"},\"visible\":false},\"id\":\"1799\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"2037\"}},\"id\":\"2042\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"1308\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1311\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2191\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2039\",\"type\":\"Line\"},{\"attributes\":{\"angle\":{\"value\":0.3141592653589793},\"text_color\":{\"value\":\"purple\"},\"text_font_size\":{\"value\":\"10px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2056\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1804\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1795\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1798\",\"type\":\"Grid\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2044\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2280\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N and M at position x\"},\"id\":\"1785\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1317\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1796\",\"type\":\"BasicTicker\"},{\"attributes\":{\"angle\":{\"value\":0.3141592653589793},\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"purple\"},\"text_font_size\":{\"value\":\"10px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2057\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"1312\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1799\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1802\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1318\"}},\"id\":\"1314\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2046\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1315\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1793\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2255\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"below\":[{\"id\":\"1828\"}],\"center\":[{\"id\":\"1831\"},{\"id\":\"1835\"},{\"id\":\"1866\"}],\"height\":200,\"left\":[{\"id\":\"1832\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1860\"},{\"id\":\"1897\"},{\"id\":\"2023\"},{\"id\":\"2029\"},{\"id\":\"2035\"}],\"title\":{\"id\":\"1818\"},\"toolbar\":{\"id\":\"1843\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1820\"},\"x_scale\":{\"id\":\"1824\"},\"y_range\":{\"id\":\"1822\"},\"y_scale\":{\"id\":\"1826\"}},\"id\":\"1817\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1316\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"2048\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1332\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1800\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2050\",\"type\":\"Line\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"T_stress_diag\":{\"id\":\"2041\"},\"V_stress_diag\":{\"id\":\"1694\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div\":{\"id\":\"1107\"},\"div_P\":{\"id\":\"1259\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_b\":{\"id\":\"1003\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"support_r\":{\"id\":\"1099\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const b = cb_obj.value // value of the slider\\n const h = db['h'][0]\\n const t = db['t'][0]\\n const A = compute_area(b, h, t)\\n const Iy = compute_inertia_y(b, h, t)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n\\n // Easter egg\\n const str_Doge = \\\" such width\\\"\\n const str_tmp = div_P.text\\n if (b == 300) {\\n div_P.text = str_tmp+str_Doge\\n } else {\\n div_P.text = str_tmp.replace(str_Doge, '')\\n }\\n\\n // apply the changes\\n db['b'][0] = b\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h, t)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_torsional_stress(db, T_stress_diag)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const t = Math.round(data['t'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n t = `+t+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n const src = glyph_section.data_source\\n const t = data['t'][0]\\n const b = data['b'][0]\\n const h = data['h'][0]\\n src.data.xs = [[[ [b/2, b/2, -b/2, -b/2], [b/2-t, b/2-t, -b/2+t, -b/2+t] ]]]\\n src.data.ys = [[[ [h/2, -h/2, -h/2, h/2], [h/2-t, -h/2+t, -h/2+t, h/2-t] ]]]\\n src.change.emit()\\n }\\n \\n \\n function compute_area(b, h, t) {\\n return b*h - (b-t*2)*(h-2*t)\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12 - (b-2*t)*(h-2*t)**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h, t) {\\n return h*b**3/12 - (h-2*t)*(b-2*t)**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \\n function update_torsional_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const t = data['t'][0]\\n const T = data['T'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_torsion = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_torsion, y_discr)\\n }\\n \\n \"},\"id\":\"2062\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2256\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2319\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2357\"},\"selection_policy\":{\"id\":\"2356\"}},\"id\":\"2049\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2337\",\"type\":\"Selection\"},{\"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\":\"1318\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1808\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2049\"},\"glyph\":{\"id\":\"2050\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2052\"},\"nonselection_glyph\":{\"id\":\"2051\"},\"view\":{\"id\":\"2054\"}},\"id\":\"2053\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1803\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2258\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"angle\":{\"value\":0.3141592653589793},\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"purple\"},\"text_font_size\":{\"value\":\"10px\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2058\",\"type\":\"Text\"},{\"attributes\":{\"overlay\":{\"id\":\"1809\"}},\"id\":\"1805\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1806\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2051\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[2],\"y\":[-4]},\"selected\":{\"id\":\"2208\"},\"selection_policy\":{\"id\":\"2207\"}},\"id\":\"2055\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1807\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2259\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1391\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1393\"},\"nonselection_glyph\":{\"id\":\"1392\"},\"view\":{\"id\":\"1395\"}},\"id\":\"1394\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"2049\"}},\"id\":\"2054\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2192\",\"type\":\"UnionRenderers\"},{\"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\":\"1809\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1384\"},\"glyph\":{\"id\":\"1385\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1387\"},\"nonselection_glyph\":{\"id\":\"1386\"},\"view\":{\"id\":\"1389\"}},\"id\":\"1388\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"2055\"}},\"id\":\"2060\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2281\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2055\"},\"glyph\":{\"id\":\"2056\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2058\"},\"nonselection_glyph\":{\"id\":\"2057\"},\"view\":{\"id\":\"2060\"}},\"id\":\"2059\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2193\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.06060606060606061,0.12121212121212122,0.18181818181818182,0.24242424242424243,0.30303030303030304,0.36363636363636365,0.42424242424242425,0.48484848484848486,0.5454545454545454,0.6060606060606061,0.6666666666666667,0.7272727272727273,0.7878787878787878,0.8484848484848485,0.9090909090909092,0.9696969696969697,1.0303030303030303,1.0909090909090908,1.1515151515151516,1.2121212121212122,1.2727272727272727,1.3333333333333335,1.393939393939394,1.4545454545454546,1.5151515151515151,1.5757575757575757,1.6363636363636365,1.696969696969697,1.7575757575757576,1.8181818181818183,1.878787878787879,1.9393939393939394,2.0,2.0606060606060606,2.121212121212121,2.1818181818181817,2.2424242424242427,2.303030303030303,2.3636363636363638,2.4242424242424243,2.484848484848485,2.5454545454545454,2.606060606060606,2.666666666666667,2.7272727272727275,2.787878787878788,2.8484848484848486,2.909090909090909,2.9696969696969697,3.0303030303030303,3.090909090909091,3.1515151515151514,3.2121212121212124,3.272727272727273,3.3333333333333335,3.393939393939394,3.4545454545454546,3.515151515151515,3.5757575757575757,3.6363636363636367,3.6969696969696972,3.757575757575758,3.8181818181818183,3.878787878787879,3.9393939393939394,4.0,4.0606060606060606,4.121212121212121,4.181818181818182,4.242424242424242,4.303030303030303,4.363636363636363,4.424242424242425,4.484848484848485,4.545454545454546,4.606060606060606,4.666666666666667,4.7272727272727275,4.787878787878788,4.848484848484849,4.909090909090909,4.96969696969697,5.03030303030303,5.090909090909091,5.151515151515151,5.212121212121212,5.2727272727272725,5.333333333333334,5.3939393939393945,5.454545454545455,5.515151515151516,5.575757575757576,5.636363636363637,5.696969696969697,5.757575757575758,5.818181818181818,5.878787878787879,5.9393939393939394,6.0,6],\"y\":[0,-0.0,-0.7199265381083563,-1.4251606978879707,-2.115702479338843,-2.7915518824609737,-3.452708907254362,-4.099173553719009,-4.730945821854913,-5.348025711662076,-5.950413223140496,-6.5381083562901745,-7.111111111111112,-7.669421487603306,-8.213039485766759,-8.74196510560147,-9.25619834710744,-9.755739210284665,-10.240587695133149,-10.710743801652892,-11.166207529843895,-11.606978879706153,-12.03305785123967,-12.444444444444445,-12.841138659320476,-13.223140495867767,-13.590449954086317,-13.943067033976122,-14.28099173553719,-14.604224058769512,-14.912764003673093,-15.206611570247935,-15.485766758494032,-15.750229568411386,-16.0,-16.235078053259873,-16.455463728191,-16.661157024793386,-16.852157943067034,-17.02846648301194,-17.1900826446281,-17.33700642791552,-17.469237832874196,-17.58677685950413,-17.689623507805326,-17.77777777777778,-17.85123966942149,-17.910009182736456,-17.95408631772268,-17.983471074380166,-17.99816345270891,-17.99816345270891,-17.983471074380166,-17.95408631772268,-17.910009182736456,-17.85123966942149,-17.77777777777778,-17.689623507805326,-17.58677685950413,-17.469237832874196,-17.33700642791552,-17.1900826446281,-17.028466483011936,-16.852157943067034,-16.661157024793386,-16.455463728191,-16.235078053259873,-16.0,-15.750229568411386,-15.485766758494032,-15.206611570247935,-14.912764003673095,-14.604224058769514,-14.280991735537192,-13.943067033976122,-13.590449954086315,-13.223140495867765,-12.841138659320475,-12.444444444444443,-12.033057851239668,-11.606978879706151,-11.166207529843893,-10.710743801652892,-10.240587695133149,-9.755739210284665,-9.25619834710744,-8.741965105601471,-8.21303948576676,-7.669421487603308,-7.111111111111105,-6.538108356290169,-5.950413223140491,-5.348025711662071,-4.730945821854909,-4.099173553719005,-3.452708907254359,-2.791551882460971,-2.1157024793388413,-1.4251606978879694,-0.7199265381083556,0.0,0]},\"selected\":{\"id\":\"2214\"},\"selection_policy\":{\"id\":\"2213\"}},\"id\":\"1384\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"T_stress_diag\":{\"id\":\"2041\"},\"V_stress_diag\":{\"id\":\"1694\"},\"arr_head\":{\"id\":\"1253\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div_P\":{\"id\":\"1259\"},\"div_T\":{\"id\":\"1899\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_T_section\":{\"id\":\"2035\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_T_head\":{\"id\":\"2029\"},\"section_T_line\":{\"id\":\"2023\"},\"section_T_source\":{\"id\":\"2018\"},\"section_V\":{\"id\":\"1866\"},\"section_torsion_head\":{\"id\":\"1997\"},\"section_torsion_source\":{\"id\":\"1986\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const FBD = db['FBD'][0]\\n const pos = cb_obj.value\\n const q = db['q'][0]\\n const L = db['L'][0]\\n const Mt = db['Mt'][0]\\n\\n // update data\\n db['N'][0] = compute_N(db['P'][0])\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['T'][0] = compute_T(pos, Mt, L)\\n db['x'][0] = pos\\n\\n // check state\\n check_state(db)\\n\\n // update:\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section)\\n update_torsional_stress(db, T_stress_diag)\\n\\n // apply the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n // declare functions\\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function update_T_section(data, head_T_curved, source_T_curved, line_T, head_T, source_T, div_T, label_T_section, offset_T=4, pixel2unit=10, scale_T=10) {\\n const Mt = data['Mt'][0]\\n const T = data['T'][0]\\n \\n if (T > 0) {\\n update_doubleArrow(offset_T, offset_T+T/scale_T, 0, 0, source_T, head_T)\\n } else {\\n update_doubleArrow(offset_T-T/scale_T, offset_T, 0, 0, source_T, head_T)\\n }\\n \\n // update visibility\\n if (Mt==0) {\\n div_T.text = \\\"Torsion Mt=0 kNm (removed)\\\"\\n line_T.glyph.line_alpha = 0 // T\\n head_T.glyph.line_alpha = 0\\n head_T.glyph.fill_alpha = 0\\n // T in cross-section\\n update_curvedArrow(0, 0, 0, 0, 0, source_T_curved, head_T_curved)\\n } else {\\n div_T.text = \\\"Torsion Mt=\\\"+Mt+\\\" kNm (applied)\\\"\\n line_T.glyph.line_alpha = 1 // T\\n head_T.glyph.line_alpha = 1\\n head_T.glyph.fill_alpha = 1\\n // T in cross-section\\n update_curvedArrow(0, T*4/scale_T, Math.abs(T*3/scale_T), 0, 0, source_T_curved, head_T_curved)\\n }\\n \\n if (T==0) {\\n label_T_section.glyph.text=''\\n } else {\\n label_T_section.glyph.text='T'\\n }\\n }\\n \\n \\n function update_doubleArrow(x_start, x_end, y_start, y_end, source, arr_heads, AHF=6, pixel2unit=10) {\\n // compute the angle of the line\\n const delta_x = x_end-x_start\\n const delta_y = y_end-y_start\\n if (delta_x==0) {\\n if (delta_y > 0) {\\n var theta = Math.PI/2\\n } else {\\n var theta = Math.PI*3/2\\n }\\n } else if (delta_x > 0) {\\n var theta = Math.atan(delta_y/delta_x)\\n } else {\\n var theta = Math.atan(delta_y/delta_x)+Math.PI\\n }\\n \\n // head adjust\\n const length_arr = Math.sqrt(delta_x**2 + delta_y**2)\\n const size_head = arrow_growth(length_arr)*AHF\\n const head_x = size_head/pixel2unit*Math.cos(theta)\\n const head_y = size_head/pixel2unit*Math.sin(theta)\\n \\n // update line\\n const data_line = source.data\\n data_line['x'] = [x_start, x_end]\\n data_line['y'] = [y_start, y_end]\\n source.change.emit()\\n \\n // heads\\n arr_heads.glyph.size = size_head\\n arr_heads.glyph.angle = theta+Math.PI/6\\n //arr_heads.glyph.x = [x_end-head_x/2, x_end-head_x/2*3]\\n //arr_heads.glyph.y = [y_end-head_y/2, y_end-head_y/2*3]\\n const source_h = arr_heads.data_source\\n source_h.data['x'] = [x_end-head_x/2, x_end-head_x/2*3]\\n source_h.data['y'] = [y_end-head_y/2, y_end-head_y/2*3]\\n source_h.change.emit()\\n }\\n \\n \\n function compute_T(x, Mt, L) {\\n if (xGeometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n t = `+t+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n const src = glyph_section.data_source\\n const t = data['t'][0]\\n const b = data['b'][0]\\n const h = data['h'][0]\\n src.data.xs = [[[ [b/2, b/2, -b/2, -b/2], [b/2-t, b/2-t, -b/2+t, -b/2+t] ]]]\\n src.data.ys = [[[ [h/2, -h/2, -h/2, h/2], [h/2-t, -h/2+t, -h/2+t, h/2-t] ]]]\\n src.change.emit()\\n }\\n \\n \\n function compute_area(b, h, t) {\\n return b*h - (b-t*2)*(h-2*t)\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12 - (b-2*t)*(h-2*t)**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h, t) {\\n return h*b**3/12 - (h-2*t)*(b-2*t)**3/12\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \\n function update_torsional_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const t = data['t'][0]\\n const T = data['T'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_torsion = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_torsion, y_discr)\\n }\\n \\n \"},\"id\":\"2063\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2339\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"N_diag\":{\"id\":\"1364\"},\"N_stress_diag\":{\"id\":\"1658\"},\"arr_head\":{\"id\":\"1253\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"div_P\":{\"id\":\"1259\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox P\\n if (f.length==0) f = [1]\\n const db = source.data\\n\\n // apply the changes\\n db['P'][0] = 10*(1-f)\\n db['N'][0] = compute_N(db['P'][0])\\n db['Rx'][0] = compute_Rx(db['P'][0])\\n\\n // update\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_N_diagram(db, N_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function compute_Rx(P) {\\n return P\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_N(P) {\\n return -P\\n }\\n \\n \\n function update_N_diagram(data, glyph, discr=100) {\\n const P = data['P'][0]\\n const N_discr = Array.from({length: discr}, (_, i) => compute_N(P))\\n update_NVM_diagram(glyph, N_discr)\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \"},\"id\":\"2064\",\"type\":\"CustomJS\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2297\"},\"selection_policy\":{\"id\":\"2296\"}},\"id\":\"1850\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2227\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"args\":{\"arr_head\":{\"id\":\"1253\"},\"div_P\":{\"id\":\"1259\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_sb\":{\"id\":\"1004\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const FBD = cb_obj.active\\n const data_sb = s_sb.data\\n const data_q = s_q.data\\n const pos = db['x'][0]\\n\\n // apply the changes\\n db['FBD'][0] = FBD\\n\\n // update\\n check_state(db)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_scheme_position(db, data_sb, data_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n\\n // emit the changes\\n source.change.emit()\\n s_sb.change.emit()\\n s_q.change.emit()\\n\\n \\n function check_state(data) {\\n const FBD = data['FBD'][0]\\n const pos = data['x'][0]\\n const L = data['L'][0]\\n if (FBD == 0 && pos != L) {\\n data['state'][0] = 'R_SEC'\\n } else if (FBD == 1 && pos != 0) {\\n data['state'][0] = 'L_SEC'\\n } else {\\n data['state'][0] = 'IDLE'\\n }\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_scheme_position(data, data_scheme_beam, data_scheme_q) {\\n const L = data['L'][0]*data['SCALE'][0]\\n const pos = data['x'][0]*data['SCALE'][0]\\n \\n // move position of the point\\n data['xF'][0] = pos\\n \\n switch(data['state'][0]) {\\n case 'IDLE':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = L\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = L\\n data_scheme_q['x'][3] = L\\n break\\n case 'R_SEC':\\n // beam\\n data_scheme_beam['x'][0] = 0\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = 0\\n data_scheme_q['x'][1] = 0\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n case 'L_SEC':\\n // beam\\n data_scheme_beam['x'][0] = L\\n data_scheme_beam['x'][1] = pos\\n // unif load\\n data_scheme_q['x'][0] = L\\n data_scheme_q['x'][1] = L\\n data_scheme_q['x'][2] = pos\\n data_scheme_q['x'][3] = pos\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \"},\"id\":\"2065\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2296\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1850\"}},\"id\":\"1855\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2228\",\"type\":\"AllLabels\"},{\"attributes\":{\"args\":{\"M_diag\":{\"id\":\"1388\"},\"M_stress_diag\":{\"id\":\"1676\"},\"V_diag\":{\"id\":\"1376\"},\"V_stress_diag\":{\"id\":\"1694\"},\"arr_head\":{\"id\":\"1253\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div_P\":{\"id\":\"1259\"},\"div_f\":{\"id\":\"1261\"},\"fN\":{\"id\":\"1237\"},\"fP\":{\"id\":\"1225\"},\"fRx\":{\"id\":\"1234\"},\"fRyl\":{\"id\":\"1231\"},\"fRyr\":{\"id\":\"1228\"},\"fV\":{\"id\":\"1240\"},\"label_M_section\":{\"id\":\"1891\"},\"label_N_section\":{\"id\":\"1885\"},\"label_V_section\":{\"id\":\"1897\"},\"neutral_axis\":{\"id\":\"1724\"},\"s_M\":{\"id\":\"1242\"},\"s_q\":{\"id\":\"1005\"},\"s_section_M\":{\"id\":\"1868\"},\"section_M_head\":{\"id\":\"1879\"},\"section_N\":{\"id\":\"1863\"},\"section_V\":{\"id\":\"1866\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data\\n const db = source.data\\n const q = cb_obj.value\\n const pos = db['x'][0]\\n const L = db['L'][0]\\n\\n // update q\\n db['q'][0] = q\\n db['V'][0] = compute_V(pos, q, L)\\n db['M'][0] = compute_M(pos, q, L)\\n db['Ry_l'][0] = compute_Ry_l(q, L)\\n db['Ry_r'][0] = compute_Ry_r(q, L)\\n\\n // update\\n update_u_load(db, s_q)\\n update_reactions(db, fRx, fRyl, fRyr)\\n update_external_forces(db, fP, div_P)\\n update_V_diagram(db, V_diag)\\n update_M_diagram(db, M_diag)\\n update_internal_forces(db, fN, fV, arr_head, s_M)\\n update_div_forces(db, div_f)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_NVM_section(db, section_N, section_V, section_M_head, s_section_M, label_N_section, label_V_section, label_M_section)\\n\\n // apply changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function parabola(x, a1, a2, a3) {\\n return Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a2 * x[i] + a1);\\n }\\n \\n \\n function arrow_alpha(straight_arrow, alpha=1) {\\n straight_arrow.end.line_alpha = alpha\\n straight_arrow.end.fill_alpha = alpha\\n straight_arrow.line_alpha = alpha\\n }\\n \\n \\n function update_arrow(straight_arrow, intensity, x_start=0, x_end=0, y_start=0, y_end=0, AHF=7) {\\n straight_arrow.end.size = arrow_growth(intensity)*AHF\\n straight_arrow.x_start = x_start\\n straight_arrow.x_end = x_end\\n straight_arrow.y_start = y_start\\n straight_arrow.y_end = y_end\\n straight_arrow.line_width = arrow_growth(intensity)\\n }\\n \\n \\n function compute_V(x, q, L) {\\n return q*x-q*L/2\\n }\\n \\n \\n function compute_M(x, q, L) {\\n return q*x/2*(x-L)\\n }\\n \\n \\n function compute_Ry_l(q, L) {\\n return q*L/2\\n }\\n \\n \\n function compute_Ry_r(q, L) {\\n return q*L/2\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_V_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const V_discr = Array.from({length: discr}, (_, i) => compute_V(x[i], q, L))\\n update_NVM_diagram(glyph, V_discr)\\n }\\n \\n \\n function update_M_diagram(data, glyph, discr=100) {\\n const L = data['L'][0]\\n const q = data['q'][0]\\n const x = linspace(0, L, 100)\\n const M_discr = Array.from({length: discr}, (_, i) => compute_M(x[i], q, L))\\n update_NVM_diagram(glyph, M_discr)\\n }\\n \\n \\n function update_reactions(data, glyph_Rx, glyph_Ry_l, glyph_Ry_r, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n const Ry_l = data['Ry_l'][0]\\n const Ry_r = data['Ry_r'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_Rx) // Rx\\n arrow_alpha(glyph_Ry_l) // Ry left\\n arrow_alpha(glyph_Ry_r) // Ry right\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_Rx, 1) // Rx\\n arrow_alpha(glyph_Ry_l, 1) // Ry left\\n arrow_alpha(glyph_Ry_r, alpha) // Ry right\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_Rx, alpha) //Rx\\n arrow_alpha(glyph_Ry_l, alpha) //Ry left\\n arrow_alpha(glyph_Ry_r, 1) // Ry right\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n update_arrow(glyph_Rx, -P, -P, 0, 0, 0) // Rx\\n update_arrow(glyph_Ry_r, Ry_r, L, L, -Ry_r, 0) // Ry right\\n update_arrow(glyph_Ry_l, Ry_l, 0, 0, -Ry_l, 0) // Ry left\\n }\\n \\n \\n function update_external_forces(data, glyph_P, div_P, alpha=0.3) {\\n const P = data['P'][0]\\n const L = data['L'][0]*data['SCALE'][0]\\n \\n // update visibility\\n switch(data['state'][0]) {\\n case 'IDLE':\\n arrow_alpha(glyph_P) // P\\n break\\n case 'R_SEC':\\n arrow_alpha(glyph_P, alpha) // P\\n break\\n case 'L_SEC':\\n arrow_alpha(glyph_P, 1) //P\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n \\n // update size\\n if (P==0) {\\n div_P.text = \\\"Axial force P=0 kN (removed)\\\"\\n update_arrow(glyph_P) // P\\n } else {\\n div_P.text = \\\"Axial force P=\\\"+P+\\\" kN (applied)\\\"\\n update_arrow(glyph_P, P, L+P, L, 0, 0) // P\\n }\\n }\\n \\n \\n function update_u_load(data, source_q, OFFSET_Q=4) {\\n const q = data['q'][0]\\n source_q.data['y'][1] = OFFSET_Q+q\\n source_q.data['y'][2] = OFFSET_Q+q\\n source_q.change.emit()\\n }\\n \\n \\n function update_internal_forces(data, glyph_N, glyph_V, glyph_M_head, source_M, lambda=0.25, offset_N=1.5, offset_V=1) {\\n const pos = data['x'][0]\\n const SCALE = data['SCALE'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n switch(data['state'][0]) {\\n case 'IDLE':\\n // internal forces\\n update_arrow(glyph_N)\\n update_arrow(glyph_V)\\n update_curvedArrow(0, 0, 0, 0, 0, source_M, glyph_M_head)\\n break;\\n case 'R_SEC':\\n // internal forces\\n update_arrow(glyph_N, -N, pos*SCALE-N+offset_N, pos*SCALE+offset_N, 0, 0)\\n update_arrow(glyph_V, -V, pos*SCALE+offset_V, pos*SCALE+offset_V, -V/2, V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n case 'L_SEC':\\n // internal forces\\n update_arrow(glyph_N, N, pos*SCALE+N-offset_N, pos*SCALE-offset_N, 0, 0)\\n update_arrow(glyph_V, V, pos*SCALE-offset_V, pos*SCALE-offset_V, V/2, -V/2)\\n var b = -6\\n var c = -M/2*0.8\\n var a = b+lambda*c\\n update_curvedArrow(a, b, c, pos*SCALE, 0, source_M, glyph_M_head)\\n break;\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n }\\n \\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_centroid_y(h) {\\n return h/2\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_div_forces(data, div) {\\n switch(data['state'][0]) {\\n case 'IDLE':\\n var str_sec = \\\"No cross section analysed.\\\"\\n break\\n case 'R_SEC':\\n case 'L_SEC':\\n var str_sec = \\\"Cross section at \\\"+Math.round(data['x'][0]*10)/10+\\\" m.\\\"\\n break\\n default:\\n console.error(\\\"State \\\"+data['state'][0]+\\\" in state machine not implemented\\\")\\n }\\n const P = data['P'][0]\\n const Rx = data['Rx'][0]\\n const Ry_l = Math.round(data['Ry_l'][0]*10)/10\\n const Ry_r = Math.round(data['Ry_r'][0]*10)/10\\n const N = Math.abs(data['N'][0])\\n const V = Math.round(Math.abs(data['V'][0])*10)/10\\n const M = Math.round(data['M'][0]*10)/10\\n \\n div.text = `\\n

Forces and Moments:

\\n P = `+P+` kN
\\n Rx = `+Rx+` kN
\\n Ry (left) = `+Ry_r+` kN
\\n Ry (right) = `+Ry_l+` kN
\\n `+str_sec+`
\\n N = `+N+` kN
\\n V = `+V+` kN
\\n M = `+M+` kNm\\n \\n ` \\n }\\n \\n \\n function update_NVM_section(data, glyph_N, glyph_V, glyph_M_head, source_M, label_N_section, label_V_section, label_M_section, lambda=0.25, offset_N=1.5, offset_V=2) {\\n const x = 0\\n const y = 0\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const M = data['M'][0]\\n \\n update_arrow(glyph_N, -N, x-N+offset_N, x+offset_N, y, y)\\n update_arrow(glyph_V, -V, x+offset_V, x+offset_V, y-V/2, y+V/2)\\n var b = 6\\n var c = -M/2*0.8\\n var a = b-lambda*c\\n update_curvedArrow(a, b, c, x, y, source_M, glyph_M_head)\\n \\n if (N==0) {\\n label_N_section.glyph.text=''\\n } else {\\n label_N_section.glyph.text='N'\\n }\\n \\n if (V==0) {\\n label_V_section.glyph.text=''\\n } else {\\n label_V_section.glyph.text='V'\\n }\\n \\n if (M==0) {\\n label_M_section.glyph.text=''\\n } else {\\n label_M_section.glyph.text='M'\\n }\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \"},\"id\":\"2066\",\"type\":\"CustomJS\"},{\"attributes\":{\"tools\":[{\"id\":\"1312\"},{\"id\":\"1313\"},{\"id\":\"1314\"},{\"id\":\"1315\"},{\"id\":\"1316\"},{\"id\":\"1317\"},{\"id\":\"1319\"}]},\"id\":\"1320\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2297\",\"type\":\"Selection\"},{\"attributes\":{\"args\":{\"T_diag\":{\"id\":\"1938\"},\"T_stress_diag\":{\"id\":\"2041\"},\"div_T\":{\"id\":\"1899\"},\"label_T_section\":{\"id\":\"2035\"},\"neutral_axis\":{\"id\":\"1724\"},\"section_T_head\":{\"id\":\"2029\"},\"section_T_line\":{\"id\":\"2023\"},\"section_T_source\":{\"id\":\"2018\"},\"section_torsion_head\":{\"id\":\"1997\"},\"section_torsion_source\":{\"id\":\"1986\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve var from the object that uses callback\\n var f = cb_obj.active // checkbox Mt\\n if (f.length==0) f = [1]\\n const db = source.data\\n const L = db['L'][0]\\n const x = db['x'][0]\\n\\n // apply the changes\\n db['Mt'][0] = 100*(1-f)\\n db['T'][0] = compute_T(x, db['Mt'][0], L)\\n\\n // update\\n update_torsional_stress(db, T_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n update_T_diagram(db, T_diag)\\n update_T_section(db, section_torsion_head, section_torsion_source, section_T_line, section_T_head, section_T_source, div_T, label_T_section)\\n\\n // emit the changes\\n source.change.emit()\\n\\n // declare functions\\n \\n function update_curvedArrow(a, b, c, pos_x, pos_y, source, arr_head, discr=10, AHF=6) {\\n const data_M = source.data\\n if (c==0) {\\n var a1 = 0\\n var a3 = 0\\n } else {\\n var a1 = b\\n var a3 = (a-b)/c**2\\n }\\n const step = 2*c / (discr-1);\\n const x = Array.from({length: discr}, (_, i) => -c + step * i);\\n const y = Array.from({length: x.length}, (_, i) => a3 * x[i]**2 + a1)\\n var theta = -Math.atan(2/c*(a-b))\\n if (c<0) {\\n theta = theta+Math.PI\\n }\\n data_M['x'] = y.map(y => y+pos_x)\\n data_M['y'] = x.map(x => x+pos_y)\\n \\n arr_head.glyph.size = arrow_growth(2*c)*AHF\\n arr_head.glyph.angle = theta\\n arr_head.glyph.x = y[y.length-1]+pos_x\\n arr_head.glyph.y = x[x.length-1]+pos_y\\n source.change.emit()\\n }\\n \\n \\n function update_doubleArrow(x_start, x_end, y_start, y_end, source, arr_heads, AHF=6, pixel2unit=10) {\\n // compute the angle of the line\\n const delta_x = x_end-x_start\\n const delta_y = y_end-y_start\\n if (delta_x==0) {\\n if (delta_y > 0) {\\n var theta = Math.PI/2\\n } else {\\n var theta = Math.PI*3/2\\n }\\n } else if (delta_x > 0) {\\n var theta = Math.atan(delta_y/delta_x)\\n } else {\\n var theta = Math.atan(delta_y/delta_x)+Math.PI\\n }\\n \\n // head adjust\\n const length_arr = Math.sqrt(delta_x**2 + delta_y**2)\\n const size_head = arrow_growth(length_arr)*AHF\\n const head_x = size_head/pixel2unit*Math.cos(theta)\\n const head_y = size_head/pixel2unit*Math.sin(theta)\\n \\n // update line\\n const data_line = source.data\\n data_line['x'] = [x_start, x_end]\\n data_line['y'] = [y_start, y_end]\\n source.change.emit()\\n \\n // heads\\n arr_heads.glyph.size = size_head\\n arr_heads.glyph.angle = theta+Math.PI/6\\n //arr_heads.glyph.x = [x_end-head_x/2, x_end-head_x/2*3]\\n //arr_heads.glyph.y = [y_end-head_y/2, y_end-head_y/2*3]\\n const source_h = arr_heads.data_source\\n source_h.data['x'] = [x_end-head_x/2, x_end-head_x/2*3]\\n source_h.data['y'] = [y_end-head_y/2, y_end-head_y/2*3]\\n source_h.change.emit()\\n }\\n \\n \\n function arrow_growth(variable) {\\n return Math.log(Math.abs(variable)+1)\\n }\\n \\n \\n function update_T_section(data, head_T_curved, source_T_curved, line_T, head_T, source_T, div_T, label_T_section, offset_T=4, pixel2unit=10, scale_T=10) {\\n const Mt = data['Mt'][0]\\n const T = data['T'][0]\\n \\n if (T > 0) {\\n update_doubleArrow(offset_T, offset_T+T/scale_T, 0, 0, source_T, head_T)\\n } else {\\n update_doubleArrow(offset_T-T/scale_T, offset_T, 0, 0, source_T, head_T)\\n }\\n \\n // update visibility\\n if (Mt==0) {\\n div_T.text = \\\"Torsion Mt=0 kNm (removed)\\\"\\n line_T.glyph.line_alpha = 0 // T\\n head_T.glyph.line_alpha = 0\\n head_T.glyph.fill_alpha = 0\\n // T in cross-section\\n update_curvedArrow(0, 0, 0, 0, 0, source_T_curved, head_T_curved)\\n } else {\\n div_T.text = \\\"Torsion Mt=\\\"+Mt+\\\" kNm (applied)\\\"\\n line_T.glyph.line_alpha = 1 // T\\n head_T.glyph.line_alpha = 1\\n head_T.glyph.fill_alpha = 1\\n // T in cross-section\\n update_curvedArrow(0, T*4/scale_T, Math.abs(T*3/scale_T), 0, 0, source_T_curved, head_T_curved)\\n }\\n \\n if (T==0) {\\n label_T_section.glyph.text=''\\n } else {\\n label_T_section.glyph.text='T'\\n }\\n }\\n \\n \\n function compute_T(x, Mt, L) {\\n if (x compute_T(x[i], Mt, L))\\n update_NVM_diagram(glyph, T_discr)\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function update_NVM_diagram(diagram, y) {\\n const y_ = [...y]\\n const source = diagram.data_source\\n y_.unshift(0)\\n y_.push(0)\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_torsional_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const t = data['t'][0]\\n const T = data['T'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_torsion = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_torsion, y_discr)\\n }\\n \\n \"},\"id\":\"2067\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2194\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2229\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1837\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Bending moment\",\"@y kNm\"]]},\"id\":\"1351\",\"type\":\"HoverTool\"},{\"attributes\":{\"args\":{\"M_stress_diag\":{\"id\":\"1676\"},\"N_stress_diag\":{\"id\":\"1658\"},\"T_stress_diag\":{\"id\":\"2041\"},\"V_stress_diag\":{\"id\":\"1694\"},\"axial_strain_diag\":{\"id\":\"1748\"},\"bending_strain_diag\":{\"id\":\"1768\"},\"centroid\":{\"id\":\"1688\"},\"div\":{\"id\":\"1107\"},\"neutral_axis\":{\"id\":\"1724\"},\"section\":{\"id\":\"1105\"},\"sigma_stress_diag\":{\"id\":\"1712\"},\"source\":{\"id\":\"1007\"},\"tau_stress_diag\":{\"id\":\"1730\"}},\"code\":\"\\n // retrieve data used\\n const db = source.data\\n const t = cb_obj.value // value of the slider\\n const b = db['b'][0]\\n const h = db['h'][0]\\n const A = compute_area(b, h, t)\\n const Iy = compute_inertia_y(b, h, t)\\n const yG = db['yG'][0]\\n const N = db['N'][0]\\n const M = db['M'][0]\\n\\n // apply the changes\\n db['t'][0] = t\\n db['A'][0] = A\\n db['Iy'][0] = Iy\\n db['Iz'][0] = compute_inertia_z(b, h, t)\\n db['y_n_axis'][0] = compute_neutral_axis(N, A, Iy, M, yG)\\n\\n // update\\n update_div_geo(db, div)\\n update_section(db, section)\\n update_axial_stress_strain(db, N_stress_diag, axial_strain_diag)\\n update_bending_stress_strain(db, M_stress_diag, bending_strain_diag, centroid)\\n update_shear_stress(db, V_stress_diag)\\n update_torsional_stress(db, T_stress_diag)\\n update_total_stress(db, sigma_stress_diag, tau_stress_diag, neutral_axis)\\n\\n // emit the changes\\n source.change.emit()\\n\\n \\n function update_div_geo(data, div) {\\n // compute the parameters and dimensions\\n const L = Math.round(data['L'][0]*10)/10\\n const b = Math.round(data['b'][0])\\n const h = Math.round(data['h'][0])\\n const t = Math.round(data['t'][0])\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const Iz = data['Iz'][0]\\n // change the div text\\n div.text = `\\n

Geometrical and mechanical parameters:

\\n h = `+h+` mm
\\n b = `+b+` mm
\\n t = `+t+` mm
\\n L = `+L+` m
\\n A = `+A.toExponential(2)+` mm2
\\n Iy = `+Iy.toExponential(2)+` mm4
\\n Iz = `+Iz.toExponential(2)+` mm4` \\n }\\n \\n \\n function update_section(data, glyph_section) {\\n // change the plot of the section\\n const src = glyph_section.data_source\\n const t = data['t'][0]\\n const b = data['b'][0]\\n const h = data['h'][0]\\n src.data.xs = [[[ [b/2, b/2, -b/2, -b/2], [b/2-t, b/2-t, -b/2+t, -b/2+t] ]]]\\n src.data.ys = [[[ [h/2, -h/2, -h/2, h/2], [h/2-t, -h/2+t, -h/2+t, h/2-t] ]]]\\n src.change.emit()\\n }\\n \\n \\n function compute_area(b, h, t) {\\n return b*h - (b-t*2)*(h-2*t)\\n }\\n \\n \\n function compute_inertia_y(b, h) {\\n return b*h**3/12 - (b-2*t)*(h-2*t)**3/12\\n }\\n \\n \\n function compute_inertia_z(b, h, t) {\\n return h*b**3/12 - (h-2*t)*(b-2*t)**3/12\\n }\\n \\n \\n function compute_neutral_axis(N, A, Iy, M, yG) {\\n if (M == 0) {\\n return yG\\n }\\n else {\\n return yG - N/A*Iy/M/1000\\n }\\n }\\n \\n \\n function update_axial_stress_strain(data, glyph_stress, glyph_strain, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const A = data['A'][0]\\n const E = data['E'][0]\\n const N = data['N'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_axial = new Array(discr)\\n let strain_axial = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n strain_axial[i] = compute_epsilon_axial(sigma_axial[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_axial, y_discr)\\n update_strain_diagram(glyph_strain, strain_axial, y_discr)\\n }\\n \\n \\n function update_bending_stress_strain(data, glyph_stress, glyph_strain, glyph_centroid, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const E = data['E'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const M = data['M'][0]\\n const y_discr = linspace(0, h, discr)\\n let sigma_bending = new Array(discr)\\n let strain_bending = new Array(discr)\\n const src_centroid = glyph_centroid.data_source\\n \\n // apply the changes\\n src_centroid.data.y = [yG, yG]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n strain_bending[i] = compute_epsilon_bending(sigma_bending[i], E)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, sigma_bending, y_discr)\\n update_strain_diagram(glyph_strain, strain_bending, y_discr)\\n src_centroid.change.emit()\\n }\\n \\n \\n function update_shear_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const yG = data['yG'][0]\\n const Iy = data['Iy'][0]\\n const V = data['V'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_shear = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_shear, y_discr)\\n }\\n \\n \\n function update_total_stress(data, glyph_sigma, glyph_tau, glyph_neutral_axis, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const M = data['M'][0]\\n const N = data['N'][0]\\n const V = data['V'][0]\\n const A = data['A'][0]\\n const Iy = data['Iy'][0]\\n const yG = data['yG'][0]\\n const y_discr = linspace(0, h, discr)\\n const y_n_axis = compute_neutral_axis(N, A, Iy, M, yG)\\n let sigma_bending = new Array(discr)\\n let tau_shear = new Array(discr)\\n let sigma_axial = new Array(discr)\\n let total_sigma = new Array(discr)\\n let total_tau = new Array(discr)\\n const src_n_axis = glyph_neutral_axis.data_source\\n \\n const t = data['t'][0]\\n const T = data['T'][0]\\n let tau_torsion = new Array(discr)\\n \\n \\n // apply the changes\\n db['y_n_axis'][0] = y_n_axis\\n src_n_axis.data.y = [y_n_axis, y_n_axis]\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n // sigma\\n sigma_axial[i] = compute_sigma_axial(N, A)\\n sigma_bending[i] = compute_sigma_bending(y_discr[i], M, Iy, yG)\\n total_sigma[i] = compute_total_sigma(sigma_axial[i], sigma_bending[i])\\n // tau\\n var S = compute_first_moment_of_area_implicit(y_discr[i], data)\\n \\n if (Math.abs(y_discr[i]-yG) >= (h-2*data['t'][0])/2) {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, b)\\n } else {\\n tau_shear[i] = compute_tau_shear(V, S, Iy, 2*data['t'][0])\\n }\\n \\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n total_tau[i] = compute_total_tau(tau_shear[i], tau_torsion[i])\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_sigma, total_sigma, y_discr)\\n update_stress_diagram(glyph_tau, total_tau, y_discr)\\n src_n_axis.change.emit()\\n }\\n \\n \\n function linspace(start, stop, discr = 100) {\\n const step = (stop - start) / (discr-1);\\n return Array.from({length: discr}, (_, i) => start + step * i);\\n }\\n \\n \\n function compute_epsilon_axial(sigma_axial, E) {\\n return sigma_axial/E*100\\n }\\n \\n \\n function compute_epsilon_bending(sigma_bending, E) {\\n return sigma_bending/E*100\\n }\\n \\n \\n function compute_sigma_axial(N, A) {\\n return N*1000/A\\n }\\n \\n \\n function update_stress_diagram(diagram, x, y) {\\n const x_ = [...x]\\n const y_ = [...y]\\n const source = diagram.data_source\\n x_.unshift(0)\\n x_.push(0)\\n y_.unshift(y[0])\\n y_.push(y[y.length-1])\\n source.data.x = x_\\n source.data.y = y_\\n source.change.emit()\\n }\\n \\n \\n function update_strain_diagram(diagram, x, y) {\\n const source = diagram.data_source\\n source.data.x = x\\n source.data.y = y\\n source.change.emit()\\n }\\n \\n \\n function compute_sigma_bending(y, M, Iy, yG) {\\n return M*1e6/Iy*(y-yG)\\n }\\n \\n \\n function compute_total_sigma(sigma_axial, sigma_bending) {\\n return sigma_bending+sigma_axial\\n }\\n \\n \\n function compute_total_tau(tau_shear, tau_torsion=0) {\\n return tau_shear + tau_torsion\\n }\\n \\n \\n function compute_first_moment_of_area(y_, b, h, t, yG) {\\n const y = y_-yG\\n const h_ = h-2*t\\n if (Math.abs(y) >= h_/2) {\\n return b/2*(h**2/4-y**2)\\n } else {\\n return b/2*(h-t)*t + t*(h_**2/4-y**2)\\n }\\n }\\n \\n \\n function compute_first_moment_of_area_implicit(y_, data) {\\n return compute_first_moment_of_area(y_, data['b'][0], data['h'][0], data['t'][0], data['yG'][0])\\n }\\n \\n \\n function compute_tau_shear(V, S, Iy, b_or_t) {\\n return V*1000*S/(Iy*b_or_t)\\n }\\n \\n \\n function compute_tau_torsion(T, b, h, t) {\\n return -T/(2*t*(b-t)*(h-t))*1000\\n }\\n \\n \\n function update_torsional_stress(data, glyph_stress, discr=50) { \\n // define parameters\\n const h = data['h'][0]\\n const b = data['b'][0]\\n const t = data['t'][0]\\n const T = data['T'][0]\\n const y_discr = linspace(0, h, discr)\\n let tau_torsion = new Array(discr)\\n \\n // compute the arrays\\n for (var i = 0; i < discr; i++) {\\n tau_torsion[i] = compute_tau_torsion(T, b, h, t)\\n }\\n \\n // change the diagrams\\n update_stress_diagram(glyph_stress, tau_torsion, y_discr)\\n }\\n \\n \"},\"id\":\"2068\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"2195\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2230\",\"type\":\"AllLabels\"},{\"attributes\":{\"width\":10},\"id\":\"2069\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1822\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2283\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2340\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"height\":30},\"id\":\"2072\",\"type\":\"Spacer\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2258\"},\"group\":null,\"major_label_policy\":{\"id\":\"2259\"},\"ticker\":{\"id\":\"1829\"},\"visible\":false},\"id\":\"1828\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2284\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1336\"}],\"center\":[{\"id\":\"1339\"},{\"id\":\"1343\"}],\"height\":160,\"left\":[{\"id\":\"1340\"}],\"renderers\":[{\"id\":\"1388\"},{\"id\":\"1394\"},{\"id\":\"1412\"}],\"title\":{\"id\":\"2093\"},\"toolbar\":{\"id\":\"1352\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1332\"},\"y_range\":{\"id\":\"1330\"},\"y_scale\":{\"id\":\"1334\"}},\"id\":\"1328\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"1330\",\"type\":\"DataRange1d\"},{\"attributes\":{\"height\":30},\"id\":\"2070\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1820\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2133\"},\"group\":null,\"major_label_policy\":{\"id\":\"2134\"},\"ticker\":{\"id\":\"1337\"},\"visible\":false},\"id\":\"1336\",\"type\":\"LinearAxis\"},{\"attributes\":{\"height\":30},\"id\":\"2071\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"2321\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2341\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"2070\"},{\"id\":\"1108\"},{\"id\":\"1109\"},{\"id\":\"1933\"},{\"id\":\"1256\"},{\"id\":\"1255\"},{\"id\":\"2071\"},{\"id\":\"1257\"},{\"id\":\"1258\"},{\"id\":\"1259\"},{\"id\":\"1260\"},{\"id\":\"2072\"},{\"id\":\"1899\"},{\"id\":\"1900\"}]},\"id\":\"2073\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"2298\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2322\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1041\"},{\"id\":\"2069\"},{\"id\":\"2073\"}]},\"id\":\"2074\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1334\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1337\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1336\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1339\",\"type\":\"Grid\"},{\"attributes\":{\"tools\":[{\"id\":\"1803\"},{\"id\":\"1804\"},{\"id\":\"1805\"},{\"id\":\"1806\"},{\"id\":\"1807\"},{\"id\":\"1808\"}]},\"id\":\"1810\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2299\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1345\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2255\"},\"group\":null,\"major_label_policy\":{\"id\":\"2256\"},\"ticker\":{\"id\":\"1833\"},\"visible\":false},\"id\":\"1832\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"Bending moment M [kNm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2130\"},\"group\":null,\"major_label_policy\":{\"id\":\"2131\"},\"ticker\":{\"id\":\"1341\"}},\"id\":\"1340\",\"type\":\"LinearAxis\"},{\"attributes\":{\"width\":200},\"id\":\"2080\",\"type\":\"Spacer\"},{\"attributes\":{},\"id\":\"1824\",\"type\":\"LinearScale\"},{\"attributes\":{\"children\":[{\"id\":\"1128\"},{\"id\":\"2074\"}]},\"id\":\"2075\",\"type\":\"Column\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1367\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1369\"},\"nonselection_glyph\":{\"id\":\"1368\"},\"view\":{\"id\":\"1371\"}},\"id\":\"1370\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"1842\"}},\"id\":\"1838\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"height\":10},\"id\":\"2076\",\"type\":\"Spacer\"},{\"attributes\":{\"axis\":{\"id\":\"1340\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1343\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1828\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1831\",\"type\":\"Grid\"},{\"attributes\":{\"children\":[{\"id\":\"1008\"},{\"id\":\"2076\"},{\"id\":\"1262\"},{\"id\":\"1296\"},{\"id\":\"1328\"},{\"id\":\"1901\"}]},\"id\":\"2077\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1341\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"V at position x\"},\"id\":\"1818\",\"type\":\"Title\"},{\"attributes\":{\"children\":[{\"id\":\"2075\"},{\"id\":\"2077\"}]},\"id\":\"2078\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1829\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2262\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"width\":200},\"id\":\"2081\",\"type\":\"Spacer\"},{\"attributes\":{\"axis\":{\"id\":\"1832\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1835\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2285\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"children\":[{\"id\":\"2079\"},{\"id\":\"2082\"}]},\"id\":\"2083\",\"type\":\"Column\"},{\"attributes\":{},\"id\":\"1349\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2263\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1344\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2286\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2342\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"overlay\":{\"id\":\"1350\"}},\"id\":\"1346\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1826\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1836\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2265\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2343\",\"type\":\"Selection\"},{\"attributes\":{\"children\":[{\"id\":\"1784\"},{\"id\":\"1449\"},{\"id\":\"1414\"},{\"id\":\"1517\"},{\"id\":\"1483\"},{\"id\":\"1586\"}]},\"id\":\"2079\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1347\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1833\",\"type\":\"BasicTicker\"},{\"attributes\":{\"children\":[{\"id\":\"2083\"}]},\"id\":\"2084\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"1348\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1839\",\"type\":\"SaveTool\"},{\"attributes\":{\"children\":[{\"id\":\"1817\"},{\"id\":\"2080\"},{\"id\":\"1551\"},{\"id\":\"2081\"},{\"id\":\"1952\"},{\"id\":\"1620\"}]},\"id\":\"2082\",\"type\":\"Row\"},{\"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\":\"1350\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2277\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"1003\"}},\"id\":\"1088\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"radius\":{\"value\":0.15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1096\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1074\"},\"glyph\":{\"id\":\"1075\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1077\"},\"nonselection_glyph\":{\"id\":\"1076\"},\"view\":{\"id\":\"1079\"}},\"id\":\"1078\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"interval\":50},\"id\":\"1080\",\"type\":\"SingleIntervalTicker\"},{\"attributes\":{},\"id\":\"2351\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"1074\"}},\"id\":\"1079\",\"type\":\"CDSView\"},{\"attributes\":{\"children\":[{\"id\":\"2078\"},{\"id\":\"2084\"}]},\"id\":\"2085\",\"type\":\"Column\"},{\"attributes\":{\"fill_color\":\"white\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1090\",\"type\":\"Patch\"},{\"attributes\":{},\"id\":\"2352\",\"type\":\"Selection\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1085\",\"type\":\"Line\"},{\"attributes\":{\"children\":[{\"id\":\"2085\"}]},\"id\":\"2086\",\"type\":\"Row\"},{\"attributes\":{\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1084\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":6,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1086\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2278\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1110\",\"type\":\"VeeHead\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"hatch_pattern\":{\"value\":\"/\"},\"line_width\":{\"value\":1.8},\"xs\":{\"field\":\"xs\"},\"ys\":{\"field\":\"ys\"}},\"id\":\"1102\",\"type\":\"MultiPolygons\"},{\"attributes\":{\"fill_alpha\":0.1,\"fill_color\":\"white\",\"hatch_alpha\":0.1,\"line_alpha\":0.1,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1091\",\"type\":\"Patch\"},{\"attributes\":{\"data\":{\"x\":[0,0.15,-0.15],\"y\":[0,-0.16887495373796552,-0.16887495373796552]},\"selected\":{\"id\":\"2187\"},\"selection_policy\":{\"id\":\"2186\"}},\"id\":\"1089\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1089\"},\"glyph\":{\"id\":\"1090\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1092\"},\"nonselection_glyph\":{\"id\":\"1091\"},\"view\":{\"id\":\"1094\"}},\"id\":\"1093\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":0.2,\"fill_color\":\"white\",\"hatch_alpha\":0.2,\"line_alpha\":0.2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1092\",\"type\":\"Patch\"},{\"attributes\":{\"source\":{\"id\":\"1089\"}},\"id\":\"1094\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"xs\":[[[[50.0,50.0,-50.0,-50.0],[40.0,40.0,-40.0,-40.0]]]],\"ys\":[[[[100.0,-100.0,-100.0,100.0],[90.0,-90.0,-90.0,90.0]]]]},\"selected\":{\"id\":\"2282\"},\"selection_policy\":{\"id\":\"2281\"}},\"id\":\"1101\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis\":{\"id\":\"1143\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1146\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[6],\"y\":[-0.0975]},\"selected\":{\"id\":\"2189\"},\"selection_policy\":{\"id\":\"2188\"}},\"id\":\"1095\",\"type\":\"ColumnDataSource\"},{\"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\":\"1097\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[9.0,4],\"y\":[0,0]},\"selected\":{\"id\":\"2341\"},\"selection_policy\":{\"id\":\"2340\"}},\"id\":\"2018\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_pattern\":{\"value\":\"/\"},\"line_alpha\":{\"value\":0.1},\"line_width\":{\"value\":1.8},\"xs\":{\"field\":\"xs\"},\"ys\":{\"field\":\"ys\"}},\"id\":\"1103\",\"type\":\"MultiPolygons\"},{\"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\":\"1098\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1101\"},\"glyph\":{\"id\":\"1102\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1104\"},\"nonselection_glyph\":{\"id\":\"1103\"},\"view\":{\"id\":\"1106\"}},\"id\":\"1105\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1095\"},\"glyph\":{\"id\":\"1096\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1098\"},\"nonselection_glyph\":{\"id\":\"1097\"},\"view\":{\"id\":\"1100\"}},\"id\":\"1099\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1095\"}},\"id\":\"1100\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"z\"],\"x\":[-88.0],\"y\":[0]},\"selected\":{\"id\":\"2286\"},\"selection_policy\":{\"id\":\"2285\"}},\"id\":\"1122\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_pattern\":{\"value\":\"/\"},\"line_alpha\":{\"value\":0.2},\"line_width\":{\"value\":1.8},\"xs\":{\"field\":\"xs\"},\"ys\":{\"field\":\"ys\"}},\"id\":\"1104\",\"type\":\"MultiPolygons\"},{\"attributes\":{\"source\":{\"id\":\"1101\"}},\"id\":\"1106\",\"type\":\"CDSView\"},{\"attributes\":{\"end\":300,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2062\"}]},\"start\":50,\"step\":10,\"title\":\"Change the width b [mm]\",\"value\":100},\"id\":\"1108\",\"type\":\"Slider\"},{\"attributes\":{\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2013\",\"type\":\"Text\"},{\"attributes\":{\"text\":\"\\n

Geometrical and mechanical parameters:

\\n h = 200 mm
\\n b = 100 mm
\\n t = 10 mm
\\n L = 6 m
\\n A = 5.60e+03 mm2
\\n Iy = 2.78e+07 mm4
\\n Iz = 8.99e+06 mm4\",\"width\":170},\"id\":\"1107\",\"type\":\"Div\"},{\"attributes\":{\"text_align\":{\"value\":\"right\"},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1123\",\"type\":\"Text\"},{\"attributes\":{\"end\":600,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2063\"}]},\"start\":50,\"step\":10,\"title\":\"Change the height h [mm]\",\"value\":200},\"id\":\"1109\",\"type\":\"Slider\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1110\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2182\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":128.0},\"y_start\":{\"value\":0}},\"id\":\"1111\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"2151\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1122\"},\"glyph\":{\"id\":\"1123\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1125\"},\"nonselection_glyph\":{\"id\":\"1124\"},\"view\":{\"id\":\"1127\"}},\"id\":\"1126\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2152\",\"type\":\"Selection\"},{\"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\":\"1125\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2354\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"text\":[\"y\"],\"x\":[0],\"y\":[136.0]},\"selected\":{\"id\":\"2284\"},\"selection_policy\":{\"id\":\"2283\"}},\"id\":\"1113\",\"type\":\"ColumnDataSource\"},{\"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\":\"1124\",\"type\":\"Text\"},{\"attributes\":{\"fill_alpha\":{\"value\":0},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1162\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"2355\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1122\"}},\"id\":\"1127\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[30.0],\"y\":[0]},\"selected\":{\"id\":\"2152\"},\"selection_policy\":{\"id\":\"2151\"}},\"id\":\"1161\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"below\":[{\"id\":\"1139\"}],\"center\":[{\"id\":\"1142\"},{\"id\":\"1146\"},{\"id\":\"1225\"},{\"id\":\"1228\"},{\"id\":\"1231\"},{\"id\":\"1234\"},{\"id\":\"1237\"},{\"id\":\"1240\"}],\"height\":200,\"left\":[{\"id\":\"1143\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1165\"},{\"id\":\"1198\"},{\"id\":\"1204\"},{\"id\":\"1210\"},{\"id\":\"1216\"},{\"id\":\"1222\"},{\"id\":\"1247\"},{\"id\":\"1253\"}],\"title\":{\"id\":\"1129\"},\"toolbar\":{\"id\":\"1154\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1131\"},\"x_scale\":{\"id\":\"1135\"},\"y_range\":{\"id\":\"1133\"},\"y_scale\":{\"id\":\"1137\"}},\"id\":\"1128\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1163\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1131\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1133\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1135\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2101\"},\"group\":null,\"major_label_policy\":{\"id\":\"2102\"},\"ticker\":{\"id\":\"1140\"},\"visible\":false},\"id\":\"1139\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2098\"},\"group\":null,\"major_label_policy\":{\"id\":\"2099\"},\"ticker\":{\"id\":\"1144\"},\"visible\":false},\"id\":\"1143\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1139\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1142\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1137\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1152\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Forces and Moments Scheme\"},\"id\":\"1129\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"2091\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2153\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1140\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1144\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2154\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":18.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":72.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1164\",\"type\":\"Rect\"},{\"attributes\":{},\"id\":\"1148\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1147\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1153\"}},\"id\":\"1149\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1740\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"2093\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1150\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1151\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2356\",\"type\":\"UnionRenderers\"},{\"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\":\"1153\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"1147\"},{\"id\":\"1148\"},{\"id\":\"1149\"},{\"id\":\"1150\"},{\"id\":\"1151\"},{\"id\":\"1152\"}]},\"id\":\"1154\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2357\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1004\"}},\"id\":\"1205\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1004\"},\"glyph\":{\"id\":\"1201\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1203\"},\"nonselection_glyph\":{\"id\":\"1202\"},\"view\":{\"id\":\"1205\"}},\"id\":\"1204\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2169\"},\"selection_policy\":{\"id\":\"2168\"}},\"id\":\"2104\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1032\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2205\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2309\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2310\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2171\"},\"selection_policy\":{\"id\":\"2170\"}},\"id\":\"2105\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2206\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1031\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2173\"},\"selection_policy\":{\"id\":\"2172\"}},\"id\":\"2106\",\"type\":\"ColumnDataSource\"},{\"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\":\"1033\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1046\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2175\"},\"selection_policy\":{\"id\":\"2174\"}},\"id\":\"2107\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1061\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2318\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2311\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2177\"},\"selection_policy\":{\"id\":\"2176\"}},\"id\":\"2108\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1065\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2312\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1076\",\"type\":\"Rect\"},{\"attributes\":{\"axis\":{\"id\":\"1052\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1055\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Width b [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2180\"},\"group\":null,\"major_label_policy\":{\"id\":\"2181\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1052\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1044\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2313\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2331\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0],\"y\":[0]},\"selected\":{\"id\":\"2280\"},\"selection_policy\":{\"id\":\"2279\"}},\"id\":\"1074\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2314\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2332\",\"type\":\"Selection\"},{\"attributes\":{\"tools\":[{\"id\":\"1027\"},{\"id\":\"1028\"},{\"id\":\"1029\"},{\"id\":\"1030\"},{\"id\":\"1031\"},{\"id\":\"1032\"}]},\"id\":\"1034\",\"type\":\"Toolbar\"},{\"attributes\":{\"overlay\":{\"id\":\"1066\"}},\"id\":\"1062\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1048\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Cross-section of the beam\"},\"id\":\"1042\",\"type\":\"Title\"},{\"attributes\":{\"fill_color\":{\"value\":\"gray\"},\"line_color\":{\"value\":\"gray\"},\"size\":{\"value\":15.380572041353537}},\"id\":\"1119\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis\":{\"id\":\"1056\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1059\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2178\"},\"group\":null,\"major_label_policy\":{\"id\":\"2179\"},\"ticker\":{\"id\":\"1080\"}},\"id\":\"1056\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2207\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1050\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1060\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2208\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1113\"},\"glyph\":{\"id\":\"1114\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1116\"},\"nonselection_glyph\":{\"id\":\"1115\"},\"view\":{\"id\":\"1118\"}},\"id\":\"1117\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1119\"},\"group\":null,\"line_color\":{\"value\":\"gray\"},\"line_width\":{\"value\":2.1972245773362196},\"source\":{\"id\":\"2183\"},\"start\":null,\"x_end\":{\"value\":-80.0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1120\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1063\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1064\",\"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\":\"1066\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2333\",\"type\":\"UnionRenderers\"},{\"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\":\"1116\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2334\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1113\"}},\"id\":\"1118\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"1060\"},{\"id\":\"1061\"},{\"id\":\"1062\"},{\"id\":\"1063\"},{\"id\":\"1064\"},{\"id\":\"1065\"}]},\"id\":\"1067\",\"type\":\"Toolbar\"},{\"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\":\"1115\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2316\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"angle\":{\"value\":1.5707963267948966},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"gray\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1114\",\"type\":\"Text\"},{\"attributes\":{},\"id\":\"2317\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"height\":{\"value\":480.0},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"width\":{\"value\":240.0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1077\",\"type\":\"Rect\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":16.785266909588593}},\"id\":\"1233\",\"type\":\"VeeHead\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2238\"},\"group\":null,\"major_label_policy\":{\"id\":\"2239\"},\"ticker\":{\"id\":\"1532\"},\"visible\":false},\"id\":\"1531\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1639\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2114\"},\"group\":null,\"major_label_policy\":{\"id\":\"2115\"},\"ticker\":{\"id\":\"1020\"}},\"id\":\"1019\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1531\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1534\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1644\"}},\"id\":\"1640\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1236\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2107\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1237\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1017\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1536\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1236\",\"type\":\"VeeHead\"},{\"attributes\":{\"data\":{\"x\":[0,6],\"y\":[0,0]},\"selected\":{\"id\":\"2185\"},\"selection_policy\":{\"id\":\"2184\"}},\"id\":\"1003\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1542\",\"type\":\"HoverTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"orange\"},\"line_color\":{\"value\":\"orange\"},\"size\":{\"value\":17.954645502230758}},\"id\":\"1230\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1020\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1532\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1239\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2108\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1240\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1641\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1642\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1230\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.5649493574615367},\"source\":{\"id\":\"2105\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":-12.0}},\"id\":\"1231\",\"type\":\"Arrow\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1239\",\"type\":\"VeeHead\"},{\"attributes\":{},\"id\":\"1540\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1233\"},\"group\":null,\"line_color\":{\"value\":\"orange\"},\"line_width\":{\"value\":2.3978952727983707},\"source\":{\"id\":\"2106\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":-10},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1234\",\"type\":\"Arrow\"},{\"attributes\":{},\"id\":\"1535\",\"type\":\"PanTool\"},{\"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\":\"1644\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"overlay\":{\"id\":\"1541\"}},\"id\":\"1537\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1244\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"1638\"},{\"id\":\"1639\"},{\"id\":\"1640\"},{\"id\":\"1641\"},{\"id\":\"1642\"},{\"id\":\"1643\"},{\"id\":\"1645\"}]},\"id\":\"1646\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1538\",\"type\":\"SaveTool\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2164\"},\"selection_policy\":{\"id\":\"2163\"}},\"id\":\"1249\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1539\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{\"x\":[0,60],\"y\":[0,0]},\"selected\":{\"id\":\"2156\"},\"selection_policy\":{\"id\":\"2155\"}},\"id\":\"1004\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2162\"},\"selection_policy\":{\"id\":\"2161\"}},\"id\":\"1242\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1673\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1242\"},\"glyph\":{\"id\":\"1244\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1246\"},\"nonselection_glyph\":{\"id\":\"1245\"},\"view\":{\"id\":\"1248\"}},\"id\":\"1247\",\"type\":\"GlyphRenderer\"},{\"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\":\"1541\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1245\",\"type\":\"Line\"},{\"attributes\":{\"end\":0.9,\"start\":-0.4},\"id\":\"1013\",\"type\":\"Range1d\"},{\"attributes\":{\"source\":{\"id\":\"1672\"}},\"id\":\"1677\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1246\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2279\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1250\",\"type\":\"Scatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1674\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1242\"}},\"id\":\"1248\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1680\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1249\"}},\"id\":\"1254\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1252\",\"type\":\"Scatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1251\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1249\"},\"glyph\":{\"id\":\"1250\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1252\"},\"nonselection_glyph\":{\"id\":\"1251\"},\"view\":{\"id\":\"1254\"}},\"id\":\"1253\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"1023\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1026\",\"type\":\"Grid\"},{\"attributes\":{\"end\":5.0,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2066\"}]},\"start\":0.1,\"step\":0.1,\"title\":\"Change the uniform load q [kN/m]\",\"value\":4},\"id\":\"1255\",\"type\":\"Slider\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1657\",\"type\":\"Line\"},{\"attributes\":{\"text\":\"Free-body diagram (FBD):\"},\"id\":\"1257\",\"type\":\"Div\"},{\"attributes\":{\"end\":6,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"2061\"}]},\"start\":0,\"step\":0.02,\"title\":\"Change the position x along the beam [m]\",\"value\":6},\"id\":\"1256\",\"type\":\"Slider\"},{\"attributes\":{\"active\":0,\"js_property_callbacks\":{\"change:active\":[{\"id\":\"2065\"}]},\"labels\":[\"Right-hand\",\"Left-hand\"]},\"id\":\"1258\",\"type\":\"RadioButtonGroup\"},{\"attributes\":{\"text\":\"Axial force P=10 kN (applied)\"},\"id\":\"1259\",\"type\":\"Div\"},{\"attributes\":{},\"id\":\"1563\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1773\",\"type\":\"Line\"},{\"attributes\":{\"text\":\"\\n

Forces and Moments:

\\n P = 10 kN
\\n Rx = 10 kN
\\n Ry (left) = 12.0 kN
\\n Ry (right) = 12.0 kN
\\n No cross section analysed.
\\n N = 0 kN
\\n V = 0 kN
\\n M = 0 kNm\\n \\n \",\"width\":170},\"id\":\"1261\",\"type\":\"Div\"},{\"attributes\":{\"axis\":{\"id\":\"1272\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1275\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[0,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2317\"},\"selection_policy\":{\"id\":\"2316\"}},\"id\":\"1654\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"2064\"}]},\"labels\":[\"Apply or remove axial force P\"]},\"id\":\"1260\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"below\":[{\"id\":\"1272\"}],\"center\":[{\"id\":\"1275\"},{\"id\":\"1279\"}],\"height\":160,\"left\":[{\"id\":\"1276\"}],\"renderers\":[{\"id\":\"1364\"},{\"id\":\"1370\"},{\"id\":\"1400\"},{\"id\":\"2059\"}],\"title\":{\"id\":\"1263\"},\"toolbar\":{\"id\":\"1288\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1268\"},\"y_range\":{\"id\":\"1266\"},\"y_scale\":{\"id\":\"1270\"}},\"id\":\"1262\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1775\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1661\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1663\"},\"nonselection_glyph\":{\"id\":\"1662\"},\"view\":{\"id\":\"1665\"}},\"id\":\"1664\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"1535\"},{\"id\":\"1536\"},{\"id\":\"1537\"},{\"id\":\"1538\"},{\"id\":\"1539\"},{\"id\":\"1540\"},{\"id\":\"1542\"}]},\"id\":\"1543\",\"type\":\"Toolbar\"},{\"attributes\":{\"end\":7.2,\"start\":-1.2000000000000002},\"id\":\"1011\",\"type\":\"Range1d\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1655\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1266\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"2111\"},\"group\":null,\"major_label_policy\":{\"id\":\"2112\"},\"ticker\":{\"id\":\"1024\"},\"visible\":false},\"id\":\"1023\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Position\",\"@x m\"],[\"Axial force\",\"@y kN\"]]},\"id\":\"1287\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1560\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1268\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"N V M Diagrams\"},\"id\":\"1263\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1270\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1654\"},\"glyph\":{\"id\":\"1655\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1657\"},\"nonselection_glyph\":{\"id\":\"1656\"},\"view\":{\"id\":\"1659\"}},\"id\":\"1658\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1281\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1675\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Position [m]\",\"coordinates\":null,\"formatter\":{\"id\":\"2121\"},\"group\":null,\"major_label_policy\":{\"id\":\"2122\"},\"ticker\":{\"id\":\"1273\"},\"visible\":false},\"id\":\"1272\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1756\"},\"glyph\":{\"id\":\"1757\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1759\"},\"nonselection_glyph\":{\"id\":\"1758\"},\"view\":{\"id\":\"1761\"}},\"id\":\"1760\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1273\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1554\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1662\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1019\"}],\"center\":[{\"id\":\"1022\"},{\"id\":\"1026\"},{\"id\":\"1180\"}],\"height\":200,\"left\":[{\"id\":\"1023\"}],\"min_border_left\":0,\"renderers\":[{\"id\":\"1087\"},{\"id\":\"1093\"},{\"id\":\"1099\"},{\"id\":\"1171\"},{\"id\":\"1177\"},{\"id\":\"1186\"},{\"id\":\"1192\"},{\"id\":\"2004\"},{\"id\":\"2010\"},{\"id\":\"2016\"}],\"title\":{\"id\":\"1009\"},\"toolbar\":{\"id\":\"1034\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1015\"},\"y_range\":{\"id\":\"1013\"},\"y_scale\":{\"id\":\"1017\"}},\"id\":\"1008\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"below\":[{\"id\":\"1562\"}],\"center\":[{\"id\":\"1565\"},{\"id\":\"1569\"}],\"height\":200,\"left\":[{\"id\":\"1566\"}],\"renderers\":[{\"id\":\"1694\"},{\"id\":\"1700\"},{\"id\":\"1706\"}],\"title\":{\"id\":\"1552\"},\"toolbar\":{\"id\":\"1578\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1554\"},\"x_scale\":{\"id\":\"1558\"},\"y_range\":{\"id\":\"1556\"},\"y_scale\":{\"id\":\"1560\"}},\"id\":\"1551\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"1654\"}},\"id\":\"1659\",\"type\":\"CDSView\"},{\"attributes\":{\"axis_label\":\"Axial force N [kN]\",\"coordinates\":null,\"formatter\":{\"id\":\"2118\"},\"group\":null,\"major_label_policy\":{\"id\":\"2119\"},\"ticker\":{\"id\":\"1277\"}},\"id\":\"1276\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1556\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1656\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"1276\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1279\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1679\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1681\"},\"nonselection_glyph\":{\"id\":\"1680\"},\"view\":{\"id\":\"1683\"}},\"id\":\"1682\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple supported beam\"},\"id\":\"1009\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1277\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1661\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,-0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2327\"},\"selection_policy\":{\"id\":\"2326\"}},\"id\":\"1672\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1573\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1003\"},\"glyph\":{\"id\":\"1084\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1086\"},\"nonselection_glyph\":{\"id\":\"1085\"},\"view\":{\"id\":\"1088\"}},\"id\":\"1087\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Shear stress\"},\"id\":\"1552\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1285\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1015\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1280\",\"type\":\"PanTool\"},{\"attributes\":{\"axis\":{\"id\":\"1562\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1565\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"1286\"}},\"id\":\"1282\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1558\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1663\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1283\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c4\\u1d65 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2265\"},\"group\":null,\"major_label_policy\":{\"id\":\"2266\"},\"ticker\":{\"id\":\"1563\"}},\"id\":\"1562\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1679\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1024\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1284\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1665\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,0],\"y\":[0,200]},\"selected\":{\"id\":\"2312\"},\"selection_policy\":{\"id\":\"2311\"}},\"id\":\"1006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1691\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1571\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"1019\"},\"coordinates\":null,\"grid_line_alpha\":0,\"group\":null,\"ticker\":null},\"id\":\"1022\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1577\",\"type\":\"HoverTool\"},{\"attributes\":{\"below\":[{\"id\":\"1052\"}],\"center\":[{\"id\":\"1055\"},{\"id\":\"1059\"},{\"id\":\"1111\"},{\"id\":\"1120\"}],\"left\":[{\"id\":\"1056\"}],\"match_aspect\":true,\"renderers\":[{\"id\":\"1078\"},{\"id\":\"1105\"},{\"id\":\"1117\"},{\"id\":\"1126\"},{\"id\":\"1991\"},{\"id\":\"1997\"}],\"title\":{\"id\":\"1042\"},\"toolbar\":{\"id\":\"1067\"},\"toolbar_location\":null,\"width\":300,\"x_range\":{\"id\":\"1044\"},\"x_scale\":{\"id\":\"1048\"},\"y_range\":{\"id\":\"1046\"},\"y_scale\":{\"id\":\"1050\"}},\"id\":\"1041\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"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\":\"1286\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":[-3.0,3.0],\"y\":[0,0]},\"selected\":{\"id\":\"2319\"},\"selection_policy\":{\"id\":\"2318\"}},\"id\":\"1666\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2262\"},\"group\":null,\"major_label_policy\":{\"id\":\"2263\"},\"ticker\":{\"id\":\"1567\"},\"visible\":false},\"id\":\"1566\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1697\",\"type\":\"Line\"},{\"attributes\":{\"below\":[{\"id\":\"1304\"}],\"center\":[{\"id\":\"1307\"},{\"id\":\"1311\"}],\"height\":160,\"left\":[{\"id\":\"1308\"}],\"renderers\":[{\"id\":\"1376\"},{\"id\":\"1382\"},{\"id\":\"1406\"}],\"title\":{\"id\":\"2091\"},\"toolbar\":{\"id\":\"1320\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1300\"},\"y_range\":{\"id\":\"1298\"},\"y_scale\":{\"id\":\"1302\"}},\"id\":\"1296\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1566\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1569\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1672\"},\"glyph\":{\"id\":\"1673\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1675\"},\"nonselection_glyph\":{\"id\":\"1674\"},\"view\":{\"id\":\"1677\"}},\"id\":\"1676\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1567\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"A\":[5600],\"E\":[200000.0],\"FBD\":[0],\"Iy\":[27786666.666666664],\"Iz\":[8986666.666666666],\"L\":[6],\"M\":[0.0],\"Mt\":[100],\"N\":[-10.0],\"P\":[10],\"Rx\":[10],\"Ry_l\":[12.0],\"Ry_r\":[12.0],\"SCALE\":[10],\"T\":[-50.0],\"V\":[12.0],\"b\":[100],\"h\":[200],\"q\":[4],\"state\":[\"IDLE\"],\"t\":[10],\"x\":[6],\"xF\":[60],\"y\":[0],\"yG\":[100.0],\"y_n_axis\":[100.0]},\"selected\":{\"id\":\"2154\"},\"selection_policy\":{\"id\":\"2153\"}},\"id\":\"1007\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1690\"}},\"id\":\"1695\",\"type\":\"CDSView\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1762\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{},\"id\":\"1575\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1681\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bending stress and centroid\"},\"id\":\"1484\",\"type\":\"Title\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1687\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1570\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1683\",\"type\":\"CDSView\"},{\"attributes\":{\"overlay\":{\"id\":\"1576\"}},\"id\":\"1572\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1693\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2098 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2246\"},\"group\":null,\"major_label_policy\":{\"id\":\"2247\"},\"ticker\":{\"id\":\"1494\"}},\"id\":\"1493\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1685\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1690\"},\"glyph\":{\"id\":\"1691\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1693\"},\"nonselection_glyph\":{\"id\":\"1692\"},\"view\":{\"id\":\"1695\"}},\"id\":\"1694\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1574\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1697\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1699\"},\"nonselection_glyph\":{\"id\":\"1698\"},\"view\":{\"id\":\"1701\"}},\"id\":\"1700\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1491\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1692\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2220\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2329\"},\"selection_policy\":{\"id\":\"2328\"}},\"id\":\"1684\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1684\"},\"glyph\":{\"id\":\"1685\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1687\"},\"nonselection_glyph\":{\"id\":\"1686\"},\"view\":{\"id\":\"1689\"}},\"id\":\"1688\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2221\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1684\"}},\"id\":\"1689\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1686\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,0,60,60],\"x_fade\":[0,0,60,60],\"y\":[4,8,8,4]},\"selected\":{\"id\":\"2160\"},\"selection_policy\":{\"id\":\"2159\"}},\"id\":\"1005\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2350\"},\"selection_policy\":{\"id\":\"2349\"}},\"id\":\"1690\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[-0.00012,0.00012],\"y\":[0,0]},\"selected\":{\"id\":\"2314\"},\"selection_policy\":{\"id\":\"2313\"}},\"id\":\"1756\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2155\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1417\",\"type\":\"DataRange1d\"},{\"attributes\":{\"below\":[{\"id\":\"1425\"}],\"center\":[{\"id\":\"1428\"},{\"id\":\"1432\"}],\"height\":200,\"left\":[{\"id\":\"1429\"}],\"renderers\":[{\"id\":\"1658\"},{\"id\":\"1664\"},{\"id\":\"1670\"}],\"title\":{\"id\":\"1415\"},\"toolbar\":{\"id\":\"1441\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1417\"},\"x_scale\":{\"id\":\"1421\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1423\"}},\"id\":\"1414\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2156\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1419\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1423\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1426\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1643\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial stress\"},\"id\":\"1415\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2243\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2323\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"1425\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1428\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2163\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1421\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"Stress \\u03c3\\u2099 [MPa]\",\"coordinates\":null,\"formatter\":{\"id\":\"2235\"},\"group\":null,\"major_label_policy\":{\"id\":\"2236\"},\"ticker\":{\"id\":\"1426\"}},\"id\":\"1425\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2244\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2324\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2164\",\"type\":\"Selection\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1440\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"1434\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2246\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2344\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2232\"},\"group\":null,\"major_label_policy\":{\"id\":\"2233\"},\"ticker\":{\"id\":\"1430\"},\"visible\":false},\"id\":\"1429\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"1429\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1432\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2345\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1430\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2247\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2136\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2157\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1438\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"1433\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2137\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2158\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"1439\"}},\"id\":\"1435\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1436\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1437\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2139\",\"type\":\"BasicTickFormatter\"},{\"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\":\"1439\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2140\",\"type\":\"AllLabels\"},{\"attributes\":{\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1894\",\"type\":\"Text\"},{\"attributes\":{\"tools\":[{\"id\":\"1467\"},{\"id\":\"1468\"},{\"id\":\"1469\"},{\"id\":\"1470\"},{\"id\":\"1471\"},{\"id\":\"1472\"},{\"id\":\"1474\"}]},\"id\":\"1475\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2184\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"1493\"}],\"center\":[{\"id\":\"1496\"},{\"id\":\"1500\"}],\"height\":200,\"left\":[{\"id\":\"1497\"}],\"renderers\":[{\"id\":\"1676\"},{\"id\":\"1682\"},{\"id\":\"1688\"}],\"title\":{\"id\":\"1484\"},\"toolbar\":{\"id\":\"1509\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1486\"},\"x_scale\":{\"id\":\"1489\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1491\"}},\"id\":\"1483\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2159\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2185\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2160\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2326\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"tools\":[{\"id\":\"1433\"},{\"id\":\"1434\"},{\"id\":\"1435\"},{\"id\":\"1436\"},{\"id\":\"1437\"},{\"id\":\"1438\"},{\"id\":\"1440\"}]},\"id\":\"1441\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"2327\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2249\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2347\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1771\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1773\"},\"nonselection_glyph\":{\"id\":\"1772\"},\"view\":{\"id\":\"1775\"}},\"id\":\"1774\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2186\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2250\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2348\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2187\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2349\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2252\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1452\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2350\",\"type\":\"Selection\"},{\"attributes\":{\"below\":[{\"id\":\"1459\"}],\"center\":[{\"id\":\"1462\"},{\"id\":\"1466\"}],\"height\":200,\"left\":[{\"id\":\"1463\"}],\"renderers\":[{\"id\":\"1748\"},{\"id\":\"1754\"},{\"id\":\"1760\"}],\"title\":{\"id\":\"1450\"},\"toolbar\":{\"id\":\"1475\"},\"toolbar_location\":null,\"width\":200,\"x_range\":{\"id\":\"1452\"},\"x_scale\":{\"id\":\"1455\"},\"y_range\":{\"id\":\"1419\"},\"y_scale\":{\"id\":\"1457\"}},\"id\":\"1449\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"2253\",\"type\":\"AllLabels\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Strain\",\"@x %\"],[\"Height\",\"@y mm\"]]},\"id\":\"1474\",\"type\":\"HoverTool\"},{\"attributes\":{},\"id\":\"2166\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2167\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1470\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axial strain\"},\"id\":\"1450\",\"type\":\"Title\"},{\"attributes\":{\"axis\":{\"id\":\"1459\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1462\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1468\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1457\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2168\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"Strain \\u03b5\\u2099 [%]\",\"coordinates\":null,\"formatter\":{\"id\":\"2229\"},\"group\":null,\"major_label_policy\":{\"id\":\"2230\"},\"ticker\":{\"id\":\"1762\"}},\"id\":\"1459\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2169\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Height h [mm]\",\"coordinates\":null,\"formatter\":{\"id\":\"2227\"},\"group\":null,\"major_label_policy\":{\"id\":\"2228\"},\"ticker\":{\"id\":\"1464\"},\"visible\":false},\"id\":\"1463\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2188\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"1463\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1466\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2161\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1464\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2189\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2162\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2170\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1472\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2328\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1467\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"2171\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1471\",\"type\":\"ResetTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1473\"}},\"id\":\"1469\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2329\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"2095\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1841\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1698\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1699\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1971\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"tooltips\":[[\"Stress\",\"@x MPa\"],[\"Height\",\"@y mm\"]]},\"id\":\"1977\",\"type\":\"HoverTool\"},{\"attributes\":{\"axis\":{\"id\":\"1966\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1969\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1840\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1701\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1705\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2361\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1715\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1717\"},\"nonselection_glyph\":{\"id\":\"1716\"},\"view\":{\"id\":\"1719\"}},\"id\":\"1718\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2232\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[0,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,-1.7857142857142858,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2332\"},\"selection_policy\":{\"id\":\"2331\"}},\"id\":\"1708\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1975\",\"type\":\"HelpTool\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1703\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1970\",\"type\":\"PanTool\"},{\"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\":\"1842\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2299\"},\"selection_policy\":{\"id\":\"2298\"}},\"id\":\"1868\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"overlay\":{\"id\":\"1976\"}},\"id\":\"1972\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2233\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2352\"},\"selection_policy\":{\"id\":\"2351\"}},\"id\":\"1702\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1973\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1974\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1702\"},\"glyph\":{\"id\":\"1703\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1705\"},\"nonselection_glyph\":{\"id\":\"1704\"},\"view\":{\"id\":\"1707\"}},\"id\":\"1706\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1857\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2235\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1711\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1704\",\"type\":\"Line\"},{\"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\":\"1976\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1708\"},\"glyph\":{\"id\":\"1709\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1711\"},\"nonselection_glyph\":{\"id\":\"1710\"},\"view\":{\"id\":\"1713\"}},\"id\":\"1712\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1858\",\"type\":\"Line\"},{\"attributes\":{\"angle\":{\"value\":-1.2120256565243244},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1995\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"2236\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"1702\"}},\"id\":\"1707\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1709\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1856\"}},\"id\":\"1861\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1716\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2362\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"1708\"}},\"id\":\"1713\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1710\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1733\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1735\"},\"nonselection_glyph\":{\"id\":\"1734\"},\"view\":{\"id\":\"1737\"}},\"id\":\"1736\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"angle\":{\"value\":3.665191429188092},\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2026\",\"type\":\"Scatter\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1715\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1870\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[4.5,5.5],\"y\":[-6.123233995736766e-17,-1.8369701987210297e-16]},\"selected\":{\"id\":\"2343\"},\"selection_policy\":{\"id\":\"2342\"}},\"id\":\"2025\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1851\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2018\"}},\"id\":\"2024\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[50]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAVvJyCl1MQQBW8nIKXUyBAIBrrQ2N9KEAVvJyCl1MwQBrrQ2N9aDRAIBrrQ2N9OEAlSZIkSZI8QBW8nIKXU0BAmFPwcgpeQkAa60NjfWhEQJ2Cl1PwckZAIBrrQ2N9SECisT401odKQCVJkiRJkkxAp+DlFLycTkAVvJyCl1NQQNaHxvrQWFFAmFPwcgpeUkBZHxrrQ2NTQBrrQ2N9aFRA3LZt27ZtVUCdgpdT8HJWQF5OwcspeFdAIBrrQ2N9WEDh5RS8nIJZQKKxPjTWh1pAY31orA+NW0AlSZIkSZJcQOYUvJyCl11Ap+DlFLycXkBprA+N9aFfQBW8nIKXU2BA9qGxPjTWYEDWh8b60FhhQLdt27Zt22FAmFPwcgpeYkB4OQUvp+BiQFkfGutDY2NAOgUvp+DlY0Aa60NjfWhkQPvQWB8a62RA3LZt27ZtZUC8nIKXU/BlQJ2Cl1PwcmZAfmisD431ZkBeTsHLKXhnQD801ofG+mdAIBrrQ2N9aEAAAAAAAABpQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[50]}},\"selected\":{\"id\":\"2322\"},\"selection_policy\":{\"id\":\"2321\"}},\"id\":\"1764\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1717\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1723\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2022\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1719\",\"type\":\"CDSView\"},{\"attributes\":{\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1721\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1859\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1989\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1727\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-30.0,30.0],\"y\":[100.0,100.0]},\"selected\":{\"id\":\"2334\"},\"selection_policy\":{\"id\":\"2333\"}},\"id\":\"1720\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1720\"},\"glyph\":{\"id\":\"1721\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1723\"},\"nonselection_glyph\":{\"id\":\"1722\"},\"view\":{\"id\":\"1725\"}},\"id\":\"1724\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1856\"},\"glyph\":{\"id\":\"1857\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1859\"},\"nonselection_glyph\":{\"id\":\"1858\"},\"view\":{\"id\":\"1861\"}},\"id\":\"1860\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1720\"}},\"id\":\"1725\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1722\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"1970\"},{\"id\":\"1971\"},{\"id\":\"1972\"},{\"id\":\"1973\"},{\"id\":\"1974\"},{\"id\":\"1975\"},{\"id\":\"1977\"}]},\"id\":\"1978\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1734\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[-1.6666666666666667,0,0,-1.6666666666666667],\"y\":[-10,-10,10,10]},\"selected\":{\"id\":\"2337\"},\"selection_policy\":{\"id\":\"2336\"}},\"id\":\"1856\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1726\"}},\"id\":\"1731\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1988\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1729\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"1836\"},{\"id\":\"1837\"},{\"id\":\"1838\"},{\"id\":\"1839\"},{\"id\":\"1840\"},{\"id\":\"1841\"}]},\"id\":\"1843\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1726\"},\"glyph\":{\"id\":\"1727\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1729\"},\"nonselection_glyph\":{\"id\":\"1728\"},\"view\":{\"id\":\"1731\"}},\"id\":\"1730\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1877\",\"type\":\"Scatter\"},{\"attributes\":{\"data\":{\"x\":[0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0],\"y\":[0,0.0,4.081632653061225,8.16326530612245,12.244897959183675,16.3265306122449,20.408163265306122,24.48979591836735,28.571428571428573,32.6530612244898,36.734693877551024,40.816326530612244,44.89795918367347,48.9795918367347,53.06122448979592,57.142857142857146,61.224489795918366,65.3061224489796,69.38775510204081,73.46938775510205,77.55102040816327,81.63265306122449,85.71428571428572,89.79591836734694,93.87755102040816,97.9591836734694,102.04081632653062,106.12244897959184,110.20408163265306,114.28571428571429,118.36734693877551,122.44897959183673,126.53061224489797,130.6122448979592,134.69387755102042,138.77551020408163,142.85714285714286,146.9387755102041,151.0204081632653,155.10204081632654,159.18367346938777,163.26530612244898,167.3469387755102,171.42857142857144,175.51020408163265,179.59183673469389,183.67346938775512,187.75510204081633,191.83673469387756,195.9183673469388,200.0,200]},\"selected\":{\"id\":\"2360\"},\"selection_policy\":{\"id\":\"2359\"}},\"id\":\"1726\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1934\"},\"glyph\":{\"id\":\"1935\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1937\"},\"nonselection_glyph\":{\"id\":\"1936\"},\"view\":{\"id\":\"1939\"}},\"id\":\"1938\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1728\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1862\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2225\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1863\",\"type\":\"Arrow\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1006\"},\"glyph\":{\"id\":\"1751\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1753\"},\"nonselection_glyph\":{\"id\":\"1752\"},\"view\":{\"id\":\"1755\"}},\"id\":\"1754\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1986\"},\"glyph\":{\"id\":\"1988\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1990\"},\"nonselection_glyph\":{\"id\":\"1989\"},\"view\":{\"id\":\"1992\"}},\"id\":\"1991\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1883\",\"type\":\"Text\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1733\",\"type\":\"Line\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":0.0}},\"id\":\"1865\",\"type\":\"VeeHead\"},{\"attributes\":{\"coordinates\":null,\"end\":{\"id\":\"1865\"},\"group\":null,\"line_color\":{\"value\":\"red\"},\"line_width\":{\"value\":0.0},\"source\":{\"id\":\"2260\"},\"start\":null,\"x_end\":{\"value\":0},\"x_start\":{\"value\":0},\"y_end\":{\"value\":0},\"y_start\":{\"value\":0}},\"id\":\"1866\",\"type\":\"Arrow\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1772\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAABapAw83ZofwM4Pi5SBpyvAchzHcRzHMcC35odFysAzwLfmh0XKwDPAchzHcRzHMcDLD4uUgacrwFSkDDzdmh/AAAAAAAAAAAA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"AAAAAAAALsBVVVVVVVUnwKqqqqqqqiDAAAAAAAAAFMCoqqqqqqr6v7Cqqqqqqvo/AAAAAAAAFECsqqqqqqogQFZVVVVVVSdAAAAAAAAALkA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[10]}},\"selected\":{\"id\":\"2288\"},\"selection_policy\":{\"id\":\"2287\"}},\"id\":\"1986\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[0.0]},\"selected\":{\"id\":\"2301\"},\"selection_policy\":{\"id\":\"2300\"}},\"id\":\"1875\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvx7UQR3UQU2/HtRBHdRBTb8e1EEd1EFNvw==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[50]},\"y\":{\"__ndarray__\":\"AAAAAAAAAAAVvJyCl1MQQBW8nIKXUyBAIBrrQ2N9KEAVvJyCl1MwQBrrQ2N9aDRAIBrrQ2N9OEAlSZIkSZI8QBW8nIKXU0BAmFPwcgpeQkAa60NjfWhEQJ2Cl1PwckZAIBrrQ2N9SECisT401odKQCVJkiRJkkxAp+DlFLycTkAVvJyCl1NQQNaHxvrQWFFAmFPwcgpeUkBZHxrrQ2NTQBrrQ2N9aFRA3LZt27ZtVUCdgpdT8HJWQF5OwcspeFdAIBrrQ2N9WEDh5RS8nIJZQKKxPjTWh1pAY31orA+NW0AlSZIkSZJcQOYUvJyCl11Ap+DlFLycXkBprA+N9aFfQBW8nIKXU2BA9qGxPjTWYEDWh8b60FhhQLdt27Zt22FAmFPwcgpeYkB4OQUvp+BiQFkfGutDY2NAOgUvp+DlY0Aa60NjfWhkQPvQWB8a62RA3LZt27ZtZUC8nIKXU/BlQJ2Cl1PwcmZAfmisD431ZkBeTsHLKXhnQD801ofG+mdAIBrrQ2N9aEAAAAAAAABpQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[50]}},\"selected\":{\"id\":\"2310\"},\"selection_policy\":{\"id\":\"2309\"}},\"id\":\"1744\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1868\"},\"glyph\":{\"id\":\"1870\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1872\"},\"nonselection_glyph\":{\"id\":\"1871\"},\"view\":{\"id\":\"1874\"}},\"id\":\"1873\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0.0],\"y\":[15.0]},\"selected\":{\"id\":\"2290\"},\"selection_policy\":{\"id\":\"2289\"}},\"id\":\"1993\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1735\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1871\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1741\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1872\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2238\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2021\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1935\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2018\"},\"glyph\":{\"id\":\"2020\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2022\"},\"nonselection_glyph\":{\"id\":\"2021\"},\"view\":{\"id\":\"2024\"}},\"id\":\"2023\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1737\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1756\"}},\"id\":\"1761\",\"type\":\"CDSView\"},{\"attributes\":{\"angle\":{\"value\":3.665191429188092},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2027\",\"type\":\"Scatter\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1739\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1990\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2239\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[-1.2,1.2],\"y\":[0,0]},\"selected\":{\"id\":\"2362\"},\"selection_policy\":{\"id\":\"2361\"}},\"id\":\"1738\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1868\"}},\"id\":\"1874\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1738\"},\"glyph\":{\"id\":\"1739\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1741\"},\"nonselection_glyph\":{\"id\":\"1740\"},\"view\":{\"id\":\"1743\"}},\"id\":\"1742\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1986\"}},\"id\":\"1992\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1875\"}},\"id\":\"1880\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1993\"}},\"id\":\"1998\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1878\",\"type\":\"Scatter\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1747\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2098\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":[3.0,4.0],\"y\":[0,0]},\"selected\":{\"id\":\"2197\"},\"selection_policy\":{\"id\":\"2196\"}},\"id\":\"1999\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2240\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1744\"},\"glyph\":{\"id\":\"1745\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1747\"},\"nonselection_glyph\":{\"id\":\"1746\"},\"view\":{\"id\":\"1749\"}},\"id\":\"1748\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"angle\":{\"value\":-1.2120256565243244},\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1996\",\"type\":\"Scatter\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":0},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1876\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1875\"},\"glyph\":{\"id\":\"1876\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1878\"},\"nonselection_glyph\":{\"id\":\"1877\"},\"view\":{\"id\":\"1880\"}},\"id\":\"1879\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2216\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2241\",\"type\":\"AllLabels\"},{\"attributes\":{\"text\":\"Torsion M\\u209c=100 kNm (applied)\"},\"id\":\"1899\",\"type\":\"Div\"},{\"attributes\":{\"angle\":{\"value\":-1.2120256565243244},\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":20},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1994\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"1738\"}},\"id\":\"1743\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1993\"},\"glyph\":{\"id\":\"1994\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1996\"},\"nonselection_glyph\":{\"id\":\"1995\"},\"view\":{\"id\":\"1998\"}},\"id\":\"1997\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[11.0],\"y\":[1]},\"selected\":{\"id\":\"2303\"},\"selection_policy\":{\"id\":\"2302\"}},\"id\":\"1881\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1745\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2099\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2217\",\"type\":\"Selection\"},{\"attributes\":{\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1882\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1893\"},\"glyph\":{\"id\":\"1894\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1896\"},\"nonselection_glyph\":{\"id\":\"1895\"},\"view\":{\"id\":\"1898\"}},\"id\":\"1897\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1744\"}},\"id\":\"1749\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1752\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1999\"},\"glyph\":{\"id\":\"2001\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2003\"},\"nonselection_glyph\":{\"id\":\"2002\"},\"view\":{\"id\":\"2005\"}},\"id\":\"2004\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2101\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1746\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1758\",\"type\":\"Line\"},{\"attributes\":{\"angle\":{\"value\":3.665191429188092},\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2028\",\"type\":\"Scatter\"},{\"attributes\":{\"data\":{\"x\":[3.925,3.775],\"y\":[0.0,0.0]},\"selected\":{\"id\":\"2199\"},\"selection_policy\":{\"id\":\"2198\"}},\"id\":\"2006\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1881\"},\"glyph\":{\"id\":\"1882\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1884\"},\"nonselection_glyph\":{\"id\":\"1883\"},\"view\":{\"id\":\"1886\"}},\"id\":\"1885\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1751\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2102\",\"type\":\"AllLabels\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2014\",\"type\":\"Text\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[5],\"y\":[4]},\"selected\":{\"id\":\"2339\"},\"selection_policy\":{\"id\":\"2338\"}},\"id\":\"1893\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"green\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2001\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1764\"},\"glyph\":{\"id\":\"1765\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1767\"},\"nonselection_glyph\":{\"id\":\"1766\"},\"view\":{\"id\":\"1769\"}},\"id\":\"1768\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1884\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2002\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1764\"}},\"id\":\"1769\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2012\"},\"glyph\":{\"id\":\"2013\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2015\"},\"nonselection_glyph\":{\"id\":\"2014\"},\"view\":{\"id\":\"2017\"}},\"id\":\"2016\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1881\"}},\"id\":\"1886\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1753\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1767\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1896\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2003\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1887\"}},\"id\":\"1892\",\"type\":\"CDSView\"},{\"attributes\":{\"source\":{\"id\":\"1006\"}},\"id\":\"1755\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1759\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"1999\"}},\"id\":\"2005\",\"type\":\"CDSView\"},{\"attributes\":{\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1888\",\"type\":\"Text\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1766\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2012\"}},\"id\":\"2017\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"text\":[\"\"],\"x\":[6],\"y\":[-5]},\"selected\":{\"id\":\"2305\"},\"selection_policy\":{\"id\":\"2304\"}},\"id\":\"1887\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1765\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"text\":[\"M\\u209c\"],\"x\":[3.5],\"y\":[0.01]},\"selected\":{\"id\":\"2201\"},\"selection_policy\":{\"id\":\"2200\"}},\"id\":\"2012\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1889\",\"type\":\"Text\"},{\"attributes\":{\"active\":[0],\"js_property_callbacks\":{\"change:active\":[{\"id\":\"2067\"}]},\"labels\":[\"Apply or remove torsion M\\u209c\"]},\"id\":\"1900\",\"type\":\"CheckboxButtonGroup\"},{\"attributes\":{\"source\":{\"id\":\"2006\"}},\"id\":\"2011\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1757\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2006\"},\"glyph\":{\"id\":\"2007\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2009\"},\"nonselection_glyph\":{\"id\":\"2008\"},\"view\":{\"id\":\"2011\"}},\"id\":\"2010\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_baseline\":{\"value\":\"top\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1890\",\"type\":\"Text\"},{\"attributes\":{\"desired_num_ticks\":3,\"num_minor_ticks\":2},\"id\":\"1782\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"data\":{},\"selected\":{\"id\":\"2167\"},\"selection_policy\":{\"id\":\"2166\"}},\"id\":\"2103\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"angle\":{\"value\":0.5235987755982988},\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"green\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"green\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2009\",\"type\":\"Scatter\"},{\"attributes\":{\"line_width\":1.5,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1771\",\"type\":\"Line\"},{\"attributes\":{\"text_alpha\":{\"value\":0.2},\"text_color\":{\"value\":\"green\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2015\",\"type\":\"Text\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1887\"},\"glyph\":{\"id\":\"1888\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1890\"},\"nonselection_glyph\":{\"id\":\"1889\"},\"view\":{\"id\":\"1892\"}},\"id\":\"1891\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"text_alpha\":{\"value\":0.1},\"text_baseline\":{\"value\":\"middle\"},\"text_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1895\",\"type\":\"Text\"},{\"attributes\":{\"angle\":{\"value\":0.5235987755982988},\"fill_color\":{\"value\":\"green\"},\"line_color\":{\"value\":\"green\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2007\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1850\"},\"glyph\":{\"id\":\"1851\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1853\"},\"nonselection_glyph\":{\"id\":\"1852\"},\"view\":{\"id\":\"1855\"}},\"id\":\"1854\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"1893\"}},\"id\":\"1898\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1776\"},\"glyph\":{\"id\":\"1777\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1779\"},\"nonselection_glyph\":{\"id\":\"1778\"},\"view\":{\"id\":\"1781\"}},\"id\":\"1780\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"angle\":{\"value\":0.5235987755982988},\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"green\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"green\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2008\",\"type\":\"Scatter\"},{\"attributes\":{\"below\":[{\"id\":\"1909\"}],\"center\":[{\"id\":\"1912\"},{\"id\":\"1916\"}],\"height\":200,\"left\":[{\"id\":\"1913\"}],\"renderers\":[{\"id\":\"1938\"},{\"id\":\"1944\"},{\"id\":\"1950\"}],\"title\":{\"id\":\"2095\"},\"toolbar\":{\"id\":\"1925\"},\"toolbar_location\":null,\"width\":700,\"x_range\":{\"id\":\"1011\"},\"x_scale\":{\"id\":\"1905\"},\"y_range\":{\"id\":\"1903\"},\"y_scale\":{\"id\":\"1907\"}},\"id\":\"1901\",\"subtype\":\"Figure\",\"type\":\"Plot\"}],\"root_ids\":[\"2087\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n", + " const render_items = [{\"docid\":\"59ecfd77-c705-4c8c-9c88-28bd01828977\",\"root_ids\":[\"2087\"],\"roots\":{\"2087\":\"272a9d88-57a5-466e-b9b2-cd6e1a1520cb\"}}];\n", + " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", + "\n", + " }\n", + " if (root.Bokeh !== undefined) {\n", + " embed_document(root);\n", + " } else {\n", + " let attempts = 0;\n", + " const timer = setInterval(function(root) {\n", + " if (root.Bokeh !== undefined) {\n", + " clearInterval(timer);\n", + " embed_document(root);\n", + " } else {\n", + " attempts++;\n", + " if (attempts > 100) {\n", + " clearInterval(timer);\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": "2087" + } + }, + "output_type": "display_data" } ], "source": [ - "padding_layout = 10\n", - "layout1 = layout([\n", - " [column(row(column(fig_scheme,\n", - " row(fig_section, Spacer(width=padding_layout), column(Spacer(height=padding_layout*3),\n", - " slider_b,\n", - " slider_h,\n", - " slider_t,\n", - " # row(div_geo, div_forces),\n", - " slider_position,\n", - " slider_q,\n", - " Spacer(height=padding_layout*3),\n", - " div_rg_FBD,\n", - " radiogroup_FBD,\n", - " div_cb_P,\n", - " checkbox_P,\n", - " Spacer(height=padding_layout*3),\n", - " div_cb_T,\n", - " checkbox_T))),\n", - " column(fig_beam,\n", - " Spacer(height=padding_layout),\n", - " fig_N,\n", - " fig_V,\n", - " fig_M,\n", - " fig_T)),\n", - " row(column(\n", - " row(fig_NM_section, fig_axial_strain, fig_stress_N, fig_bending_strain, fig_stress_M, fig_stress_sigma),\n", - " row(fig_V_section, Spacer(width=FIG_B_ss), fig_stress_V, Spacer(width=FIG_B_ss), fig_stress_T, fig_stress_tau),\n", - " ))\n", - " ),\n", - " ],\n", - "])\n", - "\n", - "show(layout1)" + "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)" ] } ], "metadata": { "interpreter": { "hash": "f29f3a16a5c47811d2900cf82e6584cc83572ddcd5db25d9cf9bef77823b3d45" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }