Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/documentation/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ After the lint gate passes:

- **GitHub-hosted:** Ubuntu and macOS, GNU and Intel (Ubuntu only), MPI, `reldebug` and no-debug, plus one single-precision lane
- **NVHPC containers:** CPU build and test, GPU build only. PRs build the oldest and newest version in the matrix (currently 25.5 and 26.3); pushes to master build every version from 25.5 to 26.3
- **HPC runners:** Frontier (GPU only: Cray ftn OpenACC/OpenMP, AMD flang OpenMP) and Phoenix (NVHPC GPU with OpenACC and OpenMP) on PRs and on pushes to master; Frontier is non-blocking. While Phoenix fails on master, an issue titled "Phoenix CI failing on master" lists the failed and no-result (cancelled or timed out) jobs and the merges since the last green run, and closes on the next green run. HPC and case-optimization jobs skip draft PRs
- **HPC runners:** Frontier (GPU only: Cray ftn OpenACC/OpenMP, AMD flang OpenMP) and Phoenix (NVHPC GPU with OpenACC and OpenMP; the test suite is sharded in two per interface, plus a case-optimization job) on non-draft PRs and on pushes to master; Frontier is non-blocking. While Phoenix fails on master, an issue titled "Phoenix CI failing on master" lists the failed and no-result (cancelled or timed out) jobs and the merges since the last green run, and closes on the next green run. HPC and case-optimization jobs skip draft PRs
- **Retries:** Tests get up to 3 attempts before failing
- **Cleanliness check:** Compiler warnings are compared against master and reported, not enforced

Expand Down
45 changes: 45 additions & 0 deletions docs/documentation/ibm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@page ibm Immersed Boundaries

# Immersed Boundaries

This page is a map of the immersed-boundary (IB) options.
The parameters and their constraints are in [Immersed Boundary Patches](@ref sec-immersed-boundary-patches) of the case-file documentation; this page only says which option does what and where it is checked.
Enable the model with `ib = T` and `num_ibs`; each body is a `patch_ib(i)` entry whose geometry is listed in [Immersed Boundary Patch Types](@ref immersed-boundary-patch-types).

## Motion

| Option | Effect |
| :--- | :--- |
| `moving_ibm = 0` | fixed body |
| `moving_ibm = 1` | one-way coupling: the body moves at its prescribed rate and acts on the fluid, which does not act back |
| `moving_ibm = 2` | two-way coupling: the body moves under pressure, viscous and body forces (`bf_x`, `bf_y`, `bf_z`) |
| `collision_model = 1` | soft-sphere collisions between circles or spheres and with walls; `coefficient_of_restitution`, `collision_time`, `collision_temporal_resolution`, `ib_coefficient_of_friction` |
| `ib_friction_slip_eps` | regularises the friction direction at small slip speed, so contacts split across MPI ranks agree with a single rank |

Moving-body kinematics and the restitution of a wall collision are checked in [Validation](@ref sec-validation-moving-kinematics).

## Wall treatment

| Option | Effect |
| :--- | :--- |
| `ib_second_order_vel`, `ib_ip_min_dist` | linear ghost-velocity extrapolation; minimum image-point distance |
| `ib_ip_interp = 2` | triangular-shaped-cloud image-point interpolation instead of inverse-distance weights |
| `ib_wall_order = 2` | two-probe quadratic wall-normal ghost velocity at no-slip walls |
| `ib_slip_ccst`, `ib_smooth_contact`, `ib_uncover_fill` | slip-wall ghost state, HLLC contact blending in the viscous work, fill of cells a moving body uncovers |
| `weno_Re_flux`, `ib_visc_compact` | compact velocity gradient on the viscous faces within two cells of a body |
| `ib_mass_relax` | returns the spurious gas mass of a body over about N steps; the default resolves at start-up (see the parameter entry) |

Each option has a default that leaves existing results unchanged, except `ib_mass_relax`, whose default depends on whether a body moves.
Drag and Nusselt number of a cylinder: @ref validation_cyl_drag_nu. Interpolation against an exact conduction solution: @ref validation_tsc_annulus.

## Heat transfer and chemistry

`thermal_bc` selects the wall condition: zero-gradient (0), prescribed `Twall` (1), reacting-surface energy balance (2), lumped solid with an evolving temperature (3).
`wall_column` adds a sub-grid conduction column to a fixed isothermal circle or sphere, and `ib_flux_wall` sets the face fluxes of a reacting wall from its surface solve.
Examples: `examples/2D_ibm_lumped_wall`, `examples/2D_ibm_wall_mass_budget`, `examples/2D_ibm_conduction_annulus`.

## Output and restart

- `ib_force_wrt` writes `ib_forces.dat` ([force history](@ref sec-ib-force-history)); `ib_heat_wrt` writes `ib_heat.dat` ([heat history](@ref sec-ib-heat-history)); `ib_surface_wrt` writes surface-point records for a chemistry run.
- `ib_state_wrt` writes the IB state as a point mesh in post-processing.
- The IB state is saved under `restart_data/` (`ib_state_*.dat`; the conduction temperature of ghost points in `ib_tcond_<step>.dat`).
1 change: 1 addition & 0 deletions docs/documentation/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Welcome to the Multi-component Flow Code (MFC) documentation.

- @ref architecture "Code Architecture" - How the source code is organized, data flow, and module map
- @ref expectedPerformance "Performance" - Optimization and benchmarks
- @ref ibm "Immersed Boundaries" - Overview of the immersed-boundary options and where each is documented
- @ref amr "Adaptive Mesh Refinement" - Block-structured AMR: algorithm, physics support, and parameters
- @ref gpuParallelization "GPU Parallelization" - GPU macro API (developer reference)
- @ref docker "Containers" - Docker usage
Expand Down
6 changes: 6 additions & 0 deletions docs/documentation/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ where `<computer name>` could be `phoenix` or any of the others in the [template
You can create new templates with the appropriate run commands or omit this option.
The use of `--` in the above command passes options to the `./mfc.sh run` command underlying the `./mfc.sh test`.

The comparison tolerance is set per case in `compute_tolerance` (`toolchain/mfc/test/case.py`): a default of 1e-12, looser for cases whose physics amplifies round-off (examples, hypoelasticity, IBM, bubbles and others), and `override_tol` on a `define_case_d` call for a single case. Set an `override_tol` from the spread seen across compiler and device lanes, not from one machine, and in single precision it is floored at the default single-precision tolerance. When a default or an algorithm changes, regenerate the affected goldens in the same change (see [Keeping the goldens current](@ref validation)).

The build configuration is remembered between commands (`build/lock.yaml`), so pass `--no-debug --no-reldebug --no-single` explicitly when you need a plain build after a debug or single-precision one.

CI runs the test suite on GitHub-hosted runners, in NVHPC containers and on cluster runners; see the CI section of [Contributing](@ref contributing). A GPU change that involves more than one MPI rank should be tested with both ranks on one GPU and on two GPUs ([Silent-Failure Traps](@ref silent-failure-traps)).

Besides the golden comparison, every case with ``chemistry = 'T'`` must keep its saved species mass fractions in [0, 1] and must not let the species clean-up fallback move more than roundoff-scale density (`Species cleanup at step ...` in the output); a failure names the step or variable.

### Creating Tests
Expand Down
30 changes: 26 additions & 4 deletions docs/documentation/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ When builds fail, isolate the problem by disabling features:
./mfc.sh build --mixed # Mixed precision
```

### Stale Remembered Configuration

`./mfc.sh` stores the last build configuration (MPI, GPU, debug, reldebug, single, and so on) in
`build/lock.yaml` and reuses it, so a `--debug` or `--single` from an earlier command applies to
later `build`, `run` and `test` commands that do not repeat the flag. If a run is unexpectedly slow, a
test tolerance or skip depends on precision, or binaries are rebuilt, check the `Switching from ...`
line and state the options you want explicitly, for example `--no-debug --no-reldebug --no-single`.
See [Building MFC](@ref getting-started).

### Clean Rebuild

Sometimes a clean rebuild fixes issues:
Expand Down Expand Up @@ -272,17 +281,20 @@ To isolate parallel issues, try running with fewer MPI ranks:

### Running Specific Tests

Run only a specific test by UUID:
Run only a specific test by UUID (`./mfc.sh test -l` lists them):

```bash
./mfc.sh test --only 3D_sphbubcollapse
./mfc.sh test --only <UUID>
```

Run multiple specific tests:
Run several specific tests by passing several UUIDs, which are ORed:
```bash
./mfc.sh test --only 3D_sphbubcollapse 2D_shockbubble
./mfc.sh test --only <UUID1> <UUID2>
```

Non-UUID terms are labels, and a case must carry all of them, so two unrelated labels select nothing
(see [Selection and Execution Pitfalls](@ref selection-and-execution-pitfalls)).

### Serial Test Execution

Run tests serially for clearer output:
Expand Down Expand Up @@ -325,6 +337,16 @@ Possible causes:
3. **Precision settings:** Single vs double precision
4. **Platform differences:** CPU architecture, GPU differences

**GPU test passes with both ranks on one GPU but differs on two:** a device-binding bug, such as
device data updated before the rank is bound to its GPU. AMD CI can hide it. See
[Silent-Failure Traps](@ref silent-failure-traps) and test a 2-rank GPU change both ways.

**"Submitting batch file for Interactive failed"** (the name is the queue system, here the interactive
launcher): the job script that `./mfc.sh run` generated returned a non-zero status. The message gives
its path; run that script by hand and read its output (`./mfc.sh run ... -v` prints the submit command).
In CI, a Slurm `TIMEOUT` or a launch failure like this is no result for the PR: see
[Silent-Failure Traps](@ref silent-failure-traps).

---

## Performance Profiling
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ Cite references with `\cite` keys from `docs/references.bib`.

## Keeping the goldens current

The registered tests are regression guards: their goldens hold the output of the code at the time they were generated. When a default or an algorithm in the numerics a test exercises changes (for moving bodies, for example the `ib_mass_relax` default), regenerate the goldens with `./mfc.sh test --generate --only <UUID>` in the same change, and re-run the checker scripts to confirm the physics results above.
The registered tests are regression guards: their goldens hold the output of the code at the time they were generated. When a default or an algorithm in the numerics a test exercises changes (for moving bodies, for example the `ib_mass_relax` default), regenerate the goldens with `./mfc.sh test --generate --only <UUID>` in the same change, and re-run the checker scripts to confirm the physics results above. A case whose tolerance must be looser than the default takes `override_tol` chosen from the spread between compiler and device lanes ([Testing](@ref testing)).
Loading