Closed aypee19 closed 1 year ago
Hi, the proper way to do this would be
INFLOW_LEFT = extrapolation.combine_by_direction(normal=v_inflow, tangential=0)
velocity = StaggeredGrid(0, extrapolation.combine_sides(x=(INFLOW_LEFT, extrapolation.BOUNDARY), y=0), x=50, y=32)
This is not yet supported, though. I'll work on a fix and let you know when it's ready.
I'm strugling to set the extrapolations of a velocity field. For example, how to set an inflow boundary condition on the left side, and neumann conditions on the others?
Among other things, I tried this:
But it has no effect when doing my simple fluid simulation (
advect
andmake_incompressible
) Moreover I can't compile a function using this velocity field like this.I know I can bypass this issue by setting a BOUNDARY extrapolation on each side and setting the velocity on the lower x at each step, like in the pipe demo, but physically it is not the same, especially in the
make_incompressible
step. I've been trying to dig into how extrapolations are used in calculations, but I'm not yet comfortable enough with phiflow to understand it all. ^^What is the correct way to set extrapolations?