Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Air is contained within a cylinder in which heat is being transferred to it via a heating coil. Initially the air is at a

image text in transcribed

image

image text in transcribed

image

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

Step by Step Solution

3.48 Rating (141 Votes )

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

More Books

Students also viewed these Programming questions