Runge-Kutta Method for SDOF Systems

In this method the approximate formula used for obtaining x_i+1 from x_i is made to coincide with Taylor’s series expansion of x and x_i+1 up to terms of order (∆t)^n. The Taylor’s series expansion of x(t) at t+∆t is given by:

$$x\left( t+\Delta t \right)=x\left( t \right)+\dot{x}\left( t \right)\Delta t+\ddot{x}\left( t \right)\frac{{{\left( \Delta t \right)}^{2}}}{2!}+\left( t \right)\frac{{{\left( \Delta t \right)}^{3}}}{3!}+\left( t \right)\frac{{{\left( \Delta t \right)}^{4}}}{4!}+....$$


The previous equation requires higher-order derivatives while Runge-Kutta requires only first derivative and not higher than that. In order to solve the equation

$$m\ddot{x}+c\dot{x}+kx=F$$


we need to reduce it to two first-order equations. But before we start to implement R-K method let’s rearrange previous second-order differential equation:

$$\begin{align} & m\ddot{x}=F-c\dot{x}-kx \\ & \ddot{x}=\frac{1}{m}\left[ F-c\dot{x}-kx \right]=f\left( x,\dot{x},t \right) \\ \end{align}$$


Now we can define

$$\begin{align} & {{x}_{1}}=x \\ & {{x}_{2}}=\dot{x} \\ \end{align}$$


and then we can write previously rearranged second order differential equation in the following form. 

$$\begin{align} & {{{\dot{x}}}_{1}}={{x}_{2}} \\ & {{{\dot{x}}}_{2}}=f\left( {{x}_{1}},{{x}_{2}},t \right) \\ \end{align}$$



The following recurrence formula is used to find values of X(t) at different grid points t_i according to the fourth order Runge-Kutta method. 
$${{\vec{X}}_{i+1}}={{\vec{X}}_{i}}+\frac{1}{6}\left[ {{{\vec{K}}}_{1}}+2{{{\vec{K}}}_{2}}+2{{{\vec{K}}}_{3}}+{{{\vec{K}}}_{4}} \right]$$


Where:

$$\begin{align} & {{{\vec{K}}}_{1}}=h\vec{F}({{{\vec{X}}}_{i}},{{t}_{i}}) \\ & {{{\vec{K}}}_{2}}=h\vec{F}({{{\vec{X}}}_{i}}+\frac{1}{2}{{{\vec{K}}}_{1}},{{t}_{i}}+\frac{1}{2}h) \\ & {{{\vec{K}}}_{3}}=h\vec{F}({{{\vec{X}}}_{i}}+\frac{1}{2}{{{\vec{K}}}_{2}},{{t}_{i}}+\frac{1}{2}h) \\ & {{{\vec{K}}}_{4}}=h\vec{F}({{{\vec{X}}}_{i}}+{{{\vec{K}}}_{3}},{{t}_{i+3}}) \\ \end{align}$$

Nema komentara:

Objavi komentar