Solving IVP w/ Finite Difference: Strange Oscillations

In summary, the speaker is encountering a strange oscillation when using the 'finite difference' method to solve an initial value problem (IVP). They are using periodical boundary conditions and 4th degree center approximations for the differential operators. They wonder if using a smaller x stepsize or a forward approximation would help. They mention using MATLAB's odes15s and trying other methods like ode45 and ode23tb, but getting the same result. They also mention that using a larger x stepsize results in a smooth result, while a smaller stepsize leads to the strange oscillation. They speculate that this may be due to the stability of the method and reference the Von Neumann stability analysis.
  • #1
gstar2002
3
0
Hallo, I tried to use 'finite difference' method to solve a Initial Value Problem(IVP). For the two boundaries I used periodical condtion and for the differential operators I used 4th degree center approximations. But as result, I got this thing. Where comes this strange oscillation What do you think could be the problem. Should I use a smaller x stepsize? Will use a forward approximation help? Thanks.
Actually I am using matlab's odes15s.

update:
The strange thing is that, if I use a biger x stepsize, say 0.1, i will get a smooth result. With smaller stepsize from 0.08, I will get the result showed in the picture.
I tried ode45, which is based on an explicit Runge-Kutta (4,5) formula, the Dormand-Prince pair and ode23tb, which is an implementation of TR-BDF2. I got the same result.

Thanks.
96eXy.png



\begin{aligned}
\dot{q} & = -\frac{\partial (6*q^2/5*h)}{\partial x}-\frac{3*q}{h^2}+h*h'''-(1+10*cos(pi*t))*h*h'\\
\end{aligned}

\begin{aligned}
\dot{h} & = -\frac{\partial q}{\partial x}
\end{aligned}

\begin{aligned}
h(t,0) = h(t,10),q(t,0) = q(t,10)
\end{aligned}


h(0,x), q(0,x) are known.
Thanks.
 
Physics news on Phys.org
  • #2

1. What is an initial value problem (IVP)?

An initial value problem is a mathematical problem that involves finding the solution to a differential equation given initial conditions. The initial conditions usually involve the value of the dependent variable and its derivatives at a specific point in the domain.

2. What is finite difference method?

The finite difference method is a numerical method for solving differential equations by approximating the derivatives of the function at discrete points in the domain. The function is then represented as a system of linear equations, which can be solved using various algorithms.

3. Why do strange oscillations occur when solving IVP with finite difference?

Strange oscillations occur when solving IVP with finite difference due to the nature of the method itself. The finite difference method involves approximating the derivative of the function at discrete points, which can introduce errors that can accumulate and cause oscillations in the solution.

4. How can we reduce the occurrence of strange oscillations when solving IVP with finite difference?

There are several techniques that can be used to reduce the occurrence of strange oscillations when solving IVP with finite difference. These include using higher-order difference schemes, reducing the size of the time or spatial step, and using smoothing techniques such as artificial viscosity or filtering.

5. Are there any other methods for solving IVP besides finite difference?

Yes, there are several other methods for solving IVP, such as the finite element method, the finite volume method, and the spectral method. Each method has its advantages and disadvantages, and the choice of method depends on the specific problem being solved.

Similar threads

Replies
4
Views
1K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
1
Views
733
Replies
4
Views
1K
  • Differential Equations
Replies
6
Views
2K
Replies
5
Views
1K
Replies
3
Views
203
  • Engineering and Comp Sci Homework Help
Replies
2
Views
804
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
3
Views
2K
Back
Top