Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0020/prfgse.eng
There are 2 other files named prfgse.eng in the archive. Click here to see a list.
100' NAME--PRFGASE
110'
120' DESCRIPTION--EXPLANATION OF PROGRAM "PERFGAS"
130'
140' SOURCE--DEAN MYRON TRIBUS, THAYER SCHOOL OF ENGINEERING
150'
160' INSTRUCTIONS--CONTINUE THE LISTING FOR INSTRUCTIONS
170'
180'
190' * * * * * * * MAIN PROGRAM * * * * * * * * * * *
200'
210' A PERFECT GAS OBEYS PV=RT AND HAS ITS
220' STATE DEFINED WHENEVER TWO OF THE
230' PROPERTIES T(OR H OR E), P, V, S
240' ARE GIVEN. THIS PROGRAM ALLOWS YOU TO
250' NAME TWO PROPERTIES THEN IT TELLS YOU THE
260' OTHERS FOR ANY ONE OF 14 COMMON
270' GASES. THE RANGE OF T IS FROM
280' 273K TO 1800K. SEE PG.184 "THERMOSTATICS
290' AND THERMODYNAMICS" D. VAN NOSTRAND (1961).
300' CP TAKEN AS CUBIC IN T. GASES ARE
310' AIR, CO, CO2, H2, H2O, O2, N2, NH3, CH4, C3H8,
320' C4H10, C6H6, C2H2, CH3OH.
330'
340' THERE ARE 9 POSSIBLE INPUT CASES TO CONSIDER.
350' THE FIRST 6 INVOLVE T(OR H OR E) AS
360' GIVEN. THE CASES ARE:
370' CASE GIVEN SUBROUTINES
380' 1 H C,B
390' 2 E D,A
400' 3 T A,B
410' FROM CASES 1,2 OR 3 PROGRAM GOES TO 4,5 OR 6
420' 4 P,V E,G
430' 5 T,V F,G
440' 6 T,S H,E
450' 7 P,V K,F,A,B
460' 8 P,S I,E,A,H
470' 9 V,S J,F,A,H
480'
490' THE SUBROUTINES DO THE FOLLOWING.
500' SUB FINDS FROM
510' A H T
520' B E T
530' C T H
540' D T E
550' E V T,P
560' F P T,V
570' G S P,T
580' H P S,T
590' I T S,P
600' J T S,V
610' K T P,V
620'
630'
640' DEFINITIONS
650'
660' G$(J) = NAME OF J-TH GAS
670' A(I,J) = COEFFICIENT IN POLYNOMIAL FOR CP
680' P$(I) = NAME OF PROPERTY (T,H,E,P,V,S)
690' X$(I) = UNITS FOR P$(I)
700' V(I) = VALUE OF P$(I)
710' K1,K2 DUMMIES TO KEEP TRACK OF INPUTS
720' FNH(T) IS THE INTEGRAL OF CP FROM T0 TO T. THE VALUE OF CP
730' IS DEFINED BY A POLYNOMIAL IN T, THE COEFFICIENTS OF WHICH
740' ARE GIVEN BY A(I,J). THE INTEGRAL IS THEREFORE ALSO A POLYNOMIAL
750' IN T.
760'
770' FNS(T) IS THE INTEGRAL OF (CP/T) FROM T0 TO T AND IS THE CHANGE
780' IN ENTROPY FROM T0 TO T AT CONSTANT P.
790'
800' FASTER INPUT: USE DATA BLOCK LINES 570-630. IN LINE 99
810' K9 IS A DUMMY TO TELL IF FAST INPUT IS BEING USED. K9=1 PUTS
820' PROGRAM INTO FAST INPUT MODE, INSTEAD OF CONVERSATIONAL INPUT MODE.
830' SEE DATA BLOCK AT LINES 570 TO 630
840'
850' E9 AT BEGINNING OF PROGRAM GIVES ALLOWED FRACTIONAL ERROR IN H.
860' R=GAS CONSTANT IN L-ATM/G-MOL,K; R1=GAS CONSTANT IN CAL/G-MOL,K
870' P0,T0,V0 STANDARD VALUES FOR PRESSURE, TEMPERATURE, VOLUME
880'
890'
900'EXPLANATION OF SUBROUTINES
910'
920'SUB A: USES FNH(T) TO GET H
930
940'SUB B: USES FNH(T) AND SUBTRACTS R1*T
950
960' SUB C: THE MEAN HEAT CAPACITY BETWEEN T0 AND T IS EQUAL
970' TO FNH(T)/(T-T0). THIS MEAN HEAT CAPACITY DOES NOT CHANGE
980' RAPIDLY WITH TEMPERATURE. AN INITIAL GUESS FOR T IS MADE
990' AND THIS GUESS IS USED TO COMPUTE A VALUE FOR MEAN CP.
1000' THAT VALUE IS USED TO COMPUTE THE APPROXIMATE TEMPERATURE.
1010' USING THE RELATION T=T0+(H/(MEAN CP)). IF FNH(T) USING
1020' THIS NEW T IS CLOSE ENOUGH TO H, THE TEMPERATURE IS ACCEPTED.
1030' OTHERWISE THE PROCEDURE IS REPEATED.
1040'
1050' SUB D: ESSENTIALLY THE SAME AS SUB C, EXCEPT THAT MEAN
1060' VALUES FOR CV INSTEAD OF CP MUST BE USED.
1070
1080'SUB E USES PERFECT GAS LAW
1090
1100'SUB F USES PERFECT GAS LAW
1110
1120'SUB G USES FNS(T), INCLUDING EFFECT OF PRESSURE
1130
1140'SUB H USES FNS(T) TO FIND P FROM S AND T
1150
1160' SUB I: THE LOGARITHMIC MEAN HEAT CAPACITY BETWEEN
1170' T0 AND T IS FOUND BY DIVIDING FNS(T) BY LOG(T/T0)
1180' THE LOGARITHMIC MEAN DOES NOT CHANGE VERY RAPIDLY WITH
1190' TEMPERATURE, AND THEREFORE MAY BE USED TO GET AN APPROXIMATION
1200' TO THE TEMPERATURE. FIRST THE EFFECT OF PRESSURE IS
1210' SUBTRACTED FROM S. FROM THE EQUATION:
1220'
1230' S=(MEAN CP)*LOG(T/T0)
1240'
1250' AN APPROXIMATE VALUE FOR T MAY BE FOUND. THIS VALUE IS
1260' USED TO FIND A NEW VALUE FOR MEAN CP AND THE PROCEDURE
1270' IS REPEATED UNTIL S IS CLOSELY ENOUGH APPROXIMATED.
1280
1290'SUB J: THIS SUBROUTINE MAKES USE OF THE EQUATION:
1300
1310' S = (MEAN CV)*LOG(T/T0) + R1*LOG(V/V0)
1320
1330' BY FIRST SUBTRACTING FROM S THE EFFECT DUE TO V AND THEN
1340' USING FNS(T) TO FIND THE APPROPRIATE MEAN CV. THIS MEAN
1350' CV IS FOUND BY COMPUTING THE LOGARITHMIC MEAN CP AND SUBTRACTING
1360' R1. SEE SUB I FOR FURTHER EXPLANATION
1370
1380