Different values from a simple convergence loop between VBA and Fortran 77


MPD78
02-18-2009, 07:15 AM
Hello all,

Would it make sense to have ending converged values differ by approximately 3% between VBA (Visual Basic for Applications) and Fortran 77?

I wrote a program in Access that was originally written in Fortran 77 to calculate a heat balance for a heat exchanger and also to calculate the exit temperature of flow stream being heated and my results between the two programs differ by about 3% but the input data for both versions of the program are the same. The convergence loop is used to calculate the exit temperature of the stream being heated. I am using the same initial guess that was used in Fortran 77. I am perplexed.

Can anyone shed some light on this for me?

Thanks
Matt

MPD78
02-18-2009, 07:25 AM
Here is the code for the VBA version.

MPD78
02-18-2009, 07:33 AM
Here is a screen shot of the user input form.

MPD78
02-18-2009, 07:35 AM
Second try on the screen shot. LOL

MPD78
08-22-2009, 07:47 AM
Hello all,

I corrected this problem. There was a simple mistake in the VBA code that I finally had time to track down this week.

Both programs produce the same results.

Thanks
Matt