I am trying to solve numerically three simultaneous ODE functions:
dw/ds = sin(theta)
dx1/ds = cos(theta)
dtheta/ds = - a * cos(theta) * (w-w0) + a * sin(theta) * x1
I am solving for a column which is separated in two halves, I want to plot w against x1 and have a positive w (something that is seeming to be impossible right now). There are three main functions:
- first_sec_w: the one that is using RK4 method with the already found out initial value for theta (using shoot_first and shoot_second).
- shoot_first: a function that solves the function using RK4 assuming initial values for theta until the boundary condition of 0 at L0/2 is achieved and return this initial value.
- shoot_second: pretty much does the same thing as the above, but it starts from L0 and goes until L0/2.
Can anyone help me out?
I will upload the codes so here it does not appear too messy.