Fortran Programs For Physics
Posted By admin On 13/03/18We made a program for our thermo class and when we go to run it, it tells us errors were encountered but will not display what errors it has. It won't print out anything. I appreciate any help you guys have to offer. Parker Hale .270 Manual.


We made a program for our thermo class and when we go to run it, it tells us errors were encountered but will not display what errors it has. It won't print out anything. I appreciate any help you guys have to offer.
Force 2.0 We tried it without the subroutines but it gave us the same problem. Do 10 rv = 4,4,2 Do 20 T4 = 1620, 4, 360 Do 30 regN = 0.05,19 The first one says to do (execute) the code up through line 10, starting with rv = 4, up through rv = 4, in increments of 2. The second one says to execute the code up through line 20, starting with T4 = 1620, up through T4 = 4, in increments of 360. The third one says to execute the code up through line 30, starting with regN = 0, up through regN = 0.05, in increments of 19.
Fortran 90 and HPF Programs Related to the Book. Book Title: An Introduction to Computational Physics Author: Tao Pang Publisher: Cambridge University Press. Adobe Flash For Os 10.5.8.
I haven't done any Fortran for awhile, but I don't think any of your loops will run at all. What values do you want rv to have (start, end, increment)? Same for T4 and regN.
Do 10 rv = 4,4,2 Do 20 T4 = 1620, 4, 360 Do 30 regN = 0.05,19 The first one says to do (execute) the code up through line 10, starting with rv = 4, up through rv = 4, in increments of 2. The second one says to execute the code up through line 20, starting with T4 = 1620, up through T4 = 4, in increments of 360.
The third one says to execute the code up through line 30, starting with regN = 0, up through regN = 0.05, in increments of 19. I haven't done any Fortran for awhile, but I don't think any of your loops will run at all.
What values do you want rv to have (start, end, increment)? Same for T4 and regN.Is this better? Do 10 rv = 4,10,2 Do 20 T4 = 1620, 2700, 360 Do 30 regN = 0,.95,.05 I need it to do all combinations for rv: 4, 6, 8, 10 T4: 1620, 1980, 2340, 2700 regN: 0,.4,.5,.6,.7,.8,.9,.95. How much do you have to strip out to get it to run? Have you successfully compiled previous programs, or is this your first one? If you've used this compiler before, has it shown you error messages? Have you looked in its Help files to see if you have to turn on a verbose mode or something?
EDIT -- good catches by Mark. Still seems like the compiler must be tossing those error statements someplace though.I have not used it before but it will run if I make a very basic program. When I first wrote it, it would display all the errors at the bottom and I fixed them one by one until they were all gone. So it no longer displays any errors but will say some were encountered. Real T2, T3, T5, thN, Tpe, dP, P2, P4, P5 Real Wcs, Wts, Wc, Wt, Wnet, regN, Qh, Qr Integer rv, T4... Print 40, rv,T4,regN,thN,Wnet 40 Format(1x,F1.0,F8.0,F7.2,F6.2,F7.2) First off rv and T4 are declared as Integer types.
Your format statement doesn't match these types. The Fx.x field specifiers are for real values, with F1.0 being used to print a real number in a field of width 1 space. The next one, F8.0 is used for T4, printing it in a field of width 8 characters, but with no places to the right of the decimal point. The appropriate specifier for Integer values is I4 or I6, or something big enough to hold the values you need printed. You should ask yourself though, whether Integer is the right type for these two variables. I haven't looked at your code close enough to say one way or the other. If you fix these things, and you're still getting 0's for rv and T4, then the time-honored way of debugging is to sprinkle PRINT (or WRITE) statements at places in your code where these variables are getting set.