Plotting this pde versus x axis

3 Ansichten (letzte 30 Tage)
Ous Chkiri
Ous Chkiri am 6 Nov. 2019
Initial Value Problem
du/dt+du/dx=0
Domain:
-20<=x<=450
Initial Condition:
u(x,0)=0.5.*exp(-log(2).*(x/3)^2)
Analytical Solution:
u(x,t)=0.5.*exp(-log(2).*(x-t/3)^2)
The initial value problem represents a pulse that moves across the x axis with respect to time.
Mesh
Spacing of deltax=1
Time step of deltat=0.25s
As the initial value problem is only in 1 spatial dimension (x), the mesh will simply be a line with nodes. Given that our domain is , the linear mesh will have 471 spatial nodes.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by