TypeError: unsupported operand type(s) for >>: 'CenteredGrid' and 'StaggeredGrid' in Navier-Stokes Forward Simulation
topsy404 opened this issue · 1 comments
topsy404 commented
Thanks for the wonderful work with vivid examples.
When I try to run the Navier-Stokes Forward Simulation demo, I got the following error.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-6c1e44e4d5ef> in <module>()
7 return velocity, smoke, pressure
8
----> 9 velocity, smoke, pressure = step(velocity, smoke, None, dt=DT)
10
11 print("Max. velocity and mean marker density: " + format( [ math.max(velocity.values) , math.mean(smoke.values) ] ))
<ipython-input-4-6c1e44e4d5ef> in step(velocity, smoke, pressure, dt, buoyancy_factor)
1 def step(velocity, smoke, pressure, dt=1.0, buoyancy_factor=1.0):
2 smoke = advect.semi_lagrangian(smoke, velocity, dt) + INFLOW
----> 3 buoyancy_force = smoke * (0, buoyancy_factor) >> velocity # resamples smoke to velocity sample points
4 velocity = advect.semi_lagrangian(velocity, velocity, dt) + dt * buoyancy_force
5 velocity = diffuse.explicit(velocity, NU, dt)
TypeError: unsupported operand type(s) for >>: 'CenteredGrid' and 'StaggeredGrid'
What do the >>
mean here?
topsy404 commented
fixed by this commit.