You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ad2538
Browse filesBrowse the repository at this point in the historyBrowse files
<li><b>Add the module to <spanclass="tt">docs/module_categories.json</span></b> so it appears in this page</li>
434
434
</ol>
435
435
<p>Follow the pattern of existing modules like <spanclass="tt">m_body_forces</span> (simple) or <spanclass="tt">m_viscous</span> (more involved) as a template.</p>
<pclass="startli">Moving-IB analytic expressions use the same Python syntax and error-reporting as IC patch expressions (see the "Analytical Definition of Primitive Variables" section above).</p>
533
533
</li>
534
534
<li><spanclass="tt">kin_model = 1</span> prescribes hinged flapping kinematics at run time (no analytic expressions, so the binary is shared across parameter values): roll \(\phi\) about the lab \(x\) axis through <spanclass="tt">kin_hinge</span> and pitch \(\theta\) about the body spanwise ( \(y\)) axis through the hinge, composed as \(R = R_x(\phi) R_y(\theta)\). With \(\tau = t - t_0\) and amplitude envelope \(A(\tau)\) (0 before onset, raised cosine over <spanclass="tt">kin_ramp</span>, then 1): \(\phi = A \phi_0 \sin(2\pi f \tau)\), \(\theta = \theta_m + A \theta_0 \sin(2\pi f \tau + \psi)\). The centroid follows \(x_c = x_h + R\,\mathbf{r}_\mathrm{off}\) and the ghost-cell velocities use the lab-frame angular velocity \(\dot\phi \mathbf{e}_x + \dot\theta R_x(\phi)\mathbf{e}_y\). Set the initial <spanclass="tt">x[y,z]_centroid</span> and <spanclass="tt">angles</span> consistently with \(t = 0\) so pre-process marks the body in the right place.</li>
535
-
<li><spanclass="tt">kin_model = 2</span> is the smoothed linear pitch-ramp-and-hold of the AIAA low-Reynolds-number canonical cases (Eldredge et al. 2009, Ol et al. 2010) about the hinge, with no roll: \(\theta(t) = \theta_m + \frac{\theta_0}{2}\left[1 + \frac{1}{a t_p}\log\frac{\cosh(a\tau)}{\cosh(a(\tau - t_p))}\right]\), \(\tau = t - t_0\), \(t_p = \theta_0/\Omega\), so the angle rises from <spanclass="tt">kin_theta_mean</span> by <spanclass="tt">kin_theta0</span> at nominal rate <spanclass="tt">kin_pitch_rate</span> starting at <spanclass="tt">kin_t0</span>, smoothed by <spanclass="tt">kin_smooth</span>. The same hinge, offset and centroid conventions as <spanclass="tt">kin_model = 1</span> apply. Available variables: <spanclass="tt">x</span> (<spanclass="tt">x_cc(i)</span>), <spanclass="tt">y</span> (<spanclass="tt">y_cc(j)</span>), <spanclass="tt">z</span> (<spanclass="tt">z_cc(k)</span>), <spanclass="tt">t</span> (current simulation time), and <spanclass="tt">r</span> (the IB patch radius). The same intrinsic functions and <spanclass="tt">pi</span> constant apply; bare <spanclass="tt">e</span> is not available.</li>
535
+
<li><spanclass="tt">kin_model = 2</span> is the smoothed linear pitch-ramp-and-hold of the AIAA low-Reynolds-number canonical cases (Eldredge et al. 2009, Ol et al. 2010) about the hinge, with no roll: \(\theta(t) = \theta_m + \frac{\theta_0}{2}\left[1 + \frac{1}{a t_p}\log\frac{\cosh(a\tau)}{\cosh(a(\tau - t_p))}\right]\), \(\tau = t - t_0\), \(t_p = \theta_0/\Omega\), so the angle rises from <spanclass="tt">kin_theta_mean</span> by <spanclass="tt">kin_theta0</span> at nominal rate <spanclass="tt">kin_pitch_rate</span> starting at <spanclass="tt">kin_t0</span>, smoothed by <spanclass="tt">kin_smooth</span>. The same hinge, offset and centroid conventions as <spanclass="tt">kin_model = 1</span> apply.</li>
536
+
<li>Airfoils and STL models (<spanclass="tt">geometry</span> 4, 5, 11, 12) can be driven by <spanclass="tt">kin_model</span> too. For these the solver moves the working centroid to the centre of mass of the marked cells and keeps the difference as an internal offset \(\mathbf{d}\); <spanclass="tt">kin_offset</span> still refers to the centroid the case file names, and the kinematics rotate <spanclass="tt">kin_offset</span> \(- \mathbf{d}\) about the hinge. Name a centroid that lies inside the body: the rank that owns a patch is chosen by its centroid, so an STL placed with <spanclass="tt">model_translate</span> while its centroid stays at the origin is handed to ranks that do not hold it. Available variables: <spanclass="tt">x</span> (<spanclass="tt">x_cc(i)</span>), <spanclass="tt">y</span> (<spanclass="tt">y_cc(j)</span>), <spanclass="tt">z</span> (<spanclass="tt">z_cc(k)</span>), <spanclass="tt">t</span> (current simulation time), and <spanclass="tt">r</span> (the IB patch radius). The same intrinsic functions and <spanclass="tt">pi</span> constant apply; bare <spanclass="tt">e</span> is not available.</li>
536
537
<li><spanclass="tt">coefficient_of_restitution</span> is a number from 0 (exclusive) to 1 (inclusive) describing how elastic IB collisions are. 0 is for perfectly inelastic collisions while 1 is for perfectly elastic collisions.</li>
537
538
<li><spanclass="tt">collision_model</span> is an integer to select the collision model being used for IB collisions. Using 0 disables collisions and collision checking. 1 enables the soft-sphere collision model, where all IBs must be circles or sphere and those IBs can collide with each other as well as walls.</li>
538
539
<li><spanclass="tt">collision_time</span> is approximately the amount of simulation time used to resolve collisions. This is handled by modifying the spring constant used to apply collision forces.</li>
<p>💡 <b>Tip:</b> If you encounter a validation error, check the relevant section above or review <ahref="https://github.com/MFlowCode/MFC/blob/master/toolchain/mfc/case_validator.py"><spanclass="tt">case_validator.py</span></a> for complete validation logic.</p>
<tdclass="markdownTableBodyNone"><spanclass="tt">--no-examples</span></td><tdclass="markdownTableBodyNone">Do not test example cases. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
400
400
<trclass="markdownTableRowOdd">
401
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--case-optimization</span></td><tdclass="markdownTableBodyNone">(GPU Optimization) Compile MFC targets with some case parameters hard-coded. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
401
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--no-chemistry</span></td><tdclass="markdownTableBodyNone">Do not test cases that use chemistry (chemistry = T). </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
402
402
<trclass="markdownTableRowEven">
403
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--dry-run</span></td><tdclass="markdownTableBodyNone">Build and generate case files but do not run tests. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
403
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--case-optimization</span></td><tdclass="markdownTableBodyNone">(GPU Optimization) Compile MFC targets with some case parameters hard-coded. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
404
404
<trclass="markdownTableRowOdd">
405
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--shard</span></td><tdclass="markdownTableBodyNone">Run only a subset of tests (e.g., '1/2' for first half, '2/2' for second half). </td><tdclass="markdownTableBodyNone">-</td></tr>
405
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--dry-run</span></td><tdclass="markdownTableBodyNone">Build and generate case files but do not run tests. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
406
406
<trclass="markdownTableRowEven">
407
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--build-coverage-map</span></td><tdclass="markdownTableBodyNone">Build the gcov coverage map (requires a prior –gcov build). Master-side only. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
407
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--shard</span></td><tdclass="markdownTableBodyNone">Run only a subset of tests (e.g., '1/2' for first half, '2/2' for second half). </td><tdclass="markdownTableBodyNone">-</td></tr>
408
408
<trclass="markdownTableRowOdd">
409
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--only-changes</span></td><tdclass="markdownTableBodyNone">Shadow mode: compute and print the coverage-based test selection but still run the full suite. Use –select-enforce to actually prune. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
409
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--build-coverage-map</span></td><tdclass="markdownTableBodyNone">Build the gcov coverage map (requires a prior –gcov build). Master-side only. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
410
410
<trclass="markdownTableRowEven">
411
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--select-enforce</span></td><tdclass="markdownTableBodyNone">Run only the coverage-selected tests (implies selection; skips unselected tests). Without it, –only-changes is shadow-only. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
411
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--only-changes</span></td><tdclass="markdownTableBodyNone">Shadow mode: compute and print the coverage-based test selection but still run the full suite. Use –select-enforce to actually prune. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
412
412
<trclass="markdownTableRowOdd">
413
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--changed-files</span></td><tdclass="markdownTableBodyNone">Changed-file list (newline-, space-, or comma-separated; from CI paths-filter). Overrides git detection. </td><tdclass="markdownTableBodyNone">-</td></tr>
413
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--select-enforce</span></td><tdclass="markdownTableBodyNone">Run only the coverage-selected tests (implies selection; skips unselected tests). Without it, –only-changes is shadow-only. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
414
414
<trclass="markdownTableRowEven">
415
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--changes-branch</span></td><tdclass="markdownTableBodyNone">Branch to diff against for –only-changes. </td><tdclass="markdownTableBodyNone"><spanclass="tt">master</span></td></tr>
415
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--changed-files</span></td><tdclass="markdownTableBodyNone">Changed-file list (newline-, space-, or comma-separated; from CI paths-filter). Overrides git detection. </td><tdclass="markdownTableBodyNone">-</td></tr>
416
416
<trclass="markdownTableRowOdd">
417
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--generate</span></td><tdclass="markdownTableBodyNone">(Test Generation) Generate golden files. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
417
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--changes-branch</span></td><tdclass="markdownTableBodyNone">Branch to diff against for –only-changes. </td><tdclass="markdownTableBodyNone"><spanclass="tt">master</span></td></tr>
418
418
<trclass="markdownTableRowEven">
419
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--add-new-variables</span></td><tdclass="markdownTableBodyNone">(Test Generation) If new variables are found in D/ when running tests, add them to the golden files. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
419
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--generate</span></td><tdclass="markdownTableBodyNone">(Test Generation) Generate golden files. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
420
420
<trclass="markdownTableRowOdd">
421
-
<tdclass="markdownTableBodyNone"><spanclass="tt">--remove-old-tests</span></td><tdclass="markdownTableBodyNone">(Test Generation) Delete test directories that are no longer needed. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
421
+
<tdclass="markdownTableBodyNone"><spanclass="tt">--add-new-variables</span></td><tdclass="markdownTableBodyNone">(Test Generation) If new variables are found in D/ when running tests, add them to the golden files. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
<tdclass="markdownTableBodyNone"><spanclass="tt">--remove-old-tests</span></td><tdclass="markdownTableBodyNone">(Test Generation) Delete test directories that are no longer needed. </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
<tdclass="markdownTableBodyNone"><spanclass="tt">--debug</span>, <spanclass="tt">--no-debug</span></td><tdclass="markdownTableBodyNone">Build with full debug compiler flags </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
<tdclass="markdownTableBodyNone"><spanclass="tt">--debug</span>, <spanclass="tt">--no-debug</span></td><tdclass="markdownTableBodyNone">Build with full debug compiler flags </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
430
+
<trclass="markdownTableRowEven">
429
431
<tdclass="markdownTableBodyNone"><spanclass="tt">--reldebug</span>, <spanclass="tt">--no-reldebug</span></td><tdclass="markdownTableBodyNone">Build with lightweight debug flags (CI) </td><tdclass="markdownTableBodyNone"><spanclass="tt">false</span></td></tr>
0 commit comments