[TRNSYS-users] the causes of error 'NaN'

David Bradley bradley at tess-inc.com
Mon Nov 20 06:32:47 PST 2006


Mohammad,
   Dieter is correct about the causes of the "NaN" condition. It is hard to 
track these because the Windows OS allows division by zero without 
generating an exception. When TRNSYS dies because of an NaN condition, it 
is usually long after the original error occurred. If you open the "control 
cards" tool in your project (where you set the simulation start and stop 
time) and switch the debug mode switch from "false" to "true" then TRNSYS 
will check every time that it leaves a component to make sure that none of 
the outputs were set to NaN. This usually makes it easier to track down 
when and where the original error occurs. The reason we do not always check 
for NaN is that to do so slows down the simulation time quite a lot. Once 
you find the Type that is causing the NaN, then put a breakpoint into the 
code and step one line at a time - it is usually pretty easy to find the 
cause at that point.
Kind regards,
  David


At 05:21 11/20/2006, mohammad abdunnabi wrote:
>Dear Trnsys users
>
>Does any one have idea about the possible causes that make the output 
>results ' NaN'. In fact, the program runs perfect and gives good results 
>when i run it as a console file , however, when i included it in 
>Trndll.dll most result comes as NaN. I have tried a lot to trace the error 
>however without benefit. these information might help, the program 
>contains two iteration loops and may subroutines and functions and also I 
>reduced the number of subroutine and functions also still error appears.
>
>any help will be appreciated
>thanks
>
>M. Abdunnabi
>
>
>
>_______________________________________________
>TRNSYS-users mailing list
>TRNSYS-users at engr.wisc.edu
>https://www.cae.wisc.edu/mailman/listinfo/trnsys-users

****************************************************************************************
Thermal Energy System Specialists (TESS), LLC
David BRADLEY                           2916 Marketplace Drive - Suite 104
Partner                                        Madison, WI 53719
Phone: (608) 274-2577 USA
Fax: (608) 278-1475
E-mail: bradley at tess-inc.com
Web Pages:  http://www.tess-inc.com     and      http://www.trnsys.com

"Providing software solutions for today's energy engineering projects"
****************************************************************************************





More information about the TRNSYS-users mailing list