Partial Differential Equation Calculation and Visualization 0
Partial Differential Equation Calculation and Visualization 0
Cryptography
Li Li
To cite this article: Li Li (2017) Partial differential equation calculation and visualization,
Journal of Discrete Mathematical Sciences and Cryptography, 20:1, 217-229, DOI:
10.1080/09720529.2016.1178918
Article views: 93
Li Li *
College of Mathematics and Computer Science
Yan’an University
Yan’an 716000
China
Abstract
The calculation of partial differential equations has wide applied background. Many
of the problems in scientific research and engineering can be the mathematical model of
partial differential equations. Differential equation containing multiple independent vari-
ables is called as PDE (partial differential equation). As for PDE problem, it is very difficult
to solve. Apart from a few special cases, the vast majority of cases are difficult to obtain
exact solutions. For the majority of applications workers, from the point of partial differen-
tial equations, using the finite element method or finite difference method has to spend a
lot of effort to get numerical solution. By MATLAB PDEToolbox, the article introduced the
accurate solution process of two-dimensional problem with high-speed. In order to see the
relationship between graph, function value and independent variable from the mathematical
expression of partial differential equations by MATLAB programming, numerical solution,
and the results can be visualized. PDE Toolbox provides a powerful and flexible as well as
practical environment for research and problem solving about partial differential equations
in two-dimensional space.
1. Introduction
PDE mainly means the general variation law based on unknown
function and its derivatives to describe the physical quantities of objective
world. In theory, the solution of partial differential equations for research
has a long history. The initial research focused on physics, mechanics,
geometry and other aspects of specific issues; the classic representation
*E-mail: [email protected]
©
218 L. LI
AΦ xx + BΦ xy + CΦ yy = f (x , y , Φ , Φ x , Φ y )
PDE CALCULATION AND VISUALIZATION 219
Parabolic equation: B2 − 4 AC = 0;
∂u ∂u
+a =0 t > 0, − ∞ < x < +∞
∂t ∂x (1)
u(x , 0) = ϕ (x )
Select Grid:
The difference schematic diagram is shown as Figure 1.
First, for a given area D = {(x , t) −∞ < x < +∞ , t ≥ 0}, proceed meshing
solution, the easiest used grid is equidistant linear axis parallel to x axis
and t axis respectively.
Divide D into many small rectangular areas. These straight lines are
called grid lines, whose intersection are called mesh points, also referred
to as nodes, h and t are referred to the step length of direction x and t. This
grid is called a rectangular grid.
(1)
Choose difference approximation for differential equations and
definite conditions, list difference scheme. If we use the forward
difference quotient represents the first-order partial derivatives,
namely:
Figure 1
Differenence schematic diagram
PDE CALCULATION AND VISUALIZATION 221
∂u u(xk +1 , t j ) − u(xk , t j ) h
= − ux′′2 (xk + θ 1h, t j )
∂x ( x ,t j )
h 2
k
(2)
∂u u(xk , t j +1 ) − u(xk , t j ) τ
= − ut′′2 (xk , t j + θ 2τ )
∂t ( x ,t j )
τ 2
k
∂u ∂u
+a =0
∂t ∂x
uk , j +1 −uk , j uk +1, j − uk , j
+a =0
τ h
here, uk, j can be seen as an approximation at node (xk, tj) when solving
problem. With initial conditions:
uk ,0 = ϕ (xk ) (k = 0, ± 1, ± 2, )
PNu¢ = (PNu)¢,
3. PDE visualization
3.1 PDE toolbox features
PDE Toolbox provides a powerful and flexible and practical
environment to research and solve the problem of partial differential
equations in two-dimensional space. PDE Toolbox features include:
(1) Set the PDE (PDE) definite solution of problem, which set a two-
dimensional area of a given solution, boundary conditions and
forms and coefficient of equations;
(2) Use finite element method (FEM) to solve the numerical solution of
PDE;
(3) Visualization of solutions.
∂u
Parabolic Equation: d − ∇ ⋅ (c∇u) + au = f , in Ω
∂t
∂ 2u
Hyperbolic equation: d − ∇ ⋅ (c∇u) + au = f , in Ω
∂t 2
You can use the command line to solve high-order equations. For
elliptic equations, you can use adaptive mesh algorithm and it also can be
combined and used with the nonlinear solution together.
h11u1 + h12 u2 = r1
h21u1 + h22 u2 = r2
n ⋅ (c21∇u1 ) + n ⋅ (c22∇u2 ) + q21u1 + q22 u2 = g2
n ⋅ (c21∇u1 ) + n ⋅ (c22∇u2 ) + q21u1 + q22 u2 = g2 + h12 µ
4. Application
Solving Poisson equation on boundary problems on the unit circle:
{
- ∆u= 1, Ω= (x , y ) x 2 + y 2 < 1
}
u ∂Ω = 0
(1 − x 2 − y 2 )
u(x , y ) =
4
Figure 2
The Condition of Set boundary conditions
PDE CALCULATION AND VISUALIZATION 227
Figure 3
The specification of set equation
Figure 4
A solution can be obtained after the decomposition equation
with cross-sectional grid
Compare with accurate solution. Click the Plot Parameters ... menu
option, open Plot Selection dialog, choose user entry in Height (3-D plot)
line Property drop-down box, and type u-(1-x.^2-y.^2)/4 in the line
of User entry input box, click the plot button to see the absolute error
graphics solution, as shown in Figure 5. We can see that at the boundary
the error is zero.
228 L. LI
Figure 5
The absolute error graphics solution after click the plot button
5. Conclusion
Solution of partial differential equations has become the core content
of scientific and engineering computing, including some large-scale
computing and many of them have become routine calculations. As for a
high-level technical computing language and interactive environment of
algorithm development, data visualization, data analysis and numerical
calculation, the MATLAB can solve mathematical problems faster. The
PDE is a very practical subject. For the issue of partial differential equations
in theoretical research and practical application, due to its complexity and
other reasons of proposed boundary and boundary conditions, to seek
analytical solution is very difficult or even impossible. It is essential to
take advantage of computer research corresponding numerical solution of
the problem. Programming for solving the whole process requires a good
theoretical basis and programming techniques from numerical partial
differential equations, and partial differential equations Toolbox provides
a powerful and flexible and practical environment to research and solve
partial differential equations in two-dimensional space. By means of this
tool, we can learn from cumbersome and common steps for solutions freed
to focus on core issues namely description of the problem, definitions and
simplifying the determination of the boundary conditions, solving and
precision control method selection, greatly improving the computational
efficiency.
PDE CALCULATION AND VISUALIZATION 229
References