Continue updating temperature values within inner cells

Assignment Help Computer Engineering
Reference no: EM133626500

Assignment:

The temperature distribution in a thin metal plate with constant (or isothermal) temperatures on each side can be modeled using a two-dimensional grid, as shown in the figure below. Typically, the number of points in the grid are specified, as are the constant temperatures on four sides. The temperatures of the interior points are usually initialized to zero, but they change according to the temperatures around them. Assume that the temperature of an interior point can be computed as the average of the four adjacent temperatures; the points shaded in the grid below represent the adjacent temperatures for the point labeled x in the grid. Each time that the temperature of an interior point changes, the temperatures of the points adjacent to it change. These changes continue until a thermal equilibrium is achieved and all temperatures become constant.

Basic algorithm:

Get from the user the names of the input and output files.
Read from the input file the initial temps for top, right, bottom, and left sides of plate.
Read from the input file the tolerance for equilibrium.
Initialize the edges of the 2D grid with initial temps you got from the input file, and initialize the inner cells of the grid to 0.0.
Continue updating temperature values within inner cells until equilibrium is reached.
Output to the output file the values of the inner cells of the grid after equilibrium obtained.
Step 5 details

When updating the grid's temperatures always start at the top, left inner cell and update that row before updating the row below it. So, the first cell to be updated will be grid[1][1], then grid[1][2], and so on.
Never change an edge cell's temperature.
A cell's new temperature will always be the average of the 4 cells adjacent to it, the cells immediately above, below, left, and right of the cell.
You should update all inner cells of the entire grid, while always keeping track of the largest difference between the old value and the new calculated value for a cell. Once you have completely updated the grid, if your max difference is within the tolerance level, equilibrium has been reached. You are done. Go ahead and output the temperatures in each cell of your grid. If not, you need to update the entire grid again.
You are required to use 2D arrays, NOT vectors, for this assignment.
The grid dimensions will always be the same as the grid example above (6 X 8).

Reference no: EM133626500

Questions Cloud

Cervical Cancer Prevention Program : Prepare an Analytical reflection Essay on the fieldwork project on the Cervical Cancer Prevention Program in a low-middle-income country, Nepal.
Explain the group is monopolistic competitive or oligopoly : For each group determine and explain whether the group is monopolistic competitive or an oligopoly. Be specific in which market structures the firms operate.
How would you break their system efficiently : How would you break their system efficiently? Explain your answer clearly, write complete sentences, and do not leave out any details.
What range of content should the items cover : What range of content should the items cover?Test item writers must keep many considerations in mind. Which of the following is not typically one of those
Continue updating temperature values within inner cells : Continue updating temperature values within inner cells until equilibrium is reached. Output to the output file the values of the inner cells of the grid
What are two best practices you would apply to improve : Based on your research, what are two best practices you would apply to improve your interview skills as a hiring manager?
Advocating for policy change to promote patient care : what role do you think a medical provider would have in medically or legally advocating for policy change to promote patient care?
Hospital with complaints of altered mental status : A 67 year old male with no known past medical history is presenting to the hospital with complaints of altered mental status.
Display the home values of the provided cities at the end : The program will re-prompt the user. Finally, the program will display the home values of the provided cities at the end of the provided year on the console

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd