Skip to content

Missing functions in meshtools #82

Closed

Description

@guillaumechauvat

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!

Activity

  1. ashwinvis commented on Dec 26, 2022

    @ashwinvis
    Member

    Visualize the mesh as a

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

    plot

  2. guillaumechauvat commented on Dec 27, 2022

    @guillaumechauvat
    MemberAuthor

    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.

  3. linked a pull request that will close this issueEnh/meshtools #83on Dec 27, 2022
  4. guillaumechauvat commented on Dec 27, 2022

    @guillaumechauvat
    MemberAuthor

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

  5. linked a pull request that will close this issueEnh/meshplot #84on Dec 28, 2022
  6. ashwinvis commented on Dec 29, 2022

    @ashwinvis
    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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions