lbmpy merge requestshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests2019-07-23T16:10:21+02:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/1WIP: Fluctuating MRT2019-07-23T16:10:21+02:00Michael Kuronmkuron@icp.uni-stuttgart.deWIP: Fluctuating MRTThis merge request copies @winterhalter's effort from the old lbmpy repository (https://i10git.cs.fau.de/software/pystencils/merge_requests/37).
The main things that are still missing are tests and generalization to non-D3Q19.
I gues...This merge request copies @winterhalter's effort from the old lbmpy repository (https://i10git.cs.fau.de/software/pystencils/merge_requests/37).
The main things that are still missing are tests and generalization to non-D3Q19.
I guess this still needs https://i10git.cs.fau.de/software/pystencils/merge_requests/26 to be brought forward from the old repository as it doesn't generate any RNG calls.
Fixes https://i10git.cs.fau.de/pycodegen/lbmpy/issues/2.
Related to https://i10git.cs.fau.de/walberla/walberla/issues/80.Felix WinterhalterFelix Winterhalterhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/2WIP: Fluctuating Equations non-normalized2019-08-12T16:23:02+02:00Felix WinterhalterWIP: Fluctuating Equations non-normalizedNon normalized equations for the variances.
Still need to figure out how to get lattice spacing and whether definition for mu should contain lattice time as well.
Related to walberla/walberla!220 and implements/enhances #2 Non normalized equations for the variances.
Still need to figure out how to get lattice spacing and whether definition for mu should contain lattice time as well.
Related to walberla/walberla!220 and implements/enhances #2 Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/84Use int64 for indexing2021-06-07T15:30:42+02:00Markus HolzerUse int64 for indexingFixes #18
The code is changed in the following way. As an example, a generated UBB boundary is shown. Before the adaption:
```cpp
const int32_t f_in_inv_dir_idx [] = { 0,2,1,4,3,6,5,10,9,8,7,16,15,18,17,12,11,14,13,26,25,24,23,22,2...Fixes #18
The code is changed in the following way. As an example, a generated UBB boundary is shown. Before the adaption:
```cpp
const int32_t f_in_inv_dir_idx [] = { 0,2,1,4,3,6,5,10,9,8,7,16,15,18,17,12,11,14,13,26,25,24,23,22,21,20,19 };
const int32_t f_in_inv_offsets_x [] = { 0,0,0,-1,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,-1,1,1,-1,1,-1,1,-1,1,-1 };
const int32_t f_in_inv_offsets_y [] = { 0,1,-1,0,0,0,0,1,1,-1,-1,1,-1,0,0,1,-1,0,0,1,1,-1,-1,1,1,-1,-1 };
const int32_t f_in_inv_offsets_z [] = { 0,0,0,0,0,1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1 };
const double weights [] = { 0.296296296296296,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963 };
const int32_t neighbour_offset_x [] = { 0,0,0,-1,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,-1,1,1,-1,1,-1,1,-1,1,-1 };
const int32_t neighbour_offset_y [] = { 0,1,-1,0,0,0,0,1,1,-1,-1,1,-1,0,0,1,-1,0,0,1,1,-1,-1,1,1,-1,-1 };
const int32_t neighbour_offset_z [] = { 0,0,0,0,0,1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1 };
for (int64_t ctr_0 = 0; ctr_0 < _size_indexField_0; ctr_0 += 1)
{
const int32_t x = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0]));
const int32_t y = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 4]));
const int32_t z = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 8]));
const int32_t dir = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 12]));
_data_ldc_pdfSrc[x + 452*y + 204304*z + 92345408*f_in_inv_dir_idx[dir] + f_in_inv_offsets_x[dir] + 452*f_in_inv_offsets_y[dir] + 204304*f_in_inv_offsets_z[dir]] = -0.029999999999999999*neighbour_offset_x[dir]*weights[dir] + _data_ldc_pdfSrc[92345408*dir + x + 452*y + 204304*z];
```
After the adaption:
```cpp
const int64_t f_in_inv_dir_idx [] = { 0,2,1,4,3,6,5,10,9,8,7,16,15,18,17,12,11,14,13,26,25,24,23,22,21,20,19 };
const int64_t f_in_inv_offsets_x [] = { 0,0,0,-1,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,-1,1,1,-1,1,-1,1,-1,1,-1 };
const int64_t f_in_inv_offsets_y [] = { 0,1,-1,0,0,0,0,1,1,-1,-1,1,-1,0,0,1,-1,0,0,1,1,-1,-1,1,1,-1,-1 };
const int64_t f_in_inv_offsets_z [] = { 0,0,0,0,0,1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1 };
const double weights [] = { 0.296296296296296,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0740740740740741,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.0185185185185185,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963,0.00462962962962963 };
const int64_t neighbour_offset_x [] = { 0,0,0,-1,1,0,0,-1,1,-1,1,0,0,-1,1,0,0,-1,1,1,-1,1,-1,1,-1,1,-1 };
const int64_t neighbour_offset_y [] = { 0,1,-1,0,0,0,0,1,1,-1,-1,1,-1,0,0,1,-1,0,0,1,1,-1,-1,1,1,-1,-1 };
const int64_t neighbour_offset_z [] = { 0,0,0,0,0,1,-1,0,0,0,0,1,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1 };
for (int64_t ctr_0 = 0; ctr_0 < _size_indexField_0; ctr_0 += 1)
{
const int64_t x = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0]));
const int64_t y = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 4]));
const int64_t z = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 8]));
const int64_t dir = *((int32_t *)(& _data_indexField[16*_stride_indexField_0*ctr_0 + 12]));
_data_ldc_pdfSrc[x + 452*y + 204304*z + 92345408*f_in_inv_dir_idx[dir] + f_in_inv_offsets_x[dir] + 452*f_in_inv_offsets_y[dir] + 204304*f_in_inv_offsets_z[dir]] = -0.029999999999999999*neighbour_offset_x[dir]*weights[dir] + _data_ldc_pdfSrc[92345408*dir + x + 452*y + 204304*z];
```Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/17Use Gram-Schmidt for create_mrt_orthogonal2019-11-28T20:34:47+01:00Michael Kuronmkuron@icp.uni-stuttgart.deUse Gram-Schmidt for create_mrt_orthogonal- orthogonalize automatically if no moments from literature are provided
- must specify whether weighted or unweighted orthogonality is desired
- add `lbmpy.moments.is_bulk_mode` and make `lbmpy.moments.is_shear_mode` also detect the d...- orthogonalize automatically if no moments from literature are provided
- must specify whether weighted or unweighted orthogonality is desired
- add `lbmpy.moments.is_bulk_mode` and make `lbmpy.moments.is_shear_mode` also detect the diagonal modes
- use the bulk mode ($`x^2+y^2+z^2-1`$) in orthogonalization so we get the same physical modes as in literature
We now match the literature MRTs in all the physical moments. The only exception is D3Q27, which chooses a different linear combination for the shear moments. Differences in the higher-order moments remain, but they have no effect on the model.
Fixes #5Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/131Upgrade sympy2022-10-10T13:52:21+02:00Markus HolzerUpgrade sympyUpgrade the maximum SymPy version to 1.11.1
Furthermore, small clean upUpgrade the maximum SymPy version to 1.11.1
Furthermore, small clean upMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/140update project links2023-04-09T12:29:22+02:00Markus Holzerupdate project linksAs the name saysAs the name saysMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/10update phase-field allen cahn2019-11-06T12:41:14+01:00Markus Holzerupdate phase-field allen cahnupdated the functionality and the testcases of the phase-field model conservative allen cahnupdated the functionality and the testcases of the phase-field model conservative allen cahnhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/19update of the kernel equations for the phase field model2019-12-19T23:29:13+01:00Markus Holzerupdate of the kernel equations for the phase field modelWith this update all derivatives are derived automatically with the functionality of pystencils.
Furthermore more testcases are provided.With this update all derivatives are derived automatically with the functionality of pystencils.
Furthermore more testcases are provided.https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/143Update for python 3.112023-06-04T18:00:46+02:00Markus HolzerUpdate for python 3.11Small changes for flake8 and sphinx.Small changes for flake8 and sphinx.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/29Update documentation2020-06-07T15:11:06+02:00Markus HolzerUpdate documentation-Updated documentation to remove mrt3
-Entropic is now working with new mrt methods (conserved quantaties are set to first relaxation rate)
-Updated testcases phase-field Allen Cahn
-Implemented more functions to momentbased class-Updated documentation to remove mrt3
-Entropic is now working with new mrt methods (conserved quantaties are set to first relaxation rate)
-Updated testcases phase-field Allen Cahn
-Implemented more functions to momentbased classhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/38Update conftest and readme2020-08-11T12:31:50+02:00Markus HolzerUpdate conftest and readmeDue to the update of the python environment, the conftest is updated to the new pytest version. Further, pages are hosted now on a new URL which is adapted in the readme and some minor changes are done.Due to the update of the python environment, the conftest is updated to the new pytest version. Further, pages are hosted now on a new URL which is adapted in the readme and some minor changes are done.Jan HönigJan Hönighttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/142Thermocapillary2023-12-27T21:28:49+01:00Markus HolzerThermocapillaryIntroduces Thermocapillary flows to lbmpyIntroduces Thermocapillary flows to lbmpyMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/39Thermalized LB: test 4 rel time model velocity and pressure fluctuations2020-10-20T10:29:49+02:00RudolfWeeberThermalized LB: test 4 rel time model velocity and pressure fluctuationsThis changes the fluctuating LB test to match as closely as possible what we are going to use.
Model with 4 relaxation times for shear/bulk/odd/even modes.
Tests:
* mass conservation
* momentum conservation
* <m v^2> = k_B T
* Maxwell ve...This changes the fluctuating LB test to match as closely as possible what we are going to use.
Model with 4 relaxation times for shear/bulk/odd/even modes.
Tests:
* mass conservation
* momentum conservation
* <m v^2> = k_B T
* Maxwell velocity distribution
* average stress tensor
* stress tensor fluctuations accodring to Duenweg, Schiller, LaddMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/73Test Poiseuille channel against analytical solution for several stencils2021-04-20T14:05:10+02:00RudolfWeeberTest Poiseuille channel against analytical solution for several stencilsI removed the code that compares solutions from different targets against each other, since they are now all compared to the analytical solution. The execution time can be adjusted by changing the channel width. With the current setting,...I removed the code that compares solutions from different targets against each other, since they are now all compared to the analytical solution. The execution time can be adjusted by changing the channel width. With the current setting, the solutions match up to 0.5%.https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/16Test for fluctuating LB, avg temperature and velocity distribution2019-11-21T19:50:12+01:00RudolfWeeberTest for fluctuating LB, avg temperature and velocity distributionTest the MRT method with 15 equal relaxation times
Closes #4Test the MRT method with 15 equal relaxation times
Closes #4Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/80Stream-Only Kernel Fixes2021-06-09T08:00:22+02:00Frederik HennigStream-Only Kernel FixesAmendment to !74. Changed API of `create_stream_only_kernel` to expect fields, instead of field names and/or numpy arrays, to be coherent with `create_lbm_kernel`. Also, stored pre-streaming values in temporary subexpressions - otherwise...Amendment to !74. Changed API of `create_stream_only_kernel` to expect fields, instead of field names and/or numpy arrays, to be coherent with `create_lbm_kernel`. Also, stored pre-streaming values in temporary subexpressions - otherwise values would be overwritten in in-place streaming. Adapted test case to catch this.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/114SquaredChannel2022-03-10T09:05:32+01:00Markus HolzerSquaredChannelFixes the failing square channel test in the windows pipeline. The test does not fail in other pipelines and it is hard to tell where this is coming from. The assumption for now is numerical issues that might be solved with !113Fixes the failing square channel test in the windows pipeline. The test does not fail in other pipelines and it is hard to tell where this is coming from. The assumption for now is numerical issues that might be solved with !113Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/18Skip some tests if waLBerla is not installed2020-01-09T20:22:42+01:00Stephan SeitzSkip some tests if waLBerla is not installedhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/134Simplify equilibrium terms2022-11-08T09:04:23+01:00Markus HolzerSimplify equilibrium termsFor some constellations, the equilibrium terms have grown rather large. This MR simplifies the terms to obtain a more reasonable representation of the EQ again
Fixes #37For some constellations, the equilibrium terms have grown rather large. This MR simplifies the terms to obtain a more reasonable representation of the EQ again
Fixes #37Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/107shorten test cases2021-11-16T09:11:04+01:00Markus Holzershorten test casesFixes #27Fixes #27Markus HolzerMarkus Holzer