Plotting this pde versus x axis

1 回表示 (過去 30 日間)
Ous Chkiri
Ous Chkiri 2019 年 11 月 6 日
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.

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by