Skip to content

Commit 51181ef

Browse files
committed
merge upstream
2 parents 136a48a + ed4ed34 commit 51181ef

36 files changed

Lines changed: 1799 additions & 1462 deletions

File tree

.github/pull_request_template.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22

33
Summarize your changes and the motivation behind them.
44

5-
Fixes #(issue)
5+
Closes #(issue number).
66

7-
### Type of change
7+
### Type of change (delete unused ones)
88

9-
- [ ] Bug fix
10-
- [ ] New feature
11-
- [ ] Refactor
12-
- [ ] Documentation
13-
- [ ] Other: _describe_
9+
- Bug fix
10+
- New feature
11+
- Refactor
12+
- Documentation
13+
- Other (describe)
1414

1515
## Testing
1616

1717
How did you test your changes?
1818

1919
## Checklist
2020

21+
__Check these like this `[x]` to indicate which of the below applies.__
22+
2123
- [ ] I added or updated tests for new behavior
2224
- [ ] I updated documentation if user-facing behavior changed
2325

@@ -33,10 +35,6 @@ See the [developer guide](https://mflowcode.github.io/documentation/contributing
3335

3436
## AI code reviews
3537

36-
Reviews are not triggered automatically. To request a review, comment on the PR:
37-
- `@coderabbitai review` — incremental review (new changes only)
38-
- `@coderabbitai full review` — full review from scratch
39-
- `/review` — Qodo review
40-
- `/improve` — Qodo code suggestions
38+
Reviews are not retriggered automatically. To request a review, comment on the PR:
4139
- `@claude full review` — Claude full review (also triggers on PR open/reopen/ready)
42-
- Add label `claude-full-review` — Claude full review via label
40+
- Or add label `claude-full-review` — Claude full review via label

.github/workflows/fp-stability.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ name: FP Stability
2424
# On FAIL: verrou_dd_sym runs to identify the responsible function symbols.
2525
# Logs are uploaded as CI artifacts.
2626
#
27-
# Verrou (Valgrind 3.26.0 + edf-hpc/verrou@a58d434) is built once and cached.
28-
# Build takes ~20 min uncached; cached runs restore in ~30 s.
27+
# Verrou (the pinned Valgrind+Verrou pair; versions live in toolchain/bootstrap/verrou.sh)
28+
# is installed by fp-stability on first use and cached. The prebuilt download is seconds;
29+
# a cache miss with no prebuilt falls back to a ~20-min source build.
2930

3031
on:
3132
push:
@@ -68,37 +69,21 @@ jobs:
6869
uses: actions/cache@v4
6970
with:
7071
path: ~/.local/verrou
71-
key: verrou-a58d434-valgrind-3.26.0-${{ runner.os }}
72+
# Key off the installer's content so any version bump (or other edit) in
73+
# verrou.sh auto-busts the cache and forces a fresh install — no hand-synced
74+
# version string to drift out of date.
75+
key: verrou-${{ hashFiles('toolchain/bootstrap/verrou.sh') }}-${{ runner.os }}
7276

7377
- name: Install system dependencies
7478
run: |
7579
sudo apt-get update -y
7680
sudo apt-get install -y \
7781
build-essential automake python3 python3-numpy libc6-dbg \
78-
cmake gfortran
82+
cmake gfortran zstd
7983
80-
- name: Build Verrou
81-
if: steps.cache-verrou.outputs.cache-hit != 'true'
82-
run: |
83-
cd /tmp
84-
wget -q https://sourceware.org/pub/valgrind/valgrind-3.26.0.tar.bz2
85-
tar xf valgrind-3.26.0.tar.bz2
86-
87-
git clone https://github.com/edf-hpc/verrou.git
88-
git -C verrou checkout a58d434
89-
90-
# Merge Verrou into Valgrind source tree and patch
91-
cp -r verrou valgrind-3.26.0/verrou
92-
cd valgrind-3.26.0
93-
cat verrou/valgrind.*diff | patch -p1
94-
95-
./autogen.sh
96-
./configure --enable-only64bit --prefix="$HOME/.local/verrou"
97-
make -j"$(nproc)"
98-
make install
99-
100-
- name: Verify Verrou
101-
run: ~/.local/verrou/bin/valgrind --version
84+
# Verrou is installed by `fp-stability` itself on first use (downloads the
85+
# prebuilt artifact; aborts if that fails). The cache above restores it across
86+
# runs so the download only happens on a cache miss.
10287

10388
- name: Build MFC (debug, serial)
10489
# FFLAGS=-fno-inline prevents gfortran from inlining small functions into

docs/documentation/case.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -322,24 +322,16 @@ This is enabled by adding ``'elliptic_smoothing': "T",`` and ``'elliptic_smoothi
322322
| Parameter | Type | Description |
323323
| ---: | :----: | :--- |
324324
| `num_ibs` | Integer | Number of immersed boundary patches |
325+
| `num_stl_models` | Integer | Number of STL/OBJ model entries in the `stl_models` array |
325326
| `num_particle_beds` | Integer | Number of particle bed specifications to generate immersed boundary patches from |
326327
| `ib_neighborhood_radius` | Integer | Parameter that controls the neighborhood size for IB detection. |
327328
| `geometry` | Integer | Geometry configuration of the patch.|
328329
| `x[y,z]_centroid` | Real | Centroid of the applied geometry in the [x,y,z]-direction. |
329330
| `length_x[y,z]` | Real | Length, if applicable, in the [x,y,z]-direction. |
330331
| `radius` | Real | Radius, if applicable, of the applied geometry. |
331-
| `theta` | Real | Angle of attach applied to airfoil IB patches |
332-
| `c` | Real | NACA airfoil parameters (see below) |
333-
| `t` | Real | NACA airfoil parameters (see below) |
334-
| `m` | Real | NACA airfoil parameters (see below) |
335-
| `p` | Real | NACA airfoil parameters (see below) |
332+
| `airfoil_id` | Integer | Index into `ib_airfoil` array for NACA airfoil geometry patches. |
333+
| `model_id` | Integer | Index into `stl_models` array for STL/OBJ geometry patches. |
336334
| `slip` | Logical | Apply a slip boundary |
337-
| `model_filepath` | String | Path to an STL or OBJ file (not all OBJs are supported). |
338-
| `model_scale(i)` | Real | Model's (applied) scaling factor for component $i$. |
339-
| `model_rotate(i)` | Real | Model's (applied) angle of rotation about axis $i$. |
340-
| `model_translate(i)` | Real | Model's $i$-th component of (applied) translation. |
341-
| `model_spc` | Integer | Number of samples per cell when discretizing the model into the grid. |
342-
| `model_threshold` | Real | Ray fraction inside the model patch above which the fraction is set to one.|
343335
| `moving_ibm` | Integer | Sets the method used for IB movement. |
344336
| `vel(i)` | Real | Initial velocity of the moving IB in the i-th direction. |
345337
| `angular_vel(i)` | Real | Initial angular velocity of the moving IB in the i-th direction. |
@@ -350,6 +342,17 @@ This is enabled by adding ``'elliptic_smoothing': "T",`` and ``'elliptic_smoothi
350342

351343
These parameters should be prepended with `patch_ib(j)%` where $j$ is the patch index.
352344

345+
STL/OBJ model geometry parameters are set on the `stl_models` array (indexed by `model_id`):
346+
347+
| Parameter | Type | Description |
348+
|:---------------------|:--------|:------------|
349+
| `model_filepath` | String | Path to an STL or OBJ file (not all OBJs are supported). |
350+
| `model_scale(i)` | Real | Model's scaling factor for component $i$. |
351+
| `model_translate(i)` | Real | Model's $i$-th component of translation. |
352+
| `model_threshold` | Real | Winding number threshold above which a cell is marked as inside the model. |
353+
354+
These parameters should be prepended with `stl_models(k)%` where $k$ is the model index.
355+
353356
#### Parameter Descriptions
354357

355358
- `geometry` defines the type of geometry of an immersed boundary patch with an integer number.
@@ -361,15 +364,13 @@ Definitions for currently implemented immersed boundary patch types are listed i
361364

362365
- `radius` is the radius to be used for circular patches.
363366

364-
- `theta` allows for the angle of attach of airfoil patches to be changed.
365-
366-
- `c`, `t`, `p`, and `m` specify the parameters for a NACA airfoil.
367-
`m` is the maximum camber, `p` is the location of maximum camber, `c` is the coord length, and `t` is the thickness.
368-
Additional details on this specification can be found in [The Naca Airfoil Series](https://web.stanford.edu/~cantwell/AA200_Course_Material/The%20NACA%20airfoil%20series.pdf)
367+
- `c`, `t`, `p`, and `m` specify the parameters for a NACA airfoil (set on the referenced `ib_airfoil` entry).
368+
`m` is the maximum camber, `p` is the location of maximum camber, `c` is the chord length, and `t` is the thickness.
369+
Additional details on this specification can be found in [NACA airfoil](https://en.wikipedia.org/wiki/NACA_airfoil).
369370

370371
- `slip` applies a slip boundary to the surface of the patch if true and a no-slip boundary condition to the surface if false.
371372

372-
- Please see [Patch Parameters](#sec-patches) for the descriptions of `model_filepath`, `model_scale`, `model_rotate`, `model_translate`, `model_spc`, and `model_threshold`.
373+
- For STL/OBJ geometry (geometry 5 or 12), set `model_id` to index into the `stl_models` array and specify `model_filepath`, `model_scale`, `model_translate`, and `model_threshold` on that entry.
373374

374375
- `moving_ibm` sets the method by which movement will be applied to the immersed boundary. Using 0 will result in no movement. Using 1 will result 1-way coupling where the boundary moves at a constant rate and applied forces to the fluid based upon it's own motion. In 1-way coupling, the fluid does not apply forces back onto the IB. Using 2 will result in 2-way coupling, where the boundary pushes on the fluid and the fluid pushes back on the boundary via pressure and viscous forces. If external forces are applied, the boundary will also experience those forces.
375376

examples/2D_bubbly_steady_shock/case.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@
144144
"patch_ib(1)%geometry": 4,
145145
"patch_ib(1)%x_centroid": 1.5e-03 / x0,
146146
"patch_ib(1)%y_centroid": 1.5e-03 / x0,
147-
"patch_ib(1)%c": 1.0e-03 / x0,
148-
"patch_ib(1)%t": 0.15,
149-
"patch_ib(1)%p": 0.4,
150-
"patch_ib(1)%m": 0.02,
147+
"patch_ib(1)%airfoil_id": 1,
151148
"patch_ib(1)%slip": "F",
152-
"patch_ib(1)%theta": 15,
149+
"ib_airfoil(1)%c": 1.0e-03 / x0,
150+
"ib_airfoil(1)%t": 0.15,
151+
"ib_airfoil(1)%p": 0.4,
152+
"ib_airfoil(1)%m": 0.02,
153153
# Fluids Physical Parameters
154154
"fluid_pp(1)%gamma": 1.0e00 / (gam_l - 1.0e00),
155155
"fluid_pp(1)%pi_inf": gam_l * (pi_inf_l) / (gam_l - 1.0),

examples/2D_ibm_airfoil/case.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@
9090
"patch_ib(1)%geometry": 4,
9191
"patch_ib(1)%x_centroid": 1.0e-03,
9292
"patch_ib(1)%y_centroid": 3.0e-03,
93-
"patch_ib(1)%c": 1.0e-03,
94-
"patch_ib(1)%t": 0.15,
95-
"patch_ib(1)%p": 0.4,
96-
"patch_ib(1)%m": 0.02,
93+
"patch_ib(1)%airfoil_id": 1,
94+
"ib_airfoil(1)%c": 1.0e-03,
95+
"ib_airfoil(1)%t": 0.15,
96+
"ib_airfoil(1)%p": 0.4,
97+
"ib_airfoil(1)%m": 0.02,
9798
"patch_ib(1)%angles(3)": -0.5235987756, # 30 degrees clockwise rotation, in radians
9899
# Fluids Physical Parameters
99100
# Use the same stiffness as the air bubble

examples/2D_ibm_steady_shock/case.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@
145145
"patch_ib(1)%geometry": 4,
146146
"patch_ib(1)%x_centroid": 1.5e-03 / x0,
147147
"patch_ib(1)%y_centroid": 1.5e-03 / x0,
148-
"patch_ib(1)%c": 1.0e-03 / x0,
149-
"patch_ib(1)%t": 0.15,
150-
"patch_ib(1)%p": 0.4,
151-
"patch_ib(1)%m": 0.02,
148+
"patch_ib(1)%airfoil_id": 1,
152149
"patch_ib(1)%slip": "F",
153-
"patch_ib(1)%theta": 15,
150+
"ib_airfoil(1)%c": 1.0e-03 / x0,
151+
"ib_airfoil(1)%t": 0.15,
152+
"ib_airfoil(1)%p": 0.4,
153+
"ib_airfoil(1)%m": 0.02,
154154
# Fluids Physical Parameters
155155
# Surrounding liquid
156156
"fluid_pp(1)%gamma": 1.0e00 / (n_tait - 1.0e00),

examples/2D_ibm_stl_MFCCharacter/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@
6868
"patch_icpp(1)%pres": 100000,
6969
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7070
"patch_icpp(1)%alpha(1)": 1.0,
71+
"num_stl_models": 1,
7172
"patch_ib(1)%geometry": 5,
72-
"patch_ib(1)%model_filepath": "Character_IBM.stl",
73-
"patch_ib(1)%model_translate(1)": -0.0469828735,
74-
"patch_ib(1)%model_translate(2)": -0.0094892600,
75-
"patch_ib(1)%model_spc": 200,
76-
"patch_ib(1)%model_threshold": 0.99,
73+
"patch_ib(1)%model_id": 1,
74+
"stl_models(1)%model_filepath": "Character_IBM.stl",
75+
"stl_models(1)%model_translate(1)": -0.0469828735,
76+
"stl_models(1)%model_translate(2)": -0.0094892600,
77+
"stl_models(1)%model_threshold": 0.99,
7778
"patch_ib(1)%slip": "F",
7879
# Fluids Physical Parameters
7980
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/2D_ibm_stl_test/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@
6969
"patch_icpp(1)%pres": 100000,
7070
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7171
"patch_icpp(1)%alpha(1)": 1.0,
72+
"num_stl_models": 1,
7273
"patch_ib(1)%geometry": 5,
73-
"patch_ib(1)%model_filepath": "Circle_IBM.stl",
74-
"patch_ib(1)%model_translate(1)": -0.05,
75-
"patch_ib(1)%model_translate(2)": -0.05,
76-
"patch_ib(1)%model_spc": 100,
77-
"patch_ib(1)%model_threshold": 0.95,
74+
"patch_ib(1)%model_id": 1,
75+
"stl_models(1)%model_filepath": "Circle_IBM.stl",
76+
"stl_models(1)%model_translate(1)": -0.05,
77+
"stl_models(1)%model_translate(2)": -0.05,
78+
"stl_models(1)%model_threshold": 0.95,
7879
"patch_ib(1)%slip": "F",
7980
# Fluids Physical Parameters
8081
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/2D_ibm_stl_wedge/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@
6969
"patch_icpp(1)%pres": 10918.2549,
7070
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7171
"patch_icpp(1)%alpha(1)": 1.0,
72+
"num_stl_models": 1,
7273
"patch_ib(1)%geometry": 5,
73-
"patch_ib(1)%model_filepath": "Wedge2D_IBM.stl",
74-
"patch_ib(1)%model_translate(1)": -0.0500000000,
75-
"patch_ib(1)%model_translate(2)": -0.0373970250,
76-
"patch_ib(1)%model_spc": 200,
77-
"patch_ib(1)%model_threshold": 0.95,
74+
"patch_ib(1)%model_id": 1,
75+
"stl_models(1)%model_filepath": "Wedge2D_IBM.stl",
76+
"stl_models(1)%model_translate(1)": -0.0500000000,
77+
"stl_models(1)%model_translate(2)": -0.0373970250,
78+
"stl_models(1)%model_threshold": 0.95,
7879
"patch_ib(1)%slip": "F",
7980
# Fluids Physical Parameters
8081
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/3D_ibm_stl_ellipsoid/case.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@
8181
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
8282
"patch_icpp(1)%alpha(1)": 1.0e00,
8383
# Patch: Model Immersed Boundary
84+
"num_stl_models": 1,
8485
"patch_ib(1)%geometry": 12,
85-
"patch_ib(1)%model_filepath": "Ellipsoid_IBM.stl",
86-
"patch_ib(1)%model_translate(1)": -0.02056,
87-
"patch_ib(1)%model_translate(2)": -0.01,
88-
"patch_ib(1)%model_translate(3)": -0.01,
89-
"patch_ib(1)%model_spc": 20,
90-
"patch_ib(1)%model_threshold": 0.01,
86+
"patch_ib(1)%model_id": 1,
87+
"stl_models(1)%model_filepath": "Ellipsoid_IBM.stl",
88+
"stl_models(1)%model_translate(1)": -0.02056,
89+
"stl_models(1)%model_translate(2)": -0.01,
90+
"stl_models(1)%model_translate(3)": -0.01,
91+
"stl_models(1)%model_threshold": 0.01,
9192
"patch_ib(1)%slip": "F",
9293
# Fluids Physical Parameters
9394
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

0 commit comments

Comments
 (0)