没有合适的资源?快使用搜索试试~ 我知道了~
首页Matlab偏微分方程求解方法
Matlab偏微分方程求解方法
需积分: 25 52 下载量 8 浏览量
更新于2023-03-16
1
收藏 179KB DOC 举报
非稳态的偏微分方程组是一个比较难解决的问题,也是在热质交换等方面的常常遇到的问题,因此需要一套程序来解决非稳态偏微分方程组的数值解。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/11179136/bg1.jpg)
Matlab 偏微分方程求解方法
目录:
§1 Function Summary on page 10-87
§2 Initial Value Problems on page 10-88
§3 PDE Solver on page 10-89
§4 Integrator Options on page 10-92
§5 Examples” on page 10-93
§1 Function Summary
1.1 PDE Solver” on page 10-87
1,2 PDE Helper Function” on page 10-87
1.3 PDE Solver
This is the MATLAB PDE solver.
PDE Initial-BoundaryValue
Problem Solver
Description
pdepe Solve initial-boundary value problems for systems of
parabolic and elliptic PDEs in one space variable and
time.
PDE Helper Function
PDE Helper Function Description
pdeval Evaluate the numerical solution of a PDE using the
output of pdepe
§2 Initial Value Problems
pdepe solves systems of parabolic and elliptic PDEs in one spatial
variable x and time t, of the form
(10-2)
The PDEs hold for .The interval [a, b] must be finite. m
can be 0, 1, or 2, corresponding to slab, cylindrical, or spherical
symmetry,respectively. If m > 0, thena≥0 must also hold.
In Equation 10-2, is a flux term and is a
source term. The flux term must depend on . The coupling of the
partial derivatives with respect to time is restricted to multiplication by a
diagonal matrix . The diagonal elements of this matrix are
either identically zero or positive. An element that is identically zero
corresponds to an elliptic equation and otherwise to a parabolic equation.
There must be at least one parabolic equation. An element of c that
corresponds to a parabolic equation can vanish at isolated values of x if
they are mesh points.Discontinuities in c and/or s due to material
interfaces are permitted provided that a mesh point is placed at each
![](https://csdnimg.cn/release/download_crawler_static/11179136/bg2.jpg)
interface.
At the initial time t = t0, for all x the solution components satisfy initial
conditions of the form
(10-3)
At the boundary x = a or x = b, for all t the solution components satisfy a
boundary condition of the form
(10-4)
q(x, t) is a diagonal matrix with elements that are either identically zero
or never zero. Note that the boundary conditions are expressed in terms of
the f rather than partial derivative of u with respect to x- . Also, of
the two coefficients, only p can depend on u.
§3 PDE Solver
3.1 The PDE Solver
The MATLAB PDE solver, pdepe, solves initial-boundary value
problems for systems of parabolic and elliptic PDEs in the one space
variable x and time t.There must be at least one parabolic equation in the
system.
The pdepe solver converts the PDEs to ODEs using a second-order
accurate spatial discretization based on a fixed set of user-specified
nodes. The discretization method is described in [9]. The time integration
is done with ode15s. The pdepe solver exploits the capabilities of ode15s
for solving the differential-algebraic equations that arise when Equation
10-2 contains elliptic equations, and for handling Jacobians with a
specified sparsity pattern. ode15s changes both the time step and the
formula dynamically.
After discretization, elliptic equations give rise to algebraic equations. If
the elements of the initial conditions vector that correspond to elliptic
equations are not “consistent” with the discretization, pdepe tries to adjust
them before eginning the time integration. For this reason, the solution
returned for the initial time may have a discretization error comparable to
that at any other time. If the mesh is sufficiently fine, pdepe can find
consistent initial conditions close to the given ones. If pdepe displays a
message that it has difficulty finding consistent initial conditions, try
refining the mesh. No adjustment is necessary for elements of the initial
conditions vector that correspond to parabolic equations.
PDE Solver Syntax
The basic syntax of the solver is:
sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan)
Note Correspondences given are to terms used in “Initial Value
Problems” on page 10-88.
The input arguments are
m: Specifies the symmetry of the problem. m can be 0 =slab, 1 =
![](https://csdnimg.cn/release/download_crawler_static/11179136/bg3.jpg)
cylindrical, or 2 = spherical. It corresponds to m in Equation 10-2.
pdefun: Function that defines the components of the PDE. It
computes the terms and in Equation 10-2, and has the form
[c,f,s] = pdefun(x,t,u,dudx)
where x and t are scalars, and u and dudx are vectors that approximate the
solution and its partial derivative with respect to . c, f, and s are column
vectors. c stores the diagonal elements of the matrix .
icfun: Function that evaluates the initial conditions. It has the form
u = icfun(x)
When called with an argument x, icfun evaluates and returns the initial
values of the solution components at x in the column vector u.
bcfun:Function that evaluates the terms and of the boundary conditions. It
has the form
[pl,ql,pr,qr] = bcfun(xl,ul,xr,ur,t)
where ul is the approximate solution at the left boundary xl = a and ur is
the approximate solution at the right boundary xr = b. pl and ql are
column vectors corresponding to p and the diagonal of q evaluated at
xl. Similarly, pr and qr correspond to xr. When m>0 and a = 0,
boundedness of the solution near x = 0 requires that the f vanish at a = 0.
pdepe imposes this boundary condition automatically and it ignores
values returned in pl and ql.
xmesh:Vector [x0, x1, ..., xn] specifying the points at which a numerical
solution is requested for every value in tspan. x0 and xn correspond to a
and b , respectively. Second-order approximation to the solution is made
on the mesh specified in xmesh. Generally, it is best to use closely spaced
mesh points where the solution changes rapidly. pdepe does not select the
mesh in automatically. You must provide an appropriate fixed mesh in
xmesh. The cost depends strongly on the length of xmesh. When , it is not
necessary to use a fine mesh near to x=0 account for the coordinate
singularity.
The elements of xmesh must satisfy x0 < x1 < ... < xn.
The length of xmesh must be ≥ 3.
tspan:Vector [t0, t1, ..., tf] specifying the points at which a solution is
requested for every value in xmesh. t0 and tf correspond to and ,
respectively.
pdepe performs the time integration with an ODE solver that selects both
the time step and formula dynamically. The solutions at the points
specified in tspan are obtained using the natural continuous extension of
the integration formulas. The elements of tspan merely specify where you
want answers and the cost depends weakly on the length of tspan.
The elements of tspan must satisfy t0 < t1 < ... < tf.
剩余10页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/default.jpg!1)
weixin_41822276
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 计算机系统基石:深度解析与优化秘籍
- 《ThinkingInJava》中文版:经典Java学习宝典
- 《世界是平的》新版:全球化进程加速与教育挑战
- 编程珠玑:程序员的基础与深度探索
- C# 语言规范4.0详解
- Java编程:兔子繁殖与素数、水仙花数问题探索
- Oracle内存结构详解:SGA与PGA
- Java编程中的经典算法解析
- Logback日志管理系统:从入门到精通
- Maven一站式构建与配置教程:从入门到私服搭建
- Linux TCP/IP网络编程基础与实践
- 《CLR via C# 第3版》- 中文译稿,深度探索.NET框架
- Oracle10gR2 RAC在RedHat上的安装指南
- 微信技术总监解密:从架构设计到敏捷开发
- 民用航空专业英汉对照词典:全面指导航空教学与工作
- Rexroth HVE & HVR 2nd Gen. Power Supply Units应用手册:DIAX04选择与安装指南
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)