lbmpy merge requestshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests2024-01-26T15:10:19+01:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/165Rework SGS models2024-01-26T15:10:19+01:00Helen SchottenhammlRework SGS modelsThis merge request generalises the definition of subgrid-scale (SGS) models.
Until now, only the Smagorinsky model could be defined in the LBMConfig (by setting `True` or the model constant).
Now, a SGS model can be provided by an en...This merge request generalises the definition of subgrid-scale (SGS) models.
Until now, only the Smagorinsky model could be defined in the LBMConfig (by setting `True` or the model constant).
Now, a SGS model can be provided by an enumeration or as a tuple of the SGS enum and its model constant.
In the same time, this MR adds an implementation for the QR model, an isotropic minimum-dissipation model.
Furthermore, the possibility to output the eddy-viscosity directly from the SGS model calculation is added. This facilitates the post-processing and validation of turbulent flows.Helen SchottenhammlHelen Schottenhammlhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/164Refactor source tree layout2024-01-20T13:27:15+01:00Markus HolzerRefactor source tree layoutSimilar to pystencils the source tree layout of lbmpy is adapted to newer standardsSimilar to pystencils the source tree layout of lbmpy is adapted to newer standardsMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/163Refactor build system2024-01-16T16:17:45+01:00Markus HolzerRefactor build systemFixes #41
As for pystencils the build system of lbmpy is renewed to fulfill new standardsFixes #41
As for pystencils the build system of lbmpy is renewed to fulfill new standardsMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/162Extend UBB2024-01-19T09:36:28+01:00Markus HolzerExtend UBBFor the UBB boundary condition, the density at the wall is calculated from the PDFs at the wall. With this MR the density can also be prescribed by the userFor the UBB boundary condition, the density at the wall is calculated from the PDFs at the wall. With this MR the density can also be prescribed by the userMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/161Fix Ubuntu CI2024-01-15T15:30:31+01:00Frederik HennigFix Ubuntu CIAfter recent changes to the Ubuntu CI container, the CI config was no longer valid. This MR fixes it.After recent changes to the Ubuntu CI container, the CI config was no longer valid. This MR fixes it.Frederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/160[Fix] Interpolation Bounce back2024-01-22T09:44:00+01:00Markus Holzer[Fix] Interpolation Bounce backThe interpolation bounce back boundary condition was wrongly implemented because the equilibrium calculation was done by looking at the 'deviation_only' property of the lb method equilibrium. However, here we need to apply the equilibriu...The interpolation bounce back boundary condition was wrongly implemented because the equilibrium calculation was done by looking at the 'deviation_only' property of the lb method equilibrium. However, here we need to apply the equilibrium on the PDF values and not on moments etc.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/159Interpolation Boundary condition2023-12-05T12:30:02+01:00Markus HolzerInterpolation Boundary conditionImplements a Linear Bouzidi boundary condition. This is an interpolated version of a NoSlip BC and described here: https://doi.org/10.1063/1.1399290
Implements the quadratic bounce back. This is an interpolated version of a NoSlip BC an...Implements a Linear Bouzidi boundary condition. This is an interpolated version of a NoSlip BC and described here: https://doi.org/10.1063/1.1399290
Implements the quadratic bounce back. This is an interpolated version of a NoSlip BC and described here in Appendix E: https://www.sciencedirect.com/science/article/pii/S0898122115002126
The advantage of the latter is that it does not need a second fluid cell. Thus, all optimizations can be applied as usual.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/158Fix uninserted aliases in cumulant collision rules + new test cases2023-11-16T09:07:46+01:00Frederik HennigFix uninserted aliases in cumulant collision rules + new test casesToo few insertion passes where run on the cumulant kernel. Fixed that, and introduced a test case to check for desired simplification behaviour in MRT methods.Too few insertion passes where run on the cumulant kernel. Fixed that, and introduced a test case to check for desired simplification behaviour in MRT methods.Frederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/157[Fix] Warning filter in fluctuating LB test2023-11-11T02:53:54+01:00Markus Holzer[Fix] Warning filter in fluctuating LB testThe fluctuating LB test used an old syntax of the pytest module to check for warnings. This now triggers an error and lets the test fail. With this MR new syntax suggested by the pytest package is used.
Furthermore, fix of some warningsThe fluctuating LB test used an old syntax of the pytest module to check for warnings. This now triggers an error and lets the test fail. With this MR new syntax suggested by the pytest package is used.
Furthermore, fix of some warningsMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/156Create regularized methods by default2023-12-01T09:59:12+01:00Frederik HennigCreate regularized methods by defaultThis 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...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:
- [x] Changed behaviour in `creationfunctions.py`
- [x] Add test cases for desired behaviour
- [x] Check and update documentationFrederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/155Enable the Partially Saturated Cells Method2023-12-19T16:23:13+01:00Philipp SuffaEnable the Partially Saturated Cells MethodPhilipp SuffaPhilipp Suffahttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/154Add sanity check to timestep arg of get_accessor2023-09-13T10:25:01+02:00Frederik HennigAdd sanity check to timestep arg of get_accessorFrederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/153Cast field reads also in BC2023-09-29T10:43:53+02:00Markus HolzerCast field reads also in BCUsing mixed precision, field reads were not isolated in the boundary kernels. This leads to calculations in lower precision in the BCUsing mixed precision, field reads were not isolated in the boundary kernels. This leads to calculations in lower precision in the BCMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/152Added new paper to readme2023-08-07T09:02:56+02:00Frederik HennigAdded new paper to readmeFrederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/151Shorten shear wave scenario.2023-08-03T12:51:42+02:00Helen SchottenhammlShorten shear wave scenario.The shear wave scenario had too long a runtime for the nightly tests.
This merge request reduces the number of time steps per run and restricts the scenario to one resolution and viscosity. The variation in LBM models is maintained.
...The shear wave scenario had too long a runtime for the nightly tests.
This merge request reduces the number of time steps per run and restricts the scenario to one resolution and viscosity. The variation in LBM models is maintained.
These measures reduce the runtime of the entire study to approx. 4 minutes.Helen SchottenhammlHelen Schottenhammlhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/150Generalise Cumulant simplificaiton2023-08-03T12:53:59+02:00Markus HolzerGeneralise Cumulant simplificaitonIn the cumulant method, the elimination of the logarithm only works when occurring exclusively or inside a `sp.Mul` expression. This MR generalises it to detect all log expressionsIn the cumulant method, the elimination of the logarithm only works when occurring exclusively or inside a `sp.Mul` expression. This MR generalises it to detect all log expressionsMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/148Remove windows from CI2023-07-13T13:19:16+02:00Markus HolzerRemove windows from CIMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/147Fourth-order correction for cumulants2023-07-18T12:49:48+02:00Helen SchottenhammlFourth-order correction for cumulantsAdds the fourth-order diffusion correction to the D3Q27 cumulants, as proposed in [Geier et al. (2017)](https://doi.org/10.1016/j.jcp.2017.05.040). Also adds the possibility to use limiters for the third-order cumulants in order to incre...Adds the fourth-order diffusion correction to the D3Q27 cumulants, as proposed in [Geier et al. (2017)](https://doi.org/10.1016/j.jcp.2017.05.040). Also adds the possibility to use limiters for the third-order cumulants in order to increase stability.
This MR depends on the MR [pystencils!338](https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/338) and can only be merged afterwards.Helen SchottenhammlHelen Schottenhammlhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/146Remove pystencils.GPU_DEVICE2023-07-13T12:00:15+02:00Michael Kuronmkuron@icp.uni-stuttgart.deRemove pystencils.GPU_DEVICEThis function reports the sizes of L1/L2/L3 caches and free and total RAM, so why not also have it report the memory size of each GPU instead of just the selected GPU. It is not used anywhere, so the slight API change has no consequences...This function reports the sizes of L1/L2/L3 caches and free and total RAM, so why not also have it report the memory size of each GPU instead of just the selected GPU. It is not used anywhere, so the slight API change has no consequences.
Related to https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/336
test_gpu_block_size_limiting.py::test_gpu_block_size_limiting actually failed on master since https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/335, but that is due to an error in the test (it was expecting the input argument to be modified and ignoring the return value of `limit_block_size_by_register_restriction`).Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/145Replace PyCuda with CuPy2023-06-24T10:10:53+02:00Markus HolzerReplace PyCuda with CuPyReplaces [PyCuda](https://documen.tician.de/pycuda/) with [CuPy](https://cupy.dev/)
Advantages of [CuPy](https://cupy.dev/):
- AMD support
- probably higher maintained due to NVIDIA support
- SciPy compatible.Replaces [PyCuda](https://documen.tician.de/pycuda/) with [CuPy](https://cupy.dev/)
Advantages of [CuPy](https://cupy.dev/):
- AMD support
- probably higher maintained due to NVIDIA support
- SciPy compatible.Markus HolzerMarkus Holzer