|
134 | 134 | \mathbf{x}_{n+1} = \mathbf{x}_n + \tfrac{\Delta t}{6}\,(k_1 + 2k_2 + 2k_3 + k_4).\end{split}\]</div> |
135 | 135 | <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 | 136 | <p><strong>Sixth-Order Runge-Kutta (RK6)</strong></p> |
137 | | -<p>The six-stage scheme uses non-uniform weights to attain sixth-order accuracy:</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</p> |
138 | 138 | <div class="math notranslate nohighlight"> |
139 | 139 | \[\begin{split}k_1 = \mathbf{u}(\mathbf{x}_n,t_n),\\ |
140 | 140 | k_2 = \mathbf{u}\!\bigl(\mathbf{x}_n + \tfrac{\Delta t}{3}k_1,\;t_n + \tfrac{\Delta t}{3}\bigr),\\ |
|
143 | 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 | 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 | 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 <span class="math notranslate nohighlight">\(O(\Delta t^6)\)</span> with six velocity evaluations.</p> |
| 146 | +<p>This scheme incurs a global error of order with six velocity evaluations.</p> |
147 | 147 | <table class="docutils align-default"> |
148 | | -<thead> |
149 | | -<tr class="row-odd"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">output_dir</span></code></p></th> |
150 | | -<th class="head"><p>Path to directory for saving results</p></th> |
151 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre"><string></span></code></p></th> |
152 | | -<th class="head"></th> |
153 | | -</tr> |
154 | | -<tr class="row-even"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">auto_wall</span></code></p></th> |
155 | | -<th class="head"><p>Flag for automatic wall detection</p></th> |
156 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">0</span></code></p></th> |
157 | | -<th class="head"><p>Manually indicate computation bounds.</p></th> |
158 | | -</tr> |
159 | | -<tr class="row-odd"><th class="head"></th> |
160 | | -<th class="head"></th> |
161 | | -<th class="head"><p>(<code class="docutils literal notranslate"><span class="pre">1</span></code>)</p></th> |
162 | | -<th class="head"><p>Auto detect bounds from input mesh.</p></th> |
163 | | -</tr> |
164 | | -<tr class="row-even"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">wall_xrange</span></code></p></th> |
165 | | -<th class="head"><p>X-direction wall bounds [xmin, xmax]</p></th> |
166 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">[<float>,</span> <span class="pre"><float>]</span></code></p></th> |
167 | | -<th class="head"><p>Dimensionalized coordinates bounds.</p></th> |
168 | | -</tr> |
169 | | -<tr class="row-odd"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">wall_yrange</span></code></p></th> |
170 | | -<th class="head"><p>Y-direction wall bounds [ymin, ymax]</p></th> |
171 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">[<float>,</span> <span class="pre"><float>]</span></code></p></th> |
172 | | -<th class="head"></th> |
| 148 | +<tbody> |
| 149 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 150 | +<td></td> |
| 151 | +<td></td> |
| 152 | +<td></td> |
| 153 | +<td></td> |
| 154 | +<td></td> |
| 155 | +<td></td> |
173 | 156 | </tr> |
174 | | -<tr class="row-even"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">wall_zrange</span></code></p></th> |
175 | | -<th class="head"><p>Z-direction wall bounds [zmin, zmax]</p></th> |
176 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">[<float>,</span> <span class="pre"><float>]</span></code></p></th> |
177 | | -<th class="head"></th> |
| 157 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 158 | +<td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 159 | +<td></td> |
| 160 | +<td></td> |
| 161 | +<td></td> |
| 162 | +<td></td> |
| 163 | +<td></td> |
178 | 164 | </tr> |
179 | | -<tr class="row-odd"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">x</span></code></p></th> |
180 | | -<th class="head"><p>Number of Lagrangian seed points in X direction</p></th> |
181 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre"><int></span></code></p></th> |
182 | | -<th class="head"></th> |
| 165 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
| 166 | +<td><p><span class="math notranslate nohighlight">\(\mp\sqrt{5}/10\)</span></p></td> |
| 167 | +<td><p><span class="math notranslate nohighlight">\((5\pm2\sqrt{5})/10\)</span></p></td> |
| 168 | +<td></td> |
| 169 | +<td></td> |
| 170 | +<td></td> |
| 171 | +<td></td> |
183 | 172 | </tr> |
184 | | -<tr class="row-even"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">y</span></code></p></th> |
185 | | -<th class="head"><p>Number of Lagrangian seed points in Y direction</p></th> |
186 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre"><int></span></code></p></th> |
187 | | -<th class="head"></th> |
| 173 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 174 | +<td><p><span class="math notranslate nohighlight">\((-15\pm7\sqrt{5})/20\)</span></p></td> |
| 175 | +<td><p><span class="math notranslate nohighlight">\((-1\pm\sqrt{5})/4\)</span></p></td> |
| 176 | +<td><p><span class="math notranslate nohighlight">\((15\mp7\sqrt{5})/10\)</span></p></td> |
| 177 | +<td></td> |
| 178 | +<td></td> |
| 179 | +<td></td> |
188 | 180 | </tr> |
189 | | -<tr class="row-odd"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">z</span></code></p></th> |
190 | | -<th class="head"><p>Number of Lagrangian seed points in Z direction</p></th> |
191 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre"><int></span></code></p></th> |
192 | | -<th class="head"></th> |
| 181 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/10\)</span></p></td> |
| 182 | +<td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/60\)</span></p></td> |
| 183 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 184 | +<td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
| 185 | +<td><p><span class="math notranslate nohighlight">\((15\pm7\sqrt{5})/60\)</span></p></td> |
| 186 | +<td></td> |
| 187 | +<td></td> |
193 | 188 | </tr> |
194 | | -<tr class="row-even"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">T_range</span></code></p></th> |
195 | | -<th class="head"><p>Time range [<code class="docutils literal notranslate"><span class="pre">T_start</span></code>, <code class="docutils literal notranslate"><span class="pre">T_end</span></code>] in frames</p></th> |
196 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">[<float>,</span> <span class="pre"><float>]</span></code></p></th> |
197 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre">T_end</span></code> no larger than <code class="docutils literal notranslate"><span class="pre">N_frames</span></code>.</p></th> |
| 189 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\((5\mp\sqrt{5})/10\)</span></p></td> |
| 190 | +<td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/60\)</span></p></td> |
| 191 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 192 | +<td><p><span class="math notranslate nohighlight">\((9\mp5\sqrt{5})/12\)</span></p></td> |
| 193 | +<td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
| 194 | +<td><p><span class="math notranslate nohighlight">\((-5\pm3\sqrt{5})/10\)</span></p></td> |
| 195 | +<td></td> |
198 | 196 | </tr> |
199 | | -<tr class="row-odd"><th class="head"><p><code class="docutils literal notranslate"><span class="pre">dt</span></code></p></th> |
200 | | -<th class="head"><p>Time step for particle advection in frames</p></th> |
201 | | -<th class="head"><p><code class="docutils literal notranslate"><span class="pre"><float></span></code></p></th> |
202 | | -<th class="head"></th> |
| 197 | +<tr class="row-odd"><td><p><span class="math notranslate nohighlight">\(1\)</span></p></td> |
| 198 | +<td><p><span class="math notranslate nohighlight">\(1/6\)</span></p></td> |
| 199 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 200 | +<td><p><span class="math notranslate nohighlight">\((-55\pm25\sqrt{5})/12\)</span></p></td> |
| 201 | +<td><p><span class="math notranslate nohighlight">\((-25\mp7\sqrt{5})/12\)</span></p></td> |
| 202 | +<td><p><span class="math notranslate nohighlight">\(5\mp2\sqrt{5}\)</span></p></td> |
| 203 | +<td><p><span class="math notranslate nohighlight">\((5\pm\sqrt{5})/2\)</span></p></td> |
203 | 204 | </tr> |
204 | | -</thead> |
205 | | -<tbody> |
206 | | -<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">physical_dt</span></code></p></td> |
207 | | -<td><p>Physical time step between two input frames</p></td> |
208 | | -<td><p><code class="docutils literal notranslate"><span class="pre"><float></span></code></p></td> |
209 | | -<td><p>Perform physical advection.</p></td> |
| 205 | +<tr class="row-even"><td><p><span class="math notranslate nohighlight">\(1/12\)</span></p></td> |
| 206 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 207 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 208 | +<td><p><span class="math notranslate nohighlight">\(0\)</span></p></td> |
| 209 | +<td><p><span class="math notranslate nohighlight">\(5/12\)</span></p></td> |
| 210 | +<td><p><span class="math notranslate nohighlight">\(5/12\)</span></p></td> |
| 211 | +<td><p><span class="math notranslate nohighlight">\(1/12\)</span></p></td> |
210 | 212 | </tr> |
211 | 213 | </tbody> |
212 | 214 | </table> |
|
0 commit comments