I have the following generalized system of differential equations:
$$ \left( \frac{du}{dt}, \frac{dh}{dt}, \frac{dv}{dt}, \frac{dy}{dt} \right) = \left( f_1(u, h, a), f_2(u, h), f_3(u, h, u'), v \right) $$
where $a = \frac{dv}{dt}$, $u' = \frac{du}{dt}$, and $h' = \frac{dh}{dt}$
Given $ (u, h, v, y) = (0, h_0, v_0, y_0) $ and $ (u', h', a, v) = (0, 0, a_0, v_0) $ at $t = 0$.
All DEs except $\frac{dy}{dt}$ are non-linear but autonomous since they have no explicit time dependence.
How does one go about solving this system?
My attempts have been to use the Forward Euler method to solve the equations simultaneously which gives some physical solution. However my attempts to introduce the classic Runge-Kutta 4th order method was unsuccessful -- the solution was unphysical and unstable. I suspect this due to the derivative dependence of the $f_1$ and $f_3$ functions. My next idea was to simulataneously solve these two functions and eliminate this dependence on the derivatives. I then plugged these reduced functions into the solver, which gave rise to a stable solution however the second boundary condition $ (u, h, v, y) = (0, 0, v_{max}, y_{max}) $, I am not sure if the decoupling of the differential equation has been done conservatively i.e. if the original system and the reduced system still give the same solution.
I am not deeply familiar with the depths of numerical analysis however I am quite confident that I am not using the right tool for this job, am I missing something here?
Edit: I am attaching the forms of these equations below.
$f_1$ was derived based on the Transient Bernoulli's equation, $f_2$ was derived due to a system of constraints concerning the flow of fluid, $f_3$ derived based on the Newton's Second Law for variable mass systems, and $f_4$'s forms follows from definition of velocity.
$$ B(h) \frac{du}{dt} + C(h) {u}^2 + D(h) \frac{P_1}{\rho_w} - \frac{P_{atm}}{\rho_w} + (\frac{dv}{dt} + g)h = 0 $$
$$ \frac{dh}{dt} = \frac{A_{out}u}{A(h)} $$
$$ m(h) \frac{dv}{dt} = \rho_w A_{out} u^2 - \rho_w A \left( h \frac{du}{dt} + \frac{A}{A(h)} u^2 \right) - C_d v - m(h)g $$
$$ \frac{dy}{dt} = v $$
Where, $A(h), B(h), C(h)$ and $D(h)$ are functions of h which do not have a strict explicit forms ($B(h)$ is an integral and $A(h), B(h), C(h)$ are step-functions). All the other symbols are constants.
Source: https://www.et.byu.edu/~wheeler/benchtop/pix/thrust_eqns.pdf, the Water Impulse Phase