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

Missing functions in meshtools #82

Closed
guillaumechauvat opened this issue Dec 25, 2022 · 4 comments · Fixed by #83 · May be fixed by #84
Closed

Missing functions in meshtools #82

guillaumechauvat opened this issue Dec 25, 2022 · 4 comments · Fixed by #83 · May be fixed by #84
Assignees

Comments

@guillaumechauvat
Copy link
Member

guillaumechauvat commented Dec 25, 2022

There aren't many functionalities implemented in meshtools right now. A few easy functions would be potentially useful:

  • Generating a box. This is trivial and hasn't been done before because the native Nek5000 tool genbox does it, but having it in pymech would allow using it as a building blocks for more complex meshes.
  • A function to map geometries, for example to map a [0, 1]×[0, 1] box to an arbitrary shape with four corners. This is also trivial and would allow for generating more complex meshes.
  • Coons patches? (trivial using the two functions above)
  • A function to generate the outside of a circle.
  • Functions to add, delete or change boundary conditions for velocity, temperature and passive scalars.

More complicated and speculative:

  • A function to generate a cylinder-box junction.
  • Integrating my airfoils script in some way. Perhaps by generating a boundary-layer mesh and returning some kind of analytic representation of the outer boudary. Then, combined with the functions above it might be possible to write a tutorial for generating a complete airfoil mesh with a boundary layer and a few free-stream blocks.
  • Getting inspired by Vitor's extrude_refine function to perform some kind of mesh refinement.

Feel free to add anything to this list!

@ashwinvis
Copy link
Member

Visualize the mesh as a

  • 2D slice / 3D
  • wireframe / pseudo-colour
  • static / interactive

plot

@guillaumechauvat
Copy link
Member Author

Do you have an idea of what library to use? For 3D or large meshes I don't think matplotlib is the way to go, maybe some OpenGL library, but I don't want to add dependencies that can break easily either.

@guillaumechauvat guillaumechauvat linked a pull request Dec 27, 2022 that will close this issue
@guillaumechauvat
Copy link
Member Author

wxpython with pyOpenGL seems to work. I'll start with that, and if there are objections I can switch to something else.

@guillaumechauvat guillaumechauvat linked a pull request Dec 28, 2022 that will close this issue
@ashwinvis
Copy link
Member

No objections if it works on all OSs. Perhaps you can consider creating a subpackage called meshtools, so we can accomodate other visualization libraries in the future.

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

Successfully merging a pull request may close this issue.

2 participants