WaterLily-jl / WaterLily.jl

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

From 2D sdf to 3D sdf #171

Open zchli9 opened 3 weeks ago

zchli9 commented 3 weeks ago

Hello, I am a beginner in Waterlily and I'm working on an underwater robot, but I'm having trouble modeling it in sdf. I want to generate a 3D geometry using several cross-sections (maybe more than 3 planes) of this geometry. Is there some way to generate a smooth transition between those 2D planes (these planes are different shapes and sizes)?Or other way to help me model it? Thank you very much!

weymouth commented 2 weeks ago

If the body is pretty slender and axisymmetric, then you could use the SDF for a line segment and define a variable thickness thk(x). See this video https://www.youtube.com/watch?v=PMltMdi1Wzg. I did something similar for the shark example here https://julialang.org/blog/2021/08/sharks/.

If the shape isn't axisymmetric, then I think you can make thk(x,theta), but I'm not sure how to implement this. Honestly, you might be better asking that video maker than me. ;-)