Plotting this pde versus x axis
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!