You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the initialization in the Step 7 diffuse() function is incomplete: Only the nodes with an initial value of 2 are reset; all other nodes are left as they were after the last call to diffuse(). For example, if you run diffuse(10) twice in succession and look at statistics such as the maximum and minimum value of u, you will see that the results differ in the two runs. This occurs because the initial values outside of [0.5, 1.0], [0.5, 1.0] have not been reset to 1.0.
This can be remedied by adding "u = numpy.ones((ny, nx)) as the first statement in diffuse().
Thanks for putting these steps to CFD together; they have been very helpful to me. I hope this is a little helpful for you.
Bob
The text was updated successfully, but these errors were encountered:
I believe the initialization in the Step 7 diffuse() function is incomplete: Only the nodes with an initial value of 2 are reset; all other nodes are left as they were after the last call to diffuse(). For example, if you run diffuse(10) twice in succession and look at statistics such as the maximum and minimum value of u, you will see that the results differ in the two runs. This occurs because the initial values outside of [0.5, 1.0], [0.5, 1.0] have not been reset to 1.0.
This can be remedied by adding "u = numpy.ones((ny, nx)) as the first statement in diffuse().
Thanks for putting these steps to CFD together; they have been very helpful to me. I hope this is a little helpful for you.
Bob
The text was updated successfully, but these errors were encountered: