Question: Python code is needed with explanations. You have been hired by Con Edison because there is a giant Arctic cold front approaching New York, and
Python code is needed with explanations.

You have been hired by Con Edison because there is a giant Arctic cold front approaching New York, and they are worried about condensation of natural gas. We will assume that natural gas is a mixture of methane and ethane. The following equations will allow you to estimate the dew point temperature (i.e., the temperature where condensation initiates) for natural gas. The dew point temperature is the temperature at which the following equations is satisfied: , where is the mole fraction of methane in the natural gas, is the mole fraction of ethane in the natural gas, and is the vapor pressure of methane or ethane, depending on the subscript. The abovementioned equation assumes that atmospheric pressure (or barometric pressure) in New York is 750mm Hg. The vapor pressures of methane and ethane depend on the temperature, and they are calculated using Antoines equation: , where is the temperature in C, is the vapor pressure in mm Hg, and A, B, and C are the speciesspecific constants given in the table below. Constant Methane Ethane A 6.61184 6.80266 B 389.93 656.4 C 266.0 256.0 Con Edison typically use natural gas that has (i.e., 90 mol% methane) and (i.e., 10 mol% ethane). Determine the dew point temperature by solving the nonlinear equation above (a) graphically, (b) by bisection method*, (c) by secant method*. * Develop the computer codes using the specified above methods to determine your answer with three significant digits. Print out the iteration number, temperature , function , and approximate relative error after each iteration.
You have been hired by Con Edison because there is a giant Arctic cold front approaching New York, and they are worried about condensation of natural gas. We will assume that natural gas is a mixture of methane and ethane. The following equations will allow you to estimate the dew point temperature (i.e., the temperature where condensation initiates) for natural gas. The dew point temperature is the temperature at which the following equations is satisfied: 750 mm Hg = YMP*+yeP}, where yn is the mole fraction of methane in the natural gas, ye is the mole fraction of ethane in the natural gas, and Pue is the vapor pressure of methane or ethane, depending on the subscript. The abovementioned equation assumes that atmospheric pressure (or barometric pressure) in New York is 750mm Hg. The vapor pressures of methane and ethane depend on the temperature, and they are calculated using Antoine's equation: B log10P*= A- T + where T is the temperature in C, P* is the vapor pressure in mm Hg, and A, B, and C are the species- specific constants given in the table below. Constant A B Methane 6.61184 389.93 266.0 Ethane 6.80266 656.4 256.0 Con Edison typically use natural gas that has yn=0.90 (i.e., 90 mol% methane) and ye =0.10 (i.e., 10 mol% ethane). Determine the dew point temperature by solving the nonlinear equation above (a) graphically, (b) by bisection method*, (e) by secant method*. * Develop the computer codes using the specified above methods to determine your answer with three significant digits. Print out the iteration number, temperature T', function f(T), and approximate relative error En after each iteration
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
