I'm having serious troubles with solving translating 3 coupled differential equations into python.
The 3 DE's stem from a 4th order DE used to calculate the bending moment of an underwater pipeline that has been substituted/transformed into 1st order equations and are coupled to each other.
4th order:
$\frac{d^4 w(x)}{dx^4} - \frac{Q_{grnd}+ Q_{fric}}{EI} w(x) = 0$
3x 1st order:
$w_1(x_1) = A x_1^3 + B x_1^2 + C x_1 + D + \frac{(q_{subm} x_1^4)}{(24 EI)}$
$w_2(x_2) = E x_2^3 + F x_2^2 + G x_2 + H + \frac{(q_{subm} x_2^4)}{(24 EI)}$
$w_3(x_3) = K e^{(\sqrt2 \beta x_3)}+ L e^{(-\sqrt2 \beta x_3)} + M \cos(\sqrt2 \beta x_3)+N \sin(\sqrt2 \beta x_3)- \frac{(q_{subm})}{(Q_{grnd}+Q_{fric})} $
where $0 \leq x_1 \leq I_1$, $0 \leq x_2 \leq I_2$ and $0 \leq x_3 \leq I_3$
The system has 15 unknown constraints and 15 boundary constraints conditions for which i want to solve.
Boundary conditions
- $w_1(0) = 0$ (deflection at $x_1$ = 0 is 0), D=0
- $w_1'(0) = 0$ (slope at $x_1$ = 0 is 0), C=0
- $w_1''(0) = 0$ (bending moment at $x_1$ = 0 is 0), B=0
- $w_1(I_1) = -p$
- $w_2(0) = p$, H=p
- $w_1'(I_1) = w_2'(0)$
- $w_1''(I_1) = w_2''(0)$
- $w_2(I_2) = 0$
- $w_3(0) = 0$
- $w_2'(I_2) = w_3'(0)$
- $w_2''(I_2) = w_3''(0)$
- $w_2'''(I_2) = w_3'''(0)$
- $w_3(I_3) = d$
- $w_3(I_3)' = 0$
- $w_3(I_3)'' = 0$
I've looked online and tried some codes myself, but until now I unfortunately haven't got any useful results. An example of my code is given below, where 15 start / 'guess' values are given for the unknown variables.
I1 = 46.483
I2 = 5.916
I3 = 21.90
A = -3.858*10**(-5)
B = 0
C = 0
D = 0
E = -1.928*10**(-4)
F = 4.270*10**(-3)
G = 0.049
H = p
K = 0.052
L = 0.1
M = -0.021
N = 0.787
def f(w, t):
x1 = w[0]
x2 = w[1]
x3 = w[2]
# the model equations (see Munz et al. 2009)
F0 = A*x1**3 + B*x1**2 + C*x1 + D + (q_subm*x1**4)/(24*EI)
F1 = E*x2**3 + F*x2**2 + G*x2 + H + (q_subm*x2**4)/(24*EI)
F2 = K*np.exp(np.sqrt(2)*beta*x3)+L*np.exp(-np.sqrt(2)*beta*x3)+M*np.cos(np.sqrt(2)*beta*x3)+N*np.sin(np.sqrt(2)*beta*x3)-(q_subm/(Q_grnd+Q_fric))
return [F0, F1, F2]
w0 = [0, 0, 0]
t = np.linspace(0, 80, 1000)
soln = odeint(f,w0,t)
w1 = soln[:,0]
w2 = soln[:,1]
w3 = soln[:,2]
plt.figure()
plt.plot(t, w1, label='w1')
plt.plot(t, w2, label='w2')
plt.plot(t, w3, label='w3')
plt.xlabel('x')
plt.ylabel('deflection')
plt.title('def')
plt.legend(loc=0)
Could anybody please be so kind to assist me?
With kind regards,
Ronald