Solve 1D Wave Equation (Hyperbolic PDE)

조회 수: 14 (최근 30일)
Tejas Adsul
Tejas Adsul 2018년 10월 19일
댓글: Torsten 2018년 10월 22일
I have the following equation:
where f = 2q, q is a function of both x and t. I have the initial condition:
where sigma = 1/8, x lies in [-1,1]. There is also a boundary condition that q(-1) = q(+1).
How do I solve this (get the function q(x,t), or at least q(x) at some particular time t) in Matlab? Can it be done using ODE45? Or do I have to use some PDE solver? Thank you!
  댓글 수: 2
Bruno Luong
Bruno Luong 2018년 10월 22일
편집: Bruno Luong 2018년 10월 22일
In my book, this equation is a transport equation or convection. It's not an hyperbolic PDE (or wave equation) which is a second order equation.
Torsten
Torsten 2018년 10월 22일
It's called hyperbolic conservation equation:
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

답변 (2개)

Torsten
Torsten 2018년 10월 22일
편집: Torsten 2018년 10월 22일
Solve the system of ordinary differential equations
df(i)/dt = -2*(f(i)-f(i-1))/(x(i)-x(i-1)) (1 <= i <= n)
f(i) @ t=0 = exp(-x(i)^2/(2*sigma^2)) (?)
with
f(0) = f(n-1) and x(i) = -1+2/(n-1)*(i-1)
using "ode15s".
Best wishes
Torsten.

Bruno Luong
Bruno Luong 2018년 10월 22일
편집: Bruno Luong 2018년 10월 22일
In my book, this equation is a transport equation or convection. It's not an hyperbolic PDE (or wave equation) which is a second order equation.
One can solve it by characteristics equation, meaning look for a curve x(t) such that dx/dt = 2.
x(t) = x(t=0) + 2*t.
Now if you define
p(t) = q(t,x(t))
then dp/dt = dq/dt + dq/dx*dx/dt = dq/dt + 2 * dq/dx = dq/dt + df/dx = 0.
Meaning p(t) is constant on the characteristic curve x(t).
q(t,x) = p(t,x0+2*t) = p(0,x0) = q(0,x-2*t) = exp((x-2*t)^2/(2*sigma))
provide (x-2*t) is in (-1,1), the place where the caracteristics lines cut the interval t=0, x in (-1,1).
The rest of the domain you can fill with anything that respects q(1)=q(-1), it doesn't matter.
  댓글 수: 1
Torsten
Torsten 2018년 10월 22일
I think you'll have to periodically continue the function given at t=0 and advect this function with velocity +2. So if the periodically continued function is called q_per(x) (now defined on all of IR), the solution of the PDE is q(x,t) = q_per(x-2*t).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by