[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TRNSYS-users] calculation error?



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

 

 

 

 

Attachment: model.TPF
Description: Binary data

TIME        	c20         	c10         	c0          	teller      	noemer      	c_pred    
+0.00000E+00	+6.00000E+02	+5.61500E+02	+3.00000E+02	+1.35282E+05	+2.23000E+02	+6.06647E+02
+1.00000E+00	+6.09000E+02	+5.70485E+02	+3.11550E+02	+1.35719E+05	+2.20420E+02	+6.15730E+02
+2.00000E+00	+6.18000E+02	+5.79470E+02	+3.23100E+02	+1.36110E+05	+2.17840E+02	+6.24815E+02
+3.00000E+00	+6.27000E+02	+5.88455E+02	+3.34650E+02	+1.36454E+05	+2.15260E+02	+6.33902E+02
+4.00000E+00	+6.36000E+02	+5.97440E+02	+3.46200E+02	+1.36751E+05	+2.12680E+02	+6.42991E+02
+5.00000E+00	+6.45000E+02	+6.06425E+02	+3.57750E+02	+1.37003E+05	+2.10100E+02	+6.52082E+02
+6.00000E+00	+6.54000E+02	+6.15410E+02	+3.69300E+02	+1.37207E+05	+2.07520E+02	+6.61176E+02
+7.00000E+00	+6.63000E+02	+6.24395E+02	+3.80850E+02	+1.37366E+05	+2.04940E+02	+6.70272E+02
+8.00000E+00	+6.72000E+02	+6.33380E+02	+3.92400E+02	+1.37477E+05	+2.02360E+02	+6.79371E+02
+9.00000E+00	+6.81000E+02	+6.42365E+02	+4.03950E+02	+1.37543E+05	+1.99780E+02	+6.88472E+02
+1.00000E+01	+6.90000E+02	+6.51350E+02	+4.15500E+02	+1.37562E+05	+1.97200E+02	+6.97575E+02
+1.10000E+01	+6.99000E+02	+6.60335E+02	+4.27050E+02	+1.37534E+05	+1.94620E+02	+7.06682E+02
+1.20000E+01	+7.08000E+02	+6.69320E+02	+4.38600E+02	+1.37460E+05	+1.92040E+02	+7.15791E+02
+1.30000E+01	+7.17000E+02	+6.78305E+02	+4.50150E+02	+1.37340E+05	+1.89460E+02	+7.24903E+02
+1.40000E+01	+7.26000E+02	+6.87290E+02	+4.61700E+02	+1.37173E+05	+1.86880E+02	+7.34018E+02
+1.50000E+01	+7.35000E+02	+6.96275E+02	+4.73250E+02	+1.36960E+05	+1.84300E+02	+7.43137E+02
+1.60000E+01	+7.44000E+02	+7.05260E+02	+4.84800E+02	+1.36700E+05	+1.81720E+02	+7.52259E+02
+1.70000E+01	+7.53000E+02	+7.14245E+02	+4.96350E+02	+1.36394E+05	+1.79140E+02	+7.61384E+02
+1.80000E+01	+7.62000E+02	+7.23230E+02	+5.07900E+02	+1.36042E+05	+1.76560E+02	+7.70513E+02
+1.90000E+01	+7.71000E+02	+7.32215E+02	+5.19450E+02	+1.35643E+05	+1.73980E+02	+7.79646E+02
+2.00000E+01	+7.80000E+02	+7.41200E+02	+5.31000E+02	+1.35197E+05	+1.71400E+02	+7.88783E+02
+2.10000E+01	+7.89000E+02	+7.50185E+02	+5.42550E+02	+1.34706E+05	+1.68820E+02	+7.97924E+02
+2.20000E+01	+7.98000E+02	+7.59170E+02	+5.54100E+02	+1.34167E+05	+1.66240E+02	+8.07070E+02
+2.30000E+01	+8.07000E+02	+7.68155E+02	+5.65650E+02	+1.33583E+05	+1.63660E+02	+8.16220E+02
+2.40000E+01	+8.16000E+02	+7.77140E+02	+5.77200E+02	+1.32951E+05	+1.61080E+02	+8.25375E+02
+2.50000E+01	+8.25000E+02	+7.86125E+02	+5.88750E+02	+1.32274E+05	+1.58500E+02	+8.34535E+02
+2.60000E+01	+8.34000E+02	+7.95110E+02	+6.00300E+02	+1.31550E+05	+1.55920E+02	+8.43700E+02
+2.70000E+01	+8.43000E+02	+8.04095E+02	+6.11850E+02	+1.30779E+05	+1.53340E+02	+8.52871E+02
+2.80000E+01	+8.52000E+02	+8.13080E+02	+6.23400E+02	+1.29962E+05	+1.50760E+02	+8.62048E+02
+2.90000E+01	+8.61000E+02	+8.22065E+02	+6.34950E+02	+1.29099E+05	+1.48180E+02	+8.71230E+02
+3.00000E+01	+8.70000E+02	+8.31050E+02	+6.46500E+02	+1.28189E+05	+1.45600E+02	+8.80420E+02
+3.10000E+01	+8.79000E+02	+8.40035E+02	+6.58050E+02	+1.27233E+05	+1.43020E+02	+8.89616E+02
+3.20000E+01	+8.88000E+02	+8.49020E+02	+6.69600E+02	+1.26230E+05	+1.40440E+02	+8.98819E+02
+3.30000E+01	+8.97000E+02	+8.58005E+02	+6.81150E+02	+1.25181E+05	+1.37860E+02	+9.08030E+02
+3.40000E+01	+9.06000E+02	+8.66990E+02	+6.92700E+02	+1.24085E+05	+1.35280E+02	+9.17249E+02
+3.50000E+01	+9.15000E+02	+8.75975E+02	+7.04250E+02	+1.22943E+05	+1.32700E+02	+9.26477E+02
+3.60000E+01	+9.24000E+02	+8.84960E+02	+7.15800E+02	+1.21755E+05	+1.30120E+02	+9.35713E+02
+3.70000E+01	+9.33000E+02	+8.93945E+02	+7.27350E+02	+1.20520E+05	+1.27540E+02	+9.44959E+02
+3.80000E+01	+9.42000E+02	+9.02930E+02	+7.38900E+02	+1.19239E+05	+1.24960E+02	+9.54216E+02
+3.90000E+01	+9.51000E+02	+9.11915E+02	+7.50450E+02	+1.17911E+05	+1.22380E+02	+9.63483E+02
+4.00000E+01	+9.60000E+02	+9.20900E+02	+7.62000E+02	+1.16537E+05	+1.19800E+02	+9.72761E+02
+4.10000E+01	+9.69000E+02	+9.29885E+02	+7.73550E+02	+1.15116E+05	+1.17220E+02	+9.82052E+02
+4.20000E+01	+9.78000E+02	+9.38870E+02	+7.85100E+02	+1.13649E+05	+1.14640E+02	+9.91356E+02
+4.30000E+01	+9.87000E+02	+9.47855E+02	+7.96650E+02	+1.12136E+05	+1.12060E+02	+1.00067E+03
+4.40000E+01	+9.96000E+02	+9.56840E+02	+8.08200E+02	+1.10576E+05	+1.09480E+02	+1.01001E+03
+4.50000E+01	+1.00500E+03	+9.65825E+02	+8.19750E+02	+1.08969E+05	+1.06900E+02	+1.01936E+03
+4.60000E+01	+1.01400E+03	+9.74810E+02	+8.31300E+02	+1.07316E+05	+1.04320E+02	+1.02872E+03
+4.70000E+01	+1.02300E+03	+9.83795E+02	+8.42850E+02	+1.05617E+05	+1.01740E+02	+1.03811E+03
+4.80000E+01	+1.03200E+03	+9.92780E+02	+8.54400E+02	+1.03871E+05	+9.91600E+01	+1.04751E+03
+4.90000E+01	+1.04100E+03	+1.00177E+03	+8.65950E+02	+1.02079E+05	+9.65800E+01	+1.05694E+03
+5.00000E+01	+1.05000E+03	+1.01075E+03	+8.77500E+02	+1.00241E+05	+9.40000E+01	+1.06639E+03
+5.10000E+01	+1.05900E+03	+1.01973E+03	+8.89050E+02	+9.83555E+04	+9.14200E+01	+1.07586E+03
+5.20000E+01	+1.06800E+03	+1.02872E+03	+9.00600E+02	+9.64240E+04	+8.88400E+01	+1.08537E+03
+5.30000E+01	+1.07700E+03	+1.03770E+03	+9.12150E+02	+9.44461E+04	+8.62600E+01	+1.09490E+03
+5.40000E+01	+1.08600E+03	+1.04669E+03	+9.23700E+02	+9.24218E+04	+8.36800E+01	+1.10447E+03
+5.50000E+01	+1.09500E+03	+1.05568E+03	+9.35250E+02	+9.03510E+04	+8.11000E+01	+1.11407E+03
+5.60000E+01	+1.10400E+03	+1.06466E+03	+9.46800E+02	+8.82337E+04	+7.85200E+01	+1.12371E+03
+5.70000E+01	+1.11300E+03	+1.07365E+03	+9.58350E+02	+8.60700E+04	+7.59400E+01	+1.13340E+03
+5.80000E+01	+1.12200E+03	+1.08263E+03	+9.69900E+02	+8.38599E+04	+7.33600E+01	+1.14313E+03
+5.90000E+01	+1.13100E+03	+1.09161E+03	+9.81450E+02	+8.16034E+04	+7.07800E+01	+1.15292E+03
+6.00000E+01	+1.14000E+03	+1.10060E+03	+9.93000E+02	+7.93004E+04	+6.82000E+01	+1.16276E+03
+6.10000E+01	+1.14900E+03	+1.10958E+03	+1.00455E+03	+7.69509E+04	+6.56200E+01	+1.17267E+03
+6.20000E+01	+1.15800E+03	+1.11857E+03	+1.01610E+03	+7.45550E+04	+6.30400E+01	+1.18266E+03
+6.30000E+01	+1.16700E+03	+1.12756E+03	+1.02765E+03	+7.21127E+04	+6.04600E+01	+1.19273E+03
+6.40000E+01	+1.17600E+03	+1.13654E+03	+1.03920E+03	+6.96240E+04	+5.78800E+01	+1.20290E+03
+6.50000E+01	+1.18500E+03	+1.14553E+03	+1.05075E+03	+6.70888E+04	+5.53000E+01	+1.21318E+03
+6.60000E+01	+1.19400E+03	+1.15451E+03	+1.06230E+03	+6.45071E+04	+5.27200E+01	+1.22358E+03
+6.70000E+01	+1.20300E+03	+1.16349E+03	+1.07385E+03	+6.18791E+04	+5.01400E+01	+1.23413E+03
+6.80000E+01	+1.21200E+03	+1.17248E+03	+1.08540E+03	+5.92046E+04	+4.75600E+01	+1.24484E+03
+6.90000E+01	+1.22100E+03	+1.18146E+03	+1.09695E+03	+5.64836E+04	+4.49800E+01	+1.25575E+03
+7.00000E+01	+1.23000E+03	+1.19045E+03	+1.10850E+03	+5.37162E+04	+4.24000E+01	+1.26689E+03
+7.10000E+01	+1.23900E+03	+1.19944E+03	+1.12005E+03	+5.09024E+04	+3.98200E+01	+1.27831E+03
+7.20000E+01	+1.24800E+03	+1.20842E+03	+1.13160E+03	+4.80421E+04	+3.72400E+01	+1.29007E+03
+7.30000E+01	+1.25700E+03	+1.21741E+03	+1.14315E+03	+4.51354E+04	+3.46600E+01	+1.30223E+03
+7.40000E+01	+1.26600E+03	+1.22639E+03	+1.15470E+03	+4.21822E+04	+3.20800E+01	+1.31491E+03
+7.50000E+01	+1.27500E+03	+1.23538E+03	+1.16625E+03	+3.91826E+04	+2.95000E+01	+1.32823E+03
+7.60000E+01	+1.28400E+03	+1.24436E+03	+1.17780E+03	+3.61366E+04	+2.69200E+01	+1.34237E+03
+7.70000E+01	+1.29300E+03	+1.25334E+03	+1.18935E+03	+3.30441E+04	+2.43400E+01	+1.35761E+03
+7.80000E+01	+1.30200E+03	+1.26233E+03	+1.20090E+03	+2.99052E+04	+2.17600E+01	+1.37432E+03
+7.90000E+01	+1.31100E+03	+1.27131E+03	+1.21245E+03	+2.67199E+04	+1.91800E+01	+1.39311E+03
+8.00000E+01	+1.32000E+03	+1.28030E+03	+1.22400E+03	+2.34881E+04	+1.66000E+01	+1.41495E+03
+8.10000E+01	+1.32900E+03	+1.28929E+03	+1.23555E+03	+2.02099E+04	+1.40200E+01	+1.44150E+03
+8.20000E+01	+1.33800E+03	+1.29827E+03	+1.24710E+03	+1.68852E+04	+1.14400E+01	+1.47598E+03
+8.30000E+01	+1.34700E+03	+1.30726E+03	+1.25865E+03	+1.35141E+04	+8.86000E+00	+1.52529E+03
+8.40000E+01	+1.35600E+03	+1.31624E+03	+1.27020E+03	+1.00965E+04	+6.28000E+00	+1.60773E+03
+8.50000E+01	+1.36500E+03	+1.32522E+03	+1.28175E+03	+6.63255E+03	+3.70000E+00	+1.79258E+03
+8.60000E+01	+1.37400E+03	+1.33421E+03	+1.29330E+03	+3.12212E+03	+1.12000E+00	+2.78761E+03
+8.70000E+01	+1.38300E+03	+1.34319E+03	+1.30485E+03	-4.34742E+02	-1.46000E+00	+2.97768E+02
+8.80000E+01	+1.39200E+03	+1.35218E+03	+1.31640E+03	-4.03805E+03	-4.04000E+00	+9.99517E+02
+8.90000E+01	+1.40100E+03	+1.36117E+03	+1.32795E+03	-7.68779E+03	-6.62000E+00	+1.16130E+03
+9.00000E+01	+1.41000E+03	+1.37015E+03	+1.33950E+03	-1.13840E+04	-9.20000E+00	+1.23739E+03
+9.10000E+01	+1.41900E+03	+1.37914E+03	+1.35105E+03	-1.51266E+04	-1.17800E+01	+1.28409E+03
+9.20000E+01	+1.42800E+03	+1.38812E+03	+1.36260E+03	-1.89157E+04	-1.43600E+01	+1.31725E+03
+9.30000E+01	+1.43700E+03	+1.39710E+03	+1.37415E+03	-2.27512E+04	-1.69400E+01	+1.34304E+03
+9.40000E+01	+1.44600E+03	+1.40609E+03	+1.38570E+03	-2.66331E+04	-1.95200E+01	+1.36440E+03
+9.50000E+01	+1.45500E+03	+1.41507E+03	+1.39725E+03	-3.05615E+04	-2.21000E+01	+1.38287E+03
+9.60000E+01	+1.46400E+03	+1.42406E+03	+1.40880E+03	-3.45363E+04	-2.46800E+01	+1.39936E+03
+9.70000E+01	+1.47300E+03	+1.43305E+03	+1.42035E+03	-3.85576E+04	-2.72600E+01	+1.41444E+03
+9.80000E+01	+1.48200E+03	+1.44203E+03	+1.43190E+03	-4.26253E+04	-2.98400E+01	+1.42846E+03
+9.90000E+01	+1.49100E+03	+1.45102E+03	+1.44345E+03	-4.67394E+04	-3.24200E+01	+1.44168E+03
+1.00000E+02	+6.00000E+02	+5.61500E+02	+3.00000E+02	+1.35282E+05	+2.23000E+02	+6.06647E+02

Attachment: Project1.dck
Description: Binary data

Attachment: analysis.xls
Description: MS-Excel spreadsheet