PyAnsys Geometry: Issues with Share Topology

Akiasa
Akiasa Member Posts: 2
Name Dropper First Comment
**

Hi everyone,

I’m using PyAnsys Geometry to create a rectangular tube for a CFD simulation in Fluent. After building the 3D model and naming the solid and fluid zones, I have a question about how to properly set Share Topology - Share. I tried using "Design.set_shared_topology" and "Component.set_shared_topology", but neither of these worked.

I’ve attached my code and some screenshots below.

Additionally, I previously posted a thread about extracting volume:
https://innovationspace.ansys.com/forum/forums/topic/trouble-extracting-fluid-volume-in-pyansys-geometry-for-cfd-setup/

I tried the first method Atharv mentioned, but I still couldn’t extract the volume using "PrepareTools.extract_volume_from_faces(sealing_faces, inside_faces)". That’s why I ended up using a boolean operation in the code above.

Any insight or advice regarding volume extraction, setting shared topology, or suppressing the lid for physics would be much appreciated!

Answers

  • Alan Varghese
    Alan Varghese Member, Employee Posts: 5
    Second Anniversary Name Dropper First Comment Ansys Employee
    ✭✭✭

    Hi @Akiasa

    Can you add the following in your script

    from ansys.geometry.core.designer import SharedTopologyType
    
    ### Define Share Topology between bodies in the component
    component.set_shared_topology(share_type=SharedTopologyType.SHARETYPE_SHARE)
    
  • Akiasa
    Akiasa Member Posts: 2
    Name Dropper First Comment
    **

    Hi @Alan Varghese,

    Thank you for your reply! I tried the script you provided, but it didn’t work. Here are the error messages I received.