You are on page 1of 86
TWO-PHASE FLOW IN GEOTHERMAL WELLS: DEVELOPMENT AND USES OF A COMPUTER CODE A Report Submitted to the Deparment of Petroleum Engineering of Stanford University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE by Jaime Ortiz-Ramirez June 1983 ACKNOWLEDGEMENT I would like to thank Comision Federal de Electricidad de Mexico for financial support for my studies at Stanford University. I greatly appreciate the adittional support received from the Stanford Geothermal Program I appreciate the help given by the Instituto de Investigaciones Electricas de Mexico in obtaining the Cerro Prieto Data. Iam in a great debt with Prof. Jon S. Gudmundsson for his suggestions and effort as my research advisor. I want to thank Prof. Roland N, Horne for his advise during my studies at Stanford. Finally, I want to express my thanks to my wife for her patience and encouragement during my graduate studies. ABSTRACT A computer code is developed for vertical two-phase flow in geothermal wellbores. The two-phase correlations used were developed by Orkiszewski (1967) and others and are widely applicable in the oil and gas industry. The computer code is compared to the flowing survey measurements from wells in the East Mesa, Cerro Prieto, and Roosevelt Hot Spring geothermal fields with success. Well data from the Svartsengi field in Iceland are also used. Several applications of the computer code are considered. They range from reservoir analysis to wellbore deposition studies. It is considered that accurate and workable wellbore simulators have an important role to play in geothermal reservoir engineering. TABLE OF CONTENTS ABSTRACT INTRODUCTION LITERATURE SURVEY VERTICAL TWO-PHASE FLOW 3.1 Description 3.2 Two-Phase Flow Equations 3.3 Two-Phase Flow Correlations . 3.4 Single-Phase Liquid Flow .. 3.5 Heat Transfer Equations ..... COMPUTER CODE nleDescription| asses. +: 4,2 Validation ....... USES OF WELLBORE MODELS 5.1 Pressure and Temperature Profiles 5.2 Discharge Analysis 5.3 Casing Design .......... 5.4 Fluid Enthalpy Page u uw 1s 20 24 28 29 3 33 5.5 Scale Deposition 5.6 Wellbore Heat Transfer ... 5.7 Well Test Analysis ......... 5.8 Decline Curves . CONCLUSIONS ., NOMENCLATURE . REFERENCES APPENDIX A Flow Diagram and Program Listing APPENDIX B Data Used APPENDIX C Derivation of equations 34 36 37 38 39 4 1, INTRODUCTION In geothermal field development the engineer is concerned with fluid flow in the reservoir and wellbore. Two-phase flow occurs in the wellbore of the wells in liquid dominated reservoirs. The engineer is therefore intrested in simulating two-phase wellbore flow to obtain information about the reservoir and production characteristics of wells. Two-phase vertical flow in geothermal wells has been studied by many investigators, The equations that describe such flow are the continuity, momentum, and energy equations, These are then used to express the total Pressure drop up the wellbore in terms of its potential accelaration, and frictional components, In studies of this nature we are able to draw upon the extensive two-phase literature of the nuclear and oil and gas industries. While many papers have been published with geothermal wellbore flow models, there are not many studies that show how these models can be used. The step from theoretical models to engineering applications seems not to have received alot of attention. There may exist many applications which still need to be discovered. The problem is that we do not have extensive measurements of geothermal well behavior. However, as more data becomes available it is important to have an accurate and workable wellbore simulator. Continuos interaction between field measurements and flow modeling studies should advance our understanding of geothermal well characteristics. The main purpose of the present work was to develop a workable geothermal wellbore simulator, the work is based on earlier efforts at Stanford University. A new computer code was written with minor modifications of the commonly used two-phase flow correlations. The applications considered (8 main categories) are based on known problems in geothermal reservoir engineering. 2, LITERATURE SURVEY Most of the available correlations**** "for vertical two- phase flow in wells have been developed for the oil and gas industry. These correlations have been modified to suit the condition that exist in geothermal wells. A complete analytical description of one dimensional two-phase flow is given by Wallis®. Gould® used a combination of correlations from Hagedorn- Brown, Ros, Turner-Ros, Aziz, and Orkiszewski and coupled them with heat transfer equations to model two-phase flow in geothermal wellbores. The data he used to validate the model came from the Wairakei and Broadlands geothermal fields in New Zealand and East Mesa in the Imperial Valley. Gould found that the Hagedorn-Brown and Turner-Ros correlations were the most consistent. Upadhyay et al’° concluded that the correlations used by Orkiszewski* and Hagedorn-Brown’ predict accurately the overall pressure drop in geothermal wellbores. Fandriana et al” compared four different correlations and found that Orkiszewski gave the best result. Chierici et al’ developed a geothermal wellbore model based on a previous work done by Chierici for oil and gas wells. They use the same criteria as Orkiszewski to determine the flow regimes, Barelli et al** included the effect of non-condensable gases on wellbore flow. They varied CO, content to match the flowing temperature and Pressure profiles. It was found that an increased CO, concentration brings about an increase in pressurebut has little effect on temperature. Nathenson“4 made calculations for a typical geothermal well showing the effects on production of varying reservoir parameters. Elliot’* compared the available power at wellhead for self flowing and pumping wells. Butz and Plooster used a two-phase wellbore simulator to investigate the effects of well casing diameter and Productivity index on the flowrate to show that casing design can be optimized. Bilicki et al” examined the effects of fluid temperature, pressure, equivalent salinity, reservoir drawdown coefficient, heat loss, and well They found that the most important parameter governing flow in geothermal wells is the reservoir temperature, Miller? has developed a wellbore model and coupled it with a simple reservoir model. The transient behavior of single and two-phase flow well during a well test was investigated. Hoang'* has also coupled reservoir and wellbore models and reported good agreement with the reservoir properties calculated using conventional well testing techniques. Goyal et al used flowing surveys ( temperature and pressure ) from Cerro Prieto wells to compare with calculated pressure and temperature profiles. They found that the calculated profiles were quite sensitive to measured wellhead parameters and well inside diameter. 3. VERTICAL TWO-PHASE FLOW 3.1 Description Vertical two-phase flow has mainly been studied by semi- empirical methods. Correlations that were developed for two-phase flow in oil and gas wells have successfully been applied to geothermal wells. Orkiszewski+ classified existing correlations for vertical two-phase flow in wells into three categories: First,liguid holdup is not considered in the determination of the mixture density which is just corrected by pressure and temperature, Liquid holdup and the pressure losses are expressed using empirically correlated friction factor. There is not distinction between flow regimes. Second, liquid holdup is considered in the calculation of mixture density. Holdup is correlated separately or in combination with friction losses, The friction losses are based on the properties of the mixture. There is not distinction between flow regimes. Third, liquid holdup is used to calculate the mixture density. Holdup determination is based on the slip velocity (| difference between gas and liquid velocities). The friction losses are determined using the continuous phase. Four flow regimes are considered. Hagedorn-Brown* belongs to the second category, vhile the Duns-Ros* , and the Orkiszewski‘ correlations belong to the third category. Flow regimes commonly used in the two-phase literature are as follow: Bubble. In this regime the liquid phase is the continuous phase and occupies most of the pipe volume , and the gaseous phase appears as small bubbles distributed through the liquid. The liquid phase is decisive in the pressure gradient calculation. Slug. The liquid phase remains as the continuous phase, but the bubbles have increased in number and size and now join to forma single bubble which form and size approaches the pipe diameter. The velocity this bubble is by far larger than the velocity of the liquid, Both liquid and gas contribute in the total pressure gradient. Transition. In this regime the gaseous phase becomes the continuous phase and some liquid is entrained as small Groplets into the gaseous phase. The gas has a greater influence on the total pressure gradient than the liquid. Mist. The gaseous phase is the continuous phase and the liguid is entrained in the gas. The gaseous phase controls the pressure gradient and liquid causes secondary effects. when dealing with two-pase flow we have to refer to the saturation states of water. These are defined as states at which a phase change begins or ends’. The saturated-liquid line is the state at which the first bubble of steam forms, and the saturated-gas line is the state at which the first liquid éroplet forms. The subscript "£" is commonly used to indicate states in the saturated-liquid line, and the states in the saturated-gas line will be refered by the subscript If the quality x is defined as the fraction of the total mass which is saturated gas, enthalpy of the liquid- gas mixture hm can be calculated from hm = (1-x) he + x hg (2 and specific volume of the gas-liquid mixture Vm will then be expressed by Uns (1-x)Vernvy (2) If the void fraction « also called gas holdup is the volume of gas or steam actually present in a given pipe section, expressed as the fraction of the total volume of that pipe section, then the density of the liquid-gas mixture as a function of the void fraction is given by Pm=(1-«)% + xf (3) The superficial velocities Vs. and sg of liquid and gas respectively will be defined as VsE= a /A ( 3a) and Vsg = dg / A ( 3b) where q, and qq are the volumetric flowrates of the two phases and A is the cross-sectional flow area. Eqs. (1), (2), and (3) are derived in Appendix Cc. 3.2 Two-Phase Flow Equations The basic equations for steady one-dimensional two-phase flow are,the continuity equatio: we = Pn vm a (4) and the momentum equation avm dp we — = -—a-1two- Snga (5) az az Sustituting Eq.(4) in Eq.(5) we get -10- avm ss ép mA Vm —=-—~a-7twd- fnga 6) dz az Multiplying the whole equation by dz/A and solving for -dp dz cap = Sogdz + ated — + Sm vmavm (7) A Potential Friction | Kinetic | Term Term | term Rewritting the kinetic term of Eq.(7) as done by Poettmann and Carpenter ag we Sm vm avm = - = ap (8) Ap and denoting 1 twD/A by t; which is the pressure drop per unit length due to friction, &q.(7) can be rewritten as a, we ap az aD ap = Pag dz + te dz - Solving for -dp (9) The minus sign is needed because we are considering z as Positive in the upward direction. -1- 3.3 Two-Phase Flow Correlations The procedure described by Orkiszewski* will be followed in this work. It has been used successfully in the oil and gas industry. Orkiszewski method has also been applied to geothermal wells giving reasonable results in determination of pressure drops. The method will now be described, The flow regimes are determined as by Duns and Ros? . The upper limit for bubble flow in their pattern map was approximated by a third degree polynomial. In order to make use of this flow pattern map we need to get the liquid number N and the gas number Ng. For the units given in the nomenclature : No = 1,938 Vs. (fu /a 1% (10) Ng = 1.938 vsg (S/o )“* (1) 1 where is the surface tension ( dynes/em) , then the flow regimes are determined as follows : Bubble 0,1 < Ng < 1.024 + 1.475 Ni. -1.75x107*No + 1.088x10"? n° (i2)) Slug Ng < 50 + 36 Ny (13) Transition Ng < 75 + B4 Nu (14) Mist Ng > 75 + 86 NL (15) Once the flow regime is determined the value for 9m and te are obtained according to the following criteria. -12- Bubble flow The density of the mixture m can be determined using Eq. (3) Pm= (1-4) + &Pg (3) Where « is determined according to Griffith and Wallis? 1 ge q. aq mo = = le - |ja-+% a (16) 2 Vs A Vs A Vs A where Vs is the slip velocity and for which they suggested a value of 0.8 ft/sec . The friction loss gradient t¢ is given by 2 vse 29D te f (17 where V_ is the real velocity of liquid and is calculated as a AC 1-o% we (18 ) The friction factor £ is obtained using a standard Moody diagram as a function of Reynolds number Nee = 1488 DVL P/M (19) Slug flow The density of the mixture Pm is calculated by = We+ fovba Pm = + PP (20) a, + VbA where [* is a correlated liquid distribution coefficient, introduced by Orkiszewski, which implicitly accounts for the following : . - Liguid is distributed in places the slug, the film around the gas bubble and in the gas bubble as entrained droplets. - The friction loss has two contributions, one from the liguid slug and the other from the liquid film, ~ The bubble rise velocity Vb approaches zero as mist flow is approached The bubble rise velocity Vb was correlated by Griffith and Wallis* as a function of the bubble Reynolds number Nb 1488 Dvb% / AL (C21) and the liquid Reynolds number Nee = 1488 Dvt PR / (228) where Vt is the total superficial velocity given by Vt = Ve. + Vsg Leela] the bubble rise velocity is then calculated from the following set of equations when Nb < 3000 =u Vb = ( 0,546 + 8.74 x 107° Nee ) {so (24) when Nb > 8000 Vb = (0.35 + 8.74 x 10"S Nae) [go (251) when 3000 < Nb < 8000 1 2 13.59 Ay Vb=— vbi+ vbi' + 2 A where vbi = (0.251 + 8.74 x10 Nee) [gD (27) ( 26) In the Orkiszewski method the friction loss gradient t; in the slug regime is calculated from veg a. + VbA teat +P] (28) 2g D a + VbA where the friction factor £ is obtained froma Moody diagram as a function of the liquid Reynolds number given by Eq. (22) The liquid distribution factor [" is determined using the following equations when vt < 10 P= (0,013 tog un) / v7? 1 - 0,681 + 0.232 log vt -0.428 log D (29) when vt > 10 “15 P= 0 (0.085 10g wa) / D™7*7) - 0.709 - 0.162 og ve -0.888 log D (30) and restricted by the limits P > -0.065 ve when ve €10 (31 p,-—e4 (1-—fe_)wnen ve > 20 (32) ade + VbA a These restrictions are to avoid pressure discontinuities between flow regimes. Transition flow In the transition regime the mixture density Pm and the friction loss gradient t, are calculated for the slug and mist regimes and then weighted with respect to Ng, and Lm and Ls the lower and upper limits of the transition regime, as proposed by Duns and Ros? : mm = A (Sm) sue + BCP) mcr (33) te = AC te Vey + BC te Vroce (34 where Lm - Ng (35) Lm - Ls and Ng - Ls (36) Lm - Ls -16- Mist flow In this regime Orkiszewski calculated Pm and t, as Duns and Ros? : The density of the mixture is given by P= (1-4)R + «Py GoD where is obtained assuming negligible slip between phases , then 1 Xs (37) Ae a Ig The friction-loss gradient is calculated from te = £ Pg Vsg'/ 2g D ( 38) where Vsg is the superficial gas velocity In the mist flow regime the friction factor £ is obtained from a Moody diagram as a function of the gas Reynolds number Nag = 1488 D vsg $5 / dg (39) and a correlated form of the Moody relative roughness factor e/D that was developed by Duns and Ross? . e/D is limited to be bigger than 10*#-3 and less than 0.5 . Nw = 4.52 x 1077 ( vsg%/v)* %/ (40) ar if Nw < 0,005 e/D = 34T/ ( Pg vsg* dD) (42) if Nw > 0.005 e/D = 178.84 (Nw "7 ( 9g vec DD (42) 3.4 Single Phase Liquid Flow In single phase liquid flow the kinetic term will be negligible and for units given in nomenclature, q.(9) becomes : 1 -p= = [Poe az (43) 144 The calculation of Q has to be done carefully because it represents the most important part of the total pressure gradient . The following procedure has been proposed by Goula® R= 62.4 Yw / Bw (44) where Bw is the formation volume factor of water and is given by Bw = 1,0 + 1,2x107* Tx + 1.0x10"*Tx'- 3.33x107°B (45 and Tx Yu 7 - 60. specific gravity of water -18- T = Average temperature (°F ) 0 = Average pressure ( psia ) The friction loss gradient ty is obtained from the equation + 1 gv a ee (46) 144 29.0 where the friction factor £ can be calculated by Colebrook'® equation e f= 41.14 - 2109 ( —+ (47) D where Nae = 1488 DVR / Mm (48) the friction factor £ has to be calculated by iteration when using Bq. (47). 3.5 Heat Transfer Equations When geothermal fluids flow toward the surface there may exist a temperature difference between the formation and the wellbore, This will result in unsteady radial heat transfer, Ramey*° gives an approximate solution to this problem which permits estimation of fluid and casing temperature as -19- @ function of time, Assuming steady flow in pipe, flow-work is zero,and the total-energy equation can be written as g 42 ave hi = hi-l-Q+— — + Ge J 2G o (49) The amount of heat lost by the fluid and transfered to the ground in an increment of pipe is given by Ore DU. tre Ac 7 atl 7ac ie) (50) where U (Btu/hr/sqft/F) is the overall heat transfer coefficient and £(t) is a time dependency function expressed by f(t) = -Ln (re /2qa't ) - 0.29 ( 50a) and re = is the outer casing radius ( ft ) s' = Thermal diffusivity of earth (sqft/éay) t = flowing time ( days ) For wells with high flow rates where the convection heat transfer is predominant, the time function cancels out in Eq. (50). -20- 4. COMPUTER CODE 4.1 Description A computer code has been developed to solve &q.(9) which determines the pressure drop in a vertical two-phase flow. The code is based on earlier work done by Fandriana et al”. When the current effort was initiated it was found that the Fandriana et al* code did not work execept for limited input conditions. Also, the calculations were time consuming and therefore costly. The modified computer code takes about ten times less time for execution and accepts a wide range of input conditions. Although the new code is more workable than the previous code, it is limited to use Orkiszewski's method. In the Fandriana et al* code there were options to use the methods of Orkiszewski> | Duns and Ros; Beggs and Brills, and Hagedorn-Brown? Pressure drop in two-phase wellbore flow is determined by Eq.(9) which includes the effects of potential energy, friction and acceleration : -21- 1 Pn + te AP = — az (9) 144 Wt ag 1-2 4637 AY p In the computer code this equation is solved by dividing the total length of the well into intervals where the fluid Properties can be considered constant. The computer code solves a one-dimensional steady-state wellbore model, It includes calculations of the pressure and temperature along with other flowing parameters at different depths. The flowing conditions at the top or bottom of a geothermal well are needed as input. The input data required for the wellbore calculations are shown in Appendix A.2. The computer code solves the pressure drop and the heat transfer Eqs.(9),(49), and (50) simultaneously using simple iteration. The total pressure drop is split into its friction, potential and kinetic terms to show their individual effects. In the code is possible to handle up to eight different diameters with their respective absolute roughness. A flow diagram of the computer code is given in Appendix A.l. A brief description of the main steps of the code will now be given : 1, Divide the total well length in several intervals. -22- 2. Calculate the rock temperature of the interval using Lagrange on the shut-in temperature. Assume a temperature drop, and and (50) calculate enthalpy of Assume a pressure drop for the Calculate fluid properties for at the middle interpolation using Eqs. (49) mixture, interval, the average pressure and temperature. Calculate the pressure drop using single phase liquid or two-phase flow correlations as needed, Compare with assumed pressure drop, if a good agreement is not achieved repeat from step 4. Using the calculated pressure drop and assumed temperature drop determine enthalpy of mixture for single phase, and for two-phase use the calculated pressure drop to get the temperature drop. Compare results in step 8 with ones in step 3 if there is not a good agreement repeat from step 3. 10. Once the pressure and temperature match has -23- been obtained procede with the next interval. The calculations end when the total well length has been reached. The enthalpy of steam and water are obtained from steam tables values using Lagrange interpolation. Steam Density is also calculated from steam tables. The density of the brine is calculated according to Eq.(44). The way in which the remaining variables are obtained can easly be deduced from the program listing in Appendix A. It has to be mentioned that in determining the fluid properties the Presence of non-condensable gases is not taken into account. When the geothermal fluid has a high content of non- condensable gases the model should be used with discretion. While testing the original code developed by Fandriana et al* a jump in the pressure gradient was detected when going from Vt <10 to Vt > 10 within the slug regime using the orkiszewski correlation. The jump was partially due to the low viscosities in geothermal wells < 1 cp compared to the high viscosities encountered in oil and gas wells ( > 10 cp ) for which the correlation was developed. It was found that the cause of this jump was the factor introduced by Orkiszewski to correlate experimental data for the density of two-phase mixtures. In order to give a smooth Pressure gradient the next modification in calculating the factor was done: ~2h- r and -0.065 Vt - 0.1 (51) ona9 = [ (0,045 log 4a) / D””"] - 0.709 - -0.162 log Vt - 0.888 log D (30 This second equation restricted by Vb oA Pm Pa- (1-z) ( 32 q + VbA Fe Eqs. (51) and (30) are evaluated and the bigger value of the factor is to be taken. This simple procedure became to give a smooth change in Pressure gradient and still the agreement with field data was satisfactory. 4.2 Validation The present computer code was tested against measured Pressure and temperature profiles from wells in the Imperial Valley, Cerro Prieto, and Roosevelt Hot Springs. (a) Bast Mesa 6-1 The data for this well were obtained from Fandriana et 2 hl al. The production zone was set at 7000 ft and the inside pipe diameter 0.7267 ft. The total mass flow rate was 102,500 lb/hr. A pipe roughness of 0.0003 ft was considered in the calculations. The heat transfer coefficient was arbitrarily determined to be 10 Btu/hr/sqft/F and water gravity was taken 1.0208 . Appendix B.1 shows the shut-in temperature and measured pressure and temperature profiles of the east Mesa well, Using the above data, calculations were made starting at bottomhole, The calculated flashing point was at 4079 ft depth showing good agreement with measurements. The calculations showed single phase at the bottom up to flashing point and then going through bubble, slug and transition flow regimes. | The superficial velocities at wellhead were 0.987 ft/sec and 107 ft/sec for water and steam respectively. The good agreement with field data can be observed in Fig.l. (b) Cerro Prieto M-90 Flowing data for well M-90 in Cerro Prieto was obtained from Castaneda (1983), The measurements are froma test carried out on February 21st 1978. The production zone was estimated to be at 4261 ft depth. The well has a uniform inside pipe diameter and equal to .5808 ft. The total mass flow rate was 356,840 lb/hr . The pipe roughness was taken as 0.0003 ft. The enthalpy at wellhead was determined to be 578 Btu/lb. The heat transfer to the ground was considered negligible and ~26- the water gravity was assumed 1.019. Table B.2 shows the shut-in temperature as well as the pressure and temperature profiles measured during the the test. The measured and calculated pressure profile for this well are compared in Fig, 2. The calculations were started at the wellhead using the measured enthalpy, and saturation temperature corresponding to 590 psia. The results showe that well is flowing in two-phase flow, Flashing point was detected at wellbottom. The bubble and slug regimes were observed for these data. It has to be mentioned that using the measured temperature at the wellbottom single phase liquid flow is detected at the bottom but flashing point is calculated at a higher point and the agreement with measured Profile is not satisfactory. This may be possible to the high content of CO, observed in this well. (c) Roosevelt Hot Springs 14-2 The data for well 14-2 in Roosevelt Hot Springs were taken from Butz and Plooster™, and is a flowing pressure survey identified as log 78-6. For the purpose of our calculations the production interval was considered at 2996 ft. The well has a 0.7433 ft inside diameter casing from surface to bottom. The total mass flow rate at the time o: the test was 325,000 lb/hr . The pipe roughness vas considered to be 0.0003 ft, An enthalpy of 502 Btu/lb was taken as the average reported in Fig.12 of Butz and -21- Plooster™. The heat transfer to the ground was considered zero, Table B.3 gives the pressure profile for this well; the temperature profile was not available. The comparison of measured and calculated profiles is shown in FPig.3, The calculations were started at wellbottom. A downhole temperature of 512 F was assumed to match the 502 Btu/lb enthalpy. It can be observed that the agreement is quite good. The flashing point was calculated at 2604 ft, and the bubble and slug flow regimes vere observed above the flashing point. ~28- 5. USES OF WELLBORE MODELS 5.1 Flowing Pressure and Temperature Profiles Knowing the discharge conditions and casing schedule of a geothermal well it is possible to calculate the temperature and pressure profiles. Based on these profiles the depth at which the flashing point is occuring can be determined. This point is characterized by a significant change in the pressure gradient. A good example of the use of temperature profiles is in correlating the kind of minerals that will deposit on the pipe wall at differents depths according with the temperatures present at those depths. In the analysis of mechanical stress on casing and on casing cementing due to thermal effects the temperature profile is required. The pressure and temperature profile can be useful in determining the depth for setting a pump into the wellbore when needed. = Elliot '*gives a complete analysis of sel flowing and pumping geothermal wells, concluding that Pumping is not recommendable on an energy basis but it may -29- be useful in preventing scaling in the wellbore. The precison of these calculated profiles greatly depends on the quality of input data, Goyal et al™ have done some sensitivity studies using Cerro Prieto flowing well data and found that the parameters to be measured, in order of decreasing accuracy, are well inside diameter, wellhead Pressure, dryness fraction and mass flow rate. They observed a 70% increase in bottomhole Pressure for a 20% decrease in enthalpy. 5.2 Discharge Analysis The productivity index ( PI ) is the ratio of the rate of Production ( Wt ) to the pressure drawdown in the reservoir, . 23 and is expressed as ree We py Dae) 1b/hr/psi (52) It is a measured of the ability of the well to flow. p, is the static reservoir pressure and can be obtained using well test analysis techniques or by a sufficiently long shut-in time. Pu, is the wellbottom flowing pressure and can be measured using subsurface pressure instruments, or using a wellbore flow model and wellhead measurements. In calculating the discharge curve of a geothermal well and the effect of the productivity index on it We consider ~30- that flow in the reservoir is steady state or semi-steady state, We can then consider the PI constant for a wide range of pressure drawdown as long as the fluid in the reservoir is flowing as single phase liquid. AS an example of how the wellbore model can be applied in calculating discharge curves data from Svartsengi well $ 12 24 in Iceland will be used. Table I shows the data for this well , TABLE I. Data for Svartsengi well #12 in 1983 Pwh = 220.6 psia Twh = 390.3 °F Wt = 333,432 lb/hr hey = 429.12 Btu/Ib Wellbottom = 3936 ft i of pipe = 1.0521 ft from 0 to 1991 ft @i of bare-hole = 1.0208 ft from 1991 to bottom Reservoir pressure = 1279 psia With these data and considering heat transfer negligible the wellbore model predicted a flowing wellbore pressure of 1050 Psia, Using Eq.(52) a PI of 1456 1b/hr/psi was calculated. Knowing the PI and considering it constant, several wellbottom flowing pressures were calculated for different total mass flow rates. Using the wellbore model these eae wellbore flowing pressure were corrected for wellhead conditions. Fig. 4 shows the characteristic production curve for the original 1456 lb/hr/psi PI. It also shows the curves for 500 and 1000 1b/hr/psi assumed PI's. As can be observed the decline of the discharge curve with respect of wellhead pressure is bigger for low than for high productivity indexes. Analyzing additional data from the computer ouput it was observed that for low productivity indexes the Pressure drop in the wellbore represents a small fraction of the total available pressure. The same observation has been made by Butz et al’, 5.3 Casing Design Wellbore flow models can be very useful in the design of casing schedules. To observe the effect of inside diameter in the wellbore performance several runs were made for Svartsengi well #12 using the data given in Table assuming that the well is totally cased with a same casing to bottom and using an arbitrarily PI of 1280 1b/hr/psi Three different diameters were assumed 13 3/8", 9 5/8", and 7 5/8" which are commonly used in geothermal wells. From Figs. 5, 6, and 7 it can be seen that for a given flowrate the wellhead pressure is lower for a smaller 32 diameter due to an increase in friction losses. In these figures, A is pressure drop in reservoir, B is pressure drop due to potential in single phase liquid, C is the pressure drop due to friction in single phase liquid, D is pressure drop due to potential in two-phase flow, and Dis the Pressure drop due to friction in two-phase flow. Svartsengi well # 12 presents an interesting case in which for low flow rates the pressure at wellhead increases with increasing flowrate, this occurs up to a maximum discharge pressure at which for higher flow rates pressure wellhead decreases as expectedd. © This behavior has been noticed in measured output curve for other similar wells in eal the Svartsengi field.. From Figs. 5 6, and 7 We observe that increasing wellhead pressure with increasing flow rate tends to disappear for small diameter, It can also be noticed that the pressure drop due to potential effects in two phase-flow is diminishing for small diameters for which We have higher velocities . This may be due to the fact, that in contrast to single phase liquid flow an increase in diameter or decrease in flow rate in two-phase flow does not necesarily represents a reduction in pressure gradients. This is because of the presence of gas ( steam ) which slips through the liquid without contributing to the lift. Finally, We note that below the flashing point the Pressure drop is mainly controlled by the potential term so the casing size is not as critical as in two-phase flow 5.4 Reservoir Fluid Enthalpy To analyze the effect of the reservoir fluid enthalpy in the performance of a geothermal well, several runs were made ‘ using data for Svartsengi well # 4 given in Table 112 TABLE II . Data for Svartsengi Well # 4 in 1975 Pwh = 263.04 psia Twh = 405.54 F We = 467,280 lb/hr ho = 454.2 Btu/1b Wellbottom = 3,359 ft Oi of pipe = 0.7218 ft from 0 to 1148 ft Oi of pipe = 0.5676 ft from 1148 to bottom The overall heat transfer coefficient was considered negligible. Using the wellbore model a bottom hole pressure of 1067 psia and a temperature of 472 F were calculated Considering everything constant the wellbottom temperature was increased to simulate an increase in reservoir fluid enthalpy. The increase in temperature was taken to a point in which the flashing occurs a few feet above the wellbottom, It was not increased more because if flashing occurs at the reservoir then the productivity index can not be considered constant anymore, From Fig.8 it can be seen that wellhead pressure depends greatly on the reservoir fluid enthalpy. Bilicki et al” have concluded that reservoir temperature is a decisive parameter in the flow performance of geothermal wells. Wells producing from two-feed zones in a steady-flow can be analyzed using wellbore models. The well performance will depend on the enthalpy of the fluids entering the well. Grant et ali* refer to the case of two-feed zones, showing in a schematical way how a well with an upper steam-feed and a water lower-feed will cycle when operated at low flow rates. A well with a cold water entrance may stop flowing or diminish its flow performance due to lowering of mixture enthalpy. 5.5 Scale Deposition Scale deposition such as calcium carbonate will normally occur immediatly above the flashing point. This deposition can occur in a length of several feet and form rapidly causing a decrease in flow rate or in wellhead pressure even when the reservoir characteristics remain practically constant. -35- The wellbore model was used to simulate scale deposition in Svartsengi well # 4 with the data given in Table II. The scale deposition was assumed to occur in the 300 ft immediately above the flashing point which was calculated at 1890 ft. The incrusted interval was assumed to have a constant diameter and the roughness was considered 0.003 ft which is an average for concrete. The mass flow rate, wellbottom flowing pressure and the productivity index were kept constant so the flashing point remained at the same depth. Fig.9 shows the reduction in wellhead pressure as a function of the fraction of cross-sectional area that has been incrusted. It can be noticed that this curve is concave downwards in contrast with a productiln decline curve which would probably be concave upwards. This behavior of incrustation has been observed in Svartsengi . The present wellbore model and approach have been applied” to wells in the Miravalles geothermal field in Costa Rica. A good match with field data has been achieved. Grant et al,*” mention that an increasing decline in flow as flow approaches zero is characteristic of deposition. It remains to determine the rate of deposition. Usually is assumed that the volume of scale deposited per unit length will increase linearly with cumulative production **. Then using this criteria the pressure drop at the wellhead would decrease slightly at the begining of incrustation and ~36- declining faster as more and more area has been incrusted. 5.6 Wellbore Heat Transfer When obtaining the characteristic production curves of a geothermal well in a short time the enthalpy of the mixture increases with flow rate and showes a reduction at low rates. This has been observed in the Los Azufres geothermal field in Mexico™, If We look at Eg.(50) We notice that for high flow rates and low wellbore temperature the amount of heat transfered to the ground decreases. If the shut-in temperature and the remaining reservoir/fluid parameter are known the overall heat transfer coefficient can perhaps be estimated by matching the measured and calculated profiles. For geothermal wells with commercial flow rates the formation around the well reaches thermal equilibrium after few days or weeks in most instances, the heat conduction can then be neglected in our calculations. Fig.10 gives effect of heat transfer on the pressure profile at well 6-1 in East Mesa field. The curve to the lef was calculated assuming an overall heat transfer coefficient of 10 Btu/hr/sqft/F but the other curve assuming zero heat transfer. It can be noticed that the curve with overall heat transfer coefficient equal zero will flash at a deeper point and also will have a higher pressure at the ea7e wellhead because of its higher enthalpy. 5.7 Well Test Analysis Transient pressure test have been used with good results in oil and gas industry and have become an important technique to obtain reservoir data. Unfortunately these analytical and graphical techniques are based on bottomhole Pressure measurements which are very difficult to obtain in geothermal wells. Hoang’ approaches the problem using a wellbore flow model to calculate wellbottom pressures and couples them with a simple reservoir simulator. He assumes steady-state flow in the wellbore and single fluid phase flowing in a radial form in the reservoir. The permeability and porosity are considered uniform anywhere in the reservoir, A good agreement was obtained in comparing simulated reservoir Parameter in this form and the ones obtained by means of the conventional well test techniques. Miller’ has coupled a transient wellbore model with a simple reservoir model. A single phase liquid flow was assumed at the reservoir and single or two phase flow in the wellbore, Calculation using this approach have been made obtaining interesting results but no matching with field data were reported. -38- 5.8 Decline Curves Production decline curves provides a simple method for Predicting the future behavior and life of a reservoir. They are based on the assumption that reservoir behavior can be determined from any mathematical relationship that can be matched to the production history. | The usual method is to plot the production rate of unrestricted wells against the Production time and then extrapolate the resultant curve for estimating future behavior. When a well has been producing ina restricted way the obtainment of decline curves is not possible. Cutler and Johnson” proposed for oil wells the use of bottomhole Pressures and productivity index data for calculating the Production decline curve that the well would have followed if it were allowed to produce without restriction. Because of the lack of a physical model supporting decline curve methods their uses appear limited®®, they can not predict the effects of changes in management practice or the character of the servoir such as cold water entry. However, many successful predictions have been made using this simple method . ~39- CONCLUSIONS A workable computer code has been developed to simulate vertical two-phase flow in geothermal wells, Reasonable results can be obtained when the input data are of good quality. Using the computer code the ouput characteristic curve can be obtained considering constant productivity indexes. In casing design is very useful to split the total pressure gradient in its potential, friction and kinetic terms to observe its individual effects. In single liquid phase flow the casing diameter is not critical because the pressure drop is mainly controlled by the potential term. The reservoir temperature is a very important parameter in well flow performance in the liquid dominated reservoir. The wellbore flow models can be applied to analyze the effect of cold water entrance in wellbores, A good example of use has been in simulating ~40- scale deposition. The use of wellbore flow models in the obtaining resevoir characteristics seems to be limited due to the high resolution needed in well test analysis techniques. Wellbore flow models can be used in obtaining of overall heat transfer coefficient when the Pressure and temperature profiles are matched. The model can be used in evaluating production histories to analyze them using production decline curves. Ls Nb Ng Ne Nee 7a 00 te Vb vs vsg vsi wt -41- NOMENCLATURE, cross-sectional area of pipe, sqft inner pipe diameter, ft absolute roughness of pipe, ft Moody friction factor, dimensionless gravity acceleration, ft/sec gravitational constant, ft-lbm / 1bf-sec enthalpy, Btu/lbm Mechanical equivalent of heat ( 778 ft-1bf / Btu ) lower limit mist flow, dimensionless higher limit slug flow, dimensionless bubble Reynolds number, dimensionless gas number, dimensionless liquid number, dimensionless Reynolds number, dimensionless Pressure, psia heat transfered to surroundings, Btu /lbm volumetric flow rate, ft / sec time, sec friction-loss gradient, lb/ft /ft overall heat transfer coeff., Btu/hr/sqft/F velocity, ft/sec bubble rise velocity, ft/sec slip velocity, ft/sec superficial gas velocity superficial liquid velocity, ft/sec total mass flow rate, 1bm/hr -42- steam quality, dimensionless z depth, ft « void fraction, dimensionless &w specific gravity of water, dimensionless PP liquid distribution coeff., dimensionless P density, lbm/ét Y surface tension, dynes/cem tw shear stress, 1bf/sqin M viscosity, cp. ‘Ww specific volume, £t /lbm Subscripts: fandL liquid tg vaporation gas mixture total REFERENCES Orkiszewski,J.: " Predicting Two-Phase Pressure Drops in Vertical Pipes," Journal of Petroleum Technology ( June 1967 ). 2, Fandriana,L.,Sanyal,S.K.,Ramey,H.J.Jr.: "A Numerical Simulator for Heat and Fluid Flow in a Geothermal Well,” Petroleum Deparment Report, Stanford University, Stanford CA. ( Oct 1981 ). 3, Duns,H.Jr.,Ros,N.C.J.: " Vertical Flow of Gas and Liquid Mixtures in Wells," Proc. Sixth World Pet. Congress, Frankfurt, ( June 19-26 1963 ), Section 11, paper 22-PD 6. 4, Hagedorn,A.R.,Brown,K.E.: "Experimental Study of Pressure Gradients Ocurring During Continuous Two-Phase Flow in Small Diameter Vertical Conduits," J. Pet. Tech.,( April 1965 ), 475-484. 5. Aziz,K.,Govier,G.W.,Fogarasi,M.: " Pressure Drop in Wells Producing Oil and Gas," J.Cdn.Pet.Tech.,( Sept 1972 ), 38-48. 6. Gould,T.L.: “ Vertical Two-Phase Steam-Water Flow in Geothermal Wells," J.Pet.Tech., ( Aug 1974 ), 833-842. 7, Poettmann,F.H.,Carpenter,P.G.: " The Multiphase Flow of Gas, Oil and Water Through Vertical Flow Strings With lo. 11. 12, 13. 14, Application to The Design of Gas-Lift Installation,” Drill.and Prod.Prac.,API, ( 1952 ), 257-317. Wallis,G.B.: " One-Dimensional Two-Phase Flow," McGraw Hill ( 1969 ), Griffith,P.,Wallis,G.B.: "Two-Phase Slug Flow," J.Heat Transfer, Trans. ASME, ( Aug 1961 ), 307-320. Upadhyay,R.N.,Hartz,J.D.,Tomkoria,B.N.,Gulati,M.S.: 9" Comparison of the Calculated and Observed Pressure Drops in Geothermal Wells Producing Steam-Water Mixtures," SPE of AIME, Paper SPE 6766. 52nd Annual Fall Tech. Conf. and Exhibition, Denver,Co.,(Oct 9-12, 1977). Nathenson,M.: " Flashing Flow in Hot-Water Geothermal Wells," J, Research U.S.Geological Survey ( Nov-Dec 1974 ) Vol.2, No.6, 743-751. Elliot,D.G.: " Comparison of Brine Production Methods and Conversion Processes for Geothermal Electrical Power Generation," Enviromental Quality Laboratory Report No.10, California Institute of Technology ( July 1975 ). Butz,J.,Plooster,M.: " Subsurface Investigations at the Roosevelt KGRA, Utah," Final report DOE/ET/28389-1 ( Oct 1979 ) Bilicki,2.,DiPippo,R. ,Kestin,J., Maeder,P.F., Michaelides,E.E.: =" Available Work Analysis in the Design of Geothermal Wells," International Conference on 15, 16. 17. 18, 19, 20. 21, Geothermal Energy, Paper H4 ( May 11-12, 1982 ) Florence Italy. Miller,C.W.: " Numerical Model of Transient Two-Phase Flow in a Wellbore," Lawrence Berkeley Laboratory, LBL-9056, (1979 ) Berkeley, ca. Hoang,V.T.: "Estimating Reservoir Properties and Well Performance Using Surface Production Data," #ighth Annual Worshop Geothermal Reservoir Engineering ( Dec 1982 ) Stanford University, Stanford ca. Reynolds,W.C.,Perkins,H.C.: : Enginnering Thermodynamics" McGraw Hill ( 1977 ) Second edition. Chierici,G.L.,Giannone,G. ,Sclocchi,G.,Terzi,L.: 8 Wellbore Model for Two-Phase Flow in Geothermal Reservoirs," Paper SPE 10135 ( 1981 ). Vennard,J.K.,Street,R.L.: " Elementary Fluid Mechanics," John Wiley and Sons, Fifth edition ( 1975 ). Ramey,H.J.: " Wellbore Heat Transmition,” J.Pet.Tech. ( April 1962 ) 427-435 ; Trans, AIME 225, Goyal,K.P.,Miller,C.P,,Lippmann,M.J.: " Effect of Measured Wellhead Parameters and Well Scaling on the Computed Downhole Conditions in Cerro Prieto Wells,” Sixth Workshop on Geothermal Reservoir Engineering ( Dec 1980 ) Stanford University, Stanford Ca. 22. 23. 24. 25. 26. 27, 28. 29, 30. 31. Barelli,A.,Corsi,R,,DelPizzo,G.,Scali,C.: " A Two-phase Flow Model for Geothermal Wells in Presence of Non- condensable Gases," Geothermics, Vol 11,No.3, ( 1982 ) pp. 175-191 Craft,B.C.,Hawkins,M.F "Applied Reservoir Engineering," Prentice-Hall, Inc. ( 1959 ), Gudmundsson,J.S.: " Personal communication " ( 1983 ) Grant,M.A., Bixley,P.F.,Syms,M.C.: " Instability in Well Performance," Geothermal Resources Council, Trans., vol.3 ( Sep 1979 ), 275-278, Granados,E.: " Personal communication " ( 1983 ) Grant ,M.A.,Donaldson,I.G.,Bixley,P.F.: "Geothermal Reservoir Engineering " Academic Press ( 1982 ) Coordinadora Los Azufres,Mexico: " Internal Reports " Sanyal,S.K.,Brown,S,,Fandriana,L.: " Sensitivity study of Varibles Affecting Fluid Flow in Geothermal Wells,” Fourth Workshop Geothermal Reservoir Enginnering, ( Dec 1978 ) Stanford University, Stanford CA, Cutler,W.W.,Johnson,H.R.,: " Estimating Recoverable Oil of Curtailed Wells,” Oil Weekly ( May 27, 1940 ) Ryley,D.J.,Parker,G.J.: " Flowing Geothermal Wells: Cerro Prieto Well M-91 and Krafla Well KJ-91 ; Computer Analysis Compared with Experimental Data," International Conference on Geothermal Energy, Florence Italy ( May 11-14, 1982 ) Paper C4, 187-194, 32. Castaneda,M.: " Personal communication " ( 1983 ), (43) Wadog ooor Pressure ( Psia ) nw a x 6 ° a 3 a 8 o 3 S 3 8 felelered ooog Fig. 1. Measured and Calculated Flowing Pressure Profile for Well East Mesa 6-1. oSel at 00! fi Pressure ( psie ) i) Q N 6 > a ° a 3 a 8 a 3 os 8 8 s 6 3 e T T aT T % SL a S 6 ie | S 4 S | ey 7 DD Measured J ele S HC celeulated BL Ay 4 oc Fig. 2. Measured and Calculated Flowing Pressure Profile for Well N-90, ) yadeg Pressure ( Psia ) Oo oo0e 00” 009 coos 000 5 S 8 oo0r oons | | ] | | | Lo : i ] 7 [epee teeters J Fig. 3. Measured and Calculated Flowing Pressure Profile for Well Roosevelt Hot Springs 14-2. "ZT TIem TBuesazeag 40 saarny votIonporg FastrazeIeYD *y “Sty ( JU/qy ) a3euMm oooo000T jo008 000009 oot . 0 0 T 7 . — O01 | jooe wsepsw/ar 00s = 1a + yed/mu/at o00't = 12 love Fea/aU/aT 96%'t = Tao fox Lot in 1. eee — (818g ) Bunsseug peayrT smoa30g 02 Burse) ,, g/¢ ET aT8UTg e Suyussy “ZT Tim F8uaszzeag 10y seAiny aanssazg eTqeTTeAy “¢ “Btu Tteay ig 8T swoajog 03 SuTseD ,, g/¢ 6 eTSuTS e SuTunssy ‘ZT 19m P8ueszzeas 05 soainy oanssazg stqeTTeAy -9 “Bra smoa30g 03 SuTse ,, 8/S / @TBUTS © ButuMssy “2I Thom F8uesazeas 403 Saainy sanssaig stqetFeay +1 -Btq /Q] ) 2124y MOT Toyo, ooo0001 oco0008 000009 oo0cor oooc0e 1 a | oce 00s oSz oooT OSeL ( Bt8d ) eunsseug efgerteay ure (Psia) 1200 1000 }—- Calculated Pressure Profiles Showing the Effect of Fluid Enthalpy in Svartsengi Well 4. Fig. 8. 90 “y TT2M FBuaszaeas 305 uoyaetnuTg uoTaTsodeq ates sO eeuy adig / eauy parsnuouy vO Oo aaeae “6 *3ta vo oor T T — OST —002 —0Se ‘O0€ ( eIsd ) sunssedg peayTen Pressure ( Psia ) IO —00¢% ‘00S oor Key % Overall Heat Transfer Coeff. = 0.0 Btu/he/oqfe/F O Overall Heat Transfer Coeff. = 10. Beu/he/sqEt/F Fig. 10. Calculated Pressure Profiles to observe Heat ‘Transfer Effect in Well East Mesa 6-1. APPENDIX A A.1 Computer Code Flow Diagram Start (input variables at initial point pressure, temperature, enthalpy, | initial point depth,total mass flow rate, water gravity, heat transfer coefficient,casing design, and shu 1 B-3 _ st Superheated | two-phase | Liquid steam Flow | Flow ‘endl Single-Phase Liquid Flow T sinitial Increment=1 wetionn_| (ana) a_i Assume: Tavg cas Calculate: heat transfer, havg Assume: Pavg | Calculate: Fluid properties at Pavg and Tavg Calculate: =| Pressure drop (DPC) | ~ Print out Check for conditions at the lashing point ~ : — end of interval Yes Print out: conditions at flash flash point ‘Two-phase Flow ‘Two-Phase Flow Calculate: Tavg,Pavg, | heat ‘Transfer, | fluid properties steam quality 7 Check forF~_ _ << flashing point > ingle aa = Liquid flow Determine: | liguid and gas numb : 7 i i _ ! ra Slug | |Transition| Mist | lis} |orkiszewski Duns-Ros Duns-ros ~ ~ ~T tot | ats | fin, te ! LE DPC | DPC | | fou > Print out: —~ DPE - DPC No condition at p< abs ————_ < ap-g interval end | DPE A.2 Input Data For Two-Phase Flow Code Card: 1 RUN FOR .. 2 P(1) Pressure at the initial point........ (psia) = T(1) Temperature at the initial point..... wee (F) 2(1) Depth of initial point..........cscscsc0sCEt) © 3. WGR Water Gravity........ eee WP Total Mass Flow Rate... +o (Lb/Hr) = ENM1 Enthalpy of mixture at initial point. (Btu/Lb) = HCO Overall Heat Transfer Coeff...(Btu/Hr/sqft/F) = 4. INC Number of intervals........ tee ee eee = 5 ANG Angle of flow from the horizontal...... (Deg) = DWELLB Depth of the wellbottom. eeieecenn( te) DWELLH Depth of the wellhead... seeoelft) = 6. ISIGN +1 (if going down) , -1 (if going up)........ = 7 ND Number of different diameters................ = 8. DIA(1) Diameter of pipe at initial point........(ft) = DIA(2) Diameter of pipe at first interval...... (ft) = DIA(3) Diameter of pipe af second interval......(ft) = DIA(4) Diameter of pipe at third interval...... (ft) = 9 AROG(1) Absolute roughness at initial point......(£t) = AROG(2) Absolute roughness first interval........(£t) = AROG(3) Absolute roughness second interval....... (ft) = AROG(4) Absolute roughness third interval........ (ft) = 10. ZDIA(1) Depth of initial point....... d= ZDIA(2) Depth at which first interval ends.......(£t) = ZDIA(3) Depth at which second interval ends......(ft) ZDIA(4) Depth at which third interval ends.......(ft) ele NPT Number of rock temperature points 12, and 13. Depth(£t) Rock Tem(F) Depth(ft) Rock Tem(F) =| oogd0 sees See Gee: te teseees See aes Cee pees A.3° Computer Code Listing 4 4 z 3 c /AWOPHASE JOB je.zorTEHE=(1450) 7 EXEC HATFIV /7SYSIN DD * HATFIV TIMES(0,10) © % THIS PROGRAM CALCULATES THE FLOKING PRESSURE AND TEMPERATURE OF A GEOTHERMAL WELL. THE FLUID CAN EITHER BE SATURATED STEAH * OR COMPRESSED LIQUID. THE DIRECTION OF FLOM CAN EITHER BE FROM © THE WELLHEAD OR FROM THE BOTTOMOLE.. * INPUT VARIABLES FLONING PRESSURE, PSIA FLOWING TEMPERATURE, DEG. F. DIA = PIPE DIAMETER, FT. no. NUMBER OF DIFFERENTS DIAMETERS + 1 ZOIAM = DEPTH OF DIFFERENTS DIAMETERS. ENOINGS Dist = PIPE LENGTH, FT. AROUS = ABSOLUTE PIPE ROUGHNESS, FT. WATER GRAVITY ‘TOTAL MASS FLOW RATE, LA/HR ENTHALPY OF FLUID AT’ INITIAL POINT, BIU/1B WEAT TRANSFER COEFFICIENT, BTU/(HR|SQFT. OF) ENTHALPY, BTU/LB ANG) ANGLE OF FLOW FROM HORIZONTAL, DEG. NPT = NUNBERS OF POINTS KITH SHUT-IN TERPERATURES ROKT = SHUT-IN TENPERATURE, DEG. F. DEPT = DEPTH OF SHUT-IN TEMPERATURE, FT. DHELLB = DEPTH OF WELLEORE (FT? DMELLH = DEPTH OF WELLHEAD (FT) ISIGN = 417-1, (O1STTERATION FROM THE WELLHEAD, “ISITERATION FROM BOTTOTHOLE. Pu) Ta) i 3 ? i IMPLICIT REALHE(A-H,O-2) DIMENSION DEPT(30),ROKT( 30) DINENSION P(250),7(250),Z(250) /ENTH(250) DIMENSION OTAM(10),ZDZAM( 10) AROUG( 10), DIMENSION TTITLE(20) »REGI5) DATA REG/ SHBBLE, 4NSLUG, SHMIST, GHTRAN, HMONO/ DATA TIN/5/, DATA TOUT/6/ READ INPUT PARAMETERS. READ( TIN, 1300 )CTTETLECT) T2118) 1300 FORNATCEAS) READCIIN, 1000) PCTDsTO1D,ZC0) 1000 FoRAT( $F40.2) READ(TIN, 1003)MGR NT ENII HCO 1003 ForxATC4Fi0.2) READCTIN,G INC READCHIN, 1010) ANG,OWELLB,OKELLM toto FoRMaT( 310.2) READ(IIN, 4 )ISIGN READCIIN,G) NO NO=ND4T 6 Fornarcxe) ot 62. 63. ee 65 os or 63 6 70. nm 7. 7 me 75. 76. 7 78. 7 20. at ee. 83. a. es 86. er. 86. re 90. a se 33. 94. 35. 96. 97. 38. 99. 100. tor toe. 103. 100. 105. 106. 107. 108. 109. io. am net i ia. 115, M6, 7, ie. 119. 120 READ(IIN, 1005) (DIANCT),T=1,ND) 1005 FORHAT(OFO.0) READ! TIN, 1005 1 AROUG() »T=1 ND) READ! TZN, 1005) (ZDIAM(T),T=1ND) READ (5,4) NPT READ (5548) (DEPT(Z),I=1 NPT) 1 FoRHAT(i5F5.0) READ (5,18) (ROKT(X 141: sNery c WRITE (TOUT, 3000) TTITLECT) T5118) 3000 FORMAT 1H14//7+5K» 1846) WRITE(1OUT, 3010) 3010 FORHAT(//,5K, "INPUT OATA_AS FOLLOH?') WRITECTOUT, 3050 1k6R RT .HCO ‘3050 FORHAT(//,7Xs"HATER GRAVITY" JT35, 15.45 13-s7Ks TOTAL WAS. FLOWRATE) LB/HR? 5T35)F15.45 4.217%, "MEAT TRANSE COEFF ,BTU/MR/SQFT/E J T35,F15.4) TFUTSIGN.E@.-1) 60 TO 10 werTe( TOUT, 3020) 3020 FORMIAT(//,5X,"AT THE WELLHEAD #1) WRITECTOUT, 30400201 ,PC1),TC1) S040 FORMATI/, 7X4 "DEPTHAET*,» 'T24,F10.2 5 17s7Ks "PRESSURE PSIA' »T24,F10.24/47K> 2'TEMPERATURE,F*,124,F10.2) WRITE( TOUT, 3075) 13075 FORHATI//,5X, "PIPE DIAMETER USED AS FOLLOW? '4/) 60 10 11 10 WRITE( TOUT, 3030) 3030 FORHAT(//sEX, 'AT THE WELLBOTTOM:" » WRITE(TOUT, 3040)2014PC15TUD WaETE(TOUT, 3075) 11 CONTINUE. vor = ND-4 IF(ND1.LE.0) 60 TO 8 0 7 ai=1,N01 WRITE TOUT 3076 ZOXAM( XE) ZDTAMCII61 ),DIAMUIT#1)/AROUGLIIAN 3076 FORMAT(7%, FROM" F815" FT TO '4F0.1,* FT, PIPE DIAMETER (FT) =" 1F9.45/,T41 "ABS ROUGHNESS (FT) =14F9.0,/) 7 CONTINUE 8 CONTINUE WRITECTOUT, 3005 )NC ‘3005 FORMAT(/5x, ‘TOTAL LENGTH DIVIDED TN *y13,* INTERVALS' WRITECTOUT, 3060) 3060 FORHAT(//,5X, "OOANMOLE SHUT-IN TEMPERATURE AS FOLLOM!*s A//s Ths DEPTHGFT! 25, "TEMPE 4/) 00"20'1=1 NPT 20 MRITEC TOUT, 3070 )DEPT(1) ROKTCT) 3070 FORHAT(2x,12.2,5%)F10.2) WRITE, 501) 501 FORMATCIX,//) c © CHECK FOR DENSE STATE OF GEOTHERMAL FLUID IF (TC).67,705.0R.P(1).6T-3208.) 60 TO 100 c © CONVERT ALL VARI/BLES INTO ITS USABLE FORHS. SIGN = DFLOAT(TSIGN) PIE = 3.1915909, ANG ANGHPIE/100, ‘Ros = AROUGI!? OIA” = OTANCH) 21. 122) 123, 124, 135. $26. wr 120. 129. 130. 1B 132. 133: 136. 135. 136. 137. 138, 139, 140. ia 42) 163. 140. 145. 146: 147, 148, 149, 150. 151 152) 153. 156. 158. 156: 157. 158. 159. 160. 161 162) 183. 166. iss: 166. 167. 168: 169. 170. wm 172. 173. 176 175. 176. v7 178. 179, 180. AREA = PIEWOIANDIA/4. DIST = DNELLB-DNELLA DELZ = DIST/OFLOAT(INC) DELL = DELZ/DSINIANIG) ISTATE = 0 Tone = 4 TEST FOR COMPRESSED LrqUIO PSAT=FPSAT(TU1D) TFCPSAT-PC1)) 201,200,600 % THIS IS A COMPRESSED LIQUID (SINGLE PHASE FLOH) # 201 IF (DABSCPSAT-P(1))/P(1) .LT.1.0-3) 60 TO 200 CALL CORAT (701,201) WOENSENTI) IF CISTATE.EQ.0) ENTH(1) = ENTAY WwerTe(TOUT, 3080) 3080 FORMAT(*1"47 10x)" LIGQUID FLOW 1752, "FRICTION! ,164, ‘ACCELE.' 1173, ‘POTENTIAL‘ T1095 'qu/A"s 24, 7ky "DEPTH FT" T18, "PRES, PSEA® /T32, ‘TEMP, F*/T4Ds BYEN/BTU/LB' 51, "Psi/100Ft" 162, "PEI/100#t" J 773, °Psi/100%t"s art05,"fe7847) WRITE( TOUT, 30900201 15PC4 5704 )ENTHCAD 5090 FORHATIGX,4U1X,F10.2),3U1K F10-4)y21K,F10.4) 253 CONTINUE DPESDELZ*0..35 CHECK IF THIS IS THE FIRST POINT OR A TRANSFER FROM THOPHASE. IF CISTATE.NE.0) TONE = KFLASH IF CISTATE.NE.O .AND. ISIGN.EQ.1 ) DELZ=(OWELLB-ZFLASH)/ 1 DFLOAT(INC-K) DELL = DELZ/DSINCANG) START TO CALCULATE PRESSURE DROP IN THE COMPRESSED LIQUID REGTON. DO 30 K=IONE, INC 29° ZMID = Z(K) + SIGNDELZ/2. ‘TR = FLAGR(DEPT,ROKT,ZNID; 1,NPT) IF CISIGN.EQ. 1 AND. "ZMID-LE.ZOTAM( PIPED) 60 TO 39 TF CISIGN.£Q.-1 AND. ZNID.GE-ZOIAM(IPIPE}} GO TO 39 PIPE = TIPE +1 ‘AROG=AROUS( TPIPED DIAS DIAN{IPIPE) AREA = PIEADIAWOIA/4, 39° CONTINUE ITERATION TO CALCULATE TEMPERATURE AND PRESSURE VALUES 0 31 T=1,500 XE DFLOATUT-1) TAVS TUK) + SIGNHKI#.005 = PIEMHCONDIANDELLA(TAV-TRI/(HTH2, ) ser. tee. 183. 188. 185. 186. 187. 420. 189. 190. 191 192. 195. 196. 195. 196. 197. 198. 199. 200. 201 202, 203. 208. 205. 208. 207. 208. 209. 210. en aie. a3. 216. 25. 216. a7. 218. 219. 220. 2a1. zee. 22. 226. 225. 226. 227. 220. 229. 230. 23. 232. 233. 234. 235. 236. 237. 238. 239, 200. arr 4008 1515 4949 3 35 see 5151 1616 5050 3 ” 36 45 40 ENAVENTHCK) ¢S16NN(Q-DELZ/1556. TF(Q UE. 0. ) ERAVSENTH(K) CALC. PRESSURE DROP USING THE ASSUMED FLOWING TEMPERATURE. Do 32 vety100 PAV=P(K)*SIGNADPE/2. CALL. PVTHUTAV, PAV, MGR DENL, VISL ED=AROG/DIA VSL=HT/DENL/AREA/3600. REYN=1686, *DIARVSLADENL/VISL CALL FRFACT(REYN, ED, FH) DPDL=( FRHDENLAVSLVSL/(32. 262.¥DIA)*DENLADSIN( ANG) 1/144. DPC=DFOLEDELL TF (J LE, 90) 60 To 4909 TF (I ‘er. 91) 60 To seca, warTE(S 4767) FORATCIXs/4 1X," J°sT9s" DPE" T21)" DPC*ST33, "PAV"? WRITE, 15157J,0PE,DPC, PAV FORMATC 1x) 13,3(2KF10.61) CONTINUE IF (DABS(DPC-DPE).LT.0.001) 60 TO 35 DPE=(DPC*DPEI/2. CONTINUE SYSTEM DOES NOT CONVERGE AFTER 100 ITERATIONS WRITE (6,36) FORHAT ("NO CONVERGENCE AT PRESSURE ITERATION'»/) 60 To 999 CONTINUE CALL COWAT(TAV,PAV,HDEN,ENL? TF CZ -LE. 400) G0 70 5050, IF(T.cT.401) 60 To 5151 wRITE(6,5252) FORMAT( 1X07 91%)! "4 T12, SENAV'sT25, °ENL! yTS7s "TAV!D WRITE(6, 1616 11 ENAV, ENL,TAY FORHATCIXsT3,302X,F10.3)) CONTINUE TF (DABS(ENAV-ENL).LT..19 60 TO 36 Conranue SYSTEN DOESN'T CONVERGE FOR 50000 P AND T ITERATIONS WRITE (6,37) FORMAT (*" NO CONVERGENCE AT TEMPERATURE ITERATION’ s/) 60 TO 999 TEKH ETEK exTHSrGHWO.O1 (KIL =PCK)*OPCSIGN CHECK IF FLUID 15 IN SATURATED REGION PSATEFPSATC TIKI) IF( DABS(PSAT-P{K#1))/PSAT .LT. 1.D-3 ) 60 TO 50 IF(CENT .£@. 1.160 0 45. IF (PUK D-PSAT) 40,5060 (CHANGE FROM COMPRESSIBLE FLUID TO SATURATED STEAM WITHIN THE INCREMENT. RECALCULATE AGAIN. CONTINUE TFL P(K#1)-PSAT ) 62550546 ‘CONTINUE 1ABS(P(K=PSAT DOL, ELZ/DSINGANG) CENT=1.0 DPE=OPOLADELE. 60 10 29 ao. 202. 203. 244. 245. 246. ear. 248. 249, 250. 251. ese. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262) 283. 266. 265 266: 267. 268) 269. 270. an 272. 273. 2m. 275. 276. a7. 278. 279. 280. zat. 202. 203. 284. 285. 266. 267. 288. 29, 290. 201 ase! 293. 296. 295. 296. 297 250. 298. 300. 42 contrNuE DELZ=DELZ-0.2 DELL = DELZ/DSINCANG) 60 To 29, 46 CONTINUE DELZ=DELz+0.3 DELL=DELZ/0SIN( ANG) 60 To 29 (60 FRIT=(FRMDENLAVSLéH2,/(52.282.*DTAKIGG. ))¥DELL POTHONSPOTHON*POTT ZUK#1)=ZCK*DELZRSIGN CALL COWAT(T(K#1DsPLK®Y )/ADSENTH(K#19) WRITE(6,3090)Z(K#1),PCK#IDsTUK#S D ENTH(K# Ds AFRIT*(100./DELL),ACCT#(100. DELL) POTTH( 100. /0ELZ),VSL 30 CONTINUE WAXTE(6,2626 )FRIMON, POTHON, FRITP,POTTP, ACCTE 60 To 999 THIS IS THE COMPRESSED LIQUID FLASHING POINT 50 Z(Ke1}=Z(K)*DELZ*STGN FRET=( FIMDENLAVSL#H2./(32.202.DTAMI44. ))4DELL, acct=0.0 POTTS (DENLWDSINCANG)/144. )MDELZ FRIMONSFRIMON*FRIT POTHCN=POTHON® POT CALL COWAT (TCK#I),PCKHY SFLSFED WeITE (6,51) 51 FORMAT(/;10X, "FLASH POINT. «17 WRITE (653090). Z(K91)PCKEED TIKI FES AFRITW. 100. DELL) ACCTHC 100./DELL) POTTA( 100. /0ELZ) KFLASH = KM, ENTH (Ken) *TWO-PHASE FLASHING FLOWN CHECK IF THIS IS A TRANSFER FROM COMPRESSED LIQUID REGION. 200 IF CISTATE.EQ.1) TONE = KFLASH TFCISTATE.£Q.0) DPDL=0.009 IF CISTATE.EQ.1 -AND. TSION.E@.-1) DELZ=(ZFLASH-OWELLID/ 1 DFLOATCINC-K? IF CISTATE.EQ.1) G0 To 262 ‘CALL SATURCTC{ ) DENS, EHS, EHW,VISS) ENTHCT YENI XS=(ENTHCY EHH) /CEHS-EHR) 282 DELL = DELZ/DSINCANG) WRITE ( TOUT,2010) 2010 FORMAT(*1"4/,10K,"% THO-PHASE FLOM", 1152, "FRICTION" »T64, *ACCELE." 173, POTENTIAL", 109) 'qu/A' 211195 "qs /A* 577K, "DEPTHS FT’, 18, ‘PRES PSIA",T32, “ TEMPS" T40, SYEN GTU/LB'sT51, "Pai /100Ft*,T62, “PsI/100FR*VT75, "Pst/V00Ft's (C705, *STH.FRAC',T97, "REGIME" TIO9, "#4/25,T119, #4/8'5/) DO 210 K = TONE,INC IFCISIGN.EQ,-1 .AND.ISTATE.£@.1) GO TO 254 so. 302. 303. 304. 305. 306. 307. 308. 305, 30. an Biz. 33. 31a 35. se. 317. 318. 319, 320. Bar. 322) 323 324. xs. 36. 37 320. 329. 330. 3 332) 335, 333) 335. 335. 337. 338) 339. 360. Ber 302. 303. ea. x5. 36. Bar. 348, 349. 350. 351 352) 353. 350, 355. 356. 357. 358. 359. 360. IFUK.NE.1) 60 TO 254 WRITE(6 565620195201 )57C1GENTHCT 1 XS 5454 FORMATCGX,4(1X+F10.2)+36X,F10.4) 254 CENT!=0.0 ZAIO = Z(K) + SIGNSDELZ/2. ‘TR = FLAGR (OEPTSROKT)ZMID, 1 NPT? IF CASIGH.EQ.1 .AND. ZHID.LE-ZOTAM(XPIPED) GO TO 69 IF CISIGN.EQ.-1" AND. ZHID.GE.ZOIAM(IPIPE}) GO TO 69 qprpe = Terre +4 AROG=AROUGLIPIPED DIAS O1antzeIPE) AREA = PIEADIASDIA/G. 69° CONTINUE ITERATE TO FIND THE PRESSURE DROP DPc=OPOLeDELL Do 219 Het,100, DPespec PAVG=PLK)*SIGNA(DPE/2. ) TAVGEFTSAT( PAVG) 1550 CONTINUE 23.1415 96HCO*DTAR(DELL/2. IHCTAVG-TR/4T TF (TR.GE.TAVE) @_=0.0 ENAVSENTH(KD#STGN*(Q-DELZ/2./778.) TFC @ LE. 0.) ENAVZENTHCK) ‘CALL. SATURCTAVG DENS ENS, ENA, VISS) ENAV=ENM)/(ENS-ENH? TFC XLT.) GO TO 202 CeNTr=cenit1. IF(CENT!.EQ.100) 60 To 220 TAVGST(K)¢S7GNHCENTI#0.05 PAVGSFPSAT( TAVG.) DPE=2.M( PAVG-PCKD IXSIGN, 0 TO 550 202 IF ( TSTATE.£Q.1) GO TO 204 IF (X.6T..001 360 TO 208 CALCULATE THE DEPTH OF THE FLASHING POINT centast. ENAVEENTH(KD TEP=TANG 0 5051 N=t,200 IF(N.LT.190) 60 To 9090 IF(N.GT.491) GO TO 3436 WeXTE(8, 3034) 3034 FORMAT(GX,"N*sT14, "TEP! ,T24, ENAV" sT36) "EMM, NT47, "ENS", 756, XD 3436 ARITE(6 8585 Ny TEP) ENAV sENWSENS)X 8505 FORMAT IX, 15,4(1XsF10.3),1KsF10.4) 9090 CONTINUE TRP=TFP-0.05, CALL. SATUR(TFP,DENS,ENS,ENH,VISS) XECENAV-ENM)/CENS “EN IFUX.GE,-1.D-3) 6D TO 5052 5051 CONTINUE WRITE(6 6060) {6060 FORMAT(1X./41X, NO CONVERGENCE FINDING FLASH POINT") 0 70 999 5052 TAVG=(TIK)+TFPIZ2. PAVG=FPSAT(TAVG) Ber. 362) 363. 364. 355. 366. 367. ea) 369. 370. a7 are. 373. 376. 375) 378. wr 370. 379. 3e0. sor. saz! 385. 386. 385 326. 3e7. 388. 39 390. 301) 392) 393. 396, 5. 36. 397: 390. 399 400. S01. 402. 403. 404) 405. 406. 907, S08. 08. ato. an siz. as 414. a5. 416. air aie. ais. 420. CALL, SATURCTAVG, DENS ENS, ENA,VESS) SCENAVENM) /(ENS-ENHD) 60 To 204 4206 CONTINUE PFPSFPSATCTFP) ZCK#1=Z0K 4 PFP-POKD /0PDL Tee CALL COWAT(TF,PEP,OENA,ENAV) ENTH(K#1 )=ENAV KFLASH = K+ ZFLASH = ZUKH) (ZUKS19-21K9) (SOPF/166. )¥xLEN (SEKK#(DPDL) J*XLEN POTT=(SDENTPADSINCANGI/146, )#XLEN FRITPSFRITPOFRIT Porrp=PoTrPsroTT AccTe=ACCTPOACCT WeITECTOUT, 51) WRITE (653090) ZUK#1 sPCK# TEK#H SENAY NERIT*( 100, /XLEN) sACCT@( 100. /XLEND,POTTH(100./XLEN) WRITE(6) 3080) ISTaTE = 1 60 To 253, 206 CALL PVTN(TAVG,PAVG,MGR,DENMAVISH) SURSFSURH( TAVG,PAVG)) XaKT TKS VSW=HA/DENA/AREA/3600. HUNS=VSH/(VSHOVSS) /SHOVSS = 9380VSSHC (OENA/SURD#XD.25) {9SBeVSHMC (OENR/SUR*H0.25) CALL ORKIS(HLNS .XLN,XGN» ANG DENM,OENS,Vt,DIA,VSS,VSH, 1PAVG, AROG,VISW, VISS,SUR,HL,DPOL,IFP, SOPF | SEK, 2SDENTP, XBL XSL, XML ST6,0M) TECISIGN.EQ.-1) DH=SDENTP. DPOL=-0POL DPC=DELLADPOL IF(H.LT.50) Go TO 1918 IFUW.GE.51) GO 70 atet werTe(s.7171) TATA FORMAT(Zs1X,! M'AT7," DPE THGs' DPC! ,T2e,"TAVG!sT29, ATENAV! 4730, °X" T42, 'VSW",T4B, "VSS" sT52, LHS! 5159, ROHL! sT63y DENK! 469, "DENS" 4 T26, XUN" TBR, "NCH TOT> B'VESH 5793, 'SDPF! TOG, "SEK! TOS, “SDENTP!,T109, "IF SOXDL' STH174 (XSL! TH22, "AHL! TH29, /SI6") 0101 WRITE(6,2121 1M, DPE,DPC, TAVG ENAV, X,VSH,VSS, {SHLNS HL DENA, DENS, KLM, XGN,VISH,SOPF, SEKK, SOENTP,IFPSXBL» 2xSL,2L, STS, 2121 FORMATC1Xs13,2F7.3)2F7.25F6.3,2F6.2,25.2,2F6.252F6.1y 1F6.3)F6.24F5.2)F7.3,124F4.1 25.0,F0.4) sete comriue TF(CENT.£9.1.) 60 10 4204 IF (OABS(DPE-DPCI/OPE.LT.1.0-3) GO TO 130 219 CONTINUE sTHy aan. 220 CONTINUE 422, © SYSTEM DOES NOT CONVERGES AFTER 100 ITERATIONS. 23. WRITE (TOUT, 1111 2CENTI DPE-DPC S24. ANY FORMATUSX, Scentt *4F5.0,1%» 'DIFFE '4F10.3) 425. WRITE (6,221). Z(K) PCR) TURD 426. 221 FORMAT (* THO-PHASE FLASHING FLOM" »/» 427. C* NO CONVERGENCE AT DEPTH= "yF10.3," PRESSURED * a2. F10.3," TEMPERATURES 410.3) e293, 60 TO’ 999 430. 431.130 conrmnve 32. FRIT=(S0PF/146. J#DELL 435 ACCT=(SEKK*(OPOL) DELL 434. POTT=(SDENTPADSINCANG)/146. )MDELL 435. FRITPSFRITPSFRIT. 436. POTTP=POTTP+FOTT 437. ACCTPEACCTPOACCT 438. ENTHUK#1 DEENTHCK) # DABS(ENTHCK)-ENAV HEXSIGN 439. ZUK#4)22(K )4DELZASIGN 490. PUK) PUKD * STGNADPC sore TOK JEFTSATCPCK#S ) sae. CALL SATUR(T(K#1 DENS ENS ENA,VISS) 403. X=CENTHUK@1 “ERM /(ENS-EN) SoG. AN MRETECTOUT, 2000) ZCK#I, PLKETD, TEKST) sENTHCK#1 405. SFRITA(100./DELL) /ACCT#( 100./DELL);POTT*( 100, /0ELLIy 965. 2X REGUTFP) »VSHAVES 447.2000 FORHATUX,4(1KsF40.2 1460 1X)F10.61,799)A6,2F10.4) 443.210 CONTIIUE 499, WRITE(6, 2626 )FRIHON, POTHON, FRITP, POTTP, ACCTP 450. 2626 FORMAT(///,T30, "x PRESSURE ANALYSIS 8" y/y, a5. © 7s25%, "TOTAL FRICTION, LIQUID *F10.05" PSI" 452. 1 7,25K, TOTAL POTENTIAL, LIQUID. ="yFI0.4," PSI", 453. 2//,25K, "TOTAL FRICTION, THO-PHASE =1,10.4," PST'y 454. 3-7s25X, "TOTAL POTENTIAL, THO-PHASE =*,F10.4,' PSZ'y 455. 4 725K, “TOTAL ACCELE.» THO-PHASE —="4F10.6," PSI") 556. 60" T0 999) 457, 458. 600 TF (CPSAT-P(1))/P(1).LT.1.0-3) GO TO 200 459. wexTE TOUT, 2020) 60. 2020 FORRAT(///,15%, "SUPER HEATED STEAM, RUN TERMINATED! ,//) sere TSATEFTSAT(PCUD) 462. WRITE(,£899) PC1),TSAT 463. 8899 FORNATUIX, "FOR "4F10.2,' TEMP SAT = *,FI0.2) 64. 60 To 999 465. 100 KEXTE (6,2040) 66. «2080 FORMAT ("PRESSURE OR TEMPERATURE IS ABOVE CRITICAL POINT 467 ‘1: PROGRAM EXECUTION IS TERMINATED *? 468.999 CONTINUE 469. weTECTOUT, 2001) 470. 2001 FORMATCIX 77/1 an. ‘STOP 472. ED 475. 47%. 475. 'SUEROUTINE ORKIS(HLNS,XLN,XGN, ANG .DL,OS,VH.D,VSG.VSLs 476. 1) RTUB,VL1VG)SUR/HL,DPOL, TREG,DPF ERK DENTP, 477, BXBL XSL, HL, STG,OM) a7. IMPLICIT REALKB(A-H,0-2) 473, REL=1088. *DLAVID/VL 40. Kowrt=t cc cc ce cc ce cents=1. FAC=2.*32.210 REG=1488,HDGRVSGHD/VG ED=RTUB/a CHECK FOR SINGLE PHASE FLOM TF(VSG.LT. 00001 160 TO 2500 TF(VSL:LT, 00001 160 TO 2600 XBLI=1.02355¢1.474634XLN-0,1747060-16KLNH2. XBL2=.1086030-26xLNWMS.-0.1393510-aexLNewa XBL=XBLI +xBL2 XSL=50. #36. KIN YOL=75 406. #XLNH. 75 IFCXGN’ LT. 0.1) 60 TO 2500 IFOGN CLT! XBL) 60 TO 1 IFO LT! XSL) 60 TO 4 TEGXGN LT! xmL) KOuNT=2 TROGN LT! MHL) "GOTO 4 XFONGN “GT: xMIL) 60 TO 5 BUBBLE FLOM CALCULATIONS 1 ¥3=.8 HLEL = .5HC1 4VR/VS-DSQRTU C1 VH/VS)9A2~6. 2VSG/VS)) EECHL.LT-HUNS HLSHLNS RELB=1426.OLAVSL®D/HL/VL CALL FRFACTCRELS,ED,FF) EKK=0. DENTP=DLAHL*DGNCI.-HLY REGS ‘60 To 2000 ‘S1UB FLOW CALCULATIONS 4 STG=.065"DL0G10(VL1/04#.799-.709-. 1620L0610( VIH)~ .868MDLOS10C0» LT==0.0654V-0.1 WerTe(6,1312)816/TLE 1312 FORMATCiX,2F10.4) IF(SIG.LT.TLI) SIG=TLE ITERATING FOR VB ver=.sepsaeri 32. 2x0) r 10 REB=1488. *DLAVBI«D/VL bret IE(Z.GT.10960 10 12 XXeDSGRTUS2. 2x0} THE(. 25198, 740-O64REL #KK YB=TX/2. #DSQRTCTHWTA® (13. 59AVL1/(DLxDSQRT(O))? TFCREB.LE.3000. 1VB=(.54658, 740-064REL IOXX TF(REB.GE 6000. VB=(35+8. 740-06 REL HX WRITE(G, 12122, REL,REB, VBI ,VB,SIG 1212 FORMAT(IX,212,2F10.0,3F10.4) 11 TF(DABS(VB-VBt)-LT. 004 960 70 12 versve. 60 To 10 12 conrmwe DENTP=(DLM( VSL*vB)¢064V56)/(VHVB1#DL4SI6 IF(SIG.EQ. TLE.AND.CENTS.EQ.1.) GO TO 13, TFCCENTS.EQ. 12 AND.OM.NE.0.0) DENTP=DH TLI==-VBMC1 .-DENTP/DLI/( VNB) CENTS=CENTS+1. TF(CENT3.6T.2.) 60 TO 1616 Bel. CC WRITE 6, 1213)DENTP,SIG,TLE Bez) CC 1203 FORMATIAX,3FI0.4) 543. CC 1414 CONTINUE aa. TFL(SIG-TLT).GT.-1.0-5) 60 TO 13 505. siceTlt Bas 60 To 12 a7. 13 CONTINUE. 538, NL=(ENTP-06)/(0L-06) 509, CALL FRFACT(REL,ED,FF) 550. YXEFF*D LAVERY EAC 551. cxCCVSL*VB)/(VHEVE 14816) 552. 553. 554. IF(KOUNT.£Q.260 TO 51 555. 0 2000, 556. 557, _ MIST FLOW CALCULATIONS 558. KuNT=1 359. 560. REYG=1486.sDGAVSGPHO/VG 56 XNEB=454. nOG*VSGP+VSGPHEDKO/SUR 562 XHEV=. 006204€00"VLAVL/DL/SUR/(ED¥D) 563. PReKicamRuey 564. ED=.0749*SUR/OG/VSGP/VSGP/D 565. IFCPR.GT. .005 )FO=, 0305*SUR*PRXX.302/06/VSGP/VSGP/D Bes. vsce=vso7(1.-£00/i1.-£0) 567. IFOGUNT.GT.1)60 TO 60 ses, KUNT=S. 569, 60 To 80 570. 60 TFCED.LT. .05960 10 70 am. FF=1./(4-9DL0G10( .27HED) )¥42+. O67KEDHY 73, 572. 60 70.90 573. 70 CALL FRFACT(REYG,ED,FF) 574 90 OPF=FF*OG*YSGPAVSGP/FAC 575. LXHLNS#DG#C 1, -HLNS) 576. 577 EKK=VSGPHVMAOENTR/P/32.2/146. 578. TFCEKK.GT, . 95)EKK=.95 579. IREG=3 500. TF(KOUNT.£9.260 TO 52 501. 60 To 2000 eG 503. €__ CALCULATIONS FOR THE TRANSITION REGION 54. 51. DPS=~(DPE*DENTPADSIN(ANG) 1/144, 565. DENNS=DENTP 506. DPFS=DPF 57. 50 10 5 508. '52_DPN=-(DPF*DENTPXDSZN( ANG )#XGH/XMLI/164./11 .=ERK) 59. DENHM=DENTPACXGN/>L) 590. DPFH=OPF ASURML-XGH/ORHL-XSLY 592. BECKGN-XSL)/(O0L-¥SLD 593. DENTP=DENNSAS DERE 594 DPF=DPFS*A‘DPFTD 595. CC“ MITE(6,52529A,B, DPS, DPM,OPFS,OFFH, DENS DENN 596. CC 5252 FORMATIIX,8(1K)F10.3)) 597. DPDL=AsDPS*BxDPH 598. REG: 599. 0 To sooo 600. © FOR SINGLE PHASE LIQUID ‘2500 CALL FRFACTIREL;ED)FP) L DPF=FFADLEVSLAVSL/FAC 60 To 2000 2600 CALL FRFACT(REG,ED,FF) FADGAVSGAVSG/FAC 3 (DPE ADENTPHOSIN(ANG)1/146./(4 EK) 3000 CONTINUE RETURN END c ‘SUBROUTINE FRFACT( REY,ED)FF) IMPLICIT REALMB(A-H,O-2) Ft = 66./REY FGI = -0056¢.5/REVe*.32 X 5 DEN=1.14-2.«DLOGIO(ED*9. 36/(REYHDSORT(FGT))) FF =U /DEND¥%2 DIFF=DABS(FGE-FFD IF(OIFF-.0001 18,856 6 FOIS(FOISFF/2. rei IF (1-10) 5,557 7 Freer 8 IFCFFHFFI9,10,10 9 Frere 10 RETURN END c SUBROUTINE COWAT(TF PP,DENL,EBPD IMPLICIT REAL*B(A-H,O-2) DIMENSION A(23),SAU12), DATA a/ 16.62468774105,-5.62206367302 ,-2,09666620509,3.96128676704, 2-6..73327773904,9..90238102804,-1 ,09391177405,8. 59084166704, $3-4.51116874204, 1.4181 3892604, -2.01727111303,7,96269271700, 4-2.6165718430-2,1.5224117900-3,2.2642790560-2,2.42164700302, '51.2697160800-10,2,0748383280-7,2.174020350D-8, 1,1057104960-9) 61.29546193401,,1.3081190720-5,6,0876263360-14/ ‘DATA SA/ 18.4385754050-1 ,5.3621621620-4,1.72000000000,7.3422784890-2, 24.9758588700-2,6.537154300D-1,1.1500-6,1.510800-5) 311418800-1,7.00275316500,2. 9952649260-4,2. 0400-1 / ‘TEC (TF#40, 1/1 .8)-40. ‘TeRE(TC#273.153 7607.3, PBAR=PP/14.5038 PNAR=PDAR/2.21202 YET SAU 1 DTRRATIR=SA(2)/TARERG SY+SACS)¥YAY=2,MSAUGIATIROZ, SACS APRN AX, 5. DENL=0.0 YO==2.45AL 1 OTHRYG.MSACZI/TKRAN oor. YO SNUMESWUNS(T=2)4ACT4 DHTKRIACTHND 662. PRIN SAC 120#(Z(17.9(2/29.0¥/12. 145. ATERMYD/12. 19SAC4)*THR- ees. ACSACSI“1. THRETHTD /Z0N5. 170) 664. PRT2=PNIRRWCACT3)-AC15 JATKRATKROA( 16 40 9, ATKR#SACE) JM(SAC6 )-TKRIAAD. 65. EAC 7990 20.¥TKRANIGESACT)I/(SAC7}*THRAOT 9D 92) 666. PRTSE(12.¥TKRANI 14SA(8)0/(SACB)¥TRRM#T | REMC AC 18 )4PREREAC 9 667. BPNIIREPAMRA( 20 )APRERAPLORKPHOR ) 668. PRTG=AC21DWTHRW#LGN(17.ASAC9 7°19. ATKRATERD#C 1 ./(SAC10)9PHHR DHHS 669. SSACITDNPHRR) 670. PRIS=A(22)¥SAC12 )HPAPRMWS#21 HAC 25)/TKRARZOXPHERR ING ort. ENTR=AC1 J8TKR-SHUMPRTL #PRT2-PRTS¢PRTSSPRTS. ere. EJGFENTR*70, 120400, 673. ERPSEJGNG29. 9230-3, 67a. RETURN 675. eo 67%. oc err. FUNCTION FLAGR(X.Y XARG)IDEG, PTS) 678. IMPLICIT REALMB(A-H,O-2) 679. DIMENSION XCI,YC1D 680. eet eee. 633. 606. 685. G0 To (10,2035 686. 10.00 11 MAX’ SNE SH 687. TFCXARG,LT.X(HAXD) GO TO 12 ees. 11 CONTINUE 659. maxeN 650. Go 10 12 eon. 2000 21 HAX=HI DN 692. TFOXARG.GT.X(MAXD) GO TO 12 693. 21 comme 694. maen 695. 12 MINSHAX-I0E6 696. FACTOR=1. 697. 90-2 TeMiN max, 698: TFCXARG.NE-X(1)) 60 TO 2 699. Fuasr=yir) 700. RETURN, 701. 2 FACTOR=FACTORM(XARG-X(Z)) Joe. YesT=0. 703. DO 5 T2HIN, MAX, 704. ‘TERH=YCEWFACTOR/(XARG-X(Z1) 705. DO 4 J=HIN, AK. 708: 4 TECL.NE.J) TERMETERI/(XCT)-X(J)) 707. 5 vesTzvesTereRn 708: FLAGR=YEST 709. RETURN 710. exo moe ne. FUNCTION FPSAT(TFD ns. IMPLICIT REAL # 8 (A-H,0-Z) m4. REAL # 8 XK(9) 1B. DATA 9K7-7.691234564,-2.60802369601 ,-1 .68170654602,6.42528550401 , ns. 1-1. 19564622502,4. 16711732000,2.09750676001, 1.096.007 m7 TCH TEGO, 1/1.8)-40, 78. TaRETCH27S.1537687.3, 19, eR 1. =TKR 70. Suro. 0 10 12155 10 SumsSuHexK( TyeTHRMEAT DDENO=1. #XK (6 DATKREEK (7X TRREDTKRE CCONS=TKRM/(XKC8 ATKRMSTRRN#XK(9) PRIIR=DEXP((1../TKR JNSUR/DENO-CONS PRAR=PLNRKZ.21202 PPST=PEAR%14,5038 FPSAT=PPSI RETURN 80 FUNCTION FTSAT(PD IMPLICIT REAL ® 8 (A-H,0-2) 116, 045"PRxO. 22302 90 17° 11,200 PSATTD ).L7.0.) XSIG=1. IF(OABS(PCA-PI/? -LT. 10-3) GO TO 43 ‘TaTexsTSH. 03 17 CONTINUE 43 FTSAT= RETURN, eo ‘SUBROUTINE SATUR(TF DES, EHS,EHH, VIS) IMPLICIT REALHBCA-H,0-2) DIMENSION TOC33) XVS(33),XESC33) ,XEMC33) DIMENSION XVHC 35) DATA XVW/1 .012100,1.017100,1.022800,1.029000,1,035900,1.063500, ¢1.051500,1.060300, (01067900, 1.079¢00,1.090600,1.1021D0,1.11440041.12750041.141500, ch 1565000117260, 1. 199000,1 208700, 1.229100,1.251200,1.275500,1.302500)1.332100, c1.365500,1 403600, 1.467500, 1.499200, 1.562000,1.639000,1.741000,1 .896000,2.22000/ DATA 10/50.00,60.00, 70.00,80-00,90.00, 100.00, 110.00, 120.00, ¢130.00,140-00, 150.00, 160.00, 2170.00, 180-00,190.00,200.00,210.00,220.00,230.00,240.00,250.00, €260-00,270.00,280.00,290.00, 3500.00, 310.00, 320.00, 330-00, 340.00,350.00,360.00,370.00/ DATA XVS/12045.00, 7677.600,5045.300,3408.300,2560.900, 1673.000,1210.00,891.7100,, 44668. 3200,508.6600, 392.5700, 306.0500,242.6200,195.0500, 156.3500, 127.1900, 109.2650, 586. 06200,71 .47200,59.67400,50.05600,42.14900,35.59900) €30.13300,25.53700,21 69300, 618.31600,15.45100,12.96700,10.77900,8.80500,6.94300,4.9300/ DATA XE5/2592.00,2609.00,2626 1 700,2676.00, €£2691.00,2706.00,2720.00, 72734.00,2747-00,2758.00,2769.00,2778.00,2786.00,2793.00) €2798.00,2802.00,2803.00,2803.00, 82601 .00,2796.D0,2790.00,2780.00,2766.00,2749.00,2727.00y €2700-00,2666.00,2623.00,2565.00,, 92681 00,2331 007 ‘DATA XEH/209, 300,251 .100,293.000,334.900,376, 9004419. 100+ (6461.300,503.700,546.300, 589. 1D0,632.200,675.500, 719,100,763. 100,807.500,852.400, 6897, 700,943.700,990.300, 7a. 702. 703. 78, 75. 76: 787. 708. 789. 790: mm. 72. 3. ne 795: 796. 797) 798. 799. 200. aon. 02! 03. 806, 205. 806. 07. coe. 209. aro. au. erz. 813. are. ats. are. a7. aig. B19. 20. eet. ez. e235, ea. 2s. eee. 227. e2e. 229. 230. ast, 332. 233. e346. 235. 836. e37. 238. 239, 360. eet. eee. a3. B44 1¥4037.600, 1085 .e00,1135.000,1185.200)1256.600,1290.00, 1345.00, 1402.00, 1462.09, 21526.00, 1596 D0, 1672.00,1762.00,1892.00/ TeS((TFA4D.1/1.6)=40. XOS=FLAGR( TD xVS,TC+2433) -/ADSH62. 626 LAGR(TD XES)TC.2433) EHS=H45"1000.72524.4 YOWEFLAGR( TD XEM,TCs2038) nn! 000. 72326. 407#7C460.4-(1858,-5.94TC)/X0S vis=vT5/10000. YOWSFLAGRCTD VW TC) 2) 35) DERI. /xORH62.028 RETURN Bo FUNCTION FSURH(TF,PP) IMPLICIT REAL*B(A‘H,O-2) DINENSION STVA(10),STV74(10),STVZ80(10) DATA STVA/, 10.00, 1000.00,2000.00,3000.00,4000.00,5000.00, ‘¢6000:00,7000:00,8000.00,9000.00/ DATA'STV74/ 275.D0,63.00,59.00,57.00,54.00,52.00,52.00)51 .00,50.00,49.00/ ‘DATA STVZ80/, 353.D0,46.00,40.00,33.00,26.00,21.00,21.00,22.00,25.00,26.00/ TENI=TF Pepe STH74SFLAGRISTVA,STV74,P,2,10) ‘STH2EO=FLAGR(STVA,STVZ60,P, 2,10) ‘STH=( STH74~STHEEDI/(280.-74, JM(TEMI-76. 8( <1. D4STH7 IFCTEN LT. 76. )STHESTH7S IFCTENY .6T-260. ISTHESTHZGO SuRK=stH FSURW=SURH RETURN END SUBROUTINE PVTA(TF PP) SGH,DEN,VIS) IMPLICIT REALAB(A-H,O-2) ‘TAsTF-60.00 .D0*1.20-44TA*L .D-GXTARTA~3.330-64PP DEN=62..4300*5GH/2H ‘VIS=OEXP(1 0300-1 .479D-24TF#Y .9820-58TF*TF) RETURN. 0 sara, RUN FoR CERRO PRIETO 4-90, 21/FEB/73. 9590.00 484.3. 0000.0 1.0190 356840.00 577.44 00.00 a 30. 4260.7 0.0 u ot 15808 «5808 0003 ‘0003, 0.0000 4260.7 05. 0000.2297.3281 .3937.0518. 0077.0102.0294.0557.567.9 $sT0?. A.4 Typical Output of the Computer Code APPENDIX B Table B.1 East Mesa 6-1 Flowing Profile Shut-in Profile Depth Pressure Temperature Temperature ft psia FP F 7000 1348.03 389.3 381.2 6000 961. 389. 369.3 5500 767 388. 365.0 5000 574 387. 360.2 4500 381 386 356.0 4050 208 385. = 4000 one 377, 350.6 3500 115 338. 3444 3000 93 322. 333.9 2500 75 307, 320.1 2000 62 293, 288.2 1500 53 283. 243.3 1000 45 273. 198.7 500 39 258. 143.0 0.0 33 7 105.0 Table B.2 Cerro Prieto M-90 Flowing Profile Shut-in Profile Depth Pressure Temperature Depth Temperature ft psia F ft F 82 593.45 480.4 0.0 77 328 616.21 482.9 2292 102 656 657.44 489.0 3937 557 984 697.26 495.52 4518 567.9 1312 739.92 502.0 1640 782.58 508.0 1968 832.35 515.8 2296 877.85 521.8 2624 931.89 527.7 2952 990.19 534.2 3280 047.10 541.2 3608 113.90 548.2 3936 189.3 554.7 4018 212.00 556.7 4100 233.40 4261 283.10 Table B.3 Roosevelt Hot Springs 14-2 Flowing Profile Depth Pressure Temperature Temperature ft psia F F 32 391 134 403 280 427 554 452 764 476 972 500 1177 524 1272 536 1378 549 1460 561 1539 573 1624 585 1694 597 1769 609 1880 627 2020 652 2116 670 2215 688 2301 706 2380 724 2450 743 2534 761 2580 773 2647 791 2715 809 2774 827 2832 846 2899 864 2955 882 2996 894 APPENDIX C a) Enthalpy of liquid-gas mixture HL + Hy Hy M Ha Mg a 6 Me + Mg CMO + Mg) Me (M+ Mg) Mg Hg bm = (l-x) 4x Me Mg bm = (1 - x) bl + x hy b) Specific Volume of the mixture CL vw M Vy Mg —+ Mot MG (M+ MG) Me (M+ Mg ) Mg Cl -x Ut xy c) Density of the Mixture My. + Mg Me uw My Ve Cee = Ee wit (Kw ty) (uM tu) vy My M fee (i-a—ean a Mme (1-4) R + 9%

You might also like