Question about the random intial velocity in notebook spectral_forced_turbulence.ipynb
- Dominant language
- Jupyter Notebook
- Stars
- 964
- Forks
- 142
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 1
Description
Hello,
This is a very nice JAX implementation for CFDs! I have a few questions about your latest released notebook [spectral_forced_turbulence.ipynb](https://github.com/google/jax-cfd/blob/main/notebooks/spectral_forced_turbulence.ipynb).
1. What is the exact NS equation that the notebook aims to solve? Would it be possible to provide some detailed expressions of NS equations and boundary conditions? Or would it be possible to provide some references? I think It will be super helpful to people like me who are more familiar with machine learning and know less about CFD.
2. If I understand correctly, I think the code aims to solve the NS equation (vorticity-velocity form) using the pseudo-spectral method. So we need to enforce periodic boundary conditions for the velocity (or vorticity?) However, when I try to run the following piece of code (which should give me a random velocity field and visualize it at the boundary)
```
v0 = cfd.initial_conditions.filtered_velocity_field(jax.random.PRNGKey(0), grid, max_velocity, 4)
u = v0[0].data
v = v0[1].data
plt.plot(u[:, 0])
plt.plot(u[:, -1])
plt.show()
plt.plot(u[0, :])
plt.plot(u[-1, :])
plt.show()
```
I got the following figures below. It seems that the periodic boundary condition is not fully imposed. Could you please take a look or correct me if I am wrong?


Once again, this is really a project! Looking forward to your reply.
Contributor guide
Assessment
This issue has not been assessed yet.