Geknikte constructie#

import sympy as sp
import numpy as np
from sympy import symbols
sf = sp.SingularityFunction
import matplotlib.pyplot as plt
EI = symbols('EI')
x = symbols('x')

Benadering#

x, Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('x, C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

l = 4
F1 = 10
F2 = 10

theta = sp.atan(0.25)
alpha = sp.atan(0.5)
## Krachtenvergelijking van staaf 1
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1))
qx1 = sp.nsimplify(Ah * sf(x, 0, -1))
## Krachtenvergelijking van staaf 2

qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1))
qx2 = 0
## V = V1 + V2 
## Dwarskracht in de eerste staaf 
V1 = sp.integrate(-qx1 * sp.sin(theta), x) + sp.integrate(-qz1 * sp.cos(theta), x)
## Dwasrkracht in de tweede staaf
V2 = sp.integrate(-qx2 * sp.sin(alpha), x) + sp.integrate(-qz2 * sp.cos(alpha), x)

V = V1 + V2 + Cv
## N = N1 + N2 
## Normaalkracht in de eerste staaf
N1 = sp.integrate(-qx1 * sp.cos(theta), x) + sp.integrate(qz1 * sp.sin(theta), x)
## Normaalkracht in de tweedee staaf
N2 = sp.integrate(-qx2 * sp.cos(alpha), x) + sp.integrate(qz2 * sp.sin(alpha), x)
N = N1 + N2 + Cn
M1 = sp.integrate(V1/sp.cos(theta), x)
M2 = sp.integrate(V2/sp.cos(alpha), x)
M = M1 + M2 + Cm
phi = sp.integrate(M, x) + Cphi
W = sp.integrate(phi, x) + Cw
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)

eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)

eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l )

eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) )

equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cn, Cm, Cphi, Cw, Av, Bv, MA, Cv, Ah))
display(solutions)
{C_n: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 11.0539215686274,
 B_v: 8.92036924928217,
 M_A: 15.9722222222222,
 C_v: 0.0,
 A_h: 0.234204793028313}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify())
V_list = V_numpy(x_val)

print(V_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list));
[0.9656511 0.9656511]
../../_images/e87aa87043dd32bb285d49587b5623e5d9140669b49637de1749a90a443aace1.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 7)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list)); 
[-0.48282555 -0.48282555]
../../_images/25065846d5325314b06799f48a77eb075aee4eb14a318de7e659c3e1075f9130.png

Iteratie 1#

Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

# Define qz and qx
DwaL =  0.9656511
DwaR =  0.9656511
NorL = -0.48282555
NorR = -0.48282555
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1) + DwaL * sf(x, l, -1) * sp.cos(theta)- NorL * sf(x, l, -1) * sp.sin(theta))
qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1) - DwaR *sf(x, l, -1)* sp.cos(alpha) + NorR * sf(x, l, -1)* sp.sin(alpha) )
qx1 = sp.nsimplify(Ah * sf(x, 0, -1) + DwaL * sf(x, l, -1) * sp.sin(theta)  + NorL * sf(x, l, -1)* sp.cos(theta))
qx2 = sp.nsimplify(-DwaR * sf(x, l, -1)*sp.sin(alpha) -NorR * sf(x, l, -1)* sp.cos(alpha))


# Define V as a function of x
## staaf 1
V1 = sp.cos(theta) * sp.integrate( -qz1 , x)
V2 = sp.integrate(- (sp.sin(theta) * sp.tan(theta) * qx1), x)
## staaf 2
V3 = sp.cos(alpha) * sp.integrate( -qz2 , x)
V4 = sp.integrate(- (sp.sin(alpha) * sp.tan(alpha) * qx2), x)

V =V1 + V2 + V3 + V4 + Cv

# Define M as an integral of V
## staaf 1
M1 = sp.integrate( (V1  / sp.cos(theta)), x)
M2 = sp.integrate( (V2  / sp.cos(theta)), x)
## sfaaf 2
M3 = sp.integrate((V3 / sp.cos(alpha)), x)
M4 = sp.integrate((V4 / sp.cos(alpha)), x)
M  = M1 + M2 + M3+ M4 + Cm

# Define phi as an integral of M
phi = sp.integrate(M, x) + Cphi

# Define W as an integral of -phi
W = sp.integrate(-phi, x) + Cw

N1 = sp.integrate(sp.sin(theta) * (-qx1 + qz1), x) + Cn
N2 = sp.integrate(sp.sin(alpha) * (-qx2 + qz2), x) 
N = N1+ N2 +Cn
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)
eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)
eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l)
eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) +1 )
equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cv, Cm, Cphi, Cw, Av, Bv, MA, Cn, Ah))
display(solutions)
{C_v: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 10.9868559793420,
 B_v: 8.98907082505678,
 M_A: 15.9363582385174,
 C_n: 0.0,
 A_h: 0.174590935654146}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify()) 
V_list = V_numpy(x_val)
print(V_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list)); 
[0.9468048  0.90420254]
../../_images/801f3778f16f289f9069055e25b7a8dee74144e147271f69263cd8a74d80e1cd.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-4, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list));
[-0.28169225 -0.45210127]
../../_images/409af80c65b5f1e01f97c79c57bde644dea7eadc042f024f46e8245f20ac7e20.png

Iteratie 2#

Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

# Define qz and qx
DwaL =  0.9468048
DwaR =  0.90420254
NorL = -0.28169225
NorR = -0.45210127
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1) + DwaL * sf(x, l, -1) * sp.cos(theta)- NorL * sf(x, l, -1) * sp.sin(theta))
qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1) - DwaR *sf(x, l, -1)* sp.cos(alpha) + NorR * sf(x, l, -1)* sp.sin(alpha) )
qx1 = sp.nsimplify(Ah * sf(x, 0, -1) + DwaL * sf(x, l, -1) * sp.sin(theta)  + NorL * sf(x, l, -1)* sp.cos(theta))
qx2 = sp.nsimplify(-DwaR * sf(x, l, -1)*sp.sin(alpha) -NorR * sf(x, l, -1)* sp.cos(alpha))


# Define V as a function of x
## staaf 1
V1 = sp.cos(theta) * sp.integrate( -qz1 , x)
V2 = sp.integrate(- (sp.sin(theta) * sp.tan(theta) * qx1), x)
## staaf 2
V3 = sp.cos(alpha) * sp.integrate( -qz2 , x)
V4 = sp.integrate(- (sp.sin(alpha) * sp.tan(alpha) * qx2), x)

V =V1 + V2 + V3 + V4 + Cv

# Define M as an integral of V
## staaf 1
M1 = sp.integrate( (V1  / sp.cos(theta)), x)
M2 = sp.integrate( (V2  / sp.cos(theta)), x)
## sfaaf 2
M3 = sp.integrate((V3 / sp.cos(alpha)), x)
M4 = sp.integrate((V4 / sp.cos(alpha)), x)
M  = M1 + M2 + M3+ M4 + Cm

# Define phi as an integral of M
phi = sp.integrate(M, x) + Cphi

# Define W as an integral of -phi
W = sp.integrate(-phi, x) + Cw

N1 = sp.integrate(sp.sin(theta) * (-qx1 + qz1), x) + Cn
N2 = sp.integrate(sp.sin(alpha) * (-qx2 + qz2), x) 
N = N1+ N2 + Cn
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)
eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)
eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l)
eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) +1 )
equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cv, Cm, Cphi, Cw, Av, Bv, MA, Cn, Ah))
display(solutions)
{C_v: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 10.9850963259576,
 B_v: 8.99087340809321,
 M_A: 15.9483989566231,
 C_n: 0.0,
 A_h: 0.0420835912550643}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify()) 
V_list = V_numpy(x_val)
print(V_list[200:202]) 

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list)); 
[0.95313212 0.90259026]
../../_images/cdb59d04e4b4747315032967de4a575c0fb14ebbb065afe6df845f0861c8f7d7.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-4, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list));
[-0.24912772 -0.45129513]
../../_images/50c6bd6570c0eb0542fbd7a998bf704ef46d1f80637d0126ced3ed52ba317741.png

Iteratie 3#

Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

# Define qz and qx
DwaL =  0.95313212
DwaR =  0.90259026
NorL = -0.24912772
NorR = -0.45129513
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1) + DwaL * sf(x, l, -1) * sp.cos(theta)- NorL * sf(x, l, -1) * sp.sin(theta))
qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1) - DwaR *sf(x, l, -1)* sp.cos(alpha) + NorR * sf(x, l, -1)* sp.sin(alpha) )
qx1 = sp.nsimplify(Ah * sf(x, 0, -1) + DwaL * sf(x, l, -1) * sp.sin(theta)  + NorL * sf(x, l, -1)* sp.cos(theta))
qx2 = sp.nsimplify(-DwaR * sf(x, l, -1)*sp.sin(alpha) -NorR * sf(x, l, -1)* sp.cos(alpha))


# Define V as a function of x
## staaf 1
V1 = sp.cos(theta) * sp.integrate( -qz1 , x)
V2 = sp.integrate(- (sp.sin(theta) * sp.tan(theta) * qx1), x)
## staaf 2
V3 = sp.cos(alpha) * sp.integrate( -qz2 , x)
V4 = sp.integrate(- (sp.sin(alpha) * sp.tan(alpha) * qx2), x)

V =V1 + V2 + V3 + V4 + Cv

# Define M as an integral of V
## staaf 1
M1 = sp.integrate( (V1  / sp.cos(theta)), x)
M2 = sp.integrate( (V2  / sp.cos(theta)), x)
## sfaaf 2
M3 = sp.integrate((V3 / sp.cos(alpha)), x)
M4 = sp.integrate((V4 / sp.cos(alpha)), x)
M  = M1 + M2 + M3+ M4 + Cm

# Define phi as an integral of M
phi = sp.integrate(M, x) + Cphi

# Define W as an integral of -phi
W = sp.integrate(-phi, x) + Cw

N1 = sp.integrate(sp.sin(theta) * (-qx1 + qz1), x) + Cn
N2 = sp.integrate(sp.sin(alpha) * (-qx2 + qz2), x) 
N = N1+ N2 + Cn
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)
eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)
eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l)
eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) +1 )
equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cv, Cm, Cphi, Cw, Av, Bv, MA, Cn, Ah))
display(solutions)
{C_v: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 10.9840850145227,
 B_v: 8.99190939177049,
 M_A: 15.9502774939007,
 C_n: 0.0,
 A_h: 0.00962195189033341}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify()) 
V_list = V_numpy(x_val)
print(V_list[200:202]) 

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list));
[0.95411928 0.90166365]
../../_images/c8f2ddda33734657beb25fdeea3e3e09db35d41f5dd95c6706e50f1705eba3db.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-4, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list));
[-0.24100934 -0.45083183]
../../_images/173bbb53ce037678c76eac35c243ac1136c612e5e76300001a1268134cdded4e.png

Iteratie 4#

Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

# Define qz and qx
DwaL =  0.95411928
DwaR =  0.90166365
NorL = -0.24100934
NorR = -0.45083183
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1) + DwaL * sf(x, l, -1) * sp.cos(theta)- NorL * sf(x, l, -1) * sp.sin(theta))
qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1) - DwaR *sf(x, l, -1)* sp.cos(alpha) + NorR * sf(x, l, -1)* sp.sin(alpha) )
qx1 = sp.nsimplify(Ah * sf(x, 0, -1) + DwaL * sf(x, l, -1) * sp.sin(theta)  + NorL * sf(x, l, -1)* sp.cos(theta))
qx2 = sp.nsimplify(-DwaR * sf(x, l, -1)*sp.sin(alpha) -NorR * sf(x, l, -1)* sp.cos(alpha))


# Define V as a function of x
## staaf 1
V1 = sp.cos(theta) * sp.integrate( -qz1 , x)
V2 = sp.integrate(- (sp.sin(theta) * sp.tan(theta) * qx1), x)
## staaf 2
V3 = sp.cos(alpha) * sp.integrate( -qz2 , x)
V4 = sp.integrate(- (sp.sin(alpha) * sp.tan(alpha) * qx2), x)

V =V1 + V2 + V3 + V4 + Cv

# Define M as an integral of V
## staaf 1
M1 = sp.integrate( (V1  / sp.cos(theta)), x)
M2 = sp.integrate( (V2  / sp.cos(theta)), x)
## sfaaf 2
M3 = sp.integrate((V3 / sp.cos(alpha)), x)
M4 = sp.integrate((V4 / sp.cos(alpha)), x)
M  = M1 + M2 + M3+ M4 + Cm

# Define phi as an integral of M
phi = sp.integrate(M, x) + Cphi

# Define W as an integral of -phi
W = sp.integrate(-phi, x) + Cw

N1 = sp.integrate(sp.sin(theta) * (-qx1 + qz1), x) + Cn
N2 = sp.integrate(sp.sin(alpha) * (-qx2 + qz2), x) 
N = N1 + N2 + Cn
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)
eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)
eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l)
eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) +1 )
equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cv, Cm, Cphi, Cw, Av, Bv, MA, Cn, Ah))
display(solutions)
{C_v: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 10.9838786097141,
 B_v: 8.99212083108564,
 M_A: 15.9507502786053,
 C_n: 0.0,
 A_h: 0.00222200751313955}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify()) 
V_list = V_numpy(x_val)
print(V_list[200:202]) 

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list)); 
[0.95436773 0.90147453]
../../_images/6da7bad8940b75e4f8d201d19584b0b5e96304436e04d2b34502c641af5d95c8.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-4, 12)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list));
[-0.23916453 -0.45073727]
../../_images/402a59f78d620f52634215e7258bc07177dab7438db9b2d1e055f9a9958b6982.png

Iteratie 5#

Cv, Cm, Cphi, Cw, Av, Bv, MA, Ah, Cn= sp.symbols('C_v, C_m, C_phi, C_w, A_v, B_v, M_A, A_h, C_n')

# Define qz and qx
DwaL =  0.95436773
DwaR =  0.90147453
NorL = -0.23916453
NorR = -0.45073727
qz1 = sp.nsimplify(-Av * sf(x, 0, -1) + MA* sf(x, 0, -2) + F1 *sf(x, l/2, -1) + DwaL * sf(x, l, -1) * sp.cos(theta)- NorL * sf(x, l, -1) * sp.sin(theta))
qz2 = sp.nsimplify(-Bv * sf(x, (3/2)*l, -1) + F2 *sf(x, (5/4)*l, -1) - DwaR *sf(x, l, -1)* sp.cos(alpha) + NorR * sf(x, l, -1)* sp.sin(alpha) )
qx1 = sp.nsimplify(Ah * sf(x, 0, -1) + DwaL * sf(x, l, -1) * sp.sin(theta)  + NorL * sf(x, l, -1)* sp.cos(theta))
qx2 = sp.nsimplify(-DwaR * sf(x, l, -1)*sp.sin(alpha) -NorR * sf(x, l, -1)* sp.cos(alpha))


# Define V as a function of x
## staaf 1
V1 = sp.cos(theta) * sp.integrate( -qz1 , x)
V2 = sp.integrate(- (sp.sin(theta) * sp.tan(theta) * qx1), x)
## staaf 2
V3 = sp.cos(alpha) * sp.integrate( -qz2 , x)
V4 = sp.integrate(- (sp.sin(alpha) * sp.tan(alpha) * qx2), x)

V =V1 + V2 + V3 + V4 + Cv

# Define M as an integral of V
## staaf 1
M1 = sp.integrate( (V1  / sp.cos(theta)), x)
M2 = sp.integrate( (V2  / sp.cos(theta)), x)
## sfaaf 2
M3 = sp.integrate((V3 / sp.cos(alpha)), x)
M4 = sp.integrate((V4 / sp.cos(alpha)), x)
M  = M1 + M2 + M3+ M4 + Cm

# Define phi as an integral of M
phi = sp.integrate(M, x) + Cphi

# Define W as an integral of -phi
W = sp.integrate(-phi, x) + Cw

N1 = sp.integrate(sp.sin(theta) * (-qx1 + qz1), x) + Cn
N2 = sp.integrate(sp.sin(alpha) * (-qx2 + qz2), x) 
N = N1 + N2 + Cn
eq1 = V.subs(x, -1)
eq2 = M.subs(x, -1)
eq3 = V.subs(x, (3/2)*l + 1)
eq4 = phi.subs(x, 0)
eq5 = W.subs(x, 0)
eq6 = M.subs(x, (3/2)*l)
eq7 = W.subs(x, (3/2)*l)
eq8 = N.subs(x, -0.01)
eq9 = N.subs(x, ((3/2)*l) +1 )
equations = [eq1-0, eq2-0, eq3-0, eq4-0, eq5-0, eq6-0, eq7 -0, eq8-0, eq9-0]
solutions = sp.solve(equations, (Cv, Cm, Cphi, Cw, Av, Bv, MA, Cn, Ah))
display(solutions)
{C_v: 0.0,
 C_m: 0.0,
 C_phi: 0.0,
 C_w: 0.0,
 A_v: 10.9838298415814,
 B_v: 8.99217079631337,
 M_A: 15.9508575377216,
 C_n: 0.0,
 A_h: 0.000512138382148610}
x_val = np.linspace(0, 3*l/2, 301)
V_numpy = sp.lambdify(x,V.subs(solutions).rewrite(sp.Piecewise).simplify()) 
V_list = V_numpy(x_val)
print(V_list[200:202]) 

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-9, 12)
ax.set_xlabel("$V-lijn$")
ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(V_list))
plt.savefig('V_lijnvoorbeeld4', dpi=450);
[0.95442409 0.90142984]
../../_images/5bfa62c146ed74fda4edb7223d6fcaa857f767e7823da70a6cd7ad48abd39c4f.png
x_val = np.linspace(0, 3*l/2, 301)
N_numpy = sp.lambdify(x,N.subs(solutions).rewrite(sp.Piecewise).simplify()) 
N_list = N_numpy(x_val)

print(N_list[200:202])

fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-4, 12)
ax.set_xlabel("$N-lijn$")
ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)

ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, np.array(N_list))
plt.savefig('N_lijnvoorbeeld4', dpi=450);
[-0.238738   -0.45071492]
../../_images/88bcf1544530154dc1a6c22f917557f361480db62b7bce92e1cd7b914c1889da.png
x_val1 = np.linspace(0, l, 301)
M_numpy1 = sp.lambdify(x,M.subs(solutions).rewrite(sp.Piecewise).simplify()) 
M_list1 = M_numpy1(x_val1)

x_val2 = np.linspace(l, 3*l/2, 301)
M_numpy2 = sp.lambdify(x,M.subs(solutions).rewrite(sp.Piecewise).simplify()) 
M_list2 = M_numpy2(x_val2)
fig = plt.figure(figsize=(10, 5))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6.8)
ax.set_ylim(-12, 16)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)


ax.set_xlabel("$M-lijn$")
ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val1,  -np.array(M_list1) , label='M-lijn')
ax.plot(x_val2,  -np.array(M_list2) , label='M-lijn');
plt.savefig('M_lijnvoorbeeld4', dpi=450)
;
''
../../_images/14f22c3114ab966541c39e7357cad6865fa76a952d4182bbf7579fea995d0ccc.png
x_val = np.linspace(0, 3*l/2, 901)
phi_numpy = sp.lambdify(x,phi.subs(solutions).rewrite(sp.Piecewise).simplify()) #substitute full solution, make python function of formula
phi_list = phi_numpy(x_val)
fig = plt.figure(figsize=(10, 5))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6)
ax.set_ylim(-15, 20)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)


ax.set_xlabel("$phi*EI-lijn$")
ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val/sp.cos(theta), np.array(phi_list) , label='phi-lijn')
plt.savefig('phi_lijnvoorbeeld4', dpi=450);
../../_images/d45f09862890765019b4dca4a23260c18f5064adf9cc5d33b6a9757fe3719601.png
x_val = np.linspace(0, 3*l/2, 901)
W_numpy = sp.lambdify(x,W.subs(solutions).rewrite(sp.Piecewise).simplify())
W_list = W_numpy(x_val)
fig = plt.figure(figsize=(10, 5))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlim(0, 6.5)
ax.set_ylim(-30, 0)

ax.spines["left"].set_position("zero")
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_position("zero")
ax.spines["top"].set_visible(False)


ax.set_xlabel("$EI * w-lijn$")
ax.xaxis.set_label_coords(0.53, 1.04)
plt.gca()
ax.plot(x_val, - np.array(W_list) , label='w-lijn')
plt.savefig('w_lijnvoorbeeld4', dpi=450);
../../_images/5a5755930deebbc3b088d41fd1a9e2be83257605c3329cadbeae9672d936d227.png