[TRNSYS-users] simulation running unstable/stops, NaN in output?
David Bradley
bradley at tess-inc.com
Fri Jul 18 11:02:38 PDT 2008
Wouter,
'NaN' stands for "not a number" and is what happens in most Fortran
compilers when you divide a number by zero, when you take the log of a
negative number, when you raise a negative number to a non-integer
power, etc.. Usually once an NaN occurs, it will not fix itself but gets
worse and worse because the result of every operation that you carry out
with a variable that has been set to NaN is also NaN. The only reliable
way to track down why it is happening is to run your simulation from the
compiler and put a breakpoint into your code, then step through it one
line at a time so that you can see where the NaN occurs first.
Kind regards,
David
Wouter Lumen wrote:
> Dear TRNSYS-users,
>
> I have made my own component for modeling an ice-storage tank.
> I can run this component in a simple simulation with few other components, and
> it runs flawless. I have tested the component with a wide variety of
> input values and parameters, and it always works fine.
>
> When I put this component in a more complicated simulation, I mostly
> get "invalid floating point errors". Also if i put out some component
> outputs through a printer in an excell-file, I get "NaN", sometimes a
> whole column full, sometimes just one NaN in between the normal values.
>
> I have checked the input values for the component and non of them are
> out of range. I also have checked that the component order is as it
> should be.
>
> Does anybody know where this NaN comes from and what it means?
>
> Are there parameters that i can change in TRNSYS to make the
> simulation run more stable?
>
> Thank you!
>
> Kind Regards,
>
> Wouter Lumen
> _______________________________________________
> 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
USA
P: +1.608.274.2577
F: +1.608.278.1475
E-mail: bradley at tess-inc.com
Web Pages: http://www.tess-inc.com and http://www.trnsys.com
***********************************************************************
More information about the TRNSYS-users
mailing list