Example 3

Example 3#

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(-3/4)
oo = np.array([o0, o1])
L = 10

# gegevens belastingen
Fv, qh = 60, 18
RvA, RhA, TrA, RvC = sym.symbols('R_v^A R_h^A T_R^A R_v^C')
B = np.array([RvA, RhA, TrA, Fv, qh, RvC])
b1, b2, b3 = 0, 5, 10
bb = np.array([b1, b1, b1, b2, b2, b3])
# K = 1, Fv = 2, Fh = 3, qv = 4, qh = 5
nn = np.array([2, 3, 1, 2, 5, 2])
#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])
                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 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{-1} - 1.4 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{-1} + 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{-1} + 0.2 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{-1} + 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{-1} + T^{A}_{R} {\left\langle x \right\rangle}^{-2} + 48.0 {\left\langle x - 5 \right\rangle}^{-1} - 10.8 {\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.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{-1} - 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{-1} + 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{-1} + 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{-1} + 36.0 {\left\langle x - 5 \right\rangle}^{-1} + 14.4 {\left\langle x - 5 \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.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{0} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{0} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{0} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{0} - 36.0 {\left\langle x - 5 \right\rangle}^{0} - 14.4 {\left\langle x - 5 \right\rangle}^{1}\]
\[\displaystyle {V}=\]
\[\displaystyle C_{V} - 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{0} + 1.4 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{0} - 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{0} - 0.2 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{0} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{0} - T^{A}_{R} {\left\langle x \right\rangle}^{-1} - 48.0 {\left\langle x - 5 \right\rangle}^{0} + 10.8 {\left\langle x - 5 \right\rangle}^{1}\]
\[\displaystyle {M}=\]
\[\displaystyle C_{M} + C_{V} x - 0.8 R^{A}_{h} {\left\langle x \right\rangle}^{1} + 1.4 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 0.2 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.8 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - T^{A}_{R} {\left\langle x \right\rangle}^{0} - 48.0 {\left\langle x - 5 \right\rangle}^{1} + 5.4 {\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.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}}{EA}\]
\[\displaystyle {\phi}=\]
\[\displaystyle C_{\phi} + \frac{C_{M} x + \frac{C_{V} x^{2}}{2} - 0.4 R^{A}_{h} {\left\langle x \right\rangle}^{2} + 0.7 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{2} - 0.3 R^{A}_{v} {\left\langle x \right\rangle}^{2} - 0.1 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{2} - 0.4 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{2} - T^{A}_{R} {\left\langle x \right\rangle}^{1} - 24.0 {\left\langle x - 5 \right\rangle}^{2} + 1.8 {\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} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\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} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x \right\rangle}^{0} + 1.4 \left(- \frac{5 C_{N} - 3.0 R^{A}_{h} + 4.0 R^{A}_{v}}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}}{EA}\right) {\left\langle x - 5 \right\rangle}^{0} - 0.6 \left(- \frac{10 C_{N} - 7.0 R^{A}_{h} + 0.999999999999999 R^{A}_{v} - 360.0}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}}{EA}\right) {\left\langle x - 10 \right\rangle}^{0} + 0.2 \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} - \frac{25 T^{A}_{R}}{2}}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\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} - 104.166666666667 R^{A}_{h} - 104.166666666667 R^{A}_{v} - 50 T^{A}_{R} - 718.75}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\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.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \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} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\left\langle x - 5 \right\rangle}^{4}}{EI}\right) {\left\langle x \right\rangle}^{0} + 0.2 \left(- \frac{5 C_{N} - 3.0 R^{A}_{h} + 4.0 R^{A}_{v}}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}}{EA}\right) {\left\langle x - 5 \right\rangle}^{0} - 0.8 \left(- \frac{10 C_{N} - 7.0 R^{A}_{h} + 0.999999999999999 R^{A}_{v} - 360.0}{EA} + \frac{C_{N} x - 0.6 R^{A}_{h} {\left\langle x \right\rangle}^{1} - 0.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}}{EA}\right) {\left\langle x - 10 \right\rangle}^{0} - 1.4 \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} - \frac{25 T^{A}_{R}}{2}}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\left\langle x - 5 \right\rangle}^{4}}{EI}\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} - 104.166666666667 R^{A}_{h} - 104.166666666667 R^{A}_{v} - 50 T^{A}_{R} - 718.75}{EI} - \frac{\frac{C_{M} x^{2}}{2} + \frac{C_{V} x^{3}}{6} - 0.133333333333333 R^{A}_{h} {\left\langle x \right\rangle}^{3} + 0.233333333333333 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{3} - 0.1 R^{A}_{v} {\left\langle x \right\rangle}^{3} - 0.0333333333333333 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{3} - 0.133333333333333 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{3} - \frac{T^{A}_{R} {\left\langle x \right\rangle}^{2}}{2} - 8.0 {\left\langle x - 5 \right\rangle}^{3} + 0.45 {\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.2 R^{A}_{h} {\left\langle x - 5 \right\rangle}^{1} + 0.8 R^{A}_{v} {\left\langle x \right\rangle}^{1} - 1.4 R^{A}_{v} {\left\langle x - 5 \right\rangle}^{1} - 0.6 R^{C}_{v} {\left\langle x - 10 \right\rangle}^{1} - 36.0 {\left\langle x - 5 \right\rangle}^{1} - 7.2 {\left\langle x - 5 \right\rangle}^{2}\right) {\left\langle x \right\rangle}^{0}}{EA}\]
# 4 reactiekrachten + 6 integratieconstanten = 10 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-dx),0)
Eq6 = sym.Eq(M.subs(x,L),0)
Eq7 = sym.Eq(phi.subs(x,0),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)
sol = sym.solve((Eq1,Eq2,Eq3,Eq4,Eq5,Eq6,Eq7,Eq8,Eq9,Eq10),(RvA,RhA,TrA,RvC,CN,CV,CM,Cphi,Cuz,Cux))
display(sol)
{C_M: 0.0,
 C_N: 0.0,
 C_V: 0.0,
 C_phi: 0.0,
 C_ux: 0.0,
 C_uz: 0.0,
 R_h^A: -90.0000000000000,
 R_v^A: (-43125.0*EA - 1296.0*EI)/(1090.0*EA + 30.0*EI),
 R_v^C: (-22275.0*EA - 504.0*EI)/(1090.0*EA + 30.0*EI),
 T_R^A: (285525.0*EA + 8622.0*EI)/(1090.0*EA + 30.0*EI)}
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'{TrA} = {TrA.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')
display(f'{RvC} = {RvC.subs(sol).subs(EI,ei).subs(EA,ea):.2f}')

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 = -39.66'
'R_h^A = -90.00'
'T_R^A = 262.63'
'R_v^C = -20.34'
'C_N = 0.00'
'C_V = 0.00'
'C_M = 0.00'
'C_phi = 0.0000'
'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])
x_np = np.linspace(0-dx,L+dx,10000)
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))
display(f'N(0) = {N.subs(x,0).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'N(5-) = {N.subs(x,5-dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'N(5+) = {N.subs(x,5).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'N(10) = {N.subs(x,10-dx).subs(sol).subs(EI,ei).subs(EA,ea)}')

plt.figure()
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 22.2707142857143 {\left\langle x \right\rangle}^{0} + 37.52625 {\left\langle x - 5 \right\rangle}^{0} - 14.4 {\left\langle x - 5 \right\rangle}^{1} + 12.2030357142857 {\left\langle x - 10 \right\rangle}^{0}\]
'N(0) = 22.2707142857143'
'N(5-) = 22.2707142857143'
'N(5+) = 59.7969642857143'
'N(10) = -12.2030357142857'
../../_images/965efbba0a0ff348866db6a17a8d187f6c23433647d6448f23a8d75ffb04071d.png
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))
display(f'V(0) = {V.subs(x,0+dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'V(5-) = {V.subs(x,5-dx).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'V(5+) = {V.subs(x,5).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'V(10) = {V.subs(x,10-dx).subs(sol).subs(EI,ei).subs(EA,ea)}')

plt.figure()
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 - 262.63125 {\left\langle x \right\rangle}^{-1} + 95.7969642857143 {\left\langle x \right\rangle}^{0} - 166.067678571429 {\left\langle x - 5 \right\rangle}^{0} + 10.8 {\left\langle x - 5 \right\rangle}^{1} + 16.2707142857143 {\left\langle x - 10 \right\rangle}^{0}\]
'V(0) = 95.7969642857143'
'V(5-) = 95.7969642857143'
'V(5+) = -70.2707142857143'
'V(10) = -16.2707142857143'
../../_images/0baefd8b6fa3bacab574045040fdcdadbb624ea467160680fe99d755285ce57e.png
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))
display(f'M(0) = {M.subs(x,0).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'M(5) = {M.subs(x,5).subs(sol).subs(EI,ei).subs(EA,ea)}')
display(f'M(10) = {M.subs(x,10).subs(sol).subs(EI,ei).subs(EA,ea)}')

plt.figure()
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 - 262.63125 {\left\langle x \right\rangle}^{0} + 95.7969642857143 {\left\langle x \right\rangle}^{1} - 166.067678571429 {\left\langle x - 5 \right\rangle}^{1} + 5.4 {\left\langle x - 5 \right\rangle}^{2} + 16.2707142857143 {\left\langle x - 10 \right\rangle}^{1}\]
'M(0) = -262.631250000000'
'M(5) = 216.353571428571'
'M(10) = -1.13686837721616E-13'
../../_images/14b0ca3c51116bf350e766903156e938a329b5436f09f54adce6917904ed2e5b.png
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))
display(f'uv(0) = {uv.subs(x,0).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'uv(5) = {uv.subs(x,5).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'uv(10) = {uv.subs(x,10).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')

#display(uh.subs(sol))
display(f'uh(0) = {uh.subs(x,0).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'uh(5) = {uh.subs(x,5).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')
display(f'uh(10) = {uh.subs(x,10).subs(sol).subs(EI,ei).subs(EA,ea):.4f}')

plt.figure()
plt.plot(h_np(x_np),v_np(x_np), linewidth=2, color='black', label='constructie')
plt.plot((h_np(x_np)+uh_np(x_np)),(v_np(x_np)+uv_np(x_np)), 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.0000'
'uv(5) = 0.0683'
'uv(10) = 0.0000'
'uh(0) = 0.0000'
'uh(5) = 0.1097'
'uh(10) = 0.1758'
../../_images/8619241f3d25bc21d99f684b699e61ce9fec44a0bf592c90fd1241b199010bba.png