Final Design Project Optimization of a gas pipeline and pumping facility. Salim Nasser Design of Thermal/Fluid Systems Dr.Y. Cao EML 4706 Dept. of Mechanical Engineering Florida International University Fall Semester 2002 Problem Statement: The purpose of this design Project is to optimize a gas pipeline and pumping facility were work can be recovered at the destination point. In order to recover work at the destination point, a compressor at the entrance point compresses the methane gas used to much higher pressures so as to increase the density of the gas (reduced the volume it occupies). A turbine is used at the exit point to expanding gas back to its original pressure, and therefore, recovering energy in the process. The turbine will cause the generator to which it is attached to generate this energy as it rotates. By pressurizing the gas, the diameter of the pipe, which connects the compressor and turbine, is minimized. This is of great importance since the pipeline has a link of 150km. On the front end, the system consists of a compressor powered by an electric motor and the pipeline used to transmit the compressed methane. On the production side of the system, consisting of a turbine and a generator, we use the energy stored in the compressed gas to produce electricity. Given a specified mass flow rate we notice that by using methane at a high pressure permits a high-pressure drop and increases the density of the gas. This compression does come at an additional cost. In order to mechanically compress and uncompress the fluid we must have add additional energy required for compression and not all this energy is recovered at the turbine due to inefficiencies of the electric motor, compressor, and turbine, as well frictional losses in the pipeline. See diagram. Data used in System Optimization: Methane enters the compressor at 100kPa Methane leaves the turbine at 100 kPa All the power generated by the turbine and generator can be used Gas enters the compressor at 20 C, is cooled after the compression, and remains at 20 C throughout the pipeline. The distance between the compressor outlet and the location where the gas is cooled down to 20 C is negligible compared to the total pipeline length of 150 km. The methane flow rate is 60 kg/s. The efficiencies of the electric motor and generator are 95% The efficiency (with respect to the isentropic process) of the compressor is 80% and of the turbine is 85%. The cost related to the system and operation is as follows: Electric motor and generator first cost, $45 per kilowatt output ( Compressor first cost, $110 per kilowatt input (input designated Wc ) Value of electricity at compressor end of pipeline, 5 cents per kilowatt hour Value of electricity at turbine end of pipeline, 6 cents per kilowatt hour Turbine first cost, $135 per kilowatt output (output designated Wt ) Pipe per cost in dollars per meter length 280D1.6, where D is the pipe diameter in meters Life of system is 15 years, the annual interest rate is 8%, and the operation is continuous. Diagram: Related Equations: : Equations used: V AV eq.2 PV mRT Eq.4 P RT eq.5 A Eq.1 Eq.7 dp f mRT m dl 2 D PA A Eq.9 Pdp P3 F.2 F.3 4 eq.6 D2 eq.8 dp V V mRT A PA f V V dl 2D eq.10 P2 F.1 m AV eq.3 L fRTm 2 dl 2 DA2 0 WCin WMO WGO 8760 ( 1 n i) 1 i ( 1 i) n k 1 mC p P2 k T1 T1 0.75 P1 1.309 1 kJ P3 1.309 kg 0.95(0.80) 75 2.2 300 300 s KgK 100, 000 =((2.931*109 Methane Properties: k 1.299 kJ Kg * K kJ R 0.519625 kg * K C p 2.21 F 0.018 Procedure: The method by which the analysis was done consisted of first constructing an objective function which produces the total costs of construction. The constraint function is based primarily on equation f.3, which deals with the pressure drop across the pipeline. This is the constraint used its dependence on the pipe diameter. In this particular optimization our ultimate goal is to determine and minimize the price of the compressor, turbine, and the cost associated with the diameter of the pipe. To do this we must implement tools learned such as Newton-Raphson method and Lagrange multipliers method. The following is the order in which the optimization was performed: 1. The objective function and constraint functions are formulated: Objective function: Constraint function: f1 ( p2 p3 d) 2.931 109 5 2 2 p2 p3 d 2. The three partial derivatives for the objective and constraint function are calculated using MathCAD. (See Appendix) 3. Using these derivatives we obtain the Lambda equations: i1 2953206.5242887092567 p2 .76405867970660146699 ( 2 p2) 482712020.00603422686 p3 i2 i3 1 .76405867970660146699 .6 67200000.0 d constraint i4 2.931 109 5 0 ( 2 p3) p3 14655000000.000 6 d 2 p2 p3 2 0 2 0 0 d 4. Then we proceed to use the Lambda equations in the Newton-Raphson by taking their derivatives along with the derivative of the constraints with respect to P2 , P3 , D, and . See Appendix for calculations. 5. The Newton-Raphson method is applied by creating an iterative program using MatLAB and applying the values obtained from MathCAD. See appendix for MatLAB program. Results and Conclusion: The final results obtained are as follows: OBJECTIVE FUNCTION Minimal cost gas pipeline system $101,989,236.59 CONSTRAINTS Work of the generator output Work of the motor output Pressure loss Work of the turbine out Work of the compressor input 10327.99065kW 31635.70013kW -1.03137E+12 10871.56911kW 30053.91513kW Initial cost of compressor Initial cost of turbine $3,005,391.51 $1,358,946.14 Optimized size if pipe diameter 0.689m SYSTEM OPERATION DATA T1 T3 P1 P2 P3 P4 D 293K 293K 100000Pa 793178.2541Pa 648853.9175Pa 100000Pa 0.689924217m Based upon the results above we can make some basic conclusions. We see that our pressure within the system rises to around 800,000 Pa. Given that our output and input pressure are given at 100,00Pa that leaves us with a compression ratio of around 8:1. The work and calculations performed for the Lagrange multiplier equations done using MathCAD are found the appendix section of this document. The Newton-Raphson method was used to simulate the system and generate the values for P2, P3, and the pipe diameter D the ultimate solution was found using Excel. The total minimum cost of the gas pipeline system was found to be $101,989,236.59. This value is based on a minimum diameter of the pipeline of 0.689 meters, a minimum cost of the compressor of $3,005,391.51, and a minimum cost of the turbine of $1,358,946.14. Conclusion: Analysis of this system concluded that the value found for the pipeline diameter would minimize both the initial costs of the compressor as well as the turbine, therefore optimizing the total costs of production of this system. Appendix: MATLAB PROGRAM: % The following program Stimulates a gas pipeline and pumping facility by means of the %Newton-Raphson method . i=0; p2=600000; p3=45000; L=.5; d=.8; dp2=.02; dp3=.02; dd=.02; dL=.02; % after the defined values are set, the program uses a while Loop to solve for the values %of d,p3,p2& L. The values are solved for level of accuracy of 0.1%. while ((abs(dp2) > 0.001) | (abs(dp3) > 0.001) | (abs(dd) > 0.001) | (abs(dL) > 0.001)) f1=2953206.52/((p2^.76405867970660146699))-(L*(-2*p2)); f2=(-482712020.00603422686/((1/p3)^.76405867970660146699*(p3^2)))(L*(2*p3)); f3= (67200000.0*(d^.6))-(L*(-14655000000.000/(d^6))); f4 = (2.931E+9/(d^5))-(p2^2) +(p3^2); B=[f1; f2; f3; f4]; %function 2% dp2f2= (-2256423.0778489526717/(p2^1.7640586797066014670))+ 2*L; dp3f2=0; ddf2=0; dLf2=2*p2; %function 3% dp2f3=0; dp3f3=(368820308.68/(((1/p3)^1.764))*(p3)^4)+(965424040.01/ (((1/p3)^.764)*(p3)^3))- 2*L; ddf3=0; dLf3=-2*p3; %function 4% dp2f4=0; dp3f4=0; ddf4=(40320000.00/(d^.4))-(87930000000*(L/(d^7))); dLf4=(14655000000/(d^6)); %function 5% dp2f5=-2*p2; dp3f5=2*p3; ddf5=(-14655000000.000/(d^6)); dLf5=0; A=[dp2f2 dp3f2 ddf2 dLf2; dp2f3 dp3f3 ddf3 dLf3 ; dp2f4 dp3f4 ddf4 dLf4; dp2f5 dp3f5 ddf5 dLf5]; x=A\B; dp2=x(1); dp3=x(2); dd=x(3); dL=x(4); p2=p2-dp2; p3=p3-dp3; d=d-dd; L=L-dL; i=i+1; end
© Copyright 2026 Paperzz