Skip to content

Commit 77ddd1e

Browse files
cfl dt bug fix (#1027)
Co-authored-by: Spencer Bryngelson <[email protected]>
1 parent e25dbc4 commit 77ddd1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/simulation/m_sim_helpers.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,17 @@ contains
277277
if (grid_geometry == 3) then
278278
fltr_dtheta = f_compute_filtered_dtheta(k, l)
279279
vcfl_dt = cfl_target*(min(dx(j), dy(k), fltr_dtheta)**2._wp) &
280-
/minval(1/(rho*Re_l))
280+
/maxval(1/(rho*Re_l))
281281
else
282282
vcfl_dt = cfl_target*(min(dx(j), dy(k), dz(l))**2._wp) &
283-
/minval(1/(rho*Re_l))
283+
/maxval(1/(rho*Re_l))
284284
end if
285285
elseif (n > 0) then
286286
!2D
287287
vcfl_dt = cfl_target*(min(dx(j), dy(k))**2._wp)/maxval((1/Re_l)/rho)
288288
else
289289
!1D
290-
vcfl_dt = cfl_target*(dx(j)**2._wp)/minval(1/(rho*Re_l))
290+
vcfl_dt = cfl_target*(dx(j)**2._wp)/maxval(1/(rho*Re_l))
291291
end if
292292
end if
293293

0 commit comments

Comments
 (0)