Skip to content

Commit

Permalink
Riemann tvf BC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasErbesdobler committed Jun 13, 2024
1 parent 32ce4fb commit ac1f31b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jax_sph/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ def acceleration_fn_riemann(
_kernel_grad = kernel_fn.grad_w(d_ij)
_c = _weighted_volume * _kernel_grad / (d_ij + EPS)

_A = (tvf_stress_fn(rho_i, u_i, u_i) + tvf_stress_fn(rho_j, u_j, u_j)) / 2
_A = jnp.where(
jnp.isin(wall_mask_j, wall_tags),
(tvf_stress_fn(rho_i, u_i, u_i) + tvf_stress_fn(rho_j, u_d, u_d)) / 2,
(tvf_stress_fn(rho_i, u_i, u_i) + tvf_stress_fn(rho_j, u_j, u_j)) / 2,
)
a_eq_8 = _c * jnp.dot(_A, r_ij)

return eq_9 + eq_6 + a_eq_8
Expand Down

0 comments on commit ac1f31b

Please sign in to comment.