I'm solving a large system of coupled differential equations using ODE15s. All variables are depending only on t. However, I've found conflicts when trying to solve the following:
x'=f(z')
y'=f(x',z')
z'=f(y')
In this case the derivatives of x(t),y(t),z(t) are in terms of the derivatives of each other. Therefore, when programming the ODE function. I reach the error of "using the variable before it's defined" or it makes one of the derivatives equal to zero. (Which is a trivial solution not relevant for my problem). I will appreciate some insights.
I want to use ODE solver if possible since is way faster than building solver from scratch. All the equations are thermodynamic variables as pressure, temperature and velocity of the gas, which are coupled.