[TRNSYS-users] calculation error?

Diego A. Arias daarias at wisc.edu
Wed Mar 28 12:12:51 PDT 2007


Dear Stefan,

I think that the error may is caused by the use of single precision in 
TRNSYS15. TRNSYS16 uses double precision; I tested your project in 
TRNSYS16, and the differences with the calculations in Excel are in the 
order of 10^-15. Perhaps it is a good time to consider upgrading to 
TRNSYS16? ;-)
Best regards,

Diego

Stefan de Kool wrote:
>
> Dear all,
>
> I’m having a problem with a simple calculation (see attached files). I 
> have 3 inputs, c0, c10 and c20, which are defined by type 14. I run 
> the following calculation:
>
> c-pred= teller / noemer, with teller = (c10^2 - c0*c20) and noemer = 
> (2*c10 - (c0+c20)).
>
> When I output these values, I get strange differences compared to 
> values calculated in XL (see attached xl-file). At the first 48 
> timesteps everything goes fine with relative errors on the order of 
> 10^-6, but from the 49th step on, errors on the order of 10^-4 occur. 
> Strangly these occur only at the uneven timesteps. The errors occur 
> only in teller and noemer but are, I suppose, levelled out after division.
>
> Can anyone help with this? I suspect it has something to do with 
> rounding-off errors but I can not find the exact cause. The only 
> change I see in the input values at step 49 is that c10 changes from 
> below 10^3 to above 10^3.
>
> I tried decreasing the tollerances and also using Powell instead of 
> Succesive, to no avail. When I change the timebase from 100h to 1000h 
> (also for the type 14), the errors occur at different timesteps and 
> different rates…
>
> Thanks in advance,
>
> Stefan de Kool
>
> Cauberg-Huygen Raadgevende Ingenieurs B.V.
>
> Bezoekadres: Boterdiep 48, 3077 AW ROTTERDAM
>
> Postadres: Postbus 9222, 3007 AE ROTTERDAM
>
> Telefoon: +31 (0)10-2443638
>
> Fax: +31 (0)10-425 44 43
>
> http://www.chri.nl
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at engr.wisc.edu
> https://www.cae.wisc.edu/mailman/listinfo/trnsys-users
>   


-- 
Diego A. Arias
TRNSYS Coordinator
Solar Energy Laboratory
University of Wisconsin - Madison
1500 Engineering Drive
Madison, WI 53706



More information about the TRNSYS-users mailing list