The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hi,
I am trying to solve differential equations with ODE solver. In defining the solver, there is always a message " the number of rows returned from the function arguments does not match the number of equations to be solved.
Anyone can help?
Thanks
Krisnandito
Solved! Go to Solution.
AlanStevens wrote:
... I suspect one of your square root terms becomes imaginary (probably the H4-Hmcr term which is close to zero at 620 seconds) and odesolve doesn't like this.
Yes, if you prevent H4-Hmcr from going negative it works ok - see attached. In the attached I set H4-Hmcr to zero if it tries to go negative. This might or might not be the right thing to do physically for your flood scenario.
Alan
Set tend to no more than 620 seconds and it works fine. After that I suspect one of your square root terms becomes imaginary (probably the H4-Hmcr term which is close to zero at 620 seconds) and odesolve doesn't like this. The error message is not helpful!
Alan
AlanStevens wrote:
... I suspect one of your square root terms becomes imaginary (probably the H4-Hmcr term which is close to zero at 620 seconds) and odesolve doesn't like this.
Yes, if you prevent H4-Hmcr from going negative it works ok - see attached. In the attached I set H4-Hmcr to zero if it tries to go negative. This might or might not be the right thing to do physically for your flood scenario.
Alan
Thanks Alan. This is really helpful
I modified the equation little bit knowing that Hmcr tent to have higher level than H4 by using Hmcr-H4 if Hmcr
Krisnandito