Commit e73aa05d authored by mischa's avatar mischa
Browse files

Minor Bugfix

parent 29bb1276
......@@ -278,13 +278,195 @@ class Lattice:
(1 / (6 * c_s_sq ** 2) * (
(u_x * c_ix[i] + u_y * c_iy[i]) ** 4 / (4 * c_s_sq ** 2) - (
3 * (u_x ** 2 + u_y ** 2) *
(u_x * c_ix[i] + u_y * c_iy[i]) ** 2) / (2 * c_s_sq) + 3 * (
(u_x * c_ix[i] + u_y * c_iy[i]) ** 2) / (2 * c_s_sq) + 3/4 * (
u_x ** 4 + u_y ** 4)))
symbolic_description.append(
ps.Assignment(dst[0, 0](i), omega * feq_formula + (1 - omega) * dst[0, 0](i))
)
if self._debug:
raise AssertionError("debug in lbmweights not valid")
print("debug")
sym = symbolic_description
sym.append(ps.Assignment(dst[0, 0](0),
-5 * np.sqrt(193) * density * u_x ** 2 / 48 + 193 * density * u_x
** 2 / 720 - 5 * np.sqrt(
193) * density * u_y ** 2 / 48 + 193 * density * u_y
** 2 / 720 + 23 * density / 324 + 193 * np.sqrt(193) * density
/ 8100))
sym.append(ps.Assignment(dst[0, 0](1),
density * u_x ** 2 * u_y / 2 - 1973 * density * u_x
** 2 / 4800 + 43 * np.sqrt(193) * density * u_x
** 2 / 960 - 3 * np.sqrt(
193) * density * u_y ** 3 / 80 - density * u_y
** 3 / 8 - 773 * density * u_y ** 2 / 4800 + 11 * np.sqrt(
193) * density * u_y ** 2 / 192 - 307 * density * u_y
/ 1200 - np.sqrt(193) * density * u_y / 240 - 91 * np.sqrt(
193) * density / 18000 + 671 * density / 3600))
sym.append(ps.Assignment(dst[0, 0](2),
-3 * np.sqrt(193) * density * u_x ** 3 / 80 - density * u_x
** 3 / 8 - 773 * density * u_x ** 2 / 4800 + 11 * np.sqrt(
193) * density * u_x ** 2 / 192 + density * u_x * u_y
** 2 / 2 - 307 * density * u_x / 1200 - np.sqrt(
193) * density * u_x / 240 - 1973 * density * u_y
** 2 / 4800 + 43 * np.sqrt(193) * density * u_y
** 2 / 960 - 91 * np.sqrt(
193) * density / 18000 + 671 * density / 3600))
sym.append(ps.Assignment(dst[0, 0](3),
density * u_x ** 3 / 8 + 3 * np.sqrt(193) * density * u_x
** 3 / 80 - 773 * density * u_x ** 2 / 4800 + 11 * np.sqrt(
193) * density * u_x ** 2 / 192 - density * u_x * u_y
** 2 / 2 + np.sqrt(
193) * density * u_x / 240 + 307 * density * u_x
/ 1200 - 1973 * density * u_y ** 2 / 4800 + 43 * np.sqrt(
193) * density * u_y ** 2 / 960 - 91 * np.sqrt(193) * density
/ 18000 + 671 * density / 3600))
sym.append(ps.Assignment(dst[0, 0](4),
-density * u_x ** 2 * u_y / 2 - 1973 * density * u_x
** 2 / 4800 + 43 * np.sqrt(
193) * density * u_x ** 2 / 960 + density * u_y
** 3 / 8 + 3 * np.sqrt(
193) * density * u_y ** 3 / 80 - 773 * density * u_y
** 2 / 4800 + 11 * np.sqrt(193) * density * u_y
** 2 / 192 + np.sqrt(
193) * density * u_y / 240 + 307 * density * u_y
/ 1200 - 91 * np.sqrt(193) * density / 18000 + 671 * density
/ 3600))
sym.append(ps.Assignment(dst[0, 0](5), density * u_x ** 3 / 9 + np.sqrt(193) * density * u_x
** 3 / 45 - density * u_x ** 2 * u_y / 4 - np.sqrt(
193) * density * u_x ** 2 / 40 + 41 * density * u_x ** 2 / 200 - density *
u_x * u_y ** 2 / 4 + np.sqrt(
193) * density * u_x * u_y / 120 + 391 * density * u_x * u_y
/ 3000 - 91 * density * u_x / 1800 - np.sqrt(
193) * density * u_x / 360 + density * u_y ** 3 / 9 + np.sqrt(193) * density *
u_y ** 3 / 45 - np.sqrt(
193) * density * u_y ** 2 / 40 + 41 * density * u_y ** 2 / 200 - 91 * density
* u_y / 1800 - np.sqrt(
193) * density * u_y / 360 + 17 * np.sqrt(193) * density / 27000 + 131 * density
/ 5400))
sym.append(ps.Assignment(dst[0, 0](6),
-np.sqrt(193) * density * u_x ** 3 / 45 - density * u_x
** 3 / 9 - density * u_x ** 2 * u_y / 4 - np.sqrt(
193) * density * u_x ** 2 / 40 + 41 * density * u_x
** 2 / 200 + density * u_x * u_y ** 2 / 4 - 391 * density
* u_x * u_y / 3000 - np.sqrt(
193) * density * u_x * u_y / 120 + np.sqrt(193) * density *
u_x / 360 + 91 * density * u_x / 1800 + density * u_y
** 3 / 9 + np.sqrt(
193) * density * u_y ** 3 / 45 - np.sqrt(
193) * density * u_y ** 2 / 40 + 41 * density * u_y
** 2 / 200 - 91 * density * u_y / 1800 - np.sqrt(
193) * density * u_y / 360 + 17 * np.sqrt(193) * density
/ 27000 + 131 * density / 5400))
sym.append(ps.Assignment(dst[0, 0](7), density * u_x ** 3 / 9 + np.sqrt(193) * density * u_x
** 3 / 45 + density * u_x ** 2 * u_y / 4 - np.sqrt(
193) * density * u_x ** 2 / 40 + 41 * density * u_x ** 2 / 200 - density *
u_x * u_y ** 2 / 4 - 391 * density * u_x * u_y
/ 3000 - np.sqrt(
193) * density * u_x * u_y / 120 - 91 * density * u_x / 1800 - np.sqrt(193) *
density * u_x / 360 - np.sqrt(
193) * density * u_y ** 3 / 45 - density * u_y ** 3 / 9 - np.sqrt(
193) * density * u_y ** 2 / 40 + 41 * density * u_y ** 2 / 200 + np.sqrt(
193) * density * u_y / 360 + 91 * density * u_y / 1800 + 17 * np.sqrt(193) *
density / 27000 + 131 * density / 5400))
sym.append(ps.Assignment(dst[0, 0](8),
-np.sqrt(193) * density * u_x ** 3 / 45 - density * u_x
** 3 / 9 + density * u_x ** 2 * u_y / 4 - np.sqrt(
193) * density * u_x ** 2 / 40 + 41 * density * u_x
** 2 / 200 + density * u_x * u_y ** 2 / 4 + np.sqrt(
193) * density * u_x * u_y / 120 + 391 * density * u_x
* u_y / 3000 + np.sqrt(
193) * density * u_x / 360 + 91 * density * u_x
/ 1800 - np.sqrt(193) * density * u_y ** 3 / 45 - density *
u_y ** 3 / 9 - np.sqrt(
193) * density * u_y ** 2 / 40 + 41 * density * u_y
** 2 / 200 + np.sqrt(
193) * density * u_y / 360 + 91 * density * u_y
/ 1800 + 17 * np.sqrt(193) * density / 27000 + 131 * density
/ 5400))
sym.append(ps.Assignment(dst[0, 0](9),
-np.sqrt(193) * density * u_x ** 3 / 360 - density * u_x
** 3 / 72 + density * u_x ** 2 / 4800 + np.sqrt(
193) * density * u_x ** 2 / 960 - np.sqrt(
193) * density * u_x * u_y / 480 + 359 * density * u_x
* u_y / 12000 - 71 * density * u_x / 3600 + np.sqrt(
193) * density * u_x / 720 - np.sqrt(193) * density * u_y
** 3 / 360 - density * u_y ** 3 / 72 + density * u_y
** 2 / 4800 + np.sqrt(
193) * density * u_y ** 2 / 960 - 71 * density * u_y
/ 3600 + np.sqrt(193) * density * u_y / 720 - 49 * np.sqrt(
193) * density / 54000 + 137 * density / 10800))
sym.append(ps.Assignment(dst[0, 0](10), density * u_x ** 3 / 72 + np.sqrt(193) * density * u_x
** 3 / 360 + density * u_x ** 2 / 4800 + np.sqrt(
193) * density * u_x ** 2 / 960 - 359 * density * u_x * u_y / 12000 + np.sqrt(
193) * density * u_x * u_y / 480 - np.sqrt(
193) * density * u_x / 720 + 71 * density * u_x / 3600 - np.sqrt(
193) * density * u_y ** 3 / 360 - density * u_y ** 3 / 72 + density * u_y
** 2 / 4800 + np.sqrt(
193) * density * u_y ** 2 / 960 - 71 * density * u_y / 3600 + np.sqrt(193) *
density * u_y / 720 - 49 * np.sqrt(
193) * density / 54000 + 137 * density / 10800))
sym.append(ps.Assignment(dst[0, 0](11),
-np.sqrt(193) * density * u_x ** 3 / 360 - density * u_x
** 3 / 72 + density * u_x ** 2 / 4800 + np.sqrt(
193) * density * u_x ** 2 / 960 - 359 * density * u_x *
u_y / 12000 + np.sqrt(
193) * density * u_x * u_y / 480 - 71 * density * u_x
/ 3600 + np.sqrt(193) * density * u_x / 720 + density *
u_y ** 3 / 72 + np.sqrt(
193) * density * u_y ** 3 / 360 + density * u_y
** 2 / 4800 + np.sqrt(193) * density * u_y ** 2 / 960 - np.sqrt(
193) * density * u_y / 720 + 71 * density * u_y
/ 3600 - 49 * np.sqrt(193) * density / 54000 + 137 * density
/ 10800))
sym.append(ps.Assignment(dst[0, 0](12), density * u_x ** 3 / 72 + np.sqrt(193) * density * u_x
** 3 / 360 + density * u_x ** 2 / 4800 + np.sqrt(
193) * density * u_x ** 2 / 960 - np.sqrt(193) * density * u_x * u_y
/ 480 + 359 * density * u_x * u_y / 12000 - np.sqrt(
193) * density * u_x / 720 + 71 * density * u_x / 3600 + density * u_y
** 3 / 72 + np.sqrt(
193) * density * u_y ** 3 / 360 + density * u_y ** 2 / 4800 + np.sqrt(193) *
density * u_y ** 2 / 960 - np.sqrt(
193) * density * u_y / 720 + 71 * density * u_y / 3600 - 49 * np.sqrt(193) *
density / 54000 + 137 * density / 10800))
sym.append(ps.Assignment(dst[0, 0](13),
-np.sqrt(193) * density * u_x ** 2 / 2880 - density * u_x
** 2 / 14400 - density * u_y ** 3 / 72 + np.sqrt(
193) * density * u_y ** 3 / 720 - np.sqrt(
193) * density * u_y ** 2 / 576 + 133 * density * u_y
** 2 / 4800 - 77 * density * u_y / 3600 + np.sqrt(
193) * density * u_y / 720 - 101 * np.sqrt(193) * density
/ 162000 + 289 * density / 32400))
sym.append(ps.Assignment(dst[0, 0](14),
-density * u_x ** 3 / 72 + np.sqrt(193) * density * u_x
** 3 / 720 - np.sqrt(
193) * density * u_x ** 2 / 576 + 133 * density * u_x
** 2 / 4800 - 77 * density * u_x / 3600 + np.sqrt(
193) * density * u_x / 720 - np.sqrt(193) * density * u_y
** 2 / 2880 - density * u_y ** 2 / 14400 - 101 * np.sqrt(
193) * density / 162000 + 289 * density / 32400))
sym.append(ps.Assignment(dst[0, 0](15),
-np.sqrt(193) * density * u_x ** 3 / 720 + density * u_x
** 3 / 72 - np.sqrt(
193) * density * u_x ** 2 / 576 + 133 * density * u_x
** 2 / 4800 - np.sqrt(
193) * density * u_x / 720 + 77 * density * u_x
/ 3600 - np.sqrt(
193) * density * u_y ** 2 / 2880 - density * u_y
** 2 / 14400 - 101 * np.sqrt(193) * density / 162000 + 289 * density
/ 32400))
sym.append(ps.Assignment(dst[0, 0](16),
-np.sqrt(193) * density * u_x ** 2 / 2880 - density * u_x
** 2 / 14400 - np.sqrt(
193) * density * u_y ** 3 / 720 + density * u_y
** 3 / 72 - np.sqrt(
193) * density * u_y ** 2 / 576 + 133 * density * u_y
** 2 / 4800 - np.sqrt(
193) * density * u_y / 720 + 77 * density * u_y
/ 3600 - 101 * np.sqrt(193) * density / 162000 + 289 * density
/ 32400))
return ps.AssignmentCollection(symbolic_description)
@property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment