import matplotlib
if not hasattr(matplotlib.RcParams, "_get"):
matplotlib.RcParams._get = dict.get
Begeleide oefening 1#
Gegeven is de volgende constructie:
\[EI = 30 \, \rm{MNm}^2\]
Fig. 219 #
Vind de maximale doorzakking en de maximale momenten in beide richtingen (◠ and ◡).
Opgave
Maak de opdracht in WebLab. Heb je nog geen toegang? Schrijf je dan eerst hier in voor dit vak op WebLab.
Je kan je antwoord op de vragen in de volgende opgaves invoeren. Maar om je code te checken zorg je ervoor dat deze in de variabelen w_max, M_max_neg en M_max_pos zijn opgeslagen en klik je op ‘Check’ in WebLab.
Opgave
Wat is de maximale doorzakking in \(\rm{m}\)?
Opgave
Uitwerking
import sympy as sym
sym.init_printing(use_latex='mathjax')
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display as ipy_display, Math
%config InlineBackend.figure_formats = ['svg']
def display(*objs):
for obj in objs:
if isinstance(obj, dict):
lines = [f"{sym.latex(k)} &= {sym.latex(obj[k])}" for k in sorted(obj, key=lambda s: str(s))]
ipy_display(Math(r"\begin{aligned}" + r"\\ ".join(lines) + r"\end{aligned}"))
else:
ipy_display(obj)
def plot(w_list, x_range_list,ylabel):
fig = plt.figure(facecolor='none')
for i, w in enumerate(w_list):
# check if x is the only symbol in the expression
if len(w.free_symbols) > 1:
raise ValueError('The expression must be a function of x only.')
w_numpy = sym.lambdify(x, w)
x_vals = np.linspace(x_range_list[i][0], x_range_list[i][1], 100)
# if the expression is a constant, we need to make sure that it is broadcasted correctly
if isinstance(w_numpy(x_vals),float) or isinstance(w_numpy(x_vals),int):
w_numpy = np.vectorize(w_numpy)
plt.plot(x_vals,w_numpy(x_vals))
plt.xlabel('$x$')
plt.ylabel(ylabel)
ax = plt.gca()
ax.set_facecolor('none')
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.spines['bottom'].set_position('zero')
ax.spines['left'].set_position('zero')
ax.invert_yaxis()
import sympy as sym
sym.var('x')
sym.var('C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12');
q1 = x / 7 * (-21) + 21
q2 = 0
q3 = 0
V1 = sym.integrate(-q1,x)+C1
M1 = sym.integrate(V1,x)+C2
kappa1 = M1 / 30000
phi1 = sym.integrate(kappa1,x)+C3
w1 = sym.integrate(-phi1,x)+C4
V2 = sym.integrate(-q2,x)+C5
M2 = sym.integrate(V2,x)+C6
kappa2 = M2 / 30000
phi2 = sym.integrate(kappa2,x)+C7
w2 = sym.integrate(-phi2,x)+C8
V3 = sym.integrate(-q3,x)+C9
M3 = sym.integrate(V3,x)+C10
kappa3 = M3 / 30000
phi3 = sym.integrate(kappa3,x)+C11
w3 = sym.integrate(-phi3,x)+C12
Eq1 = sym.Eq( w1.subs(x, 0), 0)
Eq2 = sym.Eq(phi1.subs(x, 0), 0)
Eq3 = sym.Eq( w1.subs(x, 7), w2.subs(x,7))
Eq4 = sym.Eq( M1.subs(x, 7), 0)
Eq5 = sym.Eq( M2.subs(x, 7), 0)
Eq6 = sym.Eq( V1.subs(x, 7), V2.subs(x, 7))
Eq7 = sym.Eq( w2.subs(x, 9), w3.subs(x, 9))
Eq8 = sym.Eq(phi2.subs(x, 9), phi3.subs(x, 9))
Eq9 = sym.Eq( M2.subs(x, 9), M3.subs(x, 9))
Eq10 = sym.Eq( -V2.subs(x, 9) + 30 + V3.subs(x, 9), 0)
Eq11 = sym.Eq( w3.subs(x,12), 0)
Eq12 = sym.Eq( M3.subs(x,12), 0)
sol = sym.solve((Eq1, Eq2, Eq3, Eq4, Eq5, Eq6, Eq7, Eq8, Eq9, Eq10, Eq11, Eq12), (C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12))
display(sol)
\[\begin{split}\displaystyle \begin{aligned}C_{1} &= \frac{183}{2}\\ C_{10} &= 144\\ C_{11} &= - \frac{3713}{1500000}\\ C_{12} &= \frac{25087}{125000}\\ C_{2} &= - \frac{595}{2}\\ C_{3} &= 0\\ C_{4} &= 0\\ C_{5} &= 18\\ C_{6} &= -126\\ C_{7} &= \frac{57037}{1500000}\\ C_{8} &= \frac{80549}{250000}\\ C_{9} &= -12\end{aligned}\end{split}\]
plot([w1_oplossing, w2_oplossing, w3_oplossing], [(0, 7), (7, 9), (9, 12)], 'w(x)')
plot([M1_oplossing, M2_oplossing, M3_oplossing], [(0, 7), (7, 9), (9, 12)], 'M(x)')
w_max = w1_oplossing.subs(x, 7) # m
M_max_neg = M1_oplossing.subs(x, 0) # kNm
M_max_pos = M2_oplossing.subs(x, 9) # kNm
display(w_max)
display(M_max_neg)
display(M_max_pos)
\[\displaystyle \frac{37387}{300000}\]
\[\displaystyle - \frac{595}{2}\]
\[\displaystyle 36\]