I’m trying to solve the following equation (incompressible NS) over a 2D domain (Tesla Valve):
S(u) = (grad(u) + grad(u)’)/2 is the symmetric part of the gradient of u, with ’ being the transpose operator.
I’m forcing a velocity profile on the inlet (Poiseuille flow) and zero velocity on the walls.
To handle the non-linear term (u*grad(u)) I’m using Newton’s method. Subbing u and p with u+du and p+dp everywhere and solving in du and dp. I’m using an initial condition for u and p to be 0 everywhere, and iteratively set u := u+du and p := p+dp.
Finally, I’m solving for Reynolds = 50, then use that solution as starting condition for Reynolds = 100, then for 150 etc… until 500.
Everything runs pretty smoothly, converging with ease in a couple iterations per Reynolds number, but the results I’m getting are off.
Normalized Velocity at various Reynolds. A pressure plot snuck in the gif, my bad.
A tesla valve should cause a steep pressure drop in the backwards direction. At low Reynolds, the flow is basically a Stokes flow, and as such has pretty much the same pressure drop in both directions. As Reynolds increases I should begin to see its effects. Instead, the plots for velocity at the various reynolds are VERY similar, only scaled up as Reynolds increases. The plots for pressure DO change with varying Reynolds, as they should to allow those velocity plots.
Normalized Pressure at various Reynolds. The pressure plot from the previous plot snuck out from here and is missing.
Comparing to other visualizations I found on the internet, it doesn’t look like I’m getting close to the real solution, and either way by simulating the forward flow (which should have a much smaller pressure drop) I’m getting approximately the same results.
Do you have any pointers on anything I might have gotten wrong?
If you have the time (and will), I also uploaded the whole project here. It’s definitely not the best code I’ve written, but if you want to give it a look and maybe find out what I did wrong you would absolutely make my month (that’s, more or less, how long I’ve been trying).