WaterLily-jl / WaterLily.jl

Fast and simple fluid simulator in Julia
Other
636 stars 78 forks source link

Internals flows in arbitrary shapes #142

Closed kylebeggs closed 3 months ago

kylebeggs commented 3 months ago

I suppose this is not really an issue, but I didn't know where to ask (depending on the answer, perhaps this could turn into an issue). Most of the examples in the repo are of external flows, so it is not clear to me how (or if) I can setup a simulation for flow in a curved pipe where the normal vectors of the input/output surfaces/planes may not be on the same line, for example. It seems you need to have the plane of the inlets/outlets be orthogonal because a structured grid is used, which I understand is fundamental to the method. Is there no way around this with some tricks with the SDF maybe?

weymouth commented 3 months ago

While you can do internal flow simulations with a Cartesian grid method like Waterlily, it's typically not the best approach. The flow in a bending pipe or channel would be more efficient with a curvilinear coordinate system. A turbine moving inside a duct would be a good use of immersed boundaries in a curvilinear or overset system [DOI: 10.1115/1.4063753], but I don't think that's planned for Waterlily any time soon.

kylebeggs commented 3 months ago

What if you have a geometry that is a "complicated" pipe such as blood vessels where tortuosity is high with bifurcations and highly irregular cross-section diameters?

weymouth commented 3 months ago

There is no reason you can't try it! I have been wondering about using the method for porous media, but I don't have any examples of this yet.