aspentech - cooper unionfaculty.cooper.edu/bdavis/examplework/che151student1project.pdf · figure...

16
AspenTech MEMORANDUM To: Ms. Sam K. Safobeen From: Student 1 Subject: Interpolation of P-T data for chemical species in flash tank May 11 th , 2011 This is a memo concerning software that I developed to interpolate pressure-temperature (P-T) data for ethane, cis-2-butene, propane, and n-butane, which are chemical species that are processed in the company's flash tank unit. I obtained the P-T data from Perry's Chemical Engineers' Handbook, which provided the vapor pressure of each chemical species at various temperatures as well as the boiling point and the critical pressure and temperature of each compound. Due to the fact that the handbook only provided several data points per species over a large temperature range, it was necessary to create software that accurately predicted the vapor pressure of each species at any intermediate temperature. This information is vital to the company's engineers who are designing and working with this unit. Since there was no known relationship between the temperature and pressure of each species, pressure at an intermediate temperature could only be obtained through numerical interpolation of the available data. While there are many methods of numerical interpolation, the method that I chose to implement in the software was cubic splines. The method of cubic splines generates piecewise cubic polynomials that fit between adjacent data points. In addition to fitting the data points exactly, the first and second derivatives of two adjacent splines evaluated at their intersecting data point are the same, which ensures that the function is smooth and continuous. Although this method is more complex than fitting a single high order polynomial to the data, it provides more accurate results because it avoids oscillations that can exist in a higher order polynomial. I observed from a simple plot of the data points that the relationship between temperature and pressure of each species was well behaved. This suggested to me that it was unnecessary to fit a high order curve to the data and led further credence to the cubic spline method. I generated cubic splines for each species using MathWork's MATLAB, which contains a built in algorithm for cubic spline interpolation, ‘spline’. This algorithm is already optimized to reduce computational error. I created function scripts called “Psat1.m”, “Psat2.m”, “Psat3.m”, and “Psat4.m” for each chemical species that allow a user to input a given temperature (in Kelvin) and obtain the vapor pressure (in bars) for that species. The scripts will not return pressures for temperatures below 140 K or above 300.3 K because these values corresponded to the lowest temperature in the data set and 5 K below the lowest critical temperature of the species (ethane), respectively. I implemented these limits to ensure accuracy of the interpolation. However, I advise that users of this software do not input temperatures below 150 K for ethane and propane as this will return a result that is extrapolated instead of interpolated, thus creating a high degree of inaccuracy in this range. In general, the error associated with cubic splines is known to be proportional to the 4 th derivative of the ‘function’ that is being approximated. In this case, the ‘function’ was unknown but the behavior of the data points indicated to me that the value of a 4 th derivative with respect to temperature would be insignificant. Thus, I determined that the error in the vapor pressures was bound by the experimental error of the data or 1 bar to the last digit associated with the nearest data point above the interpolation temperature.

Upload: others

Post on 20-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech MEMORANDUM To: Ms. Sam K. Safobeen From: Student 1 Subject: Interpolation of P-T data for chemical species in flash tank May 11th, 2011 This is a memo concerning software that I developed to interpolate pressure-temperature (P-T) data for ethane, cis-2-butene, propane, and n-butane, which are chemical species that are processed in the company's flash tank unit. I obtained the P-T data from Perry's Chemical Engineers' Handbook, which provided the vapor pressure of each chemical species at various temperatures as well as the boiling point and the critical pressure and temperature of each compound. Due to the fact that the handbook only provided several data points per species over a large temperature range, it was necessary to create software that accurately predicted the vapor pressure of each species at any intermediate temperature. This information is vital to the company's engineers who are designing and working with this unit. Since there was no known relationship between the temperature and pressure of each species, pressure at an intermediate temperature could only be obtained through numerical interpolation of the available data. While there are many methods of numerical interpolation, the method that I chose to implement in the software was cubic splines. The method of cubic splines generates piecewise cubic polynomials that fit between adjacent data points. In addition to fitting the data points exactly, the first and second derivatives of two adjacent splines evaluated at their intersecting data point are the same, which ensures that the function is smooth and continuous. Although this method is more complex than fitting a single high order polynomial to the data, it provides more accurate results because it avoids oscillations that can exist in a higher order polynomial. I observed from a simple plot of the data points that the relationship between temperature and pressure of each species was well behaved. This suggested to me that it was unnecessary to fit a high order curve to the data and led further credence to the cubic spline method. I generated cubic splines for each species using MathWork's MATLAB, which contains a built in algorithm for cubic spline interpolation, ‘spline’. This algorithm is already optimized to reduce computational error. I created function scripts called “Psat1.m”, “Psat2.m”, “Psat3.m”, and “Psat4.m” for each chemical species that allow a user to input a given temperature (in Kelvin) and obtain the vapor pressure (in bars) for that species. The scripts will not return pressures for temperatures below 140 K or above 300.3 K because these values corresponded to the lowest temperature in the data set and 5 K below the lowest critical temperature of the species (ethane), respectively. I implemented these limits to ensure accuracy of the interpolation. However, I advise that users of this software do not input temperatures below 150 K for ethane and propane as this will return a result that is extrapolated instead of interpolated, thus creating a high degree of inaccuracy in this range. In general, the error associated with cubic splines is known to be proportional to the 4th derivative of the ‘function’ that is being approximated. In this case, the ‘function’ was unknown but the behavior of the data points indicated to me that the value of a 4th derivative with respect to temperature would be insignificant. Thus, I determined that the error in the vapor pressures was bound by the experimental error of the data or � 1 bar to the last digit associated with the nearest data point above the interpolation temperature.

Page 2: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech APPENDIX

Notes to the memo: Creating the spline for propane resulted in negative pressures being returned below 148 K. This was due to the fact that the lowest data point for propane was 150 K thus extrapolation of the data was necessary. To correct this, I made an additional data point at 140 K corresponding to 0 bars. Even though this was not physically correct, it was still a better approximation than having negative values. This did not happen with ethane, which also had the lowest data point at 150 K so an additional data point was not created. However, it is still safe to say that any value of pressure that is returned for ethane or propane below 150 K is highly inaccurate. MATLAB function script for ethane (Psat1.m): function [Psat] = Psat1(T) if T < 140 % Checks to see if T is below 140 and returns an error if it is error('NaN') elseif T > 300.3 % 300.3 is 5K below the critical temperature of ethane. Checks to see if T is above that and returns an error if it is. error('NaN') else T_ethane = [150, 170, 190, 210, 230, 250, 270, 280, 300]; % T data from Perry's P_ethane = [9.672e-2, 0.4290, 1.347, 3.340, 7.004, 13.01, 22.10, 28.1, 43.5]; % P data from Perry's ethanefit = spline(T_ethane, P_ethane); % Uses Matlab's built in spline command to create cubic splines between the data points. Psat = ppval(ethanefit, T); % Evaluates the spline at the inputted temperature and sets it equal to Psat. end

Page 3: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech Spline derivative: This is an analytical derivation of the two adjacent cubic splines that fit the data points at temperatures 220, 230, and 240 K for cis-2-butene. These splines are generated and used in the software to interpolate pressures at intermediate temperatures. For cubic splines: � � �� ��� � � ��� � ���� � ���� ����� � ���� � ����� � ���� For cis-2-butene: i Ti (K) Pi (bar) 0 220 0.0595 1 230 0.1105 2 240 0.1933 To determine the appropriate constants of each spline, the system Ax=B must be solved where A is,

A =

�� ��� ��� � � �� ��� ���� �� � �� � ��� � �� �� � � �� ��� ���� � � � � �� � � � � � �� � ��

B is,

B =

�� � ����

� �� � ����

and x is,

x =

������������

�� � ���� � ��� �� � �� � �� � ���� ��� � ��

Page 4: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech �� � �� � �� � ���� ��� � �� ����� � ������ So A and B become:

A =

�� ��� ���� � � �� �� ��� �� � �� � �� � �� �� � � �� ��� ����� � � � � �� � � � � ��

B =

�������

��������

For simplification purposes, x = 0.051 and y = 0.0828 Row operations will be used to solve for the coefficients of the cubic spline via the method of Gaussian elimination. Initially: �� ��� ���� � � � �� �� ��� �� � � �� � �� � �� � �� � � �� ��� ���� �� � � � � � �� � � � � �� �

1. Divide row1 by 10, divide row5 by 2, divide row6 by 2 � �� ��� � � � ����� �� ��� �� � � �� � �� � �� � �� � � �� ��� ���� �� � � � � � �� � � � � �� �

2. Add -1*row5 to row3, add -20*row5 to row2, add -10*row5 to row1

Page 5: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech � � ��� � � � ����� � ��� �� � � �� � �� � �� � �� � � �� ��� ���� �� � � � � � �� � � � � �� �

3. Add row3 to row6 � � ��� � � � ����� � ��� �� � � �� � �� � �� � �� � � �� ��� ���� �� � � � � � �� � �� � � �� �

4. Divide row6 by 30 � � ��� � � � ����� � ��� �� � � �� � �� � �� � �� � � �� ��� ���� �� � � � � � �� � � � � � �

5. Divide row4 by -1000, add row6 to row3 � � ��� � � � ����� � ��� �� � � �� � �� � �� � �� � � ������ ����� �� �������� � � � � � �� � � � � � �

6. Add -1*row1 to row2 � � ��� � � � ����� � ��� �� � � ������ � �� � �� � �� � � ������ ����� �� �������� � � � � � �� � � � � � �

7. Divide row2 by 200, divide row3 by 30

Page 6: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech � � ��� � � � ����� � � ������ � � �������� � � � ����� � �� � � ������ ����� �� �������� � � � � � �� � � � � � �

8. Add -2*row2 to row4 � � ��� � � � ����� � � ������ � � �������� � � � ����� � �� � �� � ����� �� � �

������

����� � � � � � �� � � � � � �

9. Multiply row2 by -200 � � ��� � � � ����� � ���� � � � ����� � � � ����� � �� � �� � ����� �� � �

������

����� � � � � � �� � � � � � �

10. Multiply row3 by -3, add row3 to row4 � � ��� � � � ����� � ���� � � � ����� � �� � ���� � �� � �� � � �� � �

������

����� � � � � � �� � � � � � �

11. Multiply row3 by 10 � � ��� � � � ����� � ���� � � � ����� � ��� � � � �� � �� � � �� � �

������

����� � � � � � �� � � � � � �

12. Add row6 to row4

Page 7: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech � � ��� � � � ����� � ���� � � � ����� � ��� � � � �� � �� � � � � �

������

����� � � � � � �� � � � � � �

13. Divide row4 by -4 � � ��� � � � ����� � ���� � � � ����� � ��� � � � �� � � � � � �

������

����� � � � � � �� � � � � � �

14. Add -1*row4 to row6, add 30*row4 to row3, add 200*row4 to row2, add -100*row4 to row1

� � � � � � � ����

��

� � � � � � ����

���

� � � � � � ������

�����

� � � � � � ������

�����

� � � � � � �� � � � � � � �

������

����

15. Swap rows to get the identity

� � � � � � � ����

��

� � � � � � �� � � � � � �

������

����� � � � � � �

������

� � � � � � ������

�����

� � � � � � � ������

�����

16. Plug in for x and y

Page 8: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech � � � � � � ��������� � � � � � �� � � � � � ����������� � � � � � �������� � � � � � ������������ � � � � � �����������

�� � �������� �� � � �� � ���������� �� � ������� �� � ����������� �� � ����������� The splines: � � �� ��� � � ��� � ���� � ���� ����� � ���� � ����� � ���� � � �������� �� ��� � � �������� �������� � � ��� � ������������� � ����� � ����������� � ����������� � ��������� � ������� � � �������� �� ��� � � ������� � ������� � � ��� � �������������� � ����� � ������������� � ����� � ������������ � ����������� � ���������� � ������

Page 9: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

1

S1FLASH SOFTWARE MANUAL S1Flash.m S1flash.m is a MATLAB function script that was developed to numerically determine the

characteristics of the vapor and liquid exit streams from a flash tank by solving a series of mass

balance equations. The flash tank in question is designed to separate a mixture of ethane (C2H6),

cis-2-butene (C4H8), propane (C3H8), and n-butane (C4H10) into respective vapor and liquid

streams. S1flash will determine the mole fractions of each species in the exiting liquid stream

(xC2H6, xcis-2-C4H8, xC3H8, xn-C4H10) and the vapor stream (yC2H6, ycis-2-C4H8, yC3H8, yn-C4H10) given

an input of the mole fractions of the entering steam (zC2H6, zcis-2-C4H8, zC3H8, zn-C4H10), the molar

flow rate of the entering stream (F), and the operating temperature (T). It also requires an input

of the desired vapor flow rate (V) and operating pressure (P). If V is within a valid range,

S1flash will determine the required P for those conditions. If V is not within a valid range,

S1flash will determine the actual V that is obtainable at the inputted P. S1flash is also designed

to check for physically invalid feed conditions and will alert the user if necessary.

Figure 1 – A diagram of the flash tank

Page 10: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

2

Instructions The following files must be in the same directory: S1flash.m, flash1.m, flash2.m,

Psat1.m, Psat2.m, Psat3.m, and Psat4.m. Open S1flash.m in MATLAB; when the

desired initial conditions have been selected, they may be input into the program using the

following general syntax in the MATLAB Command Window:

[x y V L P] = S1flash(z, F, T, V, P) Where z is the vector corresponding to the desired mole fractions of ethane, cis-2-butene,

propane, and n-butane in the feed, respectively. F is the molar feed rate entering the reactor and

V is the desired vapor molar flow rate in units of mol/hr. T is the operating temperature in units

of Kelvin (K) and P is the operating pressure in units of bar. The program will return the values

of V, L, and P as well as two vectors (x and y) containing the four mole fractions in the liquid

and vapor streams in the same order as the z vector.

Figure 2 – Example user input and output generated by S1flash. The user has specified for the initial mole fractions of ethane, cis-2-butene, propane, and n-butane to be 0.2, 0.4, 0.1, and 0.3 respectively. In addition, they have specified a molar feed rate of 300 mol/hr, an operating temperature of 250 K, a desired vapor molar flow rate of 170 mol/hr, and an operating pressure of 1.5 bar. The output, which is printed below the input, shows the respective mole fractions in the x and y vectors, and the determined V, L, and P. Note that the determined P is NOT the same as the inputted pressure (see Appendix for details).

Page 11: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

3

Errors and Troubleshooting “ERROR: Invalid input (…)” S1flash will return an error if any of the inputs to do not make physical sense1. S1flash will also return an error if the value of T is less than 140 K or greater than 300.3 K1. It is strongly advised that the value of T is greater than or equal to 150 K as reliable vapor pressure data is not available below this temperature for ethane or propane. “ERROR: Invalid feed conditions (…)” The flash tank cannot operate if the entering stream is 100% liquid or 100% vapor. S1flash will return an error if either of these two conditions are met. These errors can be avoided by changing the temperature or pressure of the stream. Figure 3 shows the acceptable bounds for operating pressures at temperatures from 140 to 300 K.

Figure 3 – Pressure bounds for temperatures 140 to 300 K. Operating above the upper red line will result in a mixture that is 100% liquid. Operating below the lower red line will result in a mixture that is 100% vapor. NOTE: Operating within the two lines does not guarantee valid feed conditions.

If, “ERROR: Invalid initial conditions (Rachford-Rice …).” is obtained, the user must change the operating temperature, pressure, or composition of the entering feed. This error is a result of the inability to solve the Rachford-Rice equation for the feed conditions specified by the user1. This error will only be returned if S1flash is calculating the vapor flow rate that is obtainable at the inputted pressure. 1 See Appendix for detailed list of possible error messages and explanations of the algorithm.

140 160 180 200 220 240 260 280 3000

5

10

15

20

25

30

35

40

Temperature (K)

Acce

ptab

le P

ress

ure

(bar

)

Acceptable Pressure vs. Temperature

Pc

Tc

Page 12: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

4

APPENDIX Algorithm Given the input specified in Instructions section of the Manual, S1flash will first check to see if

the desired V is greater than zero and is less than or equal to F. An input outside of these limits

would be physically impossible as negative flow rates do not exist and the flash tank can not

output more flow than it is being fed. If V is within this range, S1flash will calculate x, y, L, and

P using Newton’s method for systems on a specified set of mass balance equations. In this case,

the output for P will most likely not be exactly the same as the input for P, which indicates to the

user that the operating pressure but must adjusted to achieve the desired vapor flow rate. If V is

not within this range, S1flash will check to see if the desired P is greater than zero and is less

than or equal to 37.8 bars. The operating pressure is limited to 37.8 bars due to the fact that this

pressure corresponds to the lowest critical pressure of the four chemical species (n-butane).

Operating at a pressure above this limit would make the mixture unpredictable. If P is within this

range, S1flash will calculate x, y, L, and V using the method of false transients. In this method,

the Rachford-Rice equation is solved for the set of initial conditions that are inputted into the

program via bisection. The solution to the Rachford-Rice equation indicates the fraction of feed

that is converted to vapor in the flash tank and thus allows for the determination of V and L. A

vector IVP is then solved using the Runge-Kutta order 4 method to determine x and y. All of the

algorithms specified in S1flash obtain the vapor pressure of each species at the inputted

temperature via a cubic spline interpolation of P-T data from Perry’s Chemical Engineers’

Handbook. If V nor P are in the allowed ranges, the program will return an error. S1flash also

contains several checks for invalid input conditions and physically impossible situations and will

return an error if any of these conditions is met. Possible errors that may be encountered by a

user using S1flash are listed in the Possible Errors section of Appendix.

Page 13: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

5

List of Possible Errors “ERROR: Invalid input (input mole fractions for all 4 components)” - This error will be obtained if four mole fractions (z1, z2, z3, z4) are not entered into the program. “ERROR: Invalid input (mole fractions do not sum to 1)” - This error will be obtained if the four inputted mole fractions do not sum to 1 within a tolerance of 0.00005. “ERROR: Invalid input (one or more of the mole fractions is negative)” - This error will be obtained if one or more of the four inputted mole fractions are less than 0. “ERROR: Invalid input (feed flow rate zero or negative)” - This error will be obtained if the value of F is less than or equal to 0 “ERROR: Invalid input (V nor P are in the allowed range).” - This error will be obtained if the value of V is not within (0,F] AND the value of P is not within (0,37.8]. “ERROR: Invalid input (temperature is below the allowed range).” - This error will be obtained if the inputted T is below 140 K. P-T data for the four chemical species was not available for temperatures below 140 K, thus no accurate information can be obtained below this temperature. “ERROR: Invalid input (temperature is above too high).” - This error will be obtained if the inputted T is above 300.3 K. Operating at temperatures higher than 300.3 K would make the mixture unpredictable, as this temperature corresponds to 5 K below the lowest critical temperature of the four chemical species (ethane, 305.3 K). “ERROR: Invalid feed conditions (stream is 100% liquid – change T or P).” - This error will be obtained if the entering stream was determined to be 100% liquid. This condition will exist when the ratios of the vapor pressure of each chemical species to the operating pressure are all less than 1. These ratios are donated as K1, K2, K3, K4 in the algorithm. The fact that the vapor pressure of each species is below the operating pressure indicates that the species have not reached their boiling point. “ERROR: Invalid feed conditions (stream is 100% vapor – change T or P).” - This error will be obtained if the entering stream was determined to be 100% vapor. This condition will exist when the ratios of the vapor pressure of each chemical species to the operating pressure are all greater than 1. These ratios are donated as K1, K2, K3, K4 in the algorithm. The fact that the vapor pressure of each species is above the operating pressure indicates that all species are in the vapor phase.

Page 14: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

AspenTech

6

“ERROR: Invalid feed conditions (Rachford-Rice equation – change z, T, or P).” - This error will be obtained if the inputted V is not within the range of (0,F] and the Rachford-Rice equation can not be solved given the inputted initial conditions. This signifies physically invalid conditions and thus the user must change one or more of their inputs for z, T, or P. For details on the Rachford-Rice equation, see the Algorithm section of the Appendix.

Figure 4 – Example error that can be obtained while using S1flash The user has inputted a value of V to be 400 mol/hr, which is greater than the inputted value of F. S1flash then tries to determine a suitable V at the inputted operating pressure. In this example, the program was unable to solve the Rachford-Rice equation for the set of feed conditions, indicating that these inputs were physically invalid.

Page 15: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

Part III 1. The partial differential equation is,

𝜕𝜕𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝜕𝜕 = 𝐷𝐷

𝜕𝜕 𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝑥𝑥

Setting this equation into the form discussed in class,

𝐴𝐴𝜕𝜕 𝐶𝐶 (𝑥𝑥, 𝑡𝑡)

𝜕𝜕𝑥𝑥 + 2𝐵𝐵𝜕𝜕 𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝜕𝜕𝜕𝜕𝜕𝜕 + 𝐶𝐶

𝜕𝜕 𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝑡𝑡 + 𝐷𝐷

𝜕𝜕𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝜕𝜕 + 𝐸𝐸

𝜕𝜕𝐶𝐶 (𝑥𝑥, 𝑡𝑡)𝜕𝜕𝜕𝜕 + 𝐹𝐹 = 0

Thus for this equation, A = DHA, B = 0, C = 0, D = 0, E = -1, and F = 0. To determine the “flavor” partial differential equation, the value of det(X) must be obtained.

𝑋𝑋 =   𝐴𝐴 𝐵𝐵𝐵𝐵 𝐶𝐶 =     𝐷𝐷 0

0 0

𝑑𝑑𝑑𝑑𝑑𝑑 𝑋𝑋 =   𝐷𝐷 0 − 0 0 =  0 Since det(X) = 0, the “flavor” of this PDE is parabolic. This differential equation is different from the other equations we’ve discussed in class because we only looked at PDEs where we did not have mixed boundary conditions. This problem has mixed boundary conditions; 2 Dirichlet and 1 Neumann. 2. This is a 2nd order partial differential equation. It is 2nd order with respect to x and 1st order with respect to t. Thus, two boundary conditions must exist in x and one boundary condition must exist in t, making a total of three boundary conditions. They are: 1. At time zero (t = 0) the leak has just started, which means that the concentration of hydrogen (CH) is zero at all positions of x except at the reactor (x = 0).

𝐶𝐶 𝑥𝑥, 0 =  0  𝑚𝑚𝑚𝑚𝑚𝑚 𝑚𝑚 𝑥𝑥 ≠ 0

2. A leak is defined by having a concentration of hydrogen equal to 8 mol/m3. Assuming that hydrogen will continuously leak out of the reactor at a steady state over the 10 second time interval, the concentration of hydrogen at the reactor is 8 mol/m3 at all times.

𝐶𝐶 0, 𝑡𝑡 =  8  𝑚𝑚𝑚𝑚𝑚𝑚/𝑚𝑚

Page 16: AspenTech - Cooper Unionfaculty.cooper.edu/bdavis/examplework/ChE151Student1Project.pdf · Figure 2– Example user input and output generated by S1flash.The user has specified for

3. Hydrogen does not diffuse through the wall which is located at x = L. Thus we can say that the change in concentration with respect to position at the wall is zero at all times.

𝜕𝜕𝐶𝐶 𝑥𝑥, 𝑡𝑡𝜕𝜕𝜕𝜕

,= 0

𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 ∗ 𝑠𝑠

3. The required distance from the reactor to the containment wall was determined to be 0.0772 m or 7.72 cm. This result indicates that diffusion is slow as this is a very short distance and the hydrogen had a full 10 seconds to build up to 0.8 mol/m3; this is only one tenth of the initial concentration. Since hydrogen diffuses the fastest of any gas, it can be concluded that diffusion in general is a slow process.