How to swap master-slave surface by TCL?

Altair Forum User
Altair Forum User
Altair Employee
edited November 2020 in Community Q&A

My question is how to use TCL scripts to swap master-slave surface. Like the figure attached, I want to swap master-slave surface of those highlighted contact pairs.

I want to use Young's modulus to decide which surface should be master, and the other to be slave. Master surface should have higher Young's modulus.

So, how can I write this if statement and swap the master-slave surface?

 

My model is also uploaded, and I have created the contact pairs. But the contact pairs have'nt been swapped.

<?xml version="1.0" encoding="UTF-8"?>CP.thumb.PNG.5be254fba8d84295015856e21764503a.PNG

Unable to find an attachment - read this blog

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2017

    Can anyone help me please?

  • tinh
    tinh Altair Community Member
    edited June 2017

    Hi

    Can you find any menu command to do it?

    If there is not, it will consume much time to parse and hook into altair code, since it is no designed to swap master-slaver

    Try exporting data, and show us text lines about interface definition, we may look for a workaround.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2017

    @tinh 

    Hi, thanks for replying.

    I think the function is in the CW.tcl file, and the function is : proc ::AbaqusCW::swapMasterSlave { args }

    The problem is that I have no idea how to use it.

    <?xml version="1.0" encoding="UTF-8"?>swap_slave_master.thumb.png.c577f041ff0542a174eda77003d2f1b4.png

     

  • tinh
    tinh Altair Community Member
    edited June 2017

    Hi

    The function requests an interface item must be selected on data tree.

    Let's looking in tk tree selection command later