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

Add functionality to check mesh inlets and outlets and flatten if necessary #176

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

dbruneau-mie
Copy link
Collaborator

Added new script "check_flatten_in_out.py", which takes a .h5 mesh file and checks whether inlets and outlets are flat, then flattens them if they fall below a certain tolerance

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.75%. Comparing base (7d490f4) to head (0d4635a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   78.75%   78.75%           
=======================================
  Files          32       32           
  Lines        3742     3742           
=======================================
  Hits         2947     2947           
  Misses        795      795           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@keiyamamo
Copy link
Collaborator

Hi @dbruneau-mie

Thank you for the script! I tried with several geometries and can see that it improves the mesh.

Just one small comment is that solid inlet and outlet is still not flat. I guess this is not really an issue since flat outlet is important for only fluid domain. I was trying to figure out why inlet/outlet become non-flat and found out that it is due to BoundarylayerMesh from VMTK. In short, VMTK computes surface normal and use those vectors to create boundary layer mesh. However, those vectors are skewed at the ends, and cause this problem, as solid domain is constructed with boundary layer mesh.

Screenshot 2024-09-02 at 10 38 48

It is possible to simply merge this, but it makes more sense to incorporate this as a final step of meshing. If it is okay with you, I will copy this function inside src/vasp/automatedPreprocessing/preprocessing_common.py and call it inside main meshing script. Let me know what you think.

@dbruneau-mie
Copy link
Collaborator Author

dbruneau-mie commented Sep 3, 2024 via email

@keiyamamo
Copy link
Collaborator

@dbruneau-mie Sure! I will merge and then create a separate commit.

@keiyamamo keiyamamo merged commit d12fc60 into KVSlab:master Sep 3, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants