Solving IVP w/ Finite Difference: Strange Oscillations

Click For Summary
SUMMARY

The forum discussion focuses on solving an Initial Value Problem (IVP) using the finite difference method in MATLAB, specifically with the 'odes15s' solver. The user experiences strange oscillations in the results when using a smaller x stepsize of 0.08, while a larger stepsize of 0.1 yields smoother results. The user also experimented with 'ode45' and 'ode23tb' solvers, which produced similar oscillations. The discussion highlights the importance of stability analysis, referencing the Von Neumann stability criteria for determining appropriate delta x and delta t values.

PREREQUISITES
  • Understanding of Initial Value Problems (IVP)
  • Familiarity with finite difference methods
  • Knowledge of MATLAB's 'odes15s', 'ode45', and 'ode23tb' solvers
  • Concept of Von Neumann stability analysis
NEXT STEPS
  • Study the Von Neumann stability analysis in detail
  • Explore the implications of stepsize selection in finite difference methods
  • Learn about alternative numerical methods for solving IVPs
  • Investigate the differences between explicit and implicit solvers in MATLAB
USEFUL FOR

Mathematicians, numerical analysts, and engineers working on differential equations, particularly those interested in stability issues and numerical methods for solving IVPs.

gstar2002
Messages
3
Reaction score
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

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K