Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
af75f84
Integrate IBM with IGR
Dec 18, 2025
1340497
Add comments
Dec 19, 2025
b07045b
Minor fixes
Dec 19, 2025
489bc7c
Change from using jac_sf to jac
Dec 19, 2025
d914ba3
add igr forward facing step example
wilfonba Dec 29, 2025
3e92773
update IGR forward facing step example
wilfonba Jan 1, 2026
4be08cc
Minor fixes
Jan 2, 2026
27ea826
Added to skipped cases and README
Jan 2, 2026
845c9b5
Minor fixes and formatting
Jan 2, 2026
a8c9629
Fix inline issue on Frontier
Jan 3, 2026
01e6492
Fix inlining issue on frontier
Jan 3, 2026
e28a2c9
Remove q_cons_vf optional variable guard
Jan 3, 2026
a914653
Restore elasticity branch
Jan 3, 2026
a29bac8
Format
Jan 3, 2026
b31dd3a
Minor fixes and add guard for IGR + MIBM
Jan 3, 2026
5a6a5a8
Minor changes
Jan 4, 2026
bcce655
Merge branch 'master' into igribm
sbryngelson Jan 4, 2026
31fce2a
Minor changes regards to chemistry. Add guard inside case_validator f…
Cowsreal Jan 5, 2026
6c756a0
merge
wilfonba Jan 18, 2026
e111b08
Formatting
Jan 21, 2026
c89cb66
Merge branch 'master' into igribm
Cowsreal Jan 21, 2026
6cf419c
Merge branch 'master' into igribm
Cowsreal Jan 22, 2026
b68f694
Add 3D IGR bowshock case
Jan 24, 2026
755b013
Merge branch 'igribm' of github.com:Cowsreal/MFCMarkZhang into igribm
Jan 24, 2026
2a40bbf
Merge branch 'master' into igribm
Cowsreal Jan 24, 2026
849a030
Fix README format
Jan 24, 2026
0009ca6
Merge branch 'igribm' of github.com:Cowsreal/MFCMarkZhang into igribm
Jan 24, 2026
1b28f76
Merge branch 'master' into igribm
wilfonba Feb 9, 2026
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
7 changes: 7 additions & 0 deletions examples/2D_IGR_forward_facing_step/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Forward Facing Step With IGR (2D)

Reference: See Section IV, b.
> Woodward, P. *(1984). The numerical simulation of two-dimensional fluid flow with strong shocks. Journal of Computational Physics, 54(1), 115–173. https://doi.org/10.1016/0021-9991(84)90140-2*

### Evolved State
<img src="figure.png" height="MAX_HEIGHT"/>
97 changes: 97 additions & 0 deletions examples/2D_IGR_forward_facing_step/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import json
import math

h = 0.2

# Radius as a percentage of height (h)
rc = 0.2

gam_a = 1.4
p0 = 1
rho0 = 1.4
c0 = math.sqrt(gam_a * p0 / rho0)
v0 = 3 * c0
mu = rho0 * v0 * h / 2e5

# Configuring case dictionary
print(
json.dumps(
{
# Logistics
"run_time_info": "T",
"x_domain%beg": 0,
"x_domain%end": 15 * h,
"y_domain%beg": 0,
"y_domain%end": 5 * h,
"cyl_coord": "F",
"m": 1499,
"n": 499,
"p": 0,
"cfl_adap_dt": "T",
"cfl_target": 0.6,
"n_start": 0,
"t_save": 0.04,
"t_stop": 4,
# Simulation Algorithm Parameters
"num_patches": 1,
"model_eqns": 2,
"alt_soundspeed": "F",
"num_fluids": 1,
"mpp_lim": "F",
"mixture_err": "F",
"time_stepper": 3,
"igr": "T",
"igr_pres_lim": "T",
"igr_order": 3,
"igr_iter_solver": 1,
"num_igr_iters": 5,
"num_igr_warm_start_iters": 50,
"bc_x%beg": -3,
"bc_x%end": -3,
"bc_y%beg": -2,
"bc_y%end": -2,
"ib": "T",
"num_ibs": 3,
# Formatted Database Files Structure Parameters
"format": 1,
"precision": 2,
"prim_vars_wrt": "T",
"parallel_io": "T",
# Patch 1 Background
"patch_icpp(1)%geometry": 3,
"patch_icpp(1)%x_centroid": 7.5 * h,
"patch_icpp(1)%y_centroid": 2.5 * h,
"patch_icpp(1)%length_x": 15 * h,
"patch_icpp(1)%length_y": 5 * h,
"patch_icpp(1)%vel(1)": v0,
"patch_icpp(1)%vel(2)": 0.0,
"patch_icpp(1)%pres": p0,
"patch_icpp(1)%alpha_rho(1)": rho0,
"patch_icpp(1)%alpha(1)": 1.0,
# Patch: Slip rectangle with rounded corner
"patch_ib(1)%geometry": 3,
"patch_ib(1)%x_centroid": (9 + rc / 2) * h,
"patch_ib(1)%y_centroid": 0.5 * h,
"patch_ib(1)%length_x": (12 - rc) * h,
"patch_ib(1)%length_y": h,
"patch_ib(1)%slip": "T",
"patch_ib(2)%geometry": 3,
"patch_ib(2)%x_centroid": (3 + rc / 2) * h,
"patch_ib(2)%y_centroid": (0.5 - rc / 2) * h,
"patch_ib(2)%length_x": rc * h,
"patch_ib(2)%length_y": (1 - rc) * h,
"patch_ib(2)%slip": "T",
"patch_ib(3)%geometry": 2,
"patch_ib(3)%x_centroid": (3 + rc) * h,
"patch_ib(3)%y_centroid": (1 - rc) * h,
"patch_ib(3)%radius": rc * h,
"patch_ib(3)%slip": "T",
# Fluids Physical Parameters
"fluid_pp(1)%gamma": 1.0 / (gam_a - 1.0),
"fluid_pp(1)%pi_inf": 0.0,
"viscous": "T",
"fluid_pp(1)%Re(1)": 1 / mu,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Incorrect Reynolds-number assignment: fluid_pp(1)%Re(1) is set to 1 / mu, but given mu = rho0 * v0 * h / 2e5 the correct Reynolds number should be rho0 * v0 * h / mu (which yields 2e5 as intended), not 1 / mu. Assign the physically-correct expression so Re is dimensionless and consistent. [logic error]

Severity Level: Critical 🚨
- ❌ Viscous-flow setup uses wrong Reynolds number.
- ⚠️ Example validation against IGR/WENO mismatches.
- ⚠️ Performance/timestep choices may be inconsistent.
Suggested change
"fluid_pp(1)%Re(1)": 1 / mu,
"fluid_pp(1)%Re(1)": rho0 * v0 * h / mu,
Steps of Reproduction ✅
1. Inspect examples/2D_IGR_forward_facing_step/case.py: mu is computed at line 14 (`mu =
rho0 * v0 * h / 2e5`) and the Reynolds entry is set at line 93 (`"fluid_pp(1)%Re(1)": 1 /
mu,`).

2. Run `python examples/2D_IGR_forward_facing_step/case.py` to emit the JSON (print at
line 17). The emitted JSON contains `"fluid_pp(1)%Re(1)"` equal to the numeric value of `1
/ mu`.

3. Calculate expected Re for this example: since mu was set as `rho0 * v0 * h / 2e5` (line
14), the intended nondimensional Re should be `rho0 * v0 * h / mu == 2e5`. The current
printed value `1 / mu` does not equal 2e5 and therefore demonstrates the incorrect formula
in-place.

4. Any solver or validation harness consuming this JSON will use the wrong Reynolds number
for this example, as demonstrated by inspecting the printed JSON.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** examples/2D_IGR_forward_facing_step/case.py
**Line:** 93:93
**Comment:**
	*Logic Error: Incorrect Reynolds-number assignment: `fluid_pp(1)%Re(1)` is set to `1 / mu`, but given `mu = rho0 * v0 * h / 2e5` the correct Reynolds number should be `rho0 * v0 * h / mu` (which yields 2e5 as intended), not `1 / mu`. Assign the physically-correct expression so `Re` is dimensionless and consistent.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

},
indent=4,
)
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/pre_process/m_check_ib_patches.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ contains
@:PROHIBIT(patch_ib(i)%geometry == dflt_int, "IB patch undefined. &
patch_ib("//trim(iStr)//")%geometry must be set.")

@:PROHIBIT(igr .and. any(patch_ib(:)%moving_ibm > 0), "Cannot use &
moving immersed boundary with IGR. patch_ib("//trim(iStr)//")%moving_ibm must be 0.")

! Constraints on the geometric initial condition patch parameters
if (patch_ib(i)%geometry == 2) then
call s_check_circle_ib_patch_geometry(i)
Expand Down
Loading
Loading