How to use ode23s to solve heat equation
Ältere Kommentare anzeigen
assume ut=D*uxx D is constant, x = [-5:0.1:5], with delta_x=0.1 initial condition u(x0,0) = derivative of x boundary condition if x=-5 or 5 u(x,t)=0
hence can i write ODE that satisfy u1 to u99? then use ODE23s solve heat equation with initial data u50=1 and uj=0 where j=/50?
thank you!!
Akzeptierte Antwort
Weitere Antworten (4)
Orion
am 13 Nov. 2014
0 Stimmen
Xiaoyan,
You're problem is a partial differential equation (PDE), so ode23 won't work, it's meant to solves ordinary differential equation (ODE).
If you don't have it, then you're gonna have to code your own finite element method (such as finite difference). you could probably some opensource code on the web for those methods.
1 Kommentar
Torsten
am 13 Nov. 2014
Xiaoyan wants to apply the method of lines to the heat equation and solve the resulting system of ODEs using ODE23.
But I don't understand which Initial and boundary conditions he/she wants to impose.
Best wishes
Torsten.
Xiaoyan
am 13 Nov. 2014
0 Stimmen
Torsten
am 13 Nov. 2014
0 Stimmen
I guess numerical methods are not adequate if Dirac-Delta function is used as initial condition.
You should look up the analytical solution for this problem.
Best wishes
Torsten.
Zoltán Csáti
am 13 Nov. 2014
0 Stimmen
I would suggest an other way. A time-dependent differential equation can be solved not only by the method of lines, but also using the so-called Rothe's approach, ie. you discretize first in time and then is space. So use for example the forward Euler-method to prepare the semi-discrete equation that can be discretized by FDM/FEM or a spectral method.
Kategorien
Mehr zu Matrix Computations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!