lbmpy merge requestshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests2021-11-10T20:37:52+01:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/105Relaxation rates should be floats2021-11-10T20:37:52+01:00Markus HolzerRelaxation rates should be floatsdefault rrs should be floats. Otherwise, this gives problems in the vectorisation.default rrs should be floats. Otherwise, this gives problems in the vectorisation.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/104D3Q7 Stencil2021-11-02T21:58:04+01:00Markus HolzerD3Q7 StencilThis MR adds a D3Q7 stencil to lbmpy which can be used for advection-diffusion equations.This MR adds a D3Q7 stencil to lbmpy which can be used for advection-diffusion equations.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/103Oldroyd-B2022-02-14T09:45:15+01:00Michael Kuronmkuron@icp.uni-stuttgart.deOldroyd-BHere is the Oldroyd-B viscoelastic method I published in https://doi.org/10.1140/epje/s10189-020-00005-6. A Poiseuille flow test case is included.
Resolves https://i10git.cs.fau.de/walberla/walberla/-/issues/158Here is the Oldroyd-B viscoelastic method I published in https://doi.org/10.1140/epje/s10189-020-00005-6. A Poiseuille flow test case is included.
Resolves https://i10git.cs.fau.de/walberla/walberla/-/issues/158Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/102Remove Mathjax path2021-10-29T14:36:31+02:00Markus HolzerRemove Mathjax pathAt the moment the LaTeX rendering in the HMTL output of the docu is broken.
Apparently, the mathjax hack introduced with !92 breaks the LaTeX rendering in the doc.At the moment the LaTeX rendering in the HMTL output of the docu is broken.
Apparently, the mathjax hack introduced with !92 breaks the LaTeX rendering in the doc.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/101Fix longrun2021-10-28T10:27:17+02:00Markus HolzerFix longrun- Fixes `test_modes_central_moment_longrun`.
- Removes benchmark case, because it is outdated. The issue to reintroduce it again is #19
- Small fix to make entropic LBM work again, when relaxation rate for conserved quantities is not de...- Fixes `test_modes_central_moment_longrun`.
- Removes benchmark case, because it is outdated. The issue to reintroduce it again is #19
- Small fix to make entropic LBM work again, when relaxation rate for conserved quantities is not defined.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/100Adaption to new API2021-10-27T15:32:20+02:00Markus HolzerAdaption to new APIWith this MR, all test cases etc should be adapted to the new API. Since all test cases are touched anyway some adaptions are made additionally. The vast majority is just formatting and removing for loops over parameter sets completely t...With this MR, all test cases etc should be adapted to the new API. Since all test cases are touched anyway some adaptions are made additionally. The vast majority is just formatting and removing for loops over parameter sets completely to replace it with the pytest functionality. A larger change is the removal of the serial scenarios since these used the LBM module of waLBerlas python coupling. However, this module is removed for almost a year now.
Furthermore, the broken elementwise multiplication from SymPy is removed (https://github.com/sympy/sympy/issues/22353).
Further changes:
- It is not simple to build entropic collision operators when forces are involved. A long and clear error message has been added if such a case occurs
- Default moment sets have been moved to their own file as they only pollute the creation functions
- Addition of better documentation for the LBMConfig and LBMOptimisation Classes
- Addition of the `_get_relaxation_info_dict` function which defines how relaxation rates are set for all methods.
- Dokumentation for the Enum classes
- Filter warnings for third party warnings
- Fixing of the maximum supported SymPy version to 1.9Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/99Shan-Chen tutorial fixes2022-02-12T16:53:13+01:00Alexander ReinauerShan-Chen tutorial fixesI included the changes i made to the tutorial during the espresso summer school to make it momentum conserving.
The comparison with the reference data is now done after 1000 timesteps for the two-component version and also only done up t...I included the changes i made to the tutorial during the espresso summer school to make it momentum conserving.
The comparison with the reference data is now done after 1000 timesteps for the two-component version and also only done up to an error of 1e-4. The reason is that there is a difference in the velocity-calculation using the Guo-force correction, the reference implementation always uses the current force whereas this notebook uses the old force value. I might be wrong here but the version from this notebook seems more physical to me.Michael Kuronmkuron@icp.uni-stuttgart.deMichael Kuronmkuron@icp.uni-stuttgart.dehttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/98Generalisation of Relaxation rate setter2021-10-27T23:34:18+02:00Markus HolzerGeneralisation of Relaxation rate setterAll 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...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.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/97Draft: Zero centered PDFs2022-01-17T07:58:40+01:00Markus HolzerDraft: Zero centered PDFsThis MR separates compressible and zero centred PDFs. At the moment only incompressible methods are zero centred and this should be possible for all methods.This MR separates compressible and zero centred PDFs. At the moment only incompressible methods are zero centred and this should be possible for all methods.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/96Fix setup dependency2021-09-30T13:44:21+02:00Markus HolzerFix setup dependencyFixes #22Fixes #22Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/95Pre-Collision PDFs in Macroscopic Quantity Kernels2021-11-09T07:58:55+01:00Frederik HennigPre-Collision PDFs in Macroscopic Quantity KernelsAdded flags to `macroscopic_values_getter` and `macroscopic_values_setter` to explicitly use pre-collision PDFs. Required for consistent initialization in the presence of forces.Added flags to `macroscopic_values_getter` and `macroscopic_values_setter` to explicitly use pre-collision PDFs. Required for consistent initialization in the presence of forces.https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/94Fix smagorinsky2021-09-26T15:20:30+02:00Markus HolzerFix smagorinskyThe Smagorinsky model was adapted in !93. This change should ensure that a smagorinsky model can also be added when omega is not a symbol but a number.
However, due to a small issue, only collision rules with omega being a number can be...The Smagorinsky model was adapted in !93. This change should ensure that a smagorinsky model can also be added when omega is not a symbol but a number.
However, due to a small issue, only collision rules with omega being a number can be generated at the moment. With this MR, this issue is fixed again.
Furthermore, some wrong type hints in the LBMConfig class have been correctedMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/93Dataclasses for method creation2021-09-26T14:55:52+02:00Markus HolzerDataclasses for method creationIn lbmpy large dicts are created to manage all parameters for the lb method and the pystencils kernel parameters. This MR introduces dataclasses to manage all these parameters. Furthermore, a better integration with pystencils is achieve...In lbmpy large dicts are created to manage all parameters for the lb method and the pystencils kernel parameters. This MR introduces dataclasses to manage all these parameters. Furthermore, a better integration with pystencils is achieved since pystencils introduced dataclasses lately.
Fixes #1Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/92Rework force models and central moments transform2021-10-28T13:19:18+02:00Markus HolzerRework force models and central moments transformThis MR provides a complete rework of the force model, so they are functioning in the moment space and the central moment space.
Furthermore, a new implementation for the shift matrix is provided and a rework of the central moment based...This MR provides a complete rework of the force model, so they are functioning in the moment space and the central moment space.
Furthermore, a new implementation for the shift matrix is provided and a rework of the central moment based method.
The central moment transform classes are adapted to be able to work with the changes.
TODOs:
- [x] Test Fixed Density BC when method has a force model
- [x] Forward/Backward Transform for D3Q15
- [x] make cumulants aware of polynomials
- [x] rework cumulants with forceMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/91Improved Moment-Based Method2021-08-05T20:33:29+02:00Frederik HennigImproved Moment-Based MethodRemade collision rule derivation for the moment-based method. Instead of bunching moment matrix multiplication, moment-wise relaxation and backward transformation into one equation, these steps are now split:
- Pre-collision moments are...Remade collision rule derivation for the moment-based method. Instead of bunching moment matrix multiplication, moment-wise relaxation and backward transformation into one equation, these steps are now split:
- Pre-collision moments are computed from populations by a chimera transform (or, optionally, matrix-vector-multiplication) and stored as subexpressions. This step also simplifies the conserved quantity equations by expressing them in terms of raw moments.
- Relaxation and forces are applied in moment space. Post-collision moments are stored as subexpressions. To this end, a `moment_space_forcing` interface was added to common force models.
- Post-collision populations are computed from post-collision moments by matrix-vector-multiplication with splitting of symmetric and asymmetric parts.
- If moment-space forcing is not available, force terms are added in populations space.
The new derivation process yields MRT collision rules with much fewer FLOPs than previously obtained within lbmpy. For D3Q27 compressible orthogonal weighted MRT, only 441 operations are counted, where previously 750-780 FLOPs were counted. The old derivation method is still available and used by default for SRT and TRT, still yielding the most efficient equations in population space.
Requires functionality introduced in pycodegen/pystencils!258.
To Do:
- [x] Documentation and Tutorial Notebookshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/90Cumulant LBM Minor Fixes2021-07-01T13:10:54+02:00Frederik HennigCumulant LBM Minor Fixes- Fixed incorrect section about forcing in Cumulant Tutorial Notebook
- Made Shift-Matrix based transform the default, since it is more efficient in most situations- Fixed incorrect section about forcing in Cumulant Tutorial Notebook
- Made Shift-Matrix based transform the default, since it is more efficient in most situationshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/89FreeSlip2021-07-09T10:14:40+02:00Markus HolzerFreeSlipThis MR adds FreeSlip boundary conditions to lbmpy. Fixes #3This MR adds FreeSlip boundary conditions to lbmpy. Fixes #3Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/88Add Authors to lbmpy2021-07-05T12:35:50+02:00Markus HolzerAdd Authors to lbmpyAdds authors.txt to lbmpy and citations to the ReadMe. Furthermore, the CI Skript was adapted slightly to have a pre test stage.Adds authors.txt to lbmpy and citations to the ReadMe. Furthermore, the CI Skript was adapted slightly to have a pre test stage.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/87Remove gmpy workaround2021-06-26T15:43:58+02:00Markus HolzerRemove gmpy workaroundRemove pystencils gmpy import because it does not exist anymoreRemove pystencils gmpy import because it does not exist anymoreMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/86Draft: Fix sparse lbm2022-02-12T20:49:41+01:00Markus HolzerDraft: Fix sparse lbmThis MR updates the sparse LBM by adding correct boundary handling and renewal of the API.This MR updates the sparse LBM by adding correct boundary handling and renewal of the API.Markus HolzerMarkus Holzer