The idea of the finite difference method or shortly
FDM is to use approximations to derivatives. By applying FDM governing
differential equation of motion is associated boundary conditions. There are
three different types of formulas in FDM, and these are:
- Forward difference formulas,
- Backward difference formulas and
- Central difference formulas
These
formulas are used to derive finite difference equations and the most accurate
one are central difference formulas. In FDM we replace the solution domain
(over which the solution of the given differential equation is required) with a
finite difference number of points, referred to as mesh or grid points, and
seek to determine the values of the desired solution at these points. The grid
points are usually considered to be equally spaced along each of the independent
coordinates.
First
thing is to apply Taylor’s series expansion, x_i+1 and x_i-1 can be expressed
about grid point i as:
$${{x}_{i-1}}={{x}_{i}}-h{{\dot{x}}_{i}}+\frac{{{h}^{2}}}{2}{{\ddot{x}}_{i}}-\frac{{{h}^{3}}}{6}{{}_{i}}+...$$
Where:
x_i is x at time t = t_i and h = t_i+1 –
t_i which is equal to ∆t. By taking first two terms in previous equations and subtracting
them we get:
$$\begin{align}
& {{x}_{i+1}}={{x}_{i}}+h{{{\dot{x}}}_{i}}\Rightarrow {{x}_{i}}={{x}_{i+1}}-h{{{\dot{x}}}_{i}} \\
& {{x}_{i-1}}={{x}_{i}}-h{{{\dot{x}}}_{i}}\Rightarrow {{x}_{i-1}}={{x}_{i+1}}-h{{{\dot{x}}}_{i}}-h{{{\dot{x}}}_{i}} \\
& {{x}_{i-1}}={{x}_{i+1}}-2h{{{\dot{x}}}_{i}} \\
& 2h{{{\dot{x}}}_{i}}={{x}_{i+1}}-{{x}_{i-1}} \\
& {{{\dot{x}}}_{i}}=\frac{1}{2h}\left( {{x}_{i+1}}-{{x}_{i-1}} \right) \\
\end{align}$$
By
taking terms up to the second derivative and adding them together we get:
Nema komentara:
Objavi komentar