lbmpy merge requestshttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests2020-06-22T13:48:19+02:00https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/33Fix split error2020-06-22T13:48:19+02:00Markus HolzerFix split errorWhen the split algorithm is used in combination with an output field a `KeyError` error was thrown. This error arises because the split simplification is added before the output fields were added to the collision rule. Thus, the simplifi...When the split algorithm is used in combination with an output field a `KeyError` error was thrown. This error arises because the split simplification is added before the output fields were added to the collision rule. Thus, the simplification strategy did not know about the additional assignments.
The error is was fixed by reordering the code in `createfunctions.py`.Helen SchottenhammlHelen Schottenhammlhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/32Fix sympy 1.62020-06-15T20:58:14+02:00Markus HolzerFix sympy 1.6fixed bugs caused by upgrading to sympy 1.6fixed bugs caused by upgrading to sympy 1.6https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/31Remove mrt32020-06-10T18:59:16+02:00Markus HolzerRemove mrt3https://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/28Mention `opencl` option in README.md2020-06-03T08:52:24+02:00Stephan SeitzMention `opencl` option in README.mdhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/25Actually test GPU in test_boundary_handling.test_simple2020-03-12T21:17:43+01:00Stephan SeitzActually test GPU in test_boundary_handling.test_simpleWas only allocating buffers for GPU but then doing boundary handling on
CPUWas only allocating buffers for GPU but then doing boundary handling on
CPUhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/26Add test to compare results from OpenCL, CPU, CUDA in a full LBM simulation2020-03-12T21:17:06+01:00Stephan SeitzAdd test to compare results from OpenCL, CPU, CUDA in a full LBM simulationFor some reason their result does not agree with the calculated reference velocity.
Did not check for the analytical solution.
https://i10git.cs.fau.de/pycodegen/lbmpy/issues/9For some reason their result does not agree with the calculated reference velocity.
Did not check for the analytical solution.
https://i10git.cs.fau.de/pycodegen/lbmpy/issues/9https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/27Fix pip installation2020-02-27T18:57:38+01:00Dominik Thoennesdominik.thoennes@fau.deFix pip installationfix installation with pip where no git is available.fix installation with pip where no git is available.Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/24Enable iterative initialization for target='opencl'2020-02-22T11:28:26+01:00Stephan SeitzEnable iterative initialization for target='opencl'Just by looking on it: I guess here 'self._gpu' should be used to (maybe) also work with 'opencl'.Just by looking on it: I guess here 'self._gpu' should be used to (maybe) also work with 'opencl'.https://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/22CI: Replace minimal-ubuntu job with ubuntu2020-01-24T12:15:58+01:00Michael Kuronmkuron@icp.uni-stuttgart.deCI: Replace minimal-ubuntu job with ubuntuThe case of testing that pystencils does not depend on any optional dependencies is still fulfilled by the minimal_conda image.
Depends on https://i10git.cs.fau.de/pycodegen/pycodegen/merge_requests/9.
Fixes https://i10git.cs.fau.de/pyc...The case of testing that pystencils does not depend on any optional dependencies is still fulfilled by the minimal_conda image.
Depends on https://i10git.cs.fau.de/pycodegen/pycodegen/merge_requests/9.
Fixes https://i10git.cs.fau.de/pycodegen/pystencils/issues/19.Stephan SeitzStephan Seitzhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/13Execute LBM scenario with OpenCL2020-01-09T20:24:34+01:00Stephan SeitzExecute LBM scenario with OpenCLIt compiles, it runs, so it's correct I guess...
:shrug:It compiles, it runs, so it's correct I guess...
:shrug:Martin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/lbmpy/-/merge_requests/20Add custom timeloop_creation_function for LatticeBoltzmannStep2020-01-09T20:23:33+01:00Stephan SeitzAdd custom timeloop_creation_function for LatticeBoltzmannStepWe use a custom Timeloop subclass for a student project.We use a custom Timeloop subclass for a student project.https://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/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/21minor documentation fix for Shan-Chen2019-12-19T23:28:41+01:00Michael Kuronmkuron@icp.uni-stuttgart.deminor documentation fix for Shan-ChenThis sum counts over the number of lattice vectors, which is not necessarily (and not in this 2-dimensional test) 19.This sum counts over the number of lattice vectors, which is not necessarily (and not in this 2-dimensional test) 19.Martin BauerMartin Bauerhttps://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/15Fluctuating MRT: requires weighted-orthogonal method2019-11-27T16:47:42+01:00Michael Kuronmkuron@icp.uni-stuttgart.deFluctuating MRT: requires weighted-orthogonal methodThis merge request makes sure that one gets an error message if an inappropriate LB method is chosen. Currently, `create_mrt_orthogonal` does not allow for explicitly choosing weighted vs. unweighted orthogonalization (see #5), but I int...This merge request makes sure that one gets an error message if an inappropriate LB method is chosen. Currently, `create_mrt_orthogonal` does not allow for explicitly choosing weighted vs. unweighted orthogonalization (see #5), but I intend to fix that soon.
I still need to talk to Ulf Schiller to learn whether his specific orthogonalization of D3Q19 involved any secret tricks.
Closes #6.Martin BauerMartin Bauerhttps://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/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/11Fluctuating MRT: use the correct prefactors2019-11-06T12:41:01+01:00Michael Kuronmkuron@icp.uni-stuttgart.deFluctuating MRT: use the correct prefactorsAs discovered by @rudolfweeber, the temperatures were wrong. This happened because we didn't correctly calculate the normalization prefactors.
I have now confirmed that `stencil="D3Q19", method="mrt"` produces the same prefactors as t...As discovered by @rudolfweeber, the temperatures were wrong. This happened because we didn't correctly calculate the normalization prefactors.
I have now confirmed that `stencil="D3Q19", method="mrt"` produces the same prefactors as the [Ladd/Schiller/Dünweg](https://doi.org/10.1103/PhysRevE.76.036704)-style D3Q19 MRT. Thermalization should probably also work when using any of the other methods (TRT, SRT, MRT3), but there no reference values of these prefactors are available in literature.
That paper also provides reference values for `stencil="D2Q9", method="mrt"`, which we reproduce after switching to their orthogonalization:
```diff
--- a/lbmpy/methods/creationfunctions.py
+++ b/lbmpy/methods/creationfunctions.py
@@ -10,7 +10,7 @@ from lbmpy.maxwellian_equilibrium import (
compressible_to_incompressible_moment_value, get_cumulants_of_continuous_maxwellian_equilibrium,
get_cumulants_of_discrete_maxwellian_equilibrium,
get_moments_of_continuous_maxwellian_equilibrium,
- get_moments_of_discrete_maxwellian_equilibrium)
+ get_moments_of_discrete_maxwellian_equilibrium, get_weights)
from lbmpy.methods.abstractlbmethod import RelaxationInfo
from lbmpy.methods.conservedquantitycomputation import DensityVelocityComputation
from lbmpy.methods.cumulantbased import CumulantBasedLbMethod
@@ -388,9 +388,16 @@ def create_mrt_orthogonal(stencil, relaxation_rate_getter=None, maxwellian_momen
moment_to_relaxation_rate_dict = OrderedDict()
if have_same_entries(stencil, get_stencil("D2Q9")):
moments = get_default_moment_set_for_stencil(stencil)
- orthogonal_moments = gram_schmidt(moments, stencil)
+ weights = get_weights(stencil, sp.Rational(1,3))
+ orthogonal_moments = gram_schmidt(moments, stencil, weights)
orthogonal_moments_scaled = [e * common_denominator(e) for e in orthogonal_moments]
nested_moments = list(sort_moments_into_groups_of_same_order(orthogonal_moments_scaled).values())
+ sq = x ** 2 + y ** 2
+ nested_moments[2][0] = 3 * sq - 2
+ nested_moments[2][1] = 2 * x ** 2 - sq
+ nested_moments[3][0] = (3 * sq - 4) * x
+ nested_moments[3][1] = (3 * sq - 4) * y
+ nested_moments[4][0] = 9 * sq ** 2 - 15 * sq + 2
elif have_same_entries(stencil, get_stencil("D3Q15")):
sq = x ** 2 + y ** 2 + z ** 2
nested_moments = [
```Martin BauerMartin Bauer