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

problem when load msh file #1035

Open
bladesaber opened this issue May 6, 2024 · 6 comments
Open

problem when load msh file #1035

bladesaber opened this issue May 6, 2024 · 6 comments

Comments

@bladesaber
Copy link

Hello everyone:

  1. When I load an msh file created by the GMSH package through Fipy.Gmsh2D class, it throws an error below:
    Screenshot from 2024-05-06 17-41-15
    The related file is provided here:
    mesh_files.zip

  2. Is it possible to use the physical group ID of the msh file in Fipy?Gmsh2D?

  3. How can I interpolate the value of some specific points?

Thanks for the whole work and looking forward to your response.
Best regards.

@bladesaber
Copy link
Author

And is it possible to directly change the vertex coordinate of a mesh and simulate it again?

@guyer
Copy link
Member

guyer commented May 7, 2024

  • When I load an msh file created by the GMSH package through Fipy.Gmsh2D class, it throws an error below:

FiPy is only able to read MSH file format 2. The .msh file you have here is version 4.1

You can load the .geo file, though:

mesh = fp.Gmsh2D("model.geo")
  • Is it possible to use the physical group ID of the msh file in Fipy?Gmsh2D?

Labeled cells are available as mesh.physicalCells and labeled faces as mesh.physicalFaces, e.g.,

cellvar = fp.CellVariable(mesh=mesh)
cellvar.setValue(1., where=mesh.physicalCells['surface1'])

inflow1 = fp.FaceVariable(mesh=mesh, rank=1, value=mesh.faceNormals * mesh.physicalFaces['inflow1'])

See the help for Gmsh2D for more information.

@guyer
Copy link
Member

guyer commented May 7, 2024

Please ask your other two questions separately, preferably as a Discussion.

@guyer
Copy link
Member

guyer commented May 7, 2024

FiPy is only able to read MSH file format 2. The .msh file you have here is version 4.1

FWIW, this doesn't seem to be documented anywhere. We need to fix that.

@bladesaber
Copy link
Author

Thank you

@guyer
Copy link
Member

guyer commented May 8, 2024

Reopening until we address the documentation issue

@guyer guyer reopened this May 8, 2024
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