Starting from:
$35

$29

Heat Loss Through a Thick-Walled Cylinder Solution

Overall Assignment




For this assignment you are to write a simple C++ program that will ask the user for dimensions, inner and outer temperatures, and thermal conductivity of a thick-walled cylinder, and will report the heat loss from the cylinder due to conduction.




Background: Conductive Heat Transfer Through a Thick-Walled Cylinder




Heat loss due to conduction through a thick-walled cylinder ( e.g. a pipe ) can be calculated using equations (1) and (2) below, as illustrated in Figure 1:




























2 (2− 1)






=
( 1 )


ln( 2⁄ 1)






















1− 2


=
( 2 )











2
1






Where:




r1, r2 = the inner and outer radius of the cylinder, respectively,




T1, T2 = the inner and outer temperature of the cylinder, respectively, L = the length of the cylinder, ( not shown in Figure 1 ),

= The log-mean average of the cylinder wall area, accounting for the fact that the surface area inside the pipe is less than the surface area outside the pipe,







k = the thermal conductivity of the cylinder, and




Q = the heat flow through the walls of the cylinder.







Typical values for thermal conductivity are 220 for copper, 118 for aluminum, 32 for iron, and 9.4 for stainless steel, all in units of Btu/ft h F.

Program Details




For this assignment you are to write a simple C++ program that asks the user for the inner diameter and the wall thickness of a pipe, the temperatures inside and outside of the pipe, the thermal conductivity and the length of the pipe, and reports the total heat loss from the pipe as well as the heat loss per foot of pipe length.




Your program should first print out your name and ACCC netID ( e.g. jbell ), and explain to the user what the program does.




Units: Your program should read in pipe diameter and wall thickness in inches, pipe length in feet, temperatures in degrees F, and thermal conductivity in Btu/ft h F. ( Don’t forget to tell the user what units to use. ) Report the total heat loss in Btu/h and the heat loss per foot in Btu/h ft. Note that you will need to convert units from inches to feet, and you will also need to calculate radiuses from the inner diameter and wall thickness.




Special Notes:




You should work out some sample problems by hand before writing any computer code. As a sample, the heat loss from a 5-foot section of stainless steel pipe with a 1.5 inch inside diameter and a wall thickness of 0.25 inches, containing hot water at 200 F in a room at 72 F should be about 131,400 Btu/h (131.4 kBtu/h) with 2.275 ft2. ( See last page. )




Try to format the results as “nicely” as you can. At a minimum there should be enough text to label the results in complete sentences, and units should always be specified. ( I.e. don’t just print numbers or variable names and numbers. )




The basic assignment should not use any loops. You may use loops in your program only if you implement one of the optional enhancements ( see below ), e.g. to allow the user to solve multiple problems without restarting the program.




Since you haven’t learned how to test things yet, you can assume that all user input is good.




What to Hand In:




Your code, including a user documentation file, should be handed in using Blackboard.




All files should be zipped together into a single file, whose name is comprised of your ACCC netID followed by the course number followed by the letters "HW", followed by the assignment number. ( E.g. jbell109HW3.zip ) The zip file should be handed in via Blackboard. ( Your TA may provide alternate instructions, which override these. )




The intended audience for the documentation file is a general end user, who might want to use this program to perform some work. They do not get to see the inner workings of the code, and have not read the homework assignment. You can assume, however, that they are familiar with the problem domain ( e.g. heat loss from a pipe. )




A secondary purpose of the documentation file is to make it as easy as possible for the grader to understand your program. If there is anything special the grader should know about your program, be sure to document it in the documentation file. In particular, if you do any of the optional enhancements, then you need to document what they are and anything special the TA needs to do to run your program and understand the results.




If there are problems that you know your program cannot handle, it is best to document them as well, rather than have the TA wonder what is wrong with your program.




Make sure that your name appears at the beginning of each of your files. Your program should also print this information when it runs.




Optional Enhancements:




It is course policy that students may go above and beyond what is called for in the base assignment if they wish. These optional enhancements will not raise any student’s score above 100 for any given assignment, but they may make up for points lost due to other reasons.




Report results in metric units as well as English. Check the data entered to verify that it is valid.

Give users the choice of whether to enter their data and see their results in English or metric.




Ask the user if they would like to solve additional problems, and if so, repeat until they indicate they are done.




Allow users to specify units for each value entered, e.g. “5 feet” or “2 meters” as user input.




Tolerate variations, such as “in”, “in.”, “inch”, “inchs”, or “inches”. Include default units where not specified.




Other enhancements that you think of – Check with TA fo

More products