如果您的碰撞表面足够简单并且在碰撞之前不应该经历高度不可预测的变化,那么您可以从某个步骤开始更改交互属性:
# Create the contact property with separation
contact_with_separation = m.ContactProperty('Contact_with_separation')
contact_with_separation.NormalBehavior(
pressureOverclosure=HARD, allowSeparation=ON, constraintEnforcementMethod=DEFAULT
)
contact_with_separation.TangentialBehavior(
formulation=PENALTY, table=((0.1, ), ), fraction=0.005, maximumElasticSlip=FRACTION
)
# Create the contact property without separation
contact_no_separation = m.ContactProperty('Contact_no_separation')
contact_no_separation.NormalBehavior(
pressureOverclosure=HARD, allowSeparation=OFF, constraintEnforcementMethod=DEFAULT
)
contact_no_separation.TangentialBehavior(formulation=ROUGH)
# Define the contact
m.SurfaceToSurfaceContactStd(
name='interaction_name', createStepName='Initial',
master=master_surf, slave=slave_surf, interactionProperty=contact_with_separation,
)
# Change contact property
m.interactions['interaction_name'].setValuesInStep(
interactionProperty=contact_no_separation, stepName=change_property_step_name
)