Skip to content

Commit 56396aa

Browse files
committed
cfl dt bug fix
1 parent 7982c58 commit 56396aa

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
@@ -271,17 +271,17 @@ contains
271271
if (grid_geometry == 3) then
272272
fltr_dtheta = f_compute_filtered_dtheta(k, l)
273273
vcfl_dt = cfl_target*(min(dx(j), dy(k), fltr_dtheta)**2._wp) &
274-
/minval(1/(rho*Re_l))
274+
/maxval(1/(rho*Re_l))
275275
else
276276
vcfl_dt = cfl_target*(min(dx(j), dy(k), dz(l))**2._wp) &
277-
/minval(1/(rho*Re_l))
277+
/maxval(1/(rho*Re_l))
278278
end if
279279
elseif (n > 0) then
280280
!2D
281281
vcfl_dt = cfl_target*(min(dx(j), dy(k))**2._wp)/maxval((1/Re_l)/rho)
282282
else
283283
!1D
284-
vcfl_dt = cfl_target*(dx(j)**2._wp)/minval(1/(rho*Re_l))
284+
vcfl_dt = cfl_target*(dx(j)**2._wp)/maxval(1/(rho*Re_l))
285285
end if
286286
end if
287287

0 commit comments

Comments
 (0)