Finite Difference Method to find Steady State
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello experts,
I have to solve the following equation to find a converged solution.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282849/image.png)
At i=0, T=10 and at i=5, T=50. (n=5)
I want to get the converged solution of T at i=2, 3, 4.
I'm fairly comfortable with MATLAB but this is the first time that I'm using MATLAB for these kind of mathematical approach and I'm learning completely alone, relying on online materials.
How should I approach this? I'd appreciate your recommendations, reading materials, suggestions and/or pointers rather than a complete code at this point.
I know the question is vague but I'd welcome any suggestions for starting points :)
TIA!
3 Commenti
Ragul Kumar
il 6 Nov 2020
Hello experts,
I am trying to solve the finite difference methof for crank nicolson scheme to 2d heat equation. please let me know if you have any MATLAB CODE for this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/405000/image.png)
Boundary codition are
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/405005/image.png)
If you can kindly send me the matlab code, it will be very useful for my research work . thank you very much.
Risposta accettata
Torsten
il 8 Apr 2020
Modificato: Torsten
il 9 Apr 2020
T = zeros(6,5);
T(1:6,1) = 10;
T(1:6,5) = 50;
T(1,2) = 73;
T(1,3) = 100;
T(1,4) = 85;
for n=1:5
for i =2:4
T(n+1,i) = T(n,i) + 0.3*(T(n,i+1)-2*T(n,i)+T(n,i-1));
end
end
T
5 Commenti
Torsten
il 9 Apr 2020
Either choose a larger value than 5 for n or solve directly the linear system dT/dt = 0, i.e.
T(1) = 10
T(i+1) - 2*T(i) + T(i-1) = 0 (i=2,3,4)
T(5) = 50
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!