We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Fluent Meshing Ascii Export

    • stephan.puntigam
      Subscriber

      Hi,

      I am using Ansys 2024 R1. I want to export my mesh from Fluent meshing to a Ascii file. In older posts (from 2022 and 2023) it was said, to simply uncheck the Box "Write Binary Files" in the export window. I did this, but didn't get an Ascii file. So i tried with the "Write Binary Files" Box checked and it seems that in both cases I get the exact same binary file.

      Is this an issue with 2024 R1 version or what could be the problem here?

      Thanks in advance and best regards.

    • Rob
      Forum Moderator

      What format did you write? Ie .msh.gz or .msh.h5 ? 

    • Friggi.Mon
      Subscriber

      I have the same problem. I want to load the mesh in python with meshio but meshio cant read the .msh.h5 format. i tried to export the mesh and change the format to .msh and and it worked but i dont think that thats the intended way. I also doubt that the mesh is correctly loaded.

    • Rob
      Forum Moderator

      Change the Preference save to "Legacy" and that should give you .msh   

    • Friggi.Mon
      Subscriber

      For clarification, i opened the case file in Meshing mode with Fluent Launcher and then set the Default format for I/O to Legacy under File-Preferences.

      But I still have only msh.gz and msh.h5 as format options under File-Write-Mesh as you can see in the screenshot.


    • Friggi.Mon
      Subscriber

      The mesh generated by this is face based grid but i need a 3D mesh. Other Sites mention i should export the mesh in Solver mode and not Meshing but i dont see any options there to export the mesh.

    • Rob
      Forum Moderator

      What are you running and generating? The mesh file is either 2d or 3d, which isn't what you originally asked about. 

    • Friggi.Mon
      Subscriber

       

      I’m sorry for the confusion, English is not my native language and probably i dont understand Ansys not well enough. I want to ensure spatial connectivity in a clustering process and therefore wanted to use the mesh for an adjacency matrix, but the Fluent Meshing works only with 3D data. So i recreated the simulation as a 1 layer pseudo 3d case (see attached image) and exported the mesh as mentioned above.

      Key Mesh Requirements for Adjacency-Based Clustering in Fluent:
      1. I need to make sure the mesh file actually includes volume cells. If the file only contains boundary faces, the adjacency algorithm won’t find interior neighbors. I think thats where the problem is. When i write the mesh there is a console output that says “moved nodes from interior zone to zone 13.”

      The console output from reading the case data looks like this:

      2. For meshio the format should be ASCII to ensure that the python script can parse the data.
      3. Ideally, the mesh should keep cell IDs consistent with the solver (e.g., CGNS “Cell_Id”) so I can match adjacency results to flow data. This prevents indexing mismatches between my volume mesh cells and the solution data.
      4. For adjacency-based connectivity, I need to confirm that “interior” or “fluid” cell blocks are properly separated from boundary face zones. Typically, volume cells live in a single fluid zone(cell zone), while inlets/outlets/walls are separate face zones.
      5. my simulation is pseudo-3D (a single extruded layer), my mesh must reflect this in actual 3D cell types (hex)
      I understand if this is not enough information for remote diagnostics but i really appreciate your help so far.

       

    • Rob
      Forum Moderator

      That's a 3d mesh, and you've got a cell zone plus interior facets for the fluid region; the latter being the sides of the cells. Cell ID may or may not be retained between mesh and solver as Fluent doesn't need cell ID from meshing; it's used to link the cell for the data file only. 

      The mesh format is covered in the User's Guide, https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v251/en/flu_ug/flu_ug_app_form_case_data.html  

    • Friggi.Mon
      Subscriber

       

      I attached the output from meshio trying to read the exported 3d mesh. Is it possible that the extruded 1 layer pseudo 3d mesh still has a face-based grid instead of real volume elements which were to be labeled hexahedron or wedges? I extracted the mesh from Fluent meshing because it didnt work in Solver mode. Is the Mesh data stored with the solution data in the CGNS file?

       
      Code:
      print("Points:", mesh.points.shape)
      for i, cblock in enumerate(mesh.cells):
      print(f"Cell block #{i}: Type={cblock.type}, shape={cblock.data.shape}")
      Output:
      Points: (51500, 3)
      Cell block #0: Type=quad, shape=(398, 4)
      Cell block #1: Type=quad, shape=(496, 4)
      Cell block #2: Type=quad, shape=(66, 4)
      Cell block #3: Type=quad, shape=(25146, 4)
      Cell block #4: Type=triangle, shape=(12, 3)
      Cell block #5: Type=quad, shape=(25146, 4)
      Cell block #6: Type=triangle, shape=(12, 3)
      Cell block #7: Type=quad, shape=(5, 4)
      Cell block #8: Type=quad, shape=(11, 4)
      Cell block #9: Type=quad, shape=(49713, 4)
      Cell block #10: Type=quad, shape=(218, 4)




       

       

       

       

    • Rob
      Forum Moderator

      If Fluent is reading a 3d volume mesh (as per the earlier image) then it's a cell (3d cell) volume zone. Is the above the .msh file or CGNS?

    • Friggi.Mon
      Subscriber

      that is the .msh file

    • Rob
      Forum Moderator

      There should be a lot more to the file than that. 

    • Friggi.Mon
      Subscriber

      this is how the .msh file looks in editor. following the link you can download the mesh file if this snippet is not enough.

      https://gigamove.rwth-aachen.de/de/download/b255d474e3f450842bc4d33d9feb6e73

    • Rob
      Forum Moderator

      I'm not allowed to download files: there are some rules to keep me out of trouble with the Export legal team and IT.

      Yes, that's a 3d volume mesh as far as Fluent is concerned. 

Viewing 14 reply threads
  • You must be logged in to reply to this topic.