Skip to content
Snippets Groups Projects
Commit 5178e467 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fix in shear flow initialization (fluctuation now centered around 0)

parent 68c626ed
No related branches found
No related tags found
No related merge requests found
Pipeline #16023 failed
...@@ -185,7 +185,7 @@ def get_shear_flow_velocity_field(domain_size, u_max, random_y_factor=0.01): ...@@ -185,7 +185,7 @@ def get_shear_flow_velocity_field(domain_size, u_max, random_y_factor=0.01):
velocity[..., 0] = u_max velocity[..., 0] = u_max
velocity[..., height // 3: height // 3 * 2, 0] = -u_max velocity[..., height // 3: height // 3 * 2, 0] = -u_max
for j in range(1, len(domain_size)): for j in range(1, len(domain_size)):
velocity[..., j] = random_y_factor * u_max * np.random.rand(*domain_size) velocity[..., j] = random_y_factor * u_max * (np.random.rand(*domain_size) - 0.5)
return velocity return velocity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment