How to solve a 2D PDE with backward Euler?

조회 수: 12 (최근 30일)
Danny Helwegen
Danny Helwegen 2019년 1월 13일
편집: M 2019년 1월 14일
Hi, i have to solve the 2D heat equation:
∂T/∂t = α∇^2 T = α(∂^2T/∂x^2 + ∂^2T/∂y^2)
It is given that at the 4 boundaries the T is 0. I've already written some code, but it doesn't works. Can someone review my code and help me? The error occurs at the end, when the new T are put in a matrix. The code has been added as an attachment.

채택된 답변

M
M 2019년 1월 14일
편집: M 2019년 1월 14일
At line 58, you are trying to access the 11th element of the Number matrix, but its dimensions are 10 x 10, so you get an error.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by