diff --git a/phi/physics/fluid.py b/phi/physics/fluid.py index 43b316a03..db554e15f 100644 --- a/phi/physics/fluid.py +++ b/phi/physics/fluid.py @@ -172,7 +172,7 @@ def make_incompressible(velocity: Field, wide_stencil = not velocity.is_staggered pressure = math.solve_linear(masked_laplace, div, solve, velocity.boundary, hard_bcs, active, wide_stencil=wide_stencil, order=order, implicit=None, upwind=None, correct_skew=correct_skew) # --- Subtract grad p --- - grad_pressure = field.spatial_gradient(pressure, input_velocity.extrapolation, at=velocity.sampled_at, order=order) + grad_pressure = field.spatial_gradient(pressure, input_velocity.extrapolation, at=velocity.sampled_at, order=order, scheme='green-gauss') if hard_bcs is not None: grad_pressure *= hard_bcs velocity = (velocity - grad_pressure).with_extrapolation(input_velocity.extrapolation)