Question

*Using C++ (no printf command)* So, this is a basic cost vs. benefit problem.  For different...

*Using C++ (no printf command)*

So, this is a basic cost vs. benefit problem.  For different thicknesses of insulation, we will need to calculate the cost of purchasing and installing that thickness of insulation and compare that to the fuel savings generated by insulating the pipe with that thickness.

DISCUSSION:  Your program will ultimately need to determine overall savings (in dollars) for each thickness and then find the thickness that corresponds to the largest overall savings.

The overall savings is found by subtracting the cost of insulation from the fuel savings:

Overall savings = (CF– CI).  

The insulation thickness that corresponds to the largest overall savings will be our answer.  To find the overall savings, your program will need to calculate two quantities:

a.  Insulation cost – CI

This quantity has two components:  the cost of purchasing the insulation and the cost of installing the insulation.  The formula for this calculation is (see below for identification of variables):

CI = (b2-a2)(L)(Cvol) + (L)(CL)

b.  Fuel Savings – CF

The fuel savings is found by taking the difference in heat lost, dQ, and then multiplying this quantity by a dollar amount to get the amount of money we save using the insulation. The formula for finding the difference in heat lost (dQ) is:

Q3 represents the quantity of heat lost with no insulation and is found using:

Q3 = 2*3.14*a*F*(Ta – Tair)*L

Now, once we have dQ, we can calculate the fuel savings.  We’ll use a five year period (5 years=1.578 x 108sec).  The formula for fuel savings over this 5-year period is:

CF= dQ*(1.578 x 108) * (CstHeat)

What we want to do is maximize the difference of  CFand CI.   This difference is the overall savings (in dollars) and the thickness that corresponds to this difference is the optimum thickness!

Here are the constant variables for your program:

Pipe radius                              =a=0.05m

Radius of pipe + insulation     =b=(a + insulation thickness)

Pipe length                              =L=100m

Pipe temperature                      =Ta=150 C

Insulation conductivity            =k=0.1watt/(m C)

Convection constant                =F=3.0watt/(m C)

Pipe insulation cost                 =Cvol=$325/m3

Insulation installation cost       =CL=$1.50/m

Cost of heat                             =Cstheat = 1.11x 10-9per watt-sec

The only two quantities that are not constant in our problem are the insulation thickness and the air temperature (Tair).  For our program, the insulation is available in thicknesses ranging from 1 to 10 cm, in 1 cm increments (note this quantity must be changed to meters).  The air temperature will range from –10 C to 10 C in increments of 10 (in other words, you must evaluate at air temperatures of –10, 0, and 10).

Your program should output a table of thicknesses, insulation costs (CI), fuel savings (CF), and overall savings (CF– CI), for each air temperature (so, you’ll have three of these tables – one for –10, one for 0, and one for 10).  Your output must be in chart form, neat, and labeled.  You must also output the constant values used.

For example, the title of your first table may look like this:

Temperature:  -10

Thickness      CF             CI       Savings

.01 m

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream>
using namespace std;
int main(){

float a = 0.05; //m
float L = 100; //m
float Ta = 150; // o C
float k = 0.1; // watt/(m C)
float F = 3.0; // watt/(m C)
float Cvol = 325; // $/m^3
float CL = 1.50; // $/m
float Cstheat = 0.00000000111; //1.11*10^-9 per watt-sec

// thickness R
float R;
float minR = 0.01;// 1cm to m
float maxR = 0.1; // 10cm to m
float dR = 0.01; // 1cm to m -->increments
int nR = ((maxR-minR)/dR)+1; // number of possible thickness values

float Q3,dQ;
float b;
// temperature Tair
float vTair[] = {-10,0,10}; // vector of Tair values
float Tair;
int nT = 3; // number of Tair values

// loop to traverse all Tair values
for(int j=0;j<nT;j++){
float CI[nR],CF[nR],savings[nR];
float maxSaving = 0; int i_max=0;
Tair = vTair[j];
cout<<"Temperature: "<<Tair;
cout<<endl<<"CF \t\tCI\tsavings";
R = minR;

// loop to traverse all thickness values for the current Tair value
for(int i=0;i<nR;i++){
b = a + R;
CI[i] = ((b*b)-(a*a))*L*Cvol + L*CL;
Q3 = 2*3.14*a*F*(Ta-Tair)*L;

//************ take note *******************
dQ = Q3;
//******************************************

CF[i] = dQ*1.578*108*Cstheat;
savings[i] = CF[i] - CI[i];

// computing the max savings and corresponding max index thickness
if (savings[i]>maxSaving){
maxSaving = savings[i];
i_max = i;
}

cout<<endl<<CF[i]<<"\t"<<CI[i]<<"\t"<<savings[i];

R = R + dR;
}
float thicknessAtMaxSavings = (i_max+1)*dR;
cout<<endl<<"Max saving: $ "<<maxSaving;
cout<<endl<<"Thickness at max savings: "<<thicknessAtMaxSavings<<" meters"<<endl;
cout<<"---------------------------------------"<<endl;
}

return 0;
}

Temperature: -10 savings CF CI 0.00285118 185.75 -185.747 -227.997 0.00285118 228 0.00285118 276.75 -276.747 0.00285118 332 3

------------------------------------------------------------------------------
COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,

IF YOU'RE SATISFIED, GIVE A THUMBS UP
~yc~

Add a comment
Know the answer?
Add Answer to:
*Using C++ (no printf command)* So, this is a basic cost vs. benefit problem.  For different...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a C++ program to solve: The completed program should include the following: —Program input and...

    Write a C++ program to solve: The completed program should include the following: —Program input and output —Allow the user to input the starting, stopping and increment values for the insulation thickness and the air temperature. Also, at the end of the program, provide an opportunity for the user to use the program again without having to re-execute the program (ie. Ask them if they want to use the program again). —your program must find and output the value of...

  • 3. CIN: A 50 m long section of a steam pipe at 15°C. The average temperature...

    3. CIN: A 50 m long section of a steam pipe at 15°C. The average temperature of the outer surface of combined heat transfer coefficient or the rate of heat loss from the steam plp generated in an natural gas furnance $0.52/therm (1 therm = 105, 0.035 W/mK) needed in order to say remain constant at 150°C. (10 marks) For a steam pipe whose outer diameter is 10 cm passes through an open space mperature of the outer surface of...

  • need someone to walk me through this Home Weatherization: A Simulation Many homes have been constructed...

    need someone to walk me through this Home Weatherization: A Simulation Many homes have been constructed with insufficient insulation and without proper weatherization. Homes can be made more energy efficient by adding attic and crawl space insulation, by installing storm doors and storm windows, and by caulking windows and doors. In order to conserve energy and save money on fuel bills, you have decided to investigate a home weatherization program for your house. To weatherize your home, you need to...

  • Two large parallel plates with surface conditions approximating those of a blackbody are maintained at 800°C...

    Two large parallel plates with surface conditions approximating those of a blackbody are maintained at 800°C and 100°C, respectively. Determine the rate of heal transfer by radiation between the plates in Wim and the radiative heat transfer coefficient in W/m K ) 12 Write down the one-dimensional sent heal conduction equation for a plane wall with constant thermal conductivity and heat generation in its simplest form, and indicate what each variable represents 13 Write down the one-dimensional transient heat conduction...

  • summarizr the followung info and write them in your own words and break them into different...

    summarizr the followung info and write them in your own words and break them into different key points.   6.5 Metering Chamber: 6.5.1 The minimum size of the metering box is governed by the metering area required to obtain a representative test area for the specimen (see 7.2) and for maintenance of reasonable test accuracy. For example, for specimens incorporating air spaces or stud spaces, the metering area shall span an integral number of spaces (see 5.5). The depth of...

  • summatize the following info and break them into differeng key points. write them in yojr own...

    summatize the following info and break them into differeng key points. write them in yojr own words   apartus 6.1 Introduction—The design of a successful hot box appa- ratus is influenced by many factors. Before beginning the design of an apparatus meeting this standard, the designer shall review the discussion on the limitations and accuracy, Section 13, discussions of the energy flows in a hot box, Annex A2, the metering box wall loss flow, Annex A3, and flanking loss, Annex...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT