Air is contained within a cylinder in which heat is being transferred to it via a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Air is contained within a cylinder in which heat is being transferred to it via a heating coil. Initially the air is at a temperature T₁ and is heated until a final temperature of T2. The total heat transferred to the system is Q. Assuming the specific heat is the average of the specific heat at the initial and final temperatures: Cp(T₁) + Cp (T2) Cp = Eq(2) 2 determine the final temperature (T2) of the system. Develop a program using MATLAB that performs successive iterations on a provided initial guess for T₂ to numerically solve for the final temperature based on Eqs. (1) and (2). The program should accomplish the following: 1. Prompt the user to specify an initial guess for T₂ 2. Read in the provided data for Cp from CpData.txt 3. Provide an error if the initial guess for T₂ falls outside of the range of the Cp data 4. Perform successive iterations to improve the guess for T₂ until a relative error between the numerical solution and exact solution is less than 0.05% 5. Store the guess for T2 at each iteration 6. Output to the command window the converged solution and the number of iterations required to achieve it 7. Plot the iteration number vs. numerical solution to demonstrate the convergence of the solution Please note: The program must be your original code The code should function regardless of the initial guess specified The heat transfer, Q, mass, m, and initial temperature, T₁, are known and will be provided. Q = mcp (T2 - T₁) Eq(1) Specific Heat Capacity of Air Temperature (K) Cp (J/kgK) 250 1003 300 1005 350 1008 400 1013 450 1020 500 1029 550 1040 600 1051 650 1063 700 1075 750 1087 800 1099 900 1121 1000 1142 1100 1155 1200 1173 1300 1190 1400 1204 1500 1216 Air is contained within a cylinder in which heat is being transferred to it via a heating coil. Initially the air is at a temperature T₁ and is heated until a final temperature of T2. The total heat transferred to the system is Q. Assuming the specific heat is the average of the specific heat at the initial and final temperatures: Cp(T₁) + Cp (T2) Cp = Eq(2) 2 determine the final temperature (T2) of the system. Develop a program using MATLAB that performs successive iterations on a provided initial guess for T₂ to numerically solve for the final temperature based on Eqs. (1) and (2). The program should accomplish the following: 1. Prompt the user to specify an initial guess for T₂ 2. Read in the provided data for Cp from CpData.txt 3. Provide an error if the initial guess for T₂ falls outside of the range of the Cp data 4. Perform successive iterations to improve the guess for T₂ until a relative error between the numerical solution and exact solution is less than 0.05% 5. Store the guess for T2 at each iteration 6. Output to the command window the converged solution and the number of iterations required to achieve it 7. Plot the iteration number vs. numerical solution to demonstrate the convergence of the solution Please note: The program must be your original code The code should function regardless of the initial guess specified The heat transfer, Q, mass, m, and initial temperature, T₁, are known and will be provided. Q = mcp (T2 - T₁) Eq(1) Specific Heat Capacity of Air Temperature (K) Cp (J/kgK) 250 1003 300 1005 350 1008 400 1013 450 1020 500 1029 550 1040 600 1051 650 1063 700 1075 750 1087 800 1099 900 1121 1000 1142 1100 1155 1200 1173 1300 1190 1400 1204 1500 1216
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Water, initially at 40F, is contained within a thin-walled cylindrical vessel having a diameter of 18 in. Plot the temperature of the water vs. time up to 1 h if the water and container are immersed...
-
Suppose a monatomic ideal gas is contained within a vertical cylinder that is fitted with a movable piston. The piston is frictionless and has a negligible mass. The area of the piston is 3.14 10-2...
-
Air contained within a piston cylinder assembly undergoes three processes in series: Process 1-2: Compression at constant pressure from P1=10 lbf/in2, V1= 4ft3 to state 2. Process 2-3:...
-
In 1789, Henry Cavendish estimated the density of the earth by using a torsion balance. His 29 measurements follow, expressed as a multiple of the density of water. (a) Calculate the sample mean,...
-
Distinguish between surface-level and deep-level diversity.
-
1.) What is meant by "diminishing marginal utility"? 2.) What are some things that you have/get where you experience diminishing marginal utility? Relatedly, what is happening to your total utility?
-
What is the purpose of financial statements? Would you want to produce them even if they were not required, say, for entity tax reporting?
-
The following information was obtained from the records of Shae, Inc.: Merchandise inventory . . . . . . . . . . . . . . . . . . . . . . . . . $264,000 Notes payable (long-term) . . . . . . . . . . ....
-
3. Convert the ER Diagram below to a list of tables. The first step will be to identify wwwwww cardinalty/optionality. Be sure to identify primary keys and foreign keys. {Be careful here - note the...
-
A textile company produces shirts and pants. Each shirt requires two square yards of cloth, and each pair of pants requires three square yards of cloth. During the next two months the following...
-
The cash flow shown below are for a new Project WOV4. Place compute the IRR of Project WOV3. Year Cash flows 0 -$1,100 1 $325 2 $325 3 $325 4 $325 5 $325
-
To expand operations, Aragon Consulting issued 1,300 shares of previously unissued common stock with a par value of $1. The price for the stock was $50 per share. Required: 1-8. Complete the table...
-
1. Calculate the Payback Period of each project. Explain what argument Tim should make to show that the Payback Period is not appropriate in this case. 2. Calculate the Discounted Payback Period...
-
Assume that Farmer Jan and Rancher Jean have the same amount of resources and identical technologies. Farmer Jan can produce 2 pounds of meat or 4 pounds of potatoes or any combination. Rancher Jean...
-
1. what is the best division to invest? 2. Why are the "Cost of Equity" requested by investors by division different? In what case would they be the same? 3. why banks ask for different credit rate?...
-
The graph shows the price profile (option price vs. strike, in the Black-Scholes model) of 6- month options on XYZ, for two different implied volatilities (IVs): 22% and 40%. Recall that 22% was the...
-
The market currently yields a return of 10 per cent whereas Treasury bills yield 4 percent. Shares of ABC enterprises limited have a covariance of 7.5 with the market whereas the market has a...
-
Draw two scatterplots, one for which r = 1 and a second for which r = 21.
-
Momentum fluxes for creeping flow into a slot (Fig. 3.B-7). An incompressible Newtonian liquid is flowing very slowly into a thin slot of thickness 2B (in the y direction) and width W (in the z...
-
Stress relaxation after cessation of shear flow. A viscoelastic fluid is in steady-state flow between a pair of parallel plates, with v x = ?y If the flow is suddenly stopped (i.e., ?/becomes zero),...
-
Alternate form of the binary diffusion equation, in the absence of chemical reactions, Eq. 19.1-17 can be written in terms of v rather than v* by using a different measure of concentration namely,...
-
The Newtonian impact theory is valid at high angles of attack. The wall inclination for a blunt body gradually decreases along the free stream direction. For such cases, when this angle is less than...
-
The ellipsoid given in Problem 2.3 is also undergoing a pulsative major axis change with the same period but with phase difference \(\phi\). Express the equation of surfaces. Problem 2.3 An oblate...
-
For the attached flows over slender delta wings, show that at low angles of attack Eqs. 1.11 and 1.33 are identical. Eq 1.11 Eq 1.13 = 1 2 AR CL=
Study smarter with the SolutionInn App