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

Update sim_ns_incomp_2d.py and corresponding config file #36

Open
zli96 opened this issue May 18, 2023 · 4 comments
Open

Update sim_ns_incomp_2d.py and corresponding config file #36

zli96 opened this issue May 18, 2023 · 4 comments
Assignees

Comments

@zli96
Copy link

zli96 commented May 18, 2023

I've encountered 3 issues trying to run gen_ns_incomp.py.

  1. There are incorrect keyword variables in ns_incomp.yaml: force_smoothness, force_scale, domain_size and enable_gravity. When I run python gen_ns_incomp.py it says those keyword arguments are not recognizable. Also, with scale=0.4, the particles field seem to be all nan, which leads to Phiflow error saying that the solver cannot converge. I tried setting it to 1 and that seemed to a least generate some output.
  2. Phiflow 2.2 has changed how a Box is defined. I got an error on line 93 of sim_ns_incomp_2d.py with the newest version of PhiFlow. I got around this issue by changing it to return Box['x,y', :, 0:y]
  3. The image generation seems broken. When I set save_images=true and save_gif=true in ns_incomp.yaml, I got an error from line 186 of sim_ns_incomp_2d.py which is particles_images.append() which appends nothing to the particles_image. Similar thing happens in line 187. I'm not sure how to get around this issue yet.
@kmario23 kmario23 self-assigned this May 22, 2023
@kmario23
Copy link
Member

Hey @zli96,
Thank you for bringing this to our notice! Would you like to share the script and the config file with the changes?

@zli96
Copy link
Author

zli96 commented May 22, 2023

@kmario23 Of course! How do you want me to share it?

@kmario23
Copy link
Member

Could you please post it on a gist and share the link here?

@zli96
Copy link
Author

zli96 commented May 30, 2023

Here is the gist:
Those are the only two files I edited.
With these changes I was able to run python gen_ns_incomp.py, but the results are not what the downloadable dataset "ns_incom_inhom_2d_512-0.h5" looked like at all, which I believe is what this script should generate? More specifically, my result seems like they are not really changing from time step to time step.
And I'm using PhiFlow 2.3.4.

Please let me know if you need more information.

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

No branches or pull requests

2 participants