Skip to content
Snippets Groups Projects

Generalisation of Relaxation rate setter

Closed Markus Holzer requested to merge holzer/lbmpy:relaxationrates into master

All methods that have a high number of free relaxation rates have different logic for how the list of relaxation rates is set. First of all, this causes a lot of confusing and unnecessary code and second it is confusing for the user.

In this MR the logic for setting the relaxation rate is generalised and then used in all methods.

  • If only one relaxation rate is given by the user it is set as the shear relaxation rate.
  • If a relaxation rate for all moments is defined they are just used.
  • Otherwise, the conserved moments are relaxed with zero, the next two relaxation rates in the list are used for bulk and shear viscosity and the remaining ones are used to relax a complete group of the same order. If too many relaxation rates are given the list is just cut and the remaining ones have no influence.

Merge request reports

Pipeline #34855 failed

Pipeline failed for ff76158c on holzer:relaxationrates

Approval is optional

Closed by Markus HolzerMarkus Holzer 3 years ago (Oct 27, 2021 9:34pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
101 100 By using the continuous Maxwellian we automatically get a compressible model.
102 101
103 102 Args:
104 stencil: nested tuple defining the discrete velocity space. See `get_stencil`
103 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 162 159 Creates a generic moment-based LB method.
    163 160
    164 161 Args:
    165 stencil: sequence of lattice velocities
    162 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 183 181 Creates a moment-based LB method using a given equilibrium distribution function
    184 182
    185 183 Args:
    186 stencil: see create_with_discrete_maxwellian_eq_moments
    184 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 63 64 Instance of either :class:`lbmpy.methods.momentbased.MomentBasedLbMethod` or
    64 65 :class:`lbmpy.methods.momentbased.CentralMomentBasedLbMethod`
    65 66 """
    66 if isinstance(stencil, str):
    67 stencil = get_stencil(stencil)
    68 67 mom_to_rr_dict = OrderedDict(moment_to_relaxation_rate_dict)
    69 68 assert len(mom_to_rr_dict) == len(stencil), \
  • 212 209 r"""Creates a single relaxation time (SRT) lattice Boltzmann model also known as BGK model.
    213 210
    214 211 Args:
    215 stencil: nested tuple defining the discrete velocity space. See :func:`lbmpy.stencils.get_stencil`
    212 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 260 253 For possible parameters see :func:`lbmpy.methods.create_trt`
    261 254
    262 255 Args:
    263 stencil: nested tuple defining the discrete velocity space. See :func:`lbmpy.stencils.get_stencil`
    256 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 278 271 Creates a MRT method using non-orthogonalized moments.
    279 272
    280 273 Args:
    281 stencil: nested tuple defining the discrete velocity space. See :func:`lbmpy.stencils.get_stencil`
    274 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 301 293 Creates moment based LB method where the collision takes place in the central moment space.
    302 294
    303 295 Args:
    304 stencil: nested tuple defining the discrete velocity space. See :func:`lbmpy.stencils.get_stencil`
    296 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • 720 457 r"""Creates a cumulant lattice Boltzmann model.
    721 458
    722 459 Args:
    723 stencil: nested tuple defining the discrete velocity space. See :func:`lbmpy.stencils.get_stencil`
    460 stencil: instance of :class:`lbmpy.stencils.LBStenil`
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading