Use the explicit finite difference method to simulate heat transfer on a bar with user-input initial/boundary conditions and diffusivity constant. Allow the user to input time and space step sizes, warning about stability. Investigate how varying steps affects the solution by plotting temperature distribution evolution over time and space. Write a report explaining the code, unit tests, and discussing results.
Use the explicit finite difference method to simulate heat transfer on a bar with user-input initial/boundary conditions and diffusivity constant. Allow the user to input time and space step sizes, warning about stability. Investigate how varying steps affects the solution by plotting temperature distribution evolution over time and space. Write a report explaining the code, unit tests, and discussing results.
Use the explicit finite difference method to simulate heat transfer on a bar with user-input initial/boundary conditions and diffusivity constant. Allow the user to input time and space step sizes, warning about stability. Investigate how varying steps affects the solution by plotting temperature distribution evolution over time and space. Write a report explaining the code, unit tests, and discussing results.
• Use the explicit finite difference method (see lecture notes) to
simulate the heat equation on the right with your choice of appropriate initial and boundary conditions. Make a physically 𝜕𝑢 𝜕2 𝑢 realistic choice of the length of the bar and the thermal =𝛾 ∙ 𝜕𝑡 𝜕𝑥 2 diffusivity constant . Explain the physical meaning of each of the above choices. • Allow the user to input the step sizes and . Warn if the choice of and is expected to violate the stability criterion . Investigate how varying the step sizes affects the solution. • Plot how the temperature distribution in the bar varies with and with . Using either 2D or 3D plots, show the evolution in time. • Write a report on the above, explaining your code + sharing the unit tests that validate your code, and discussing the results. 1