lbmpy issueshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/issues2023-06-07T10:59:34+02:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/issues/35Fix Quicktests2023-06-07T10:59:34+02:00Markus HolzerFix QuicktestsOne of the quicktests is commented out for the windows pipeline due to very strange instabilities that can not be reproduced outside the pipeline:
https://i10git.cs.fau.de/pycodegen/lbmpy/-/blob/master/conftest.py#L65
It would be good t...One of the quicktests is commented out for the windows pipeline due to very strange instabilities that can not be reproduced outside the pipeline:
https://i10git.cs.fau.de/pycodegen/lbmpy/-/blob/master/conftest.py#L65
It would be good to find out what happens here. Also, the quicktests make no sense so they should be reworked.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/issues/25Minimal SymPy succeeded although errors are thrown2023-04-05T16:28:55+02:00Markus HolzerMinimal SymPy succeeded although errors are thrownMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/issues/15Bug in Vectorization with GCC < 8.1.0 and Intel C++ Compiler2022-03-31T19:46:23+02:00Markus HolzerBug in Vectorization with GCC < 8.1.0 and Intel C++ CompilerWhen compiled with `-Ofast -march=native` (default in lbmpy and pystencils), the following channel flow test case is subject to numerical instabilities in the PDF field.
This was observed with various GCC compiler versions below GCC 8.1....When compiled with `-Ofast -march=native` (default in lbmpy and pystencils), the following channel flow test case is subject to numerical instabilities in the PDF field.
This was observed with various GCC compiler versions below GCC 8.1.0 and with the Intel C++ compiler versions 17 to 19 (20 was not tested). It could not be observed with the LLVM compiler versions 7 to 10.
The bug is supposedly present in any version of lbmpy and pystencils, as it can be reproduced with lbmpy and pystencils versions 0.2.9, 0.2.13 and 0.2.14.
The minimal required compile flags to get the instabilities on GCC are `-O3 -fno-signed-zeros -fno-trapping-math -fassociative-math -mavx`.
The GCC commit that fixed this issue was identified to be [7c080ad](https://github.com/gcc-mirror/gcc/commit/7c080ade9d8198958a1a37854d5cc56f7b76b9f4). There, the cost estimation for vectorization changes, such that the auto-vectorization behavior differs. We tried `-fvect-cost-model=unlimited` to force vectorization irrespective of costs, but that did not make a difference. **Since we do not know which commit fixes the actual bug, it is possible that it is present in gcc 8 or even the current gcc 10** -- only the specific code sample below no longer runs into it because it does not get auto-vectorized anymore.
```
from lbmpy.session import *
from lbmpy.moments import *
ch = create_channel(domain_size=(300, 100), force=5e-5, initial_velocity=(0.5, 0),
relaxation_rate=1.8)
ch.run(6900)
print(ch.velocity[0.5, :, 0])
```
While the flow field initially seems to be stable, it becomes unstable between time steps 6800 and 6900 and ends up with NaNs.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/issues/14Wrong momentum density calculation for compressible methods with forces.2021-04-30T13:22:18+02:00Helen SchottenhammlWrong momentum density calculation for compressible methods with forces.In _conservedquantitycomputation.py_ (line 210f) the calculation of the momentum density uses the _macroscopic velocity shift_
```python
mom_density_eq_coll = apply_force_model_shift('macroscopic_velocity_shift', dim, mom_density_eq_coll...In _conservedquantitycomputation.py_ (line 210f) the calculation of the momentum density uses the _macroscopic velocity shift_
```python
mom_density_eq_coll = apply_force_model_shift('macroscopic_velocity_shift', dim, mom_density_eq_coll,
self._forceModel, self._compressible)
```
which defaults to <img src="https://latex.codecogs.com/svg.latex? &space;\frac{\mathbf{F}}{2\rho}" />.
When using this momentum density to calculcate the velocity (as it is done in all generated lattice models in waLBerla), we divide by the density again, resulting in the overall velocity equation
<img src="https://latex.codecogs.com/svg.latex? &space;\mathbf{u} = \frac{1}{\rho} \sum_i f_i \mathbf{c}_i + \frac{\mathbf{F}}{2\rho^2}" />,
which is obviously wrong.
Affected are all _lbmpy_ simulations that work directly on the momentum denisty, and all _waLBerla_ simulations that use generated lattice models and calculate the velocity at some point (in particular, the VTK output will be slightly off).Helen SchottenhammlHelen Schottenhammlhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/issues/10KBC LBMs do not work with the current MRT description2020-06-15T20:59:48+02:00Markus HolzerKBC LBMs do not work with the current MRT descriptionConserved quantities are relaxed with zero. If a KBC is created it looks at the number of relaxation rates which has to be 2. Since the conserved quantities are already fixed with 0 it causes problems.
Possible fix would be to state th...Conserved quantities are relaxed with zero. If a KBC is created it looks at the number of relaxation rates which has to be 2. Since the conserved quantities are already fixed with 0 it causes problems.
Possible fix would be to state the relaxation time of the conserved quantities as a parameter for the create functions.Markus HolzerMarkus Holzer