ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 29 May 2017 My Price 8.00

Modeling Temperature Transfer

Referring to C++ code, suppose you have a thin metal plate where each of the edges are maintained at a constant temperature. You can model the plate as a 2-dimensional array of square cells each of which may have a different temperature. Given the size of the array and the temperature of the edges, you are to calculate the temperature of an interior cell by averaging the 4 neighboring (cells immediately above, below, left and right) cell temperatures. The temperature of four corner cells will be the average of the two corresponding edge temperatures. Do not use vectors for this assignment. See attached doc.

 

 

Modeling Temperature TransferProblem:Suppose you have a thin metal plate where each of the edges are maintained at aconstant temperature.You can model the plate as a2-dimensional arrayof square cells each ofwhich may have a different temperature.Given the size of the array and the temperature of theedges, you are to calculate the temperature of an interior cell by averaging the 4 neighboring(cells immediately above, below, left and right) cell temperatures.The temperature of fourcorner cells will be the average of the two corresponding edge temperatures.Do not use vectorsfor this assignment.Your program is going to use the case of “immediate” updating in which you will bebegin with the cell in the left most interior cell in the top interior row and work across the row,calculating new temperatures for each cell and replacing the old temperatures with the new ones.Then you will proceed to the second interior row.After calculating the temperatures for the allthe interior cells an iteration counter should be updated and the process should repeat until all thecells have change in temperature of less than a value, epsilon, which indicates that equilibriumhas been reached.The temperatures of the edge cells should remain constant.Your program should prompt the user to enter the size of the array and the temperature ofthe top edge, bottom edge, left edge and right edge.The size of the array may not be more than35 by 20.The temperatures of the edges may not be less than 0 or greater than 300.Store thetemperature values in the appropriate cells, the corner cells should be the average of the twobordering edge cells.You should assume that the interior cells originally are at 0 degrees.Theuser should also be prompted to enter the value of epsilon that will be used to determine whenthe plate has reached equilibrium.After the array has been initialized, begin the process of determining temperature of theinterior cells (the average of the 4 cells that share an edge).The temperatures of the cells on theoutside should remain constant, only the temperatures of the internal cells should change.Oncethe absolute temperature change of all the interior is less thanepsilonyou should output thearray with the temperatures and state how many iterations were needed to reach the equilibriumtemperature distribution.Your program should employ a function to output the 2-D array.Thefunction should use appropriate formatting so the output of the temperatures in the cell aredisplayed to 1 decimal place and are aligned.For example, suppose you had a plate that could be modeled using a 5 by 7 array of cells,with the temperature of the top edge being at 100 degrees, the bottom edge being at 90 degrees,the left edge being at 75 degrees and the right edges being at 75 degrees.Initially the arraywould look like:Initial array87.5100.0100.0100.0100.0100.087.575.00.00.00.00.00.075.075.00.00.00.00.00.075.075.00.00.00.00.00.075.082.590.090.090.090.090.082.5Programming Project 41CMPSC 20

Attachments:

Answers

(11)
Status NEW Posted 29 May 2017 03:05 AM My Price 8.00

-----------

Not Rated(0)