'tie_sup_A54(m)//panel_A4_rail_right': 'tie: sup(m)//panel',
'tie_sup_A55(m)//panel_A5_rail_left': 'tie: sup(m)//panel',
'tie_sup_A55(m)//panel_A5_rail_right': 'tie: sup(m)//panel',
'tie_sup_A56(m)//panel_A6_rail_left': 'tie: sup(m)//panel',
'tie_sup_A56(m)//panel_A6_rail_right': 'tie: sup(m)//panel'}
......
parts contact summary:
{'tie: beam1(m)//beam2': 10,
'tie: beam1(m)//con1': 2, ## (1)
'tie: beam1(m)//rope1': 1,
'tie: beam1(m)//rope2': 1,
'tie: beam1(m)//rope3': 1,
'tie: beam1(m)//rope4': 1,
'tie: beam2(m)//beam3': 44,
'tie: beam2(m)//beam4': 11, 'tie: beam2(m)//sup': 60,
'tie: con2(m)//beam2': 15, ## (2)
'tie: sup(m)//panel': 60} ## (3)
>>>
其中,接触对的表达格式(即命名)为:tie_实例1(m)//实例2。(m)表示实例1为master(m是master的缩写)。例如接触对'tie_beam1_A1(m)//beam2_A1_left':该名称包含了多层含义:1)该接触对为tie;2)master实例为beam1_A1(其part名为beam1),而slave实例为beam2_A1(其part名为beam2);3)该接触对是根据beam2的face set 即fc_beam2_left寻找出来的。
由上述接触对的汇总结果可知,find_contacts()查找并建立了206个接触对,但其中有三种接触对需要修改(如上汇总中的阴影所示)。这在界面操作中利用通用接触查找按钮的查找结果是类似的。
1) sup与panel的接触关系中,master part应该为panel,而slave part应该为sup。所以接触关系需要颠倒一下。命令如下:
>>> swap_master_slave('tie',sup,panel,master=panel)
Master and slave swapped successfully for 60 contact pairs.
>>>
然后再list_contacts(),结果如下:
parts contact summary:
{'tie: beam1(m)//beam2': 10,
'tie: beam1(m)//con1': 2,
'tie: beam1(m)//rope1': 1,
'tie: beam1(m)//rope2': 1,
'tie: beam1(m)//rope3': 1,
'tie: beam1(m)//rope4': 1,
'tie: beam2(m)//beam3': 44,
'tie: beam2(m)//beam4': 11,
'tie: beam2(m)//sup': 60,
'tie: con2(m)//beam2': 15,
'tie: panel(m)//sup': 60}
由于panel与sup的关系唯一(全部为master=panel),也可以简写成如下的命令形式:
>>> swap_master_slave(’tie’,sup,panel)
Master and slave swapped successfully for 60 contact pairs.
>>>
2) 下面设置con2与beam2之间的接触关系为interaction(接触, contact),而不是constraint(tie),而且它们之间有摩擦作用(摩擦系数取0.15)。需要说明的是,假如通过软件界面操作进行通用接触对的查找和建立,那么建立之后的接触对是没法进行类似的转换的。而通过swap_contact_tie()函数,这种转换是很容易的事情。
命令形式如下:
swap_contact_tie(con2,beam2,convert_to='contact',prop='Friction')
部分输出信息如下。我们注意到,通过编程,运行过程的输出信息也是可以充分显示,从而便于程序和模型的调试,保证结果的准确性。在接触类型转换过程中,由于之前查找接触对的时候已经自动地保存了每一个接触对的主从面,所以利用这些主从面可以重新建立另外一种类型的接触对。
>>> swap_contact_tie(con2,beam2,convert_to='contact',prop='Friction')
---
Creating contact: master_inst= con2_A1 , slave_inst= beam2_A1
--->Created new set for rootAssembly , setname= _con_con2_A1(m)//beam2_A1_bot(master) , settype = faces
--->Created new set for rootAssembly , setname= _con_con2_A1(m)//beam2_A1_bot(slave) , settype = faces
★★ step1 does not exist, it will be created as StaticStep.
The interaction \
--->Contact con_con2_A1(m)//beam2_A1_bot was created, prop= Friction
---> tie_con2_A1(m)//beam2_A1_bot was successfully converted to con_con2_A1(m)//beam2_A1_bot
num = 1
---
Creating contact: master_inst= con2_A2 , slave_inst= beam2_A1
--->Created new set for rootAssembly , setname= _con_con2_A2(m)//beam2_A1_bot(master) , settype = faces
--->Created new set for rootAssembly , setname= _con_con2_A2(m)//beam2_A1_bot(slave) , settype = faces