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

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

Open
meteorair opened this issue May 21, 2023 · 6 comments

Comments

@meteorair
Copy link

meteorair commented May 21, 2023

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.

ludgerpaehler added a commit to ludgerpaehler/jaxfluids that referenced this issue Jun 6, 2023
@LiuChen802
Copy link

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
Copy link
Collaborator

dbezgin commented Jun 30, 2023

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
Copy link

LiuChen802 commented Jul 1, 2023 via email

@loliverhennigh
Copy link

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
Copy link

bianzj commented Sep 20, 2023

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

@LucasLu123
Copy link

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

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

6 participants