-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about the random intial velocity in notebook spectral_forced_turbulence.ipynb #99
Comments
The spectral method code currently always imposes periodic boundary conditions. You can find some references to the particular formulation used in the source code, and eventually we'll probably write it up in a more detailed way in a paper. To answer your second question, the solution is not exactly the same at the first and last array values, because they are off by one grid point, i.e., we keep track of the values |
Thanks for your timely reply! I guess now I understand what you are talking about. Basically the initial state But I have one additional question. This snippet of code will return an initial velocity u,v with shape (256, 256).
As you mentioned, u, v should only contain the value at two boundaries (e.g left and bottom). It seems to imply that u, v, vorticity0 should not be evaluated at the uniform grid Looking forward to your reply. |
Hello,
This is a very nice JAX implementation for CFDs! I have a few questions about your latest released notebook spectral_forced_turbulence.ipynb.
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.
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)
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.
The text was updated successfully, but these errors were encountered: