|
116 | 116 | \[\begin{split}\mathbf{u}_n = \mathbf{u}(\mathbf{x}_n,t_n),\\ |
117 | 117 | \mathbf{x}_{n+1} = \mathbf{x}_n + \sigma\,\Delta t\,\mathbf{u}_n.\end{split}\]</div> |
118 | 118 | <p>This method incurs a global error of order <span class="math notranslate nohighlight">\(O(\Delta t)\)</span> and requires only one velocity evaluation per step.</p> |
119 | | -<p><strong>Second-Order Runge-Kutta (Heun’s Method)</strong></p> |
| 119 | +<p><strong>Runge-Kutta Method</strong></p> |
| 120 | +<p>In an explicit <span class="math notranslate nohighlight">\(s\)</span>-stage Runge–Kutta method for the initial-value problem:</p> |
| 121 | +<div class="math notranslate nohighlight"> |
| 122 | +\[y' = f(t,y), \quad y(t_n) = y_n\]</div> |
| 123 | +<p>one advances the solution by a step <span class="math notranslate nohighlight">\(h\)</span> as follows. First compute the intermediate slopes</p> |
| 124 | +<div class="math notranslate nohighlight"> |
| 125 | +\[k_i = f\Bigl(t_n + c_i\,h,\;y_n + h \sum_{j=1}^{i-1} a_{ij}\,k_j\Bigr), |
| 126 | +\quad i = 1,2,\dots,s\]</div> |
| 127 | +<p>and then form the new approximation by</p> |
| 128 | +<div class="math notranslate nohighlight"> |
| 129 | +\[y_{n+1} = y_n + h \sum_{i=1}^s b_i\,k_i.\]</div> |
| 130 | +<p><em>Second-Order Runge-Kutta (RK2, Heun’s)</em></p> |
120 | 131 | <p>Heun’s method attains second-order accuracy by combining predictor and corrector slopes:</p> |
121 | 132 | <div class="math notranslate nohighlight"> |
122 | 133 | \[\begin{split}k_1 = \sigma\,\mathbf{u}(\mathbf{x}_n,t_n),\\ |
123 | 134 | \mathbf{x}^* = \mathbf{x}_n + \Delta t\,k_1,\\ |
124 | 135 | k_2 = \sigma\,\mathbf{u}(\mathbf{x}^*,t_n + \Delta t),\\ |
125 | 136 | \mathbf{x}_{n+1} = \mathbf{x}_n + \tfrac{\Delta t}{2}\,(k_1 + k_2).\end{split}\]</div> |
126 | 137 | <p>This scheme yields a global error of order <span class="math notranslate nohighlight">\(O(\Delta t^2)\)</span> with two velocity evaluations per step.</p> |
127 | | -<p><strong>Classical Fourth-Order Runge-Kutta (RK4)</strong></p> |
| 138 | +<p><em>Classical Fourth-Order Runge-Kutta (RK4)</em></p> |
128 | 139 | <p>The classical RK4 method achieves fourth-order accuracy via four slope evaluations at intermediate points:</p> |
129 | 140 | <div class="math notranslate nohighlight"> |
130 | 141 | \[\begin{split}k_1 = \mathbf{u}(\mathbf{x}_n,t_n),\\ |
|
133 | 144 | k_4 = \mathbf{u}(\mathbf{x}_n + \Delta t\,k_3,\;t_n + \Delta t),\\ |
134 | 145 | \mathbf{x}_{n+1} = \mathbf{x}_n + \tfrac{\Delta t}{6}\,(k_1 + 2k_2 + 2k_3 + k_4).\end{split}\]</div> |
135 | 146 | <p>This yields a global error of order <span class="math notranslate nohighlight">\(O(\Delta t^4)\)</span> with four velocity evaluations per step.</p> |
136 | | -<p><strong>Sixth-Order Runge-Kutta (RK6)</strong></p> |
137 | | -<p>The seven-stage scheme uses non-uniform weights to attain global <span class="math notranslate nohighlight">\(O(\Delta t^6)\)</span> accuracy. This method originates from <a class="reference internal" href="9_references.html#butcher" id="id1"><span>[Butcher]</span></a>, as well as the coefficients (Butcher table) listed in the basically-tailest table of the reference.</p> |
138 | | -<div class="math notranslate nohighlight"> |
139 | | -\[\begin{split}k_1 = \mathbf{u}(\mathbf{x}_n,t_n),\\ |
140 | | -k_2 = \mathbf{u}\!\bigl(\mathbf{x}_n + \tfrac{\Delta t}{3}k_1,\;t_n + \tfrac{\Delta t}{3}\bigr),\\ |
141 | | -k_3 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{6}k_1 + \tfrac{1}{6}k_2),\;t_n + \tfrac{\Delta t}{3}\bigr),\\ |
142 | | -k_4 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{8}k_1 + \tfrac{3}{8}k_3),\;t_n + \tfrac{\Delta t}{2}\bigr),\\ |
143 | | -k_5 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(\tfrac{1}{2}k_1 - \tfrac{3}{2}k_3 + 2k_4),\;t_n + \tfrac{2\Delta t}{3}\bigr),\\ |
144 | | -k_6 = \mathbf{u}\!\bigl(\mathbf{x}_n + \Delta t(-\tfrac{3}{2}k_1 + 2k_2 - \tfrac{1}{2}k_3 + k_4),\;t_n + \Delta t\bigr),\\ |
145 | | -\mathbf{x}_{n+1} = \mathbf{x}_n + \Delta t\bigl(\tfrac{1}{20}k_1 + \tfrac{1}{4}k_4 + \tfrac{1}{5}k_5 + \tfrac{1}{2}k_6\bigr).\end{split}\]</div> |
146 | | -<p>This scheme incurs a global error of order with six velocity evaluations.</p> |
| 147 | +<p><em>Sixth-Order Runge-Kutta (RK6)</em></p> |
| 148 | +<p>The seven-stage scheme uses non-uniform weights to attain global <span class="math notranslate nohighlight">\(O(\Delta t^6)\)</span> accuracy. This method originates from <a class="reference internal" href="9_references.html#butcher" id="id1"><span>[Butcher]</span></a>. |
| 149 | +As for the coefficients for <code class="docutils literal notranslate"><span class="pre">RK6</span></code> are more complex to write into equations, the Butcher table is given as follows.</p> |
147 | 150 | <table class="docutils align-default"> |
| 151 | +<thead> |
| 152 | +<tr class="row-odd"><th class="head"><p><span class="math notranslate nohighlight">\(c_i\)</span></p></th> |
| 153 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i1}\)</span></p></th> |
| 154 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i2}\)</span></p></th> |
| 155 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i3}\)</span></p></th> |
| 156 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i4}\)</span></p></th> |
| 157 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i5}\)</span></p></th> |
| 158 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i6}\)</span></p></th> |
| 159 | +<th class="head"><p><span class="math notranslate nohighlight">\(a_{i7}\)</span></p></th> |
| 160 | +</tr> |
| 161 | +</thead> |
148 | 162 | <tbody> |
149 | | -<tr class="row-odd"><td></td> |
150 | | -<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 163 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 164 | +<td></td> |
151 | 165 | <td></td> |
152 | 166 | <td></td> |
153 | 167 | <td></td> |
154 | 168 | <td></td> |
155 | 169 | <td></td> |
156 | 170 | <td></td> |
157 | 171 | </tr> |
158 | | -<tr class="row-even"><td></td> |
159 | | -<td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 172 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
160 | 173 | <td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
161 | 174 | <td></td> |
162 | 175 | <td></td> |
163 | 176 | <td></td> |
164 | 177 | <td></td> |
165 | 178 | <td></td> |
| 179 | +<td></td> |
166 | 180 | </tr> |
167 | | -<tr class="row-odd"><td></td> |
168 | | -<td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
| 181 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
169 | 182 | <td><p><span class="math notranslate nohighlight">\(\mp\sqrt{5}/10\)</span></p></td> |
170 | 183 | <td><p><span class="math notranslate nohighlight">\((5\pm2\sqrt{5})/10\)</span></p></td> |
171 | 184 | <td></td> |
172 | 185 | <td></td> |
173 | 186 | <td></td> |
174 | 187 | <td></td> |
| 188 | +<td></td> |
175 | 189 | </tr> |
176 | | -<tr class="row-even"><td></td> |
177 | | -<td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 190 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
178 | 191 | <td><p><span class="math notranslate nohighlight">\((-15\pm7\sqrt{5})/20\)</span></p></td> |
179 | 192 | <td><p><span class="math notranslate nohighlight">\((-1\pm\sqrt{5})/4\)</span></p></td> |
180 | 193 | <td><p><span class="math notranslate nohighlight">\((15\mp7\sqrt{5})/10\)</span></p></td> |
181 | 194 | <td></td> |
182 | 195 | <td></td> |
183 | 196 | <td></td> |
| 197 | +<td></td> |
184 | 198 | </tr> |
185 | | -<tr class="row-odd"><td></td> |
186 | | -<td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
| 199 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
187 | 200 | <td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/60\)</span></p></td> |
188 | 201 | <td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
189 | 202 | <td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
190 | 203 | <td><p><span class="math notranslate nohighlight">\((15\pm7\sqrt{5})/60\)</span></p></td> |
191 | 204 | <td></td> |
192 | 205 | <td></td> |
| 206 | +<td></td> |
193 | 207 | </tr> |
194 | | -<tr class="row-even"><td></td> |
195 | | -<td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 208 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
196 | 209 | <td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/60\)</span></p></td> |
197 | 210 | <td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
198 | 211 | <td><p><span class="math notranslate nohighlight">\((9\mp5\sqrt{5})/12\)</span></p></td> |
199 | 212 | <td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
200 | 213 | <td><p><span class="math notranslate nohighlight">\((-5\pm3\sqrt{5})/10\)</span></p></td> |
201 | 214 | <td></td> |
| 215 | +<td></td> |
202 | 216 | </tr> |
203 | | -<tr class="row-odd"><td></td> |
204 | | -<td><p><span class="math notranslate nohighlight">\(1\)</span></p></td> |
| 217 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\(1\)</span></p></td> |
205 | 218 | <td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
206 | 219 | <td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
207 | 220 | <td><p><span class="math notranslate nohighlight">\((-55\pm25\sqrt{5})/12\)</span></p></td> |
208 | 221 | <td><p><span class="math notranslate nohighlight">\((-25\mp7\sqrt{5})/12\)</span></p></td> |
209 | 222 | <td><p><span class="math notranslate nohighlight">\(5\mp2\sqrt{5}\)</span></p></td> |
210 | 223 | <td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/2\)</span></p></td> |
| 224 | +<td></td> |
211 | 225 | </tr> |
212 | | -<tr class="row-even"><td></td> |
| 226 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\(b_i\)</span></p></td> |
213 | 227 | <td><p><span class="math notranslate nohighlight">\(1/12\)</span></p></td> |
214 | 228 | <td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
215 | 229 | <td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
|
0 commit comments