[TRNSYS-users] Equation in trnsys

Scott Schollenberger scott.schollenberger at gmail.com
Mon Nov 8 13:01:30 PST 2010


I have a program in which fortran calculates an equation differently
then matlab.  The equation is:


0.072402058031322075450395961355462/((((0.023657230617811122634248363143193*(-
0.78539816339616663753986358642578*L_TUBE_NEW*D_NEW^2 + 1.0*DELTA_V +
0.01832))/(D_NEW^2*L_TUBE_NEW) -
0.00090133278715740366669821169486255)^2 -
0.00037953578803874618621389745205184)^(1/2) +
(0.023657230617811122634248363143193*(-
0.78539816339616663753986358642578*L_TUBE_NEW*D_NEW^2 + 1.0*DELTA_V +
0.01832))/(D_NEW^2*L_TUBE_NEW) -
0.00090133278715740366669821169486255)^(1/3) +
((((0.023657230617811122634248363143193*(-
0.78539816339616663753986358642578*L_TUBE_NEW*D_NEW^2 + 1.0*DELTA_V +
0.01832))/(D_NEW^2*L_TUBE_NEW) -
0.00090133278715740366669821169486255)^2 -
0.00037953578803874618621389745205184)^(1/2) +
(0.023657230617811122634248363143193*(-
0.78539816339616663753986358642578*L_TUBE_NEW*D_NEW^2 + 1.0*DELTA_V +
0.01832))/(D_NEW^2*L_TUBE_NEW) -
0.00090133278715740366669821169486255)^(1/3) -
0.46184738955823293172690763052209

where
L_TUBE_NEW = 2.26
D_NEW = .1016
DELTA_V = 4.6675 E-5

Using an intel compiler i get .61055 and with matlab i get
2.1160e-004 +2.7756e-017i

How is this possible, does the intel compiler calculate things differently?

Something might be wrong because anything i put in for delta_v in
fortran i get the same result of .61055.

Any thoughts?

Thanks,

Scott



More information about the TRNSYS-users mailing list