Skip to content

Commit

Permalink
derivative bug fix in divu calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Sep 8, 2024
1 parent 91721f7 commit aebfd15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyro/compressible/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ def artificial_viscosity(ng, dx, dy, Lx, Ly,
vb = 0.5 * (v[i, j - 1] + v[i - 1, j - 1])

# Finite difference to get ux and vy
ux = (ur*rr - ul*rl) / (rc * dx)
vy = (sint*vt - sinb*vb) / (rc * sinc * dy)
ux = (ur * rr * rr - ul * rl * rl) / (rc * rc * dx)
vy = (sint * vt - sinb * vb) / (rc * sinc * dy)

# Find div(U)_{i-1/2, j-1/2}
divU[i, j] = ux + vy
Expand Down

0 comments on commit aebfd15

Please sign in to comment.