Skip to content
Snippets Groups Projects
Commit c397b55e authored by Markus Holzer's avatar Markus Holzer
Browse files

Fix Walllaw

parent 0b077f93
No related merge requests found
Pipeline #38627 failed with stages
in 28 minutes and 28 seconds
...@@ -63,6 +63,8 @@ class WallFunctionBounce(LbBoundary): ...@@ -63,6 +63,8 @@ class WallFunctionBounce(LbBoundary):
def __call__(self, f_out, f_in, dir_symbol, inv_dir, lb_method, index_field): def __call__(self, f_out, f_in, dir_symbol, inv_dir, lb_method, index_field):
# needed symbols for offsets and indices # needed symbols for offsets and indices
neighbor_offset = NeighbourOffsetArrays.neighbour_offset(dir_symbol, lb_method.stencil)
tangential_offset = tuple(offset + normal for offset, normal in zip(neighbor_offset, self.normal_direction))
mirrored_stencil_symbol = MirroredStencilDirections._mirrored_symbol(self.mirror_axis) mirrored_stencil_symbol = MirroredStencilDirections._mirrored_symbol(self.mirror_axis)
mirrored_direction = inv_dir[sp.IndexedBase(mirrored_stencil_symbol, shape=(1,))[dir_symbol]] mirrored_direction = inv_dir[sp.IndexedBase(mirrored_stencil_symbol, shape=(1,))[dir_symbol]]
...@@ -130,6 +132,6 @@ class WallFunctionBounce(LbBoundary): ...@@ -130,6 +132,6 @@ class WallFunctionBounce(LbBoundary):
neighbor_offset = NeighbourOffsetArrays.neighbour_offset(dir_symbol, lb_method.stencil) neighbor_offset = NeighbourOffsetArrays.neighbour_offset(dir_symbol, lb_method.stencil)
drag = neighbor_offset[0] * factor * tau_w_x + neighbor_offset[2] * factor * tau_w_z drag = neighbor_offset[0] * factor * tau_w_x + neighbor_offset[2] * factor * tau_w_z
result.append(Assignment(f_in(inv_dir[dir_symbol]), f_in[normal_direction](mirrored_direction) - drag)) result.append(Assignment(f_in.center(inv_dir[dir_symbol]), f_out[tangential_offset](mirrored_direction) - drag))
return result return result
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