文件名称:UPW_utux0_2
-
所属分类:
- 标签属性:
- 上传时间:2014-07-02
-
文件大小:885byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.