讲解:Mechanical Engineering、MATLAB
Assignment 4: Mechanical Engineering Case Study –Temperature Distribution SimulationAvailable: November 24thDue: December 7th @ 11:55pmProgramming aspects to get familiarized with:Ø MATLAB MetricsØ MATLAB FunctionsØ MATLAB AnimationsØ MATLAB FiguresThe TaskThe temperature distribution in a thin metal plate with constant (isothermal) temperatures on each sidecan be modeled using a 2D grid, as shown in the Figure below. Typically, the number of points in thegrid is specified (N number of rows by M number of columns), as are the constant temperatures on thefour sides. The temperatures of the interior points are initialized to zero, but they change according tothe temperatures around them. Assuming that the temperature of an interior point can be computed asthe average of the four adjacent temperatures; the points shaded in the figure below represent theadjacent temperatures for the pointed labeled x in the grid. Each time that the temperature of an interiorpoint changes, the temperatures of the points adjacent to it change. These changes continue until athermal equilibrium is achieved and all temperatures become constant. A thermal equilibrium isreached when the difference between the previous and current temperature of every element in the gridbecomes smaller than a specific threshold (entered by the user).The SoftwareDevelop a software to model this temperature distribution for a grid with N rows (between 50 and 200)and M columns (between 50 and 200). Allow the user to enter the te代做Mechanical Engineering作业、代写MATLAB程序设计作业、代做MATLAB语言作业 代做数据库mperatures for the four sides (initialconditions). Use a one-dimensional array to store these temperatures (top, bottom, left, and right valuesare between 0 and 255). Thus, when a point is updated, its new value is used to update the next point.Continue updating the points, moving across the rows until the temperature differences (between theprevious temperature and the newly calculated temperature) for all the grid elements are less than atolerance value (provided by the user, the threshold is between 0 and 0.05). The software must providea visual display (animation) for the temperature distribution. You may use any form of inputmechanism (such as text fields to receive the required data from the user). You may design this programusing multiple functions.Given test cases:Test Case 1: Hot edgesDimensions of grid: 200 x 200Boundary conditions: 255, 255, 255, 255Simulation Threshold: 0.02Test Case 2: Mixed boundary conditionsDimensions of grid: 200 x 200Boundary conditions: 255, 0, 255, 0Simulation Threshold: 0.05Test Case 3: Zero boundary conditionsDimensions of grid: 200 x 200Boundary conditions: 0, 0, 0, 0Simulation Threshold: 0.01Write your report using the five steps model for software development (as discussed in class):a) Step 1: Problem Identification and Statement (5 points)b) Step 2: Gathering Information (10 points)c) Step 3: Test Cases and algorithm (35 points)d) Step 4: Code or implementation (35 points)e) Step 5: Test and Verification (15 points)转自:http://www.6daixie.com/contents/12/4525.html