Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting for Surface Mesh #32

Closed
jvaverka opened this issue Nov 30, 2021 · 2 comments
Closed

Adjusting for Surface Mesh #32

jvaverka opened this issue Nov 30, 2021 · 2 comments

Comments

@jvaverka
Copy link

Hi, cool package and very nice work on WaterLily.jl!

In the JuliaCon 2021 talk it is mentioned that importing a surface mesh is a fairly easy adjustment. However, I am having a go at it and could use more insight. My goal is to perform an apropos Santa's Sleigh CFD visualization. Figured out how to import the geometry, but the next step is confusing me.

Can AutoBody be used in conjunction with the surface mesh? If so then how does sdf and map come into play? Or should I consider making a new struct (something like MeshBody) when dealing with imported geometries?

Part of my confusion comes down to not fully understanding the following code from the 3D Donut example below. Maybe someone can elaborate.

body = AutoBody() do xyz,t
    x,y,z = xyz - center
    norm2([x,norm2([y,z])-R])-r
end
@weymouth
Copy link
Collaborator

weymouth commented Dec 1, 2021

That sounds like a super fun idea.

The code you have there is the analytic distance function from any point xyz to the surface of a torus with ring radius R and cross section radius r. The AutoBody struct requires this kind of analytic distance function, and so it can't handle a surface mesh out of the box.

My plan for importing mesh geometries was to use one of the existing geometry/meshing packages in Julia to produce a distance function and then proceed as usual. Unfortunately, it seems like some of the packages aren't being maintained. (The main issue with OS projects). I opened a few issues, but I haven't picked it back up in quite a while:

@weymouth
Copy link
Collaborator

We've decided to go with Parametric bodies instead of meshes for now. I'm not opposed to someone adding a STLBodies package at some point in the future, but regardless, it's not an issue with this package. So I am going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants