Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C program using one dimensional arrays to do the following: The insulati

ID: 3767031 • Letter: W

Question

Write a C program using one dimensional arrays to do the following:

The insulation thickness' of several steel pipes are to be computed (as shown). Consider the formulas listed below for determining such thickness.

     Where:                                     

                   QPL = heat loss per unit length of pipe to the insulation; QPL <= 500     Btu/hr-ft                                         

                    k1 = coefficient of heat conduction of steel = .07

                    k2 = coefficient of heat conduction of the insulation = 12.5

                   T1 = temperature on inside of pipe; use 120°F for all pipes

                    T2 = temperature on the outside surface of the insulation

                   D1, D2, D3 = inside diameter of the pipe, outside diameter of the pipe, and outside

                                 diameter of the insulation, respectively

                      T = insulation thickness required = (D3 – D2)/2

Make a flowchart and do the following steps using your desire arrays

     1. Create the headings

     2. Treat the tabulated values given below of pipe and diameter temperatures as a one-dimensional arrays, respectively. Read these tables into the computer.

     3. Compute QPL and T for each pipe.

     4. Initialize the diameter D3 as D2 + 0.5

     5. Check QPL = 500. If true, write output as shown.

If false, increase D3 by 0.5 and recalculate QPL

Given Data:

                                                                          Tempera

                                               Diameters            tures           
                                     ________________________________

                                                           D1             D2                T2

                                     ________________________________

                                          1              2               2.375           550

                                          2              4               4.50             620

       Pipes                          3              5               5.563            700

                                          4              6              6.625            760

            ____________________________________

Out- put layout:

          PIPE INSULATION THICKNESSES REQUIRED

                  PIPE           THICKNESSES REQUIRED (in)

                     1                                 x.xx

                     2                                 x.xx

                     3                                 x.xx

                     4                                 x.xx

Explanation / Answer

#include <iostream>
#include <math.h>
#include <iomanip>
#include <cmath>

using namespace std;
// Variable Meanings
// Pipe radius                         = a = 0.05m
//Radius of pip + 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/m cubed
//Insulation installation cost         =CL=$1.50/m
//Cost of heat                         =Cstheat= 1.11x10^-9

int main()
{
    float i, thick_increment, start, end, start_temp, end_temp, temp_increment, a, b, L, Ta, k, F, Cvol, CL, Cstheat, tenneg9, dQ, Q3, c, d, e, f, g, h, j,CI, CI_1, CI_2, tenpos8, one5sev, cf, CF, fuel_savings, tair, dQ_1, dQ_2, CF_1, CF_2, Q3_1, Q3_2, fuel_savings1, fuel_savings2, rerun, y;
   
    float temp[3];
   
    do {
       
    cout<<"Enter the starting thickness"" ";
    cin>>start;
    cout<<"enter the end thickness"" ";
    cin>>end;
    cout<<"Enter the thickness increment"" ";
    cin>>thick_increment;
    cout<<"Enter the starting temperature"" ";
    cin>>start_temp;
    cout<<"Enter the ending temperature "" ";
    cin>>end_temp;
    cout<<"Enter the temperature increment size"" ";
    cin>>temp_increment;
   
    cout<<setw(10)<<"Thickness"<<setw(15)<<"CI"<<setw(25)<<"CF"<<setw(35)<<"fuel_savings @ "<<start_temp<<setw(25)<<"fuel_savings @ "<<start_temp+temp_increment<<setw(25)<<"fuel_savings @ "<<end_temp<<endl;
   
    for (i=start; i<=end; i=i+thick_increment)
    { a=.05;
    b= a+i;
    L=100;
    Ta=150;
    k=.1;
    F=3;
    Cvol=325;
    CL=1.5;
    tenneg9= pow(10, -9);
    Cstheat=1.11*tenneg9;
    CI_1=(b*b-a*a)*(L)*(Cvol);
    CI_2=L*CL;
    CI=CI_1+CI_2;
       
        for (tair=start_temp; tair<=end_temp; tair=tair+temp_increment)
        c=b/a;
        d=b*F;
        e=d/k;
        f=log(c);
        g=(e*f)+1;
        h=c/g;
        j=1-h;
        dQ=Q3*j;
        dQ_1=Q3_1*j;
        dQ_2=Q3_2*j;
        Q3_1=2*3.14*a*F*(Ta-0)*L;
        Q3_2=2*3.14*a*F*(Ta-10)*L;
        Q3=2*3.14*a*F*(Ta-(-10))*L;
        tenpos8= pow(10, 8);
       >         cf=dQ*Cstheat;
        CF=dQ*one5sev*Cstheat;
        CF_1=dQ_1*one5sev*Cstheat;
        CF_2=dQ_2*one5sev*Cstheat;
        fuel_savings=CF-CI;
        fuel_savings1=CF_1-CI;
        fuel_savings2=CF_2-CI;
       
         cout<<i<<setw(25)<<CI<<setw(25)<<CF<<setw(25)<<fuel_savings<<setw(25)<<fuel_savings1<<setw(25)<<fuel_savings2<<endl;
       
       
    }
    cout<<"Do you want to run this program again? (y/n)"" ";
        cin>>rerun;
     } while (rerun=='y' ||'Y');
    return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote