-
Notifications
You must be signed in to change notification settings - Fork 187
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
Correct second order term for forces in LB #3885
Conversation
The prefactor for the traceless part of the second order term is (1+gamma_shear)/2. Terms with this prefactor must cancel in the trace. Cf. Eq. (4.61) and (4.67) in my thesis.
This matches https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/34 under the following assumptions:
Regarding the first assumption: When comparing via the code that calculates the viscosity, it seems like the sign of omega is flipped... This suggests that lambda (in Ladd&Verberg and @uschille's notation) is -1*omega (in Walberla/lbmpy notation) and I would need to flip a bunch of signs over in lbmpy/Walberla. @RudolfWeeber, since you have already compared notation between Espresso and lbmpy/Walberla, you should be able to shed some light on this. The second assumption is confirmed by looking at espresso/src/core/grid_based_algorithms/lb.cpp Lines 806 to 823 in 2fbea6e
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed the sign error of omega vs. lambda in Walberla too.
Any chance to have a simple test for that? |
Unfortunately we couldn't come up with a simple physical test. We have tests in lbmpy that check the mathematical expression in mode space though. |
Since it only affects the second order terms, one would have to look into convergence and use different combinations of relaxation parameters I think. So there's probably no "simple" test. Nobody noticed any deviations in 10+ years after all... |
The prefactor for the traceless part of the second order term is (1+gamma_shear)/2. Terms with this prefactor must cancel in the trace. Cf. Eq. (4.61) and (4.67) in my thesis. Description of changes: - Replace `gamma_bulk` by `gamma_shear` in the corresponding terms in `lb_apply_forces`
The prefactor for the traceless part of the second order term is (1+gamma_shear)/2. Terms with this prefactor must cancel in the trace. Cf. Eq. (4.61) and (4.67) in my thesis.
Description of changes:
gamma_bulk
bygamma_shear
in the corresponding terms inlb_apply_forces