-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDSGNPRES
75 lines (70 loc) · 2.54 KB
/
DSGNPRES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
***********************************************************************
* CATEGORY.: MISC CALCULATIONS
* GROUP....: FORTRAN PROGRAMS
* AUTHOR...: LANCE HAYNIE <LANCE@HAYNIEMAIL.COM>
* DATE.....: 2017-09-14
* PURPOSE..: CALCULATE DESIGN AND BURST PRESSURE
************************************************************************
* MODIFICATIONS
* 2017-09-14 - LHAYNIE - INITIAL VERSION
* 2017 09-15 - LHAYNIE - UPDATED INPUT READ
************************************************************************
PROGRAM DSGNPRES
REAL CA, CB, CC, CD, CE, PI
REAL BETA, BF, DP, BP, BSF, DD, DC
REAL OD, T, SD, FTY, FTU, E, V
CHARACTER*50 NAME
CHARACTER*3 VER
VER = "1.0"
OPEN (UNIT=1,FILE='DATA')
READ (1,*) NAME
READ (1,*) OD
READ (1,*) T
READ (1,*) SD
READ (1,*) FTY
READ (1,*) FTU
READ (1,*) E
READ (1,*) V
CA = 9.5833
CB = -33.528
CC = 44.929
CD = -28.479
CE = 8.6475
PI = 3.141592
BETA = FTY/FTU
BF = CA*(BETA**4)+CB*(BETA**3)+CC*(BETA**2)+CD*BETA+CE
DP = 2*T*FTY*1000/OD/SD
BP = 2*T*FTY*1000/OD*BF
BSF = BP/DP
DD = 2*DP*((OD/2)**2)/E/(10**6)/T*(1-V/2)
DC = PI*DD
OPEN (UNIT=2,FILE="RESULTS",STATUS="NEW")
WRITE (2,*) "HAYNIE RESEARCH & DEVELOPMENT"
WRITE (2,*) "DESIGN & BURST PRESSURE"
WRITE (2,*) "VERSION ", VER
WRITE (2,*) " "
WRITE (2,*) "CALCULATIONS FOR: ", NAME
WRITE (2,*) " "
WRITE (2,*) "-USER INPUT DATA-"
WRITE (2,*) "OUTSIDE DIAMETER (OD):", OD, "IN/MM"
WRITE (2,*) "WALL THICKNESS:", T, "IN/MM"
WRITE (2,*) "DESIGN SAFETY FACTOR:", SD
WRITE (2,*) "YIELD STRENGTH:", FTY, "KSI/MPA"
WRITE (2,*) "ULTIMATE STRENGTH:", FTU, "KSI/MPA"
WRITE (2,*) "MODULOUS OF ELASTICITY:", E, "MSI/MPA"
WRITE (2,*) "POISSONS RATIO:", V
WRITE (2,*) " "
WRITE (2,*) "-RESULTS-"
WRITE (2,*) "BURST FACTOR:", BF, "PSI/KPA"
WRITE (2,*) "DESIGN PRESSURE (DP):", DP, "PSI/KPA"
WRITE (2,*) "BURST PRESSURE:", BP
WRITE (2,*) "BURST SAFETY FACTOR:", BSF
WRITE (2,*) "CHANGE IN DIAMETER AT DP:", DD, "IN/M"
WRITE (2,*) "CHANGE IN CIRCUMFERENCE AT DP:", DC, "IN/M"
WRITE (2,*) " "
WRITE (2,*) "NOTES:"
WRITE (2,*) "KSI = PSI(LB/IN**2) X 1000"
WRITE (2,*) "MSI = PSI(LB/IN**2) X 10**6"
WRITE (2,*) "MPA = PASCAL (N/M**2) X 10**6"
CLOSE (2)
END