Skip to content

Create regularized methods by default

Frederik Hennig requested to merge da15siwa/lbmpy:single_relaxation_rate into master

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:

  • SRT: A single relaxation rate omega is used
  • TRT: A free rate omega and a bound rate computed from the magic number are used
  • MRT/Central Moment/Cumulant: A regularized method is created; only the shear-viscosity governing relaxation rate is set to omega, 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:

  • Changed behaviour in creationfunctions.py
  • Add test cases for desired behaviour
  • Check and update documentation
Edited by Frederik Hennig

Merge request reports