{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Simple_runge_kutta_example

# Simple_runge_kutta_example - Simple Runge-Kutta solution of...

This preview shows pages 1–2. Sign up to view the full content.

Simple Runge-Kutta solution of an ODE J. M. Cimbala, September 2001 The equation to be solved is dy/dt = B - Ay, where in general A and B can be functions of time. The data are plotted on a separate sheet called "plot of y vs t". tstart = 0 deltat = 0.01 y(tstart) = 7.6 ti yi A(t) B(t) Di ta ya Da tb yb Db yc Dc yi+1 0 7.6 3.82 10 -19.03 0.01 7.5 -18.67 0.01 7.51 -18.68 7.41 -18.32 7.41 0.01 7.41 3.82 10 -18.32 0.02 7.32 -17.97 0.02 7.32 -17.98 7.23 -17.63 7.23 0.02 7.23 3.82 10 -17.63 0.03 7.15 -17.3 0.03 7.15 -17.3 7.06 -16.97 7.06 0.03 7.06 3.82 10 -16.97 0.04 6.98 -16.65 0.04 6.98 -16.65 6.89 -16.34 6.89 0.04 6.89 3.82 10 -16.34 0.05 6.81 -16.02 0.05 6.81 -16.03 6.73 -15.72 6.73 0.05 6.73 3.82 10 -15.72 0.06 6.66 -15.42 0.06 6.66 -15.43 6.58 -15.13 6.58 0.06 6.58 3.82 10 -15.13 0.07 6.5 -14.84 0.07 6.51 -14.85 6.43 -14.57 6.43 0.07 6.43 3.82 10 -14.57 0.08 6.36 -14.29 0.08 6.36 -14.29 6.29 -14.02 6.29 0.08 6.29 3.82 10 -14.02 0.09 6.22 -13.75 0.09 6.22 -13.76 6.15 -13.49 6.15 0.09 6.15 3.82 10 -13.5 0.1 6.08 -13.24 0.1 6.08 -13.24 6.02 -12.99 6.02 0.1 6.02 3.82 10 -12.99 0.11 5.95 -12.74 0.11 5.95 -12.75 5.89 -12.5 5.89 0.11 5.89 3.82 10 -12.5 0.12 5.83 -12.26 0.12 5.83 -12.27 5.77 -12.03 5.77 0.12 5.77 3.82 10 -12.03 0.13 5.71 -11.8 0.13 5.71 -11.81 5.65 -11.58 5.65 0.13 5.65 3.82 10 -11.58 0.14 5.59 -11.36 0.14 5.59 -11.37 5.54 -11.15 5.54 0.14 5.54 3.82 10 -11.15 0.15 5.48 -10.94 0.15 5.48 -10.94 5.43 -10.73 5.43 0.15 5.43 3.82 10 -10.73 0.16 5.37 -10.53 0.16 5.37 -10.53 5.32 -10.33 5.32 0.16 5.32 3.82 10 -10.33 0.17 5.27 -10.13 0.17 5.27 -10.14 5.22 -9.94 5.22 0.17 5.22 3.82 10 -9.94 0.18 5.17 -9.75 0.18 5.17 -9.76 5.12 -9.57 5.12 0.18 5.12 3.82 10 -9.57 0.19 5.07 -9.39 0.19 5.08 -9.39 5.03 -9.21 5.03 0.19 5.03 3.82 10 -9.21 0.2 4.98 -9.03 0.2 4.98 -9.04 4.94 -8.87 4.94 0.2 4.94 3.82 10 -8.87 0.21 4.89 -8.7 0.21 4.9 -8.7 4.85 -8.53 4.85 0.21 4.85 3.82 10 -8.53 0.22 4.81 -8.37 0.22 4.81 -8.37 4.77 -8.21 4.77 0.22 4.77 3.82 10 -8.21 0.23 4.73 -8.06 0.23 4.73 -8.06 4.69 -7.91 4.69 0.23 4.69 3.82 10 -7.91 0.24 4.65 -7.75 0.24 4.65 -7.76 4.61 -7.61 4.61 0.24 4.61 3.82 10 -7.61 0.25 4.57 -7.46 0.25 4.57 -7.47 4.54 -7.32 4.54 0.25 4.54 3.82 10 -7.32 0.26 4.5 -7.18 0.26 4.5 -7.19 4.46 -7.05 4.46 0.26 4.46 3.82 10 -7.05 0.27 4.43 -6.91 0.27 4.43 -6.92 4.39 -6.79 4.39 0.27 4.39 3.82 10 -6.79 0.28 4.36 -6.66 0.28 4.36 -6.66 4.33 -6.53 4.33 0.28 4.33 3.82 10 -6.53 0.29 4.29 -6.41 0.29 4.3 -6.41 4.26 -6.29 4.26 0.29 4.26 3.82 10 -6.29 0.3 4.23 -6.17

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}