A Study of Discharging a Gas Tank

download A Study of Discharging a Gas Tank

of 20

description

Times New Roman

Transcript of A Study of Discharging a Gas Tank

A COMPUTATIONAL STUDY OF GAS TANK DICHARGING

Author: Marian NedelcuFreelance researcherEmail: [email protected]

ABSTRACTThis paper aims to investigate the theoretical problem of discharging of a pressurized tank. A quasi one dimensional flow is considered in both supersonic and subsonic regimes.Using Matlab time changes in parameters of flow during subsonic and supersonic flow is studied.INTRODUCTIONPressurization and depressurization of gas vessels occur in numerous industrial processes and gas storage applications and are also of fundamental interest. The objectives of the analysis are to predict the pressure, temperature, and density of the gas in the tank and the mass flow rate out of the tank as functions of time during the discharge process. DEVELOPEMENT OF PHENOMENOLOGICAL MODELA model for the charging or discharging process of a vessel filled with air is applied to the control volumes depicted in Fig. 1. The air is assumed to behave as an ideal gas, and the flow through the thoat (exit, in the case of discharging tank) will be approximated as isentropic. However, because of the possibility of heat transfer to or from the surroundings, the air inside the tank is assumed to undergo a more general polytropic process, as shown in Eqn. (1). The model will also allow for the polytropic constant n to vary with time, as will be considered later in this work. Allowing for a general, time-varying polytropic exponent n precludes a closed-form solution; therefore a numerical solution is developed.

Figure 1. Gas tank discharging modelThe model of gas tank comprises the two main element: an enough large reservoir that allow to assume contant density, pressure and temperature in the entire volume, and a convergent-divergent nozzle through which the gas is released to the athmosphere. For evolution of parameters of state three important layers are considered. Layer 1 is a section through the gas tank where the gas is considered in stagnation state (velocity is very small and is considere zero). Layer 2 is the a vertical to the throat (the smallest section of the nozzle) where the gas can reaches the speed of under specifric conditions. Layer 3 is the exist section of the nozzle.Processes are sometime modeled as an idealized type of process called a quasiequilibrium (or quasistatic) process. A quasiequilibrium process is one in which the departure from thermodynamic equilibrium is at most infinitesimal. All states through whichthe system passes in a quasiequilibrium process may be considered equilibrium states.ASSUMPTIONSTo accomplish these objectives the control volume shown in Fig. 1, which lies just inside thevessel walls, is used. In addition, the following assumptions are made:1. Properties of the gas in the tank are spatially uniform at any instant of time (i.e., quasi-steady or uniform state assumption);2. Average velocity of the gas in the tank is zero;3. Opening modeled as an ideal converging or converging-diverging nozzle with isentropic flow to the nozzle throat;4. One-dimensional flow and properties in the nozzle;5. Neglect gravitational potential energy;6. No shear or shaft work for the control volume;7. Gas is thermally and calorically perfect;8. Thermodynamic process is politropic.If we choose the adiabatic process this would be expected to be a good model for very rapid discharge processes in which case there would be little time for significant heat transfer between the tank walls and the gas. On the other hand, the isothermal process is expected to be appropriate for slow vessel discharge processes whereby there is sufficient time for heat transfer to maintain the temperature of the gas in the vessel constant.

IDEAL GAS RELATIONSHIPSBefore developing the compresibble flow equations, the ideal gas properties are evaluated. The equation of state is for an ideal gas is:

(1)

where p, , and T are pressure, density and pressure of gas, and R is the ideal gas constant.In thermodynamic analysis various form of energy is considered that make up the total energy of a system. The sum of all the microscopic forms of energy is called the internal energy and is denoted by u.For an ideal gas, the internal energy is directly proportional to temperature, and can be expressed as:

(2)

where cv is the specific heat at constant colume.The fluid property entalpy of a gas is defines as:

(3)

The entalpy as internal energy is a function of temperature and can be expressed as:

(4)

where cv, and cp are specific heats at constant volume and pressure. Having definitions of internal energy and entalpy and equation of state (6) the following relationship can be derived:

(5)

If the specific heat ration , is defined as

(6)

then combining equations (8) and (9) leads to;

(7)

(8)

Another extensive property of a thermodynamic system is entropy, as a measure of dosprder. According to the second law of thermodynamics the entropy of an isolated system never decreases. The change in entropy (S) of a system was originally defined as:

(9)

For any pure substance include ideal gases, the first Tds equationis [1]

(10)

and the second Tds equation is

(11)

The second law of thermodynamics requires that the adiabatic and frictionless flow of any fluid results ds=0. Constant entropy flow is called isentropic flow. For an isentropic flow the most useful relationship is:

(12)

The polytropic procees was coined to describe any reversible process or any open or closed system of gas which involves bothe heat and work transfer.A polytropic process is a quasiequilibrium process described by [1]

(13)

An alternate derivation is to evaluateb equation (1) between two states 1 and 2 to obain:

(14)

Mach number is defined as the ratio of the value of the local flow velocity, u,, to the local speed of sound c.

(15)

For an isentropic flow the speed of sound can be calculated using:

(16)

or

(17)

INTEGRAL FORM OF CONSEERVATION LAWS OVER A CONTROL VOLUMEAny fluid flow is guverning by the general equations of mass, momentum and enery equations.For finite control volume the mass conservation law states that the time rate of mass change in the system must be equal the rate of max influx into control volume.

(18)

The Newtons seond law equation for a control volume of fluid provide the relationship between the time rate of change of the linear momentum of the system and sum of external forces acting on the system [2]:

(19)

The first law of thermodynamics state that the time rate of increase of total stored energy of the system is equal with the sum of the net time rate of heat and work tranfered into system [2].

(20)

Where: is the total energy per unit of mass and is ralated to the internal energy per unit of mass u, the kinetic energy per unit of mass V2/2, and the potential energy per unit of mass, gz; is the net rate of heat transfer into system; is the net work rate transfer into the system;

In many cases the work is tranfered across the control surface by moving a shaft and the power transfered is related to the shaft toques T and angular velocity, shaft,. In the case of liniar motion of the shat the power transfered is related to the tranlational force F, and the speed of the shaft,vshaft,(.Work transfer can also occur at the control surface when a force associated with fluid normal stress acts over a distance.For our study, the fluid normal stress, , is simply equal with the negative pressure. The power transfer due to normal stress is:

(21)

Using information developed about the power then the first law of thermodynamics for a control volume can be written as:

(22)

DIFFERENTIAL FORM OF CONSEERVATION LAWS If we take the control volume very small, as a cubical element, then the integral form of mass conservation, given be equations (1), (2) and (5), become [2]:

(23)

In the same way the linear momentum law can be written in differential form as [2]:

(24)

(25)

(26)

where: detones the normal stresses, and the tangential stresses; u,v, and w are the components of velocity vector V, in a orthogonal system of axis (x,y,z);The shearing stresses are developed in a fluid because of viscousity of the fluid. For some common fluid as air or water the viscousity is small, and therefore it seems resonable to asume under some circumstance the effect of viscousity as neglijable (and thus the shearing forces). For fluids that in which there are no shearing forces the normal stress is independent of direction and :

(27)

For an insviscid flow equation of momentum conservation are referred as Eulers equation of motion and are reduced to:

(28)

(29)

(30)

Having an infinetisimal control volume the energy equation of an inviscid fluid can be written in differential form as:

(31)

where , and because there can be no infinitesimal shaft protruding into the control volume .ONE DIMENSIONAL FLOWIn one dimensional flow there are not a special interest in studing the variation of parameters in cross section, but their variation along flow axis. The parameters are considered constant on cross section and they are taken as averaged.Integrating the differential equations of conservation over a cross section yields:

(32)

(33)

(34)

Under first assumption made above the mass conservation equation for a steady one dimenasional flow can be written as:

(35)

where m0 is mass inside the tank volume V, which can be expressed as V, Au and , u and A denote the density, velocity and cross section area of a layer of nozzle, with coordinate x.For a steady-state inviscid flow momentum equation of momentum conservation can be written in differential form as:

(36)

If we consider that the flow occurs with no heat and work exchanges with sorounding, ate steady state, then the equation of energy conservation has differential form as follow:

(37)

The above differential equations of conservation can be derived in a discrete form when we write parameters between two layer of flow.For an isentropic process the equations of momentum and energy conservation becomes similar.QUASI ONE DIMENSIONAL FLOW IN DISCRETE FORMIf we apply the energy equation (37) betwenn the layers of study yealds:

(38)

Rearaging the therms and using the Mach number in above relationships yelds

(39)

Using the politropic process relationship followings formulas can be derived [2]

(40)

(41)

Parameters having substript 0 are known as stagnation parameters, because characterize the fluid where its velocity is zero.If we consider the mass conservation equation we can put it in the following differential form:

(44)

Combining above relationship with momentum equation and definition of spped of sound we obtain the following relationship between velocity change and area change in isentropic duct flow.

(45)

Inspection of this equation, without actually solving it, reveals a fascinating aspect of compressible flow: Property changes are of opposite sign for subsonic and supersonic flow because of the term M2 - 1.In order to calculate the mass flow we have to consider the energy as:

(42)

If we substitute the velocity from above relationship and politropic relationships and as:

(43)

The maximum mass flux is reached when ratio between ambient pressure (back pressure) and stagnation pressure is. For and adiabatic process of air .Substituting the relationship (41) of pressure ratio in mass flux equation (43) yields

(43)

The maximum flux flow coccurs at the section of minimum flow area when M=1.If we analyse the mass flux for two different layers and make their ration then the ratio of areas as a function of Mach numbers is obtained:

(47)

An relation that relates flow area with Mach number can be obtained from Equation (45) as [3]:

(48)

We observe that at the throat unless M=1.NUMERICAL SIMULATIONA matlab program was developed (Appendix 2) to analize time variation fo parameters in different layers. The tank properties, gas properties and ambient pressure were set as inputs for program (Appendix 1).The flow is chocked, and Mach number in the throat is 1, during 67.4 seconds (Figure 1.), then becomes subsonic. During the chocked phase 70.82% of gas mass is discharged and the pressure drops with 99.99%. The tank looses gas almost exponnentially in time.Pressures in each layer decrease asimptotically to ambient pressure (Figure 2).

Figure 2 Time Variation of Mach Number

Figure 2. Time Variation of Pressures

Figure 4 Time Variation of Temperatures

Figure 5 Time Variation of Velocities

Exit temperature dropped linear during the chocked flow, then remains aproximativelly constant to 278 K (50C). The inside temperature and the temperature in the throat has close values and go down to the exit temperature.Velocity of the gas at the throat decrease and tend to be equal with velocity at exit section.

Figure 6 Time Variation of Mass Loss

CONCLUSIONThe flow regime is determined by the ratio between ambient pressure and pressure in the tank.The pressure drops drastically during the supersonic flow, and tank loses a major portion of gas.

APPENDIX 1 Table 1 INPUT VALUES OF NUMERICAL SIMULATIONSymbolParameterUnit of measureValue

Specific heat ratioDimensionless1.4

RGas constantJ/(KgK)287.058

VVolume of the tankm31

dcrDimeter of the throatm0.01

deDiameter of exit section of nozzlem0.015

patmAtmospheric pressurePa101325

p0Initial pressure in the tankPa1013250

T0Initial temperature in the tankK500

APPENDIX 2 MATLAB SCRIPT% -------------------------------------------------------------------------% GAS TANK DISCHARGING% QUASI ONE DIMENSIONAL FLOW% -------------------------------------------------------------------------% Author: Marian Nedelcu% Data: September 13, 2015% -------------------------------------------------------------------------clear all;clc;n=1.35; % politropic coefficientgama=1.4; % specific heat ratiocp=gama/(gama-1); % specific heat at constant pressureR=287.058; % gas constant [286 J/KgK] at standard conditionV=1; % the volume of tank [m^3]dcr=0.01; % diameter of throat section [m]de=0.015; % diameter of exit section [m] - divergentif dcrpatm && ipc M1=1; % Mach number is 1 for chocked flow else M1=sqrt(2/(gama-1)*((p0/patm)^((gama-1)/gama)-1)); % unchocked flow end T1=T0/(1+M1^2*(gama-1)/2); % energy conservatiom rho1=rho0*(T1/T0)^(1/(gama-1)); % politropic transform p1=rho1*R*T1; % state equation in critical section u1=M1*sqrt(gama*R*T1); % isentropic flow Tcr(i)=T1; % temperature in critical section [K] rhocr(i)=rho1; % density in critical section pcr(i)=p1/10^5; % pressure in critical section [bar] ucr(i)=u1; % velocity in critical section [m/s] Mcr(i)=M1; % mach number in critical section % EXPANSION IN DIVERGENT PART OF NOZZLE f=@(m)(Ae/Acr-M1/m*((1+(gama-1)/2*m^2)/(1+(gama-1)/2*M1^2))^((gama+1)/2/(gama-1))); M2=fzero(f,0.2); T2=T0/(1+(gama-1)/2*M2^2); u2=M2*sqrt(gama*R*T2); p2=p0*(T2/T0)^(gama/(gama-1)); rho2=rho0*(T2/T0)^(1/(gama-1)); dm1=rho1*u1*Acr; dm2=rho2*u2*Ae; Me(i)=M2; ue(i)=u2; pe(i)=p2/10^5; Te(i)=T2; % PARAMETERS AT NEXT MOMENT OF TIME rho0=rho0-rho1*u1*Acr/V*dt; % stagnation density at next time p0=p0*(rho0/rho(i))^n; % politropic transform p0_a=p0_a*(rho0/rho(i))^gama; % adiabatic process T0=p0/(R*rho0); % state equation T0_a=p0_a/(R*rho0); % state equation t(i+1)=t(i)+dt; i=i+1;endt=t(1:end-1);MM=Mcr(1);i=1;while MM==1 i=i+1; MM=Mcr(i);endif i==1 str1='The flow is only subsonic - unchoked'; disp(str1);else disp('SUPERSONIC REGIME'); str1=strcat('Period of time:',num2str(t(i-1)),'seconds'); disp(str1); dm=(rhoi-rho(i-1))/rhoi*100; dp=(pi-p(i-1))/pi*100; dT=(Ti-T(i-1))/Ti*100; str2=strcat('Mass loss:',num2str(dm),'%'); str3=strcat('Pressure drop:',num2str(dp),'%'); disp (str2); disp(str3);enddmm=(rhoi-rho)/rhoi*100;figure(1);clf;plot(t,p,t,pcr,t,pe);title ('Pressure vs time');xlabel('time [s]');ylabel('pressure [bar]');grid on;legend('stagnation','critical','exit');figure(2);clf;plot(t,T,t,Tcr,t,Te);title ('Temperature vs time');xlabel('time [s]');ylabel('temperature [K]');grid on;legend('stagnation','critical','exit');figure(3);clf;plot(t,ucr,t,ue);title ('Velocity vs time');xlabel('time [s]');ylabel('velocity [m/s]');legend('crtical','exit');grid on;figure(4);clf;plot(t,Mcr,t,Me);title ('Mach number');xlabel('time [s]');ylabel('mach number');legend('crtical','exit');grid on;figure(5);clf;plot(t,T,t,T_a);title ('Temperaure poliropic vs adiabatic process');xlabel('time [s]');ylabel('[K]');legend('politropic','adiabatic');grid on;figure(6);clf;plot(t,dmm);title ('Mass Loss vs Time');xlabel('time');ylabel('percent');grid on; else disp('The throat must have the smallest diameter'); disp('Choose the exit diamater higher the critical diameter')endReferences

[1] M. J. Michael, S. N. Howard, B. D. Daisie and B. B. Margaret, Fundamentals of Engineering Thermodynamics, 7th ed., Wiley, 2011. [2] B. R. Muson, T. H. Okiishi, W. W. Huebsch and A. P. Rothmayer, Fundamentals of fluid Mechanics, Seventh ed., Wiley, 2013. [3] M. A. Saad , Compressible Fluid Flow, New Jersey: Prentice-Hall, 1985. [4] F. P. Incropera and P. D. Dewitt, Fundamentals of Heat and Mass Transfer, Seventh ed., John Wiley & Sons, Inc, 2011.