Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Jul 31, 2012
03:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jul 31, 2012
03:09 PM

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

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Aug 01, 2012
03:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Aug 01, 2012
03:58 AM

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

3 REPLIES 3

Aug 01, 2012
02:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Aug 01, 2012
02:41 AM

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

Aug 01, 2012
03:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Aug 01, 2012
03:58 AM

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

Aug 01, 2012
09:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Aug 01, 2012
09:48 AM

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