Open hangzhou188 opened 9 months ago
diffuse.explicit
and (𝑢⋅∇)𝑢 by the chosen advect
function. With higher-order spatial integration, the terms are computed within the momentum_equation
function.Thank you a lot! I am trying to run the code you provided in the colab, and I am running into some errors here:
Traceback (most recent call last):
File "
The above error occurred when running the code v_trj, p_trj = iterate(multi_step, batch(time=100), v0, p0, dt=0.005, range=trange)
. Would you please help me solve this problem?
I can run the Higher-order Fluid Simulations notebook in Colab without error.
You are talking about this cell, right?
v0 = StaggeredGrid(0, **DOMAIN)
p0 = CenteredGrid(0, **DOMAIN)
multi_step = lambda *x, **kwargs: iterate(rk4_step, 25, *x, **kwargs)
v_trj, p_trj = iterate(multi_step, batch(time=2), v0, p0, dt=0.005, range=trange)
vis.plot(field.curl(v_trj.with_extrapolation(0)), animate='time')
That cell should show a progress bar. Does that show up?
Could you try running
!pip uninstall phiflow phiml
!pip install phiflow
and restarting your runtime?
Hi, when I ran the code with default environment, i.e. jax and cpu, I got no error here. However, when I tried to replace the first line with from phi.torch.flow import *
and tried to run the simulation with cuda, I got the above error.
I'll look into it.
The higher-order solvers are still under development and at the moment only the Jax version is fully tested. So if you can switch to Jax, I'd recommend using it.
Hi, I am interested in fluid simulation, and i am following the codes at https://colab.research.google.com/github/tum-pbs/PhiFlow/blob/develop/docs/Fluid_Simulation.ipynb#scrollTo=6V52HLkhqWff. I have two questions:
Thank you very much! Your project truly helps me a lot.