I recently have been working on models for underwater bubble dynamics which are expressed by highly Non-linear system of ODE's. I have been trying to formulate a numerical method scheme using Runge-Kutta 4th order to match with what is supposedly done in Abaqus for the same model.
I had help from a gentleman on how to formulate the system of ODE's to be Runge-Kutta compatible; i.e $f=y'(t, x1,x2,...xn)$ but I'm having difficult with how to input some other dependent variables for subsequent time steps.
I have sampled a simple similar problem below to describe the complex nonlinearity. Suppose that I have this system of Linear ODE'S (derivatives with respect to $t$ )
$$x' + y'= 3xy + x'y'- 4t$$
$$y'=y^2 - xt - (x')^2$$
with Initial Conditions $x(0)=x_0$ and $y(0)=y_0$.
A very kind gentleman, Dr. Lehmann, helped me formulate the above statement problem to be Runge-Kutta compatible such that: $As'=b$
This is the formulation
Step 1: Reduce the system into second order ODE.
Step2: Substitute $u$ for $x'$ and $v$ for $y'$ also $u'$ for $x''$ and $v'$ for $y''$
Step3: Solve the original system of ODE algebraic to get initial conditions for $u$ and $v$
The formulation becomes
$$u+v-uv=3xy-4t\\u^2+v=y^2-xt$$ for $u$ and $v$ for given $t_0,x_0,y_0$, select one of the 4 solutions.
$$\pmatrix{1-v& 1-u\\2u&1}\pmatrix{u'\\v'}=\pmatrix{3uy+3xv-4\\2yv-ut-x}$$
input $[x,y,u,v]$, output $[u,v,u',v']$. Check for sign changes in the determinant, avoid division by zero.
The issue I'm facing is The system of ODE in the form of $As'=b$, has dependent variables $u$, $v$, $x$, $y$ and $t$. But from solving the system of linear equations $As'=b$ through RK4, the only output is $u'$ and $v'$, which means that, in a RK4 algorithm, I can only do the first time step using the initial conditions for $[x(0), y(0), u(0) ,v(0)]$ with the only output $[u', v']$. my code can not perform a second time step because I don't have update for $x$ and $y$
How can I get an output from the first time step so that I can get an update for second time step $x(0+h)$ and $x(0+h)$
Much thanks in advance, your help is much appreciated!!