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
Branches
Tags
No related merge requests found
......@@ -185,7 +185,7 @@ def get_shear_flow_velocity_field(domain_size, u_max, random_y_factor=0.01):
velocity[..., 0] = u_max
velocity[..., height // 3: height // 3 * 2, 0] = -u_max
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
......
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