Jump to content
GMS, SMS, and WMS User Forum
Sign in to follow this  
h20junkie

CGWAVE...I don't know whats causing this error

Recommended Posts

I have my model domain all set up and I double checked everything, and it all looks fine to me. I ran a model check and I get no errors. The program doesn't have a problem running but while it's performing the iterations it returns this continuously:

200 Iterations Completed, Residual = NaN

201 Iterations Completed, Residual = NaN

202 Iterations Completed, Residual = NaN

etc.

Is there a source for this error. I ran it up to 4000 iterations and it's always saying "NaN" ?????

Share this post


Link to post
Share on other sites

NAN stands for "Not a number" and indicates the model is trying to divide by zero or something else that would create an infinite value. Check for negative or zero depths.

Share this post


Link to post
Share on other sites
NAN stands for "Not a number" and indicates the model is trying to divide by zero or something else that would create an infinite value. Check for negative or zero depths.

I checked the model and all points are positive...is there any other source for this error?

Is there a better way to find a node that maybe hidden withing the mesh that has a negitive or zero depth that I'm not seeing?

Share this post


Link to post
Share on other sites
Is there a better way to find a node that maybe hidden withing the mesh that has a negitive or zero depth that I'm not seeing?

Select the menu command "Edit | Select by data value" and you can specify a value to select by (less than / greater than). It appears the cells might not display as selected until you zoom in / out using the mouse wheel.

Share this post


Link to post
Share on other sites

I looked in the CGWAVE code and found where "200 Iterations Completed, Residual = NaN" was being printed out. The code is printing the following:

<Iteration> Iterations Complete, Residual = BSUM / PHISUM

BSUM is the summation of Q * DCONJG of Q for every node

PHISUM is the summation of PHI * DCONJG of PHI for every node

DCONJG returns the double-precision complex conjugate of a double-complex number.

As you can see, it can be quite difficult to diagnose these types of problems.

Perhaps you can try the following:

  • Have you looked in your .cgo file for any unusual values? There are three amplitude and three phase values per line (Surface, Mid Depth, Bed). If you find values that look suspicious you should be able to pinpoint where in your mesh the problem is occuring (the .cgo file has one line per node)
  • Have you looked at your mesh quality (mesh display options) - do you have poorly shaped elements that could cause the model to go unstable?

Share this post


Link to post
Share on other sites

Well I found out what was causing my error. When I chose a coastline depth, I chose a depth that lied to close to a singularity. The singularity caused interpolation in the bathymetry, which overlapped my coastline arc. I then forced the depth to my desired value not thinking anything of it, which resulted in depths within my doimain less than the value I assigned. I'm assuming this caused some numerical problems along the way. Just thought I would give some feed back since you were so helpful with me. Thanks again.

Share this post


Link to post
Share on other sites

Thanks for the update. It is helpful to hear back on how the problem was ultimately solved.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...