tumaer / JAXFLUIDS

Differentiable Fluid Dynamics Package
Other
298 stars 52 forks source link

Is it possible for JAXFLUIDS to import a CAD model and generate AMR grids during the run #2

Open meteorair opened 1 year ago

meteorair commented 1 year ago

Hi. I saw the test case: Space shuttle at Mach 2 - Immersed solid boundary method via level-set. I wonder how to import a CAD model to the JAXFLUIDS solver. Thanks in advance.

LiuChen802 commented 1 year ago

I am also interested in this problem. The grid system adopts the cutcell method. It is possible to adopt complex grid system. For example, the gmsh grid type?

dbezgin commented 1 year ago

Hi - currently, we do not support loading a CAD model directly into JAX-Fluids. However, if you have an STL file of your geometry you can convert it into a level-set field (i.e., signed distance function). There are some open source tools available for that. You can then load the level-set field as an h5 file into JAX-Fluids. Let us know if you have troubles with that.

As for meshes: JAX-Fluids currently supports uniform and stretched Cartesian grids. We are finalising JAX-Fluids 2.0 which will make grid stretching more intuitive. JAX-Fluids 3.0 will include AMR.

LiuChen802 commented 1 year ago

okay,this formation is useful for me,I think I have known how to load a complex geometry. I also want to know how we can resolve the boundary layer flow, such as the teansition flow. It means if we can try the normal unstructured mesh feature, considering the complex boundary layer flow.

Appreciate your excellent work! It is a very worthwhile attempt to ML-CFD work.

---Original--- From: "Deniz @.> Date: Sat, Jul 1, 2023 01:30 AM To: @.>; Cc: @.**@.>; Subject: Re: [tumaer/JAXFLUIDS] Is it possible for JAXFLUIDS to import a CADmodel and generate AMR grids during the run (Issue #2)

Hi - currently, we do not support loading a CAD model directly into JAX-Fluids. However, if you have an STL file of your geometry you can convert it into a level-set field (i.e., signed distance function). There are some open source tools available for that. You can then load the level-set field as an h5 file into JAX-Fluids. Let us know if you have troubles with that.

As for meshes: JAX-Fluids currently supports uniform and stretched Cartesian grids. We are finalising JAX-Fluids 2.0 which will make grid stretching more intuitive. JAX-Fluids 3.0 will include AMR.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

loliverhennigh commented 12 months ago

Hello @dbezgin, I am very interested in the potential for AMR in JAX. Do you any details you can share on this? I have been thinking about this problem for some time but don't have any great ideas for making it work. It is very exciting to see JAX's multi-GPU support though. I am hopeful that a general purpose AMR framework similar to AMRX might be possible to build, (https://amrex-codes.github.io/amrex/). This would have a lot of potential both in the Physics and ML world if you managed to make it scalable and preserve the differentiablility. For a bit I was looking at Taichi to see if something like this was possible there and wrote a small FV solver to try and test out ideas https://www.youtube.com/watch?v=xcZcHbvMe-g. Still thinking about this problem but I am not sure now if Taichi is the right framework to implement AMR in now...

bianzj commented 11 months ago

Is the case (Space shuttle at Mach 2 - Immersed solid boundary method via level-set) in the repo? I can not find it.

LucasLu123 commented 5 months ago

Hi - currently, we do not support loading a CAD model directly into JAX-Fluids. However, if you have an STL file of your geometry you can convert it into a level-set field (i.e., signed distance function). There are some open source tools available for that. You can then load the level-set field as an h5 file into JAX-Fluids. Let us know if you have troubles with that.

As for meshes: JAX-Fluids currently supports uniform and stretched Cartesian grids. We are finalising JAX-Fluids 2.0 which will make grid stretching more intuitive. JAX-Fluids 3.0 will include AMR.

Hi, appreciate your excellent work! I don't know of any tools that convert STL file into a level-set field. Can you give me some advice? extremely grateful