cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

flood calculation

ptc-4501676
1-Newbie

flood calculation

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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

Top Tags