run-time error M6201

MOHID Water forum. Questions and discussion around MOHID Water
Posts: 37
Joined: Thu Jan 01, 1970 00:00

run-time error M6201

Postby » Wed Feb 02, 2005 16:32

Dear Mohidman,

I'm still having something wrong:

run-time error M6201: MATH- sqrt: DOMAIN error.

I'm getting desperated :cry:

MOHID Developer
Posts: 553
Joined: Thu Jan 01, 1970 00:00
Location: Instituto Superior Técnico - Technical University of Lisbon

Postby » Thu Feb 03, 2005 16:23


You have too look at the results and see where's the problem. How long did it ran? Do you see anything strange with the so far produced results?
You might still try to reduce the time step.

MOHID Beginner
Posts: 19
Joined: Thu Jan 01, 1970 00:00

Postby » Thu Feb 03, 2005 17:45

You're having stability problems. The square root error means that the program is calculating the square root of a negative value. In other words, the model made a big boom somewhere and yielded a negative value for a quantity that should be positive (water depth for instance). Conclusion: your domain is far too refined. You've got a Courant number which is about 600 and ideally it should be around 1 for stability. This is only an indicative value, because in practice only trial and error can give us the right condition for stability. Using a Courant number that is under 10 usually causes me no problem. Anyways, in your case, reducing time step only won't do, you will need to coarsen the grid as well.
Compare DX/DT (DX-minimal grid spacing, DT-time step) with the velocity of propagation of phenomena that you expect to observe. Let's take the case of a wave propagating in shallow waters at a depth of 10m. It moves at about 10m/s. With DT = 1s, if you grid spacing is 10m, you're ok. If it's 1m, you're having trouble because DX/DT is ten times smaller than the velocity of propagation of your wave. Intuitively seen, by the time you made one iteration, your wave has shifted by 10 cells, so the grid does not \"catch\" the wave. Some would say that all of this comes to nothing if you use totally implicit methods. But then again, implicit methods yield enormous linear systems, usually solved by iterative calculations, that also have stabillity conditions, which resemble strangely to those obtained for explicit methods.
There is another way to make your system stable: by adding diffusion. So go to the turbulence module and check value for horizontal viscosity.
Tip: use vh = 0.2 * DX * U / L
vh - horizontal viscosity, U horizontal velocities (0.1 to 1 m/s), L horizontal length scale(take size of your domain for instance)
Finally, try to work in a progressive way: first step should be a very coarse grid with only hydrodynamics involved. Then you refine your grid untill you're happy with the velocity field definition. Then add all the stuff you enjoy: discharges of dirty water, sun radiation over undefense small creatures, a diver smooking at the bottom of the sea...
Well, that's all folks,
MOHID Beginner
Posts: 6
Joined: Thu Jan 01, 1970 00:00

run-time error M6201

Postby » Thu Jan 21, 2010 03:29

I have this problem...(run-time error M6201). Is there something related the island in the domain?
what is the best procedure in this case?

Site Admin
Posts: 349
Joined: Thu Jan 01, 1970 00:00
Location: Instituto Superior Tecnico - Lisbon - Portugal

Postby administrator@. » Mon Feb 15, 2010 09:10

Hi Márcio,

Normally this problem is related with instability of the model (check the max Courant number in the beginning of the simulation, should be around 4; reduce the time step accordingly). Also check if the model grid was correctly designed. Check also the type of coordinate is correct.

Hope this helps,

Return to “MOHID Water”

Who is online

Users browsing this forum: No registered users and 3 guests