-
Notifications
You must be signed in to change notification settings - Fork 32
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
Convention for the hypoviscosity order: should it be positive or negative #115
Comments
It's not really hypoviscosity but a "second viscosity". I think it's better to have the primary and secondary viscosity use the same sign convention. Note that there's nothing that prevents one from using a negative exponent in the primary viscosity, either. The point of having two viscosities is just flexibility and since we can't dictate that one is "hyper" and one is "hypo", I don't think we should imply anything of the sort. We should point out that this is the intent of this feature, however. Users may also specify Laplacian viscosity and a high-order hyperviscosity. |
sure... fair point |
I agree that it should have the same sign convention as the first. One route in the code is to refer to one as small-scale viscosity and the other as large-scale viscosity by convention. In the Docs it could then be stated that
|
Now I noticed, that with the same sign convention, the GeophysicalFlows.jl/src/twodnavierstokes.jl Lines 269 to 281 in 9ccea29
GeophysicalFlows.jl/src/twodnavierstokes.jl Lines 343 to 357 in 9ccea29
They can be combine into a single function with an optional keyword argument? @glwagner any suggestion on what would be the most efficient way to do that? Can we dispatch on the parameter variable name? |
@navidcy You're right about the drag/dissipation being indistinguishable with the same sign convention. An alternative approach (outlined below) could be to have only one viscous input with two properties (viscosity
|
@BrodiePearson I think you took this one level up :) I cleared up the boiler-plate with 28a4a76. |
Your suggestion above is nice but perhaps let's leave it for a future PR and not #174... |
@BrodiePearson's suggestion of using a single viscosity object is a good one. You might maximize performance with tuples rather than arrays (since the length of a tuple is known statically, you can dispatch / unroll loops over tuples). |
At the moment, the code assumes that hypoviscosity order must is negative; see, e.g.,
GeophysicalFlows.jl/src/twodnavierstokes.jl
Line 93 in 47a2b51
but the Docs in some places imply that it is positive, e.g.,
GeophysicalFlows.jl/docs/src/modules/twodnavierstokes.md
Line 32 in 47a2b51
Let's choose one of the two conventions and smooth out everything in source code, examples, and docs (across all modules). Opinions?
The text was updated successfully, but these errors were encountered: