没有合适的资源?快使用搜索试试~ 我知道了~
首页Matlab偏微分方程求解方法
Matlab偏微分方程求解方法
需积分: 25 52 下载量 114 浏览量
更新于2023-03-16
评论 1
收藏 179KB DOC 举报
非稳态的偏微分方程组是一个比较难解决的问题,也是在热质交换等方面的常常遇到的问题,因此需要一套程序来解决非稳态偏微分方程组的数值解。
资源详情
资源评论
资源推荐
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
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 =
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页未读,继续阅读
weixin_41822276
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0