Научная статья на тему 'Нахождение решения волнового уравнения с помощью языка программирования MatLab'

Нахождение решения волнового уравнения с помощью языка программирования MatLab Текст научной статьи по специальности «Математика»

CC BY
1211
193
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
ЧИСЛЕННОЕ РЕШЕНИЕ / ЯВНАЯ СХЕМА / ЧИСЛО КУРАНТА / CONTROLLABLE IMPULSE SYSTEM / DEPENDENCE ON PARAMETERS / CONSTRAINTS BY CONTROL / A PRIORI BOUNDEDNESS / DIFFERENTIAL INCLUSION WITH IMPULSES

Аннотация научной статьи по математике, автор научной работы — Булгаков Александр Иванович, Малютина Е. В., Поносов А.

В работе находится численное решение волнового уравнения используя явную численную схему. Рассматривается пример стабильной и нестабильной явной численной схемы.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

SOLVING THE WAVE EQUATION WITH MATLAB

We find conditions of continuous dependence on parameters for the set of the phase trajectories of the controllable impulse delay system with constraints by control.

Текст научной работы на тему «Нахождение решения волнового уравнения с помощью языка программирования MatLab»

Поступила в редакцию 10 апреля 2011 г.

БЛАГОДАРНОСТИ: Работа поддержана Российским фондом фундаментальных исследований (проект № 10-01-96054-р-урал-а).

Bravyi E.I. On the solvability of the periodic boundary problem for linear functional differential equations. Collections of linear functional differential equations with positive operators are considered. If the operators act into the space of integrable functions, necessary and sufficient conditions for the unique solvability of the periodic problem are well known. We complement these conditions in the case when the operators act into the space of essentially bounded functions. The best constants in solvability conditions are found.

Key words: periodic boundary problem; functional differential equations; the best constants; positive operators; unique solvability.

Бравый Евгений Ильич, Пермский государственный технический университет, г. Пермь, Российская Федерация, кандидат физико-математических наук, доцент кафедры высшей математики, e-mail: bravyi@perm.ru.

УДК 519.633.6

SOLVING THE WAVE EQUATION WITH MAT1AB

© A.I. Bulgakov, E.V. Malyutina, A. Ponossov

Key words: numerical solution; explicit scheme; the number of Courant.

We study the numerical solution of the initial-boundary value problem for a wave equation.

We consider example of stable and unstable explicit scheme of the numerical solution.

We consider the following initial-boundary value problem for the wave equation:

utt = a2uxx + f (x,t) for xe (0,L), t e (0, to), (1)

u(x, 0) = p(x), ut(x, 0) = ф(х), (2)

u(0,t) = 0, u(L,t) = 0. (3)

The basic idea is to replace the derivatives involved in (l)-(3) by finite differences. We assume that (N + 1) is the number of the segmentation points in the x-direction; h = 1/N is the step

of grid (x-direction); xk = kh, k = 0, 1, ...,N; tj = jd, where j ^ 0, d is the time step.

Furthermore, the grid function v, with Vk,j= v(xk,tj), approximates u. Using known approximation, we can write the initial-boundary value problem in the following form:

d2d22 vk,j+1 = vk,j-1 + (vk-1,j + vk+1,j )+2(1 — ^vk,j + d2 fk,j, f°r k = 1,...N — 1,j ^ 1, (4)

From initial and boundary conditions we have:

vk,o = Vi, vk,i = vk,o + d^k , for k = 0, 1, ...,N,

vo,j = 0, vN,j = 0, for j ^ 0.

For the finite difference scheme (4) we will consider possible solutions of the form

vkj = Aj eikZ,

where i is the imaginary unit.

Therefore, from (4) we obtain

Using the equality

we have

A - 2 + 1/A 2 e-iZ — 2 + eiZ

d2 =a h2 •

e iZ — 2 + eiZ = 2 cost — 2 = —4sin2 Z,

2

A2 — A ( 2 — 4r2 sin2 2 ) +1 = 0,

where r = . The explicit scheme is stable if the discriminant of the equation is not positive

[1], i. e.

z\ 2 „2-2 Z

or

Thus

\a\d .

r = — (5)

guarantees that scheme (4) is stable. Here r is called the number of Courant. If the number of

Courant r = ^ 1 that the scheme is stable.

We can find a numerical solution by using the MatLab’s code. WTe could enter the meanings

for N, K, a, f (x,t), ^(x), y(x) and use the following code: h = L/N; d = T/K;

g = ((a * a) * (d * d))/(h * h) while g > 1

disp(’the scheme is not stable’)

KK d = T/K;

g = ((a * a) * (d * d))/(h * h) end

x = 0 : h : L;

u(:, 1) = v(x(k));

u(:, 2) = u(:, 1) + d * ^(x(k));

t = 0 : d : T;

for j = 3 : K + 1

u(1,j) = 0;

u(N + 1,j) =0;

end

j=2:K

k=2:N

u(k, j + 1) = —u(k, j — 1) + g * u(k — 1,j) + (2 — 2 * g) * u(k, j)+ g * u(k + 1, j) + d * d * f (x,t);

end

end

figure

mesh (x, t, u') ; title(’numerical method’); xlabel ('x') ; ylabel ('t') ;

Example. We consider the initial-boundary value problem for the wave equation:

utt = a2uxx + 4sin3x forx E (0,n), t E (0, to), (6)

u(x, 0) = 0, ut(x, 0) = 0, (7)

u(0,t) = 0, u(L,t) = 0. (8)

We can construct the graph of the exact solution (fig. 1) and the graph of the numerical

solution (fig. 2) in MatLab:

Fig. 1. The exact solution of the wave equation for (x,t) E ([0, n] x [0,1])

Fig. 2. The numerical solution of the wave equation for (x,t) Є ([0,^] x [0,1])

In this example we have the number of Courant r = = 0.101 ^ 1. So the explicit scheme

is stable.

If the number of Courant r > 1, then the explicit scheme is unstable.

Fig. 3. The numerical solution of the wave equation for (x,t) E ([0,n] x [0,1]) using the

unstable explicit scheme

REFERENCES

1. Kantor S. Fundamentals of numerical mathematics, 2010.

2. Tveito A., Winther R. Introduction in Partial Differential Equation, A Contemporary Approach, 1998.

3. Petrovskii I.G. Partial Differential Equation, 1967.

4. Solin P. Partial Differential Equation and the finite Element Method, 2005.

5. A.N. Tikhonov Equations of mathematical physics, 1977.

Поступила в редакцию 10 апреля 2011 г.

БЛАГОДАРНОСТИ: Работа выполнена при финансовой поддержке Российского фонда фундаментальных исследований (проекты № 09-01-97503, № 11-01-00645, № 11-01-00626), ФЦП «Научные и научно-педагогические кадры инновационной России на 2009-2013 годы».

Булгаков А.П., Малютина Е.В., Поносов А. Нахождение решения волнового уравнения с помощью языка программирования MatLab. В работе находится численное решение волнового уравнения используя явную численную схему. Рассматривается пример стабильной и нестабильной явной численной схемы.

Ключевые слова: численное решение; явная схема; число Куранта.

Bulgakov Aleksander, Tambov state university named after G.R. Derzhavin, Tambov, Russian Federation, professor, head of the chair of algebra and geometry, e-mail: aib@tsu.tmb.ru.

Malyutina Elena, Tambov state university named after G.R. Derzhavin, Tambov, Russian Federation, PhD-student of the chair of algebra and geometry, e-mail: zont85@mail.ru.

Ponossov Arkadii, Norwegian university of life sciences, Aas, Norway, full-professor, Department of mathematical sciences and technology, e-mail: arkadi@umb.no.

i Надоели баннеры? Вы всегда можете отключить рекламу.