Question: Assignment specs: The temperature distribution in a thin metal plate with constant ( or isothermal ) temperatures on each side can be modeled using a

Assignment specs:
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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!