Skip to content
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

Should we enforce dealiasing before any calculation of nonlinear terms? #247

Closed
navidcy opened this issue May 31, 2021 · 7 comments · Fixed by #246
Closed

Should we enforce dealiasing before any calculation of nonlinear terms? #247

navidcy opened this issue May 31, 2021 · 7 comments · Fixed by #246
Labels
❓ question Further information is requested

Comments

@navidcy
Copy link
Member

navidcy commented May 31, 2021

I think we should be applying dealias!(sol, prob.grid) before any calculations of quadratic nonlinearities. We were getting away with this up to now either because of viscosity/hyperviscosity damping high-wavenumber modes or due to the Filtered time steppers.

@navidcy navidcy added the ❓ question Further information is requested label May 31, 2021
@glwagner
Copy link
Member

I think it should be user choice, but this is a good default.

@navidcy
Copy link
Member Author

navidcy commented May 31, 2021

Well I don't understand exactly what you may be implying.

Also, e.g., if a user wants to solve 2D Navier-Stokes with advection terms like u ∂ζ/∂y + v ∂ζ/∂x they should be, in principle, able to do it. But they will have to write their own module...

I'm just saying that modules should solve the right equations and, of course, if a user wants to do something else they can do it. The modules claim that they compute nonlinear quadratic terms but they have aliasing error if sol is not dealiased properly, don't they? So I'm only suggesting we make the modules compute what they claim to compute (within the limits of their resolution restrictions).

@glwagner
Copy link
Member

glwagner commented Jun 1, 2021

So I'm only suggesting we make the modules compute what they claim to compute

Can you be more specific? Do we claim that we dealias nonlinear products?

@navidcy
Copy link
Member Author

navidcy commented Jun 1, 2021

No, we "claim" that modules compute, e.g., u*ζ, and derivatives of this. But in fact, it computes u*ζ+aliasing errors due to the finite resolution of the grid. Right?

@glwagner
Copy link
Member

glwagner commented Jun 1, 2021

We compute a numerical approximation to u*ζ which contains both aliasing errors (if not dealiased, and if there is non-zero power at aliased wavenumbers) and truncation errors (always).

@navidcy
Copy link
Member Author

navidcy commented Jun 1, 2021

Yes. I was at some point mislead to think that if you have filter or hyper viscosity than there is no aliasing errors though. And I'm trying to avoid this situations for others.

@glwagner
Copy link
Member

glwagner commented Jun 1, 2021

Heh, well many users will not run simulations with aliasing errors if dealiasing is default. I agree with that. I'm not sure anybody will be the wiser regarding an understanding of aliasing errors though.

One caveat is that the effective resolution of simulations with dealiasing is 2/3 or what's specified. So people will write nx=256 and not realize that their simulation in fact has a resolution of 192. That's one argument for requiring users to intentionally dealias.

Or you can go the way of dedalus and use 3/2 dealiasing. That's certainly the right way to do it if one needs to define a "right" way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants