Example 2#
import sympy as sym
import numpy as np
import matplotlib.pyplot as plt
# algemene gegevens
x = sym.symbols('x')
EI, EA = sym.symbols('EI EA')
CV, CM, Cphi, Cuz, CN, Cux = sym.symbols('C_V C_M C_phi C_uz C_N C_ux')
dx = 10**-15
# gegevens constructie
a0, a1, a2 = 0, 5, 10
aa = np.array([a0, a1, a2])
o0, o1 = sym.atan(4/3), sym.atan(-4/3)
oo = np.array([o0, o1])
L = 10
# gegevens belastingen
qh = 60
RvA, RhA, RvC, RhC = sym.symbols('R_v^A R_h^A R_v^C R_h^C')
phisB = sym.symbols('phi_s^B')
B = np.array([RvA, RhA, qh, phisB, RvC, RhC])
b1, b2, b3 = 0, 5, 10
bb = np.array([b1, b1, b1, b2, b3, b3])
# K = 1, Fv = 2, Fh = 3, qv = 4, qh = 5
nn = np.array([2, 3, 5, 6, 2, 3])
#qz opstellen
qz = 0
#beginpunten
for i in range(len(B)):
for j in range(len(aa)):
if bb[i] == aa[-1]:
if nn[i] == 1:
qz += B[i] * sym.SingularityFunction(x,bb[i],-2)
if nn[i] == 2:
qz += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.cos(oo[-1])
if nn[i] == 3:
qz += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.sin(oo[-1])
if nn[i] == 4:
qz += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.cos(oo[-1])
if nn[i] == 5:
qz += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.sin(oo[-1])
break
else:
if bb[i] < aa[j]:
if nn[i] == 1:
qz += B[i] * sym.SingularityFunction(x,bb[i],-2)
if nn[i] == 2:
qz += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.cos(oo[j-1])
if nn[i] == 3:
qz += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.sin(oo[j-1])
if nn[i] == 4:
qz += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.cos(oo[j-1])
if nn[i] == 5:
qz += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.sin(oo[j-1])
if nn[i] == 6:
qz += B[i] * sym.SingularityFunction(x,bb[i],-3) * EI
break
# knikpunten
for i in range(len(B)):
for j in range(len(aa)-1):
if bb[i] < aa[j]:
if nn[i] == 2:
qz += B[i] * sym.SingularityFunction(x,aa[j],-1) * (sym.cos(oo[j]) - sym.cos(oo[j-1]))
if nn[i] == 3:
qz += B[i] * sym.SingularityFunction(x,aa[j],-1) * (sym.sin(oo[j]) - sym.sin(oo[j-1]))
if nn[i] == 4:
qz += B[i] * ((sym.SingularityFunction(x,aa[j],0) + sym.SingularityFunction(x,aa[j],-1) * (aa[j] - bb[i])) * (sym.cos(oo[j]) - sym.cos(oo[j-1])))
if nn[i] == 5:
qz += B[i] * ((sym.SingularityFunction(x,aa[j],0) + sym.SingularityFunction(x,aa[j],-1) * (aa[j] - bb[i])) * (sym.sin(oo[j]) - sym.sin(oo[j-1])))
display(qz)
\[\displaystyle EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{-3} + 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{-1} - 1.6 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{-1} - 0.8 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{-1} + 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{-1} + 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{-1} + 48.0 {\left\langle x \right\rangle}^{0} - 480.0 {\left\langle x - 5 \right\rangle}^{-1} - 96.0 {\left\langle x - 5 \right\rangle}^{0}\]
#qx opstellen
qx = 0
#beginpunten
for i in range(len(B)):
for j in range(len(aa)):
if bb[i] == aa[-1]:
if nn[i] == 2:
qx += B[i] * sym.SingularityFunction(x,bb[i],-1) * -sym.sin(oo[-1])
if nn[i] == 3:
qx += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.cos(oo[-1])
if nn[i] == 4:
qx += B[i] * sym.SingularityFunction(x,bb[i],0) * -sym.sin(oo[-1])
if nn[i] == 5:
qx += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.cos(oo[-1])
break
else:
if bb[i] < aa[j]:
if nn[i] == 2:
qx += B[i] * sym.SingularityFunction(x,bb[i],-1) * -sym.sin(oo[j-1])
if nn[i] == 3:
qx += B[i] * sym.SingularityFunction(x,bb[i],-1) * sym.cos(oo[j-1])
if nn[i] == 4:
qx += B[i] * sym.SingularityFunction(x,bb[i],0) * -sym.sin(oo[j-1])
if nn[i] == 5:
qx += B[i] * sym.SingularityFunction(x,bb[i],0) * sym.cos(oo[j-1])
break
# knikpunten
for i in range(len(B)):
for j in range(len(aa)-1):
if bb[i] < aa[j]:
if nn[i] == 2:
qx += B[i] * sym.SingularityFunction(x,aa[j],-1) * (-sym.sin(oo[j]) + sym.sin(oo[j-1]))
if nn[i] == 3:
qx += B[i] * sym.SingularityFunction(x,aa[j],-1) * (sym.cos(oo[j]) - sym.cos(oo[j-1]))
if nn[i] == 4:
qx += B[i] * ((sym.SingularityFunction(x,aa[j],0) + sym.SingularityFunction(x,aa[j],-1) * (aa[j] - bb[i])) * (-sym.sin(oo[j]) + sym.sin(oo[j-1])))
if nn[i] == 5:
qx += B[i] * ((sym.SingularityFunction(x,aa[j],0) + sym.SingularityFunction(x,aa[j],-1) * (aa[j] - bb[i])) * (sym.cos(oo[j]) - sym.cos(oo[j-1])))
display(qx)
\[\displaystyle 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{-1} + 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{-1} - 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{-1} + 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{-1} + 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{-1} + 36.0 {\left\langle x \right\rangle}^{0}\]
V = -sym.integrate(qz.expand(), x) + CV
M = sym.integrate(V, x) + CM
kappa = M / EI
phi = sym.integrate(kappa, x) + Cphi
uz = -sym.integrate(phi, x) + Cuz
N = -sym.integrate(qx.expand(), x) + CN
epsilon = N / EA
ux = sym.integrate(epsilon, x) + Cux
uvz = uz.subs(x,0) * sym.cos(o0)
uvx = -ux.subs(x,0) * sym.sin(o0)
for i in range(len(oo)):
uvz += ((uz - uz.subs(x,aa[i])) * sym.SingularityFunction(x,aa[i],0) - (uz - uz.subs(x,aa[i+1])) * sym.SingularityFunction(x,aa[i+1],0)) * sym.cos(oo[i])
uvx += -((ux - ux.subs(x,aa[i])) * sym.SingularityFunction(x,aa[i],0) - (ux - ux.subs(x,aa[i+1])) * sym.SingularityFunction(x,aa[i+1],0)) * sym.sin(oo[i])
uv = uvz + uvx
uhz = uz.subs(x,0) * sym.sin(o0)
uhx = ux.subs(x,0) * sym.cos(o0)
for i in range(len(oo)):
uhz += ((uz - uz.subs(x,aa[i])) * sym.SingularityFunction(x,aa[i],0) - (uz - uz.subs(x,aa[i+1])) * sym.SingularityFunction(x,aa[i+1],0)) * sym.sin(oo[i])
uhx += ((ux - ux.subs(x,aa[i])) * sym.SingularityFunction(x,aa[i],0) - (ux - ux.subs(x,aa[i+1])) * sym.SingularityFunction(x,aa[i+1],0)) * sym.cos(oo[i])
uh = uhz + uhx
display(sym.symbols('{N}='), N)
display(sym.symbols('{V}='), V)
display(sym.symbols('{M}='), M)
display(sym.symbols('{u_x}='), ux)
display(sym.symbols('{\phi}='), phi)
display(sym.symbols('{u_z}='), uz)
display(sym.symbols('{u_v}='), uv)
display(sym.symbols('{u_h}='), uh)
\[\displaystyle {N}=\]
\[\displaystyle C_{N} - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{0} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{0} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{0} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{0} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{0} - 36.0 {\left\langle x \right\rangle}^{1}\]
\[\displaystyle {V}=\]
\[\displaystyle C_{V} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{-2} - 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{0} + 1.6 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{0} + 0.8 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{0} - 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{0} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{0} - 48.0 {\left\langle x \right\rangle}^{1} + 480.0 {\left\langle x - 5 \right\rangle}^{0} + 96.0 {\left\langle x - 5 \right\rangle}^{1}\]
\[\displaystyle {M}=\]
\[\displaystyle C_{M} + C_{V} x - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{-1} - 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{1} + 1.6 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} - 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 24.0 {\left\langle x \right\rangle}^{2} + 480.0 {\left\langle x - 5 \right\rangle}^{1} + 48.0 {\left\langle x - 5 \right\rangle}^{2}\]
\[\displaystyle {u_x}=\]
\[\displaystyle C_{ux} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}}{EA}\]
\[\displaystyle {\phi}=\]
\[\displaystyle C_{\phi} + \frac{C_{M} x + \frac{C_{V} x^{2}}{2} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{0} - 0.4 R^{A}_{h} {\left\langle x \right\rangle}^{2} + 0.8 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{2} + 0.4 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{2} - 0.3 R^{A}_{v} {\left\langle x \right\rangle}^{2} - 0.3 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{2} - 8.0 {\left\langle x \right\rangle}^{3} + 240.0 {\left\langle x - 5 \right\rangle}^{2} + 16.0 {\left\langle x - 5 \right\rangle}^{3}}{EI}\]
\[\displaystyle {u_z}=\]
\[\displaystyle - C_{\phi} x + C_{uz} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\]
\[\displaystyle {u_v}=\]
\[\displaystyle - 0.8 C_{ux} + 0.6 C_{uz} + 0.6 \left(- C_{\phi} x - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x \right\rangle}^{0} - 0.8 \left(- \frac{10 C_{N} - 6.0 R^{A}_{h} - 1800.0}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}}{EA}\right) {\left\langle x - 10 \right\rangle}^{0} + 1.6 \left(- \frac{5 C_{N} - 3.0 R^{A}_{h} + 4.0 R^{A}_{v} - 450.0}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}}{EA}\right) {\left\langle x - 5 \right\rangle}^{0} - 0.6 \left(- C_{\phi} x + 10 C_{\phi} + \frac{50 C_{M} + \frac{500 C_{V}}{3} - 5 EI \phi^{B}_{s} - 100.0 R^{A}_{h} - 100.0 R^{A}_{v} - 7500.0}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x - 10 \right\rangle}^{0} - \frac{0.8 \left(C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}\right) {\left\langle x \right\rangle}^{0}}{EA}\]
\[\displaystyle {u_h}=\]
\[\displaystyle 0.6 C_{ux} + 0.8 C_{uz} + 0.8 \left(- C_{\phi} x - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x \right\rangle}^{0} - 0.6 \left(- \frac{10 C_{N} - 6.0 R^{A}_{h} - 1800.0}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}}{EA}\right) {\left\langle x - 10 \right\rangle}^{0} - 1.6 \left(- C_{\phi} x + 5 C_{\phi} + \frac{\frac{25 C_{M}}{2} + \frac{125 C_{V}}{6} - 16.6666666666667 R^{A}_{h} - 12.5 R^{A}_{v} - 1250.0}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x - 5 \right\rangle}^{0} + 0.8 \left(- C_{\phi} x + 10 C_{\phi} + \frac{50 C_{M} + \frac{500 C_{V}}{3} - 5 EI \phi^{B}_{s} - 100.0 R^{A}_{h} - 100.0 R^{A}_{v} - 7500.0}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - EI \phi^{B}_{s} {\left\langle x - 5 \right\rangle}^{1} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.266666666666667 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} + 0.133333333333333 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.1 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - 2.0 {\left\langle x \right\rangle}^{4} + 80.0 {\left\langle x - 5 \right\rangle}^{3} + 4.0 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x - 10 \right\rangle}^{0} + \frac{0.6 \left(C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.6 R^{C}_{h} {\left\langle x - 10 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.6 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 18.0 {\left\langle x \right\rangle}^{2}\right) {\left\langle x \right\rangle}^{0}}{EA}\]
# 4 reactiekrachten + 1 scharnier + 6 integratieconstanten = 11 voorwaarden
Eq1 = sym.Eq(N.subs(x,0-dx),0)
Eq2 = sym.Eq(N.subs(x,L+dx),0)
Eq3 = sym.Eq(V.subs(x,0-dx),0)
Eq4 = sym.Eq(V.subs(x,L+dx),0)
Eq5 = sym.Eq(M.subs(x,0),0)
Eq6 = sym.Eq(M.subs(x,a1+dx),0)
Eq7 = sym.Eq(M.subs(x,L),0)
Eq8 = sym.Eq(uv.subs(x,0),0)
Eq9 = sym.Eq(uv.subs(x,L),0)
Eq10 = sym.Eq(uh.subs(x,0),0)
Eq11 = sym.Eq(uh.subs(x,L),0)
sol = sym.solve((Eq1,Eq2,Eq3,Eq4,Eq5,Eq6,Eq7,Eq8,Eq9,Eq10,Eq11),(RvA,RhA,RvC,RhC,phisB,CN,CV,CM,Cphi,Cuz,Cux))
display(sol)
{C_M: 0.0,
C_N: 0.0,
C_V: 0.0,
C_phi: 0.333333333333333*(-750.0*EA - 1000.0*EI)/(EA*EI),
C_ux: 0.0,
C_uz: 0.0,
R_h^A: -300.000000000000,
R_h^C: -300.000000000000,
R_v^A: 200.000000000000,
R_v^C: -200.000000000000,
phi_s^B: 0.0}
ea = 10**4
ei = 10**4
display(f'{RvA} = {RvA.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{RhA} = {RhA.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{RvC} = {RvC.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{RhC} = {RhC.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{phisB} = {phisB.subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'{CN} = {CN.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{CV} = {CV.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{CM} = {CM.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{Cphi} = {Cphi.subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'{Cux} = {Cux.subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'{Cuz} = {Cuz.subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
'R_v^A = 200.00'
'R_h^A = -300.00'
'R_v^C = -200.00'
'R_h^C = -300.00'
'phi_s^B = 0.0000'
'C_N = 0.00'
'C_V = 0.00'
'C_M = 0.00'
'C_phi = -0.0583'
'C_ux = 0.0000'
'C_uz = 0.0000'
v = 0
h = 0
for i in range(len(oo)):
v += -(sym.SingularityFunction(x,aa[i],1) - sym.SingularityFunction(x,aa[i+1],1)) * sym.sin(oo[i])
h += (sym.SingularityFunction(x,aa[i],1) - sym.SingularityFunction(x,aa[i+1],1)) * sym.cos(oo[i])
L = 10
x_np = np.linspace(0-dx,L+dx,10000)
ab = aa
N_np = sym.lambdify(x, N.subs(sol).subs(EI,ei).subs(EA,ea).rewrite(sym.Piecewise))
display(N.subs(sol).subs(EI,ei).subs(EA,ea))
for i in range(len(ab)):
display(f'N({ab[i]}) = {N.subs(x,ab[i]+dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
plt.figure(figsize=(5,4))
plt.plot(x_np,N_np(x_np))
plt.xlabel('$x$')
plt.ylabel('$N$');
ax = plt.gca()
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()
\[\displaystyle 340.0 {\left\langle x \right\rangle}^{0} - 36.0 {\left\langle x \right\rangle}^{1} - 320.0 {\left\langle x - 5 \right\rangle}^{0} + 340.0 {\left\langle x - 10 \right\rangle}^{0}\]
'N(0) = 340.000000000000'
'N(5) = -160.000000000000'
'N(10) = -5.68434188608080E-14'
V_np = sym.lambdify(x, V.subs(sol).subs(EI,ei).subs(EA,ea).rewrite(sym.Piecewise))
display(V.subs(sol).subs(EI,ei).subs(EA,ea))
for i in range(len(ab)):
display(f'V({ab[i]}) = {V.subs(x,ab[i]+dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
plt.figure(figsize=(5,4))
plt.plot(x_np,V_np(x_np))
plt.xlabel('$x$')
plt.ylabel('$V$');
ax = plt.gca()
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()
\[\displaystyle 120.0 {\left\langle x \right\rangle}^{0} - 48.0 {\left\langle x \right\rangle}^{1} + 96.0 {\left\langle x - 5 \right\rangle}^{1} - 120.0 {\left\langle x - 10 \right\rangle}^{0}\]
'V(0) = 120.000000000000'
'V(5) = -120.000000000000'
'V(10) = 5.68434188608080E-14'
M_np = sym.lambdify(x, M.subs(sol).subs(EI,ei).subs(EA,ea).rewrite(sym.Piecewise))
display(M.subs(sol).subs(EI,ei).subs(EA,ea))
for i in range(len(ab)):
display(f'M({ab[i]}) = {M.subs(x,ab[i]-dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
plt.figure(figsize=(5,4))
plt.plot(x_np,M_np(x_np))
plt.xlabel('$x$')
plt.ylabel('$M$');
ax = plt.gca()
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()
\[\displaystyle 120.0 {\left\langle x \right\rangle}^{1} - 24.0 {\left\langle x \right\rangle}^{2} + 48.0 {\left\langle x - 5 \right\rangle}^{2} - 120.0 {\left\langle x - 10 \right\rangle}^{1}\]
'M(0) = 0'
'M(5) = 0'
'M(10) = -4.54747350886464E-13'
v_np = sym.lambdify(x, v.rewrite(sym.Piecewise))
h_np = sym.lambdify(x, h.rewrite(sym.Piecewise))
uv_np = sym.lambdify(x, uv.subs(sol).subs(EI,ei).subs(EA,ea).rewrite(sym.Piecewise))
uh_np = sym.lambdify(x, uh.subs(sol).subs(EI,ei).subs(EA,ea).rewrite(sym.Piecewise))
#display(uv.subs(sol))
for i in range(len(ab)):
display(f'uv({ab[i]}) = {uv.subs(x,ab[i]).subs(sol).subs(EI,ei).subs(EA,ea)}')
for i in range(len(ab)):
display(f'uh({ab[i]}) = {uh.subs(x,ab[i]).subs(sol).subs(EI,ei).subs(EA,ea)}')
plt.figure()
plt.plot(h_np(x_np),v_np(x_np), marker='.',markersize=1, linewidth=0, color='black', label='constructie')
plt.plot((h_np(x_np)+uh_np(x_np)),(v_np(x_np)+uv_np(x_np)), marker='.',markersize=0.5, linewidth=0, label='vervormde constructie')
plt.xlabel('$h$')
plt.ylabel('$v$');
ax = plt.gca()
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()
plt.axis('scaled')
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.05),fancybox=True, shadow=False, ncol=3);
'uv(0) = 0'
'uv(5) = 8.32667268468867E-17'
'uv(10) = 0'
'uh(0) = 0'
'uh(5) = 0.208333333333333'
'uh(10) = 1.22781784739345E-16'