Viscous Flow Questions & Answers  


First, make sure you use $N=5000$ (or more) to test your algorithm properly. Then, is the answer converged? I.e, are you getting the same answer for $N=20000$ then for $N=5000$?






You don't need to take the absolute value but $\tau_w$ should be positive anyway. If it isn't, this means there's a bug somewhere. You should treat $\tau_w$ as a constant within one iteration only (i.e. because find_coeff_and_rhs is called once at each iteration, thus $\tau_w$ should be taken as constant within find_coeff_and_rhs). Of course, it should be updated every time find_coeff_and_rhs is called..




Hm does mut equal 0 for all nodes?




You need to isolate your bug (which is probably where you update mut). Be careful about integers and doubles... pow and exp need to be fed doubles not ints. The update of the counter within the for loop should involve only ints and no doubles or reals.



$\pi$ 