Skip to content
Open
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"/>
Comment on lines +6 to +7
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add alt text for accessibility and fix heading level.

The image lacks alt text, preventing screen-reader users from understanding the content. Additionally, the heading jumps from h1 to h3 (should be h2), and MAX_HEIGHT appears to be a placeholder that won't render properly.

🔎 Proposed fix
-### Evolved State  
-<img src="figure.png" height="MAX_HEIGHT"/>
+## Evolved State  
+<img src="figure.png" alt="Density contour plot showing the evolved state of the forward-facing step at the final timestep" height="400"/>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Evolved State
<img src="figure.png" height="MAX_HEIGHT"/>
## Evolved State
<img src="figure.png" alt="Density contour plot showing the evolved state of the forward-facing step at the final timestep" height="400"/>
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

6-6: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


7-7: Images should have alternate text (alt text)

(MD045, no-alt-text)

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,
},
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 @@ -37,6 +37,9 @@ contains

integer :: i

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

do i = 1, num_patches_max
if (i <= num_ibs) then
! call s_check_patch_geometry(i)
Expand Down
Loading
Loading