Jump to content
TUFLOW Forum
Bill Syme

NaNs caused by zero flow widths in HW tables

Recommended Posts

If zero flow width values in HW tables (most commonly used for bridges), these can cause NaNs (invalid numbers due to a divide by zero) to occur in the simulation. For example, the HW table below (only the first five entries are shown) will cause this problem. The first three have a zero width, which when interpolated between causes a zero flow width that can result in a divide by zero and a NaN.

H W

59.7 0

59.8 0

59.91 0

60 0.77

60.1 1.28

For the next update to TUFLOW a WARNING or an ERROR message will be included if zero widths occur, and for the 2012 release we'll most likely treat any zero HW width value as something like 0.001.

In the meantime the workaround is to ensure any zero width values are entered as a very small number or removed. In the example above the first two entries should be removed, and the width at 59.91 be set to a small number (eg. 0.001).

Cheers

Bill

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.


×
×
  • Create New...