文件名称:UPW_utux0_2
- 所属分类:
- matlab例程
- 资源属性:
- [Matlab] [源码]
- 上传时间:
- 2014-07-02
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- kingo******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
function [ue,un]=UPW_utux0_2(v,dt,t)
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = exp[-10(4x-1)^2]
边界条件为:
u(-1,t)=0,u(1,t)=0.
本题要求:
使用迎风格式,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像
-function [ue, un] = UPW_utux0_2 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = exp [- 10 (4x-1) ^ 2] boundary conditions: u (-1, t) = 0, u (1, t) = 0 of the questions asked: using the upwind scheme, choose v = 0.5, calculated and Draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when input: v- that is a* dt/dx dt- Value Time Format step t- the time to be solved Output: ue- 1N exact solution of the matrix at time t un- 1N value at time t solution matrix output image: image exact solution and the numerical solution
一个简单的双曲型偏微分方程:
ut + ux = 0
初始条件为:
u(x,0) = exp[-10(4x-1)^2]
边界条件为:
u(-1,t)=0,u(1,t)=0.
本题要求:
使用迎风格式,选择 v=0.5, 计算并画出当dt=0.01和0.0025时,
方程在t=0.5,x在(-1,1)时的数值解和精确解
输入:
v--即a*dt/dx
dt--数值格式的时间步
t--要求解的时间
输出:
ue--在时间t时的1×N精确解矩阵
un--在时间t时的1×N数值解矩阵
输出图像:
精确解和数值解的图像
-function [ue, un] = UPW_utux0_2 (v, dt, t) A simple hyperbolic partial differential equation: ut+ ux = 0 initial conditions: u (x, 0) = exp [- 10 (4x-1) ^ 2] boundary conditions: u (-1, t) = 0, u (1, t) = 0 of the questions asked: using the upwind scheme, choose v = 0.5, calculated and Draw when dt = 0.01 and 0.0025, equation t = 0.5, x numerical solution at (-1,1) and the exact solution when input: v- that is a* dt/dx dt- Value Time Format step t- the time to be solved Output: ue- 1N exact solution of the matrix at time t un- 1N value at time t solution matrix output image: image exact solution and the numerical solution
(系统自动生成,下载前可以参看下载内容)
下载文件列表
UPW_utux0_2.m