This MR changes how create_lb_method
handles relaxation rates when none are specified by the user. Also, the documentation of the handling of relaxation rates is clarified.
Previous Behaviour: When the user specifies no relaxation rates, all relaxation rates of the respective method are set to sp.Symbol('omega')
.
New Behaviour: When the user specifies no relaxation rates, the following default configurations are set up:
omega
is usedomega
and a bound rate computed from the magic number are usedomega
, all others are set to unity.Rationale: Creating a method with just one relaxation rate as default behaviour is sensible. This relaxation rate is expected to govern the most important physics, i.e. the shear viscosity. This is achieved by regularized methods, while they also provide the highest level of stability. On the other hand, I observed that setting all relaxation rates to the same value omega
will cause rapid instabilities in high Reynolds-number flows, whose cause is hard to track down if you are not aware how lbmpy determines relaxation rates.
Progress:
creationfunctions.py