Skip to content

Commit fa2bc4e

Browse files
sbryngelsonclaude
andcommitted
Fix missing END_GPU_PARALLEL_LOOP, swap v/g example properties, document beta_vars
- Add missing END_GPU_PARALLEL_LOOP in s_enforce_EL_bubbles_boundary_conditions - Fix swapped vapor/gas properties in 2D_moving_lag_bubs and 3D_moving_lag_particles examples (gam_v/gam_g, M_v/M_g, k_v/k_g, cp_v/cp_g, R_v/R_g were all inverted vs reference examples) - Document beta_vars indices: 1=void fraction, 2=d(beta)/dt, 5=energy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ca21903 commit fa2bc4e

4 files changed

Lines changed: 22 additions & 21 deletions

File tree

examples/2D_moving_lag_bubs/case.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@
132132
"bub_pp%pv": pv / p0,
133133
"bub_pp%vd": diffVapor / (L0 * c0),
134134
"bub_pp%mu_l": mu_host / (rho0 * L0 * c0),
135-
"bub_pp%gam_v": gamma_g,
136-
"bub_pp%gam_g": gamma_v,
137-
"bub_pp%M_v": MW_g,
138-
"bub_pp%M_g": MW_v,
139-
"bub_pp%k_v": k_g * (T0 / (L0 * rho0 * c0 * c0 * c0)),
140-
"bub_pp%k_g": k_v * (T0 / (L0 * rho0 * c0 * c0 * c0)),
141-
"bub_pp%cp_v": cp_g * (T0 / (c0 * c0)),
142-
"bub_pp%cp_g": cp_v * (T0 / (c0 * c0)),
143-
"bub_pp%R_v": (R_uni / MW_g) * (T0 / (c0 * c0)),
144-
"bub_pp%R_g": (R_uni / MW_v) * (T0 / (c0 * c0)),
135+
"bub_pp%gam_v": gamma_v,
136+
"bub_pp%gam_g": gamma_g,
137+
"bub_pp%M_v": MW_v,
138+
"bub_pp%M_g": MW_g,
139+
"bub_pp%k_v": k_v * (T0 / (L0 * rho0 * c0 * c0 * c0)),
140+
"bub_pp%k_g": k_g * (T0 / (L0 * rho0 * c0 * c0 * c0)),
141+
"bub_pp%cp_v": cp_v * (T0 / (c0 * c0)),
142+
"bub_pp%cp_g": cp_g * (T0 / (c0 * c0)),
143+
"bub_pp%R_v": (R_uni / MW_v) * (T0 / (c0 * c0)),
144+
"bub_pp%R_g": (R_uni / MW_g) * (T0 / (c0 * c0)),
145145
# Viscosity
146146
"viscous": "T",
147147
"fluid_pp(1)%Re(1)": 1.0 / (mu_host / (rho0 * c0 * L0)),

examples/3D_moving_lag_particles/case.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@
127127
"bub_pp%pv": pv / p0,
128128
"bub_pp%vd": diffVapor / (L0 * c0),
129129
"bub_pp%mu_l": mu_host / (rho0 * L0 * c0),
130-
"bub_pp%gam_v": gamma_g,
131-
"bub_pp%gam_g": gamma_v,
132-
"bub_pp%M_v": MW_g,
133-
"bub_pp%M_g": MW_v,
134-
"bub_pp%k_v": k_g * (T0 / (L0 * rho0 * c0 * c0 * c0)),
135-
"bub_pp%k_g": k_v * (T0 / (L0 * rho0 * c0 * c0 * c0)),
136-
"bub_pp%cp_v": cp_g * (T0 / (c0 * c0)),
137-
"bub_pp%cp_g": cp_v * (T0 / (c0 * c0)),
138-
"bub_pp%R_v": (R_uni / MW_g) * (T0 / (c0 * c0)),
139-
"bub_pp%R_g": (R_uni / MW_v) * (T0 / (c0 * c0)),
130+
"bub_pp%gam_v": gamma_v,
131+
"bub_pp%gam_g": gamma_g,
132+
"bub_pp%M_v": MW_v,
133+
"bub_pp%M_g": MW_g,
134+
"bub_pp%k_v": k_v * (T0 / (L0 * rho0 * c0 * c0 * c0)),
135+
"bub_pp%k_g": k_g * (T0 / (L0 * rho0 * c0 * c0 * c0)),
136+
"bub_pp%cp_v": cp_v * (T0 / (c0 * c0)),
137+
"bub_pp%cp_g": cp_g * (T0 / (c0 * c0)),
138+
"bub_pp%R_v": (R_uni / MW_v) * (T0 / (c0 * c0)),
139+
"bub_pp%R_g": (R_uni / MW_g) * (T0 / (c0 * c0)),
140140
# Viscosity
141141
"viscous": "T",
142142
"fluid_pp(1)%Re(1)": 1.0 / (mu_host / (rho0 * c0 * L0)),

src/common/m_constants.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module m_constants
6161

6262
! Lagrange bubbles constants
6363
integer, parameter :: mapCells = 3 !< Number of cells around the bubble where the smoothening function will have effect
64-
integer, parameter :: beta_vars(1:3) = [1, 2, 5] !< Indices of variables to communicate for bubble coupling
64+
integer, parameter :: beta_vars(1:3) = [1, 2, 5] !< q_beta indices to communicate: 1=void fraction, 2=d(beta)/dt, 5=energy source
6565
real(wp), parameter :: R_uni = 8314._wp !< Universal gas constant - J/kmol/K
6666
integer, parameter :: lag_io_vars = 21 !< Number of variables per particle for MPI_IO
6767

src/simulation/m_bubbles_EL.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,7 @@ contains
15891589
cell = fd_number - buff_size
15901590
call s_locate_cell(mtn_pos(k, 1:3, 2), cell, mtn_s(k, 1:3, 2))
15911591
end do
1592+
$:END_GPU_PARALLEL_LOOP()
15921593
15931594
call nvtxEndRange ! LAG-BC
15941595

0 commit comments

Comments
 (0)