RAMaterialsInteraction#

class ansys.rocky.app.ra_materials_interaction.RAMaterialsInteraction(id: str, model_id: str | None = None)#

Bases: ansys.rocky.app.api_element_item.ApiElementItem, ansys.rocky.app.ra_addins.ElementWithAddins

Rocky PrePost Scripting wrapper for the interaction between two materials.

Retrieve a RAMaterialsInteraction from a RAMaterialsInteractionCollection and two RASolidMaterial:

material_1 = study.GetElement('Default Particles')
material_2 = study.GetElement('Default Boundaries')
interaction_collection = RAMaterialCollection.GetMaterialsInteractionCollection()
interaction = interaction_collection.GetMaterialsInteraction(material_1, material_2)

Note that the materials to which a RAMaterialsInteraction refers are fixed - while they can be retrieved with GetFirstMaterial() and GetSecondMaterial(), they can’t be set.

Overview#

GetFirstMaterial

Get this interaction’s first material.

GetSecondMaterial

Get this interaction’s second material.

GetAdhesiveDistance

Get the value of “Adhesive Distance”.

SetAdhesiveDistance

Set the value of “Adhesive Distance”.

GetAdhesiveFraction

Get the value of “Adhesive Fraction”.

SetAdhesiveFraction

Set the value of “Adhesive Fraction”.

GetContactStiffnessMultiplier

Get the value of “Contact Stiffness Multiplier”.

SetContactStiffnessMultiplier

Set the value of “Contact Stiffness Multiplier”.

GetRestitutionCoefficient

Get the value of “Restitution Coefficient”.

SetRestitutionCoefficient

Set the value of “Restitution Coefficient”.

GetDynamicFriction

Get the value of “Dynamic Friction”.

SetDynamicFriction

Set the value of “Dynamic Friction”.

GetStaticFriction

Get the value of “Static Friction”.

SetStaticFriction

Set the value of “Static Friction”.

GetSurfaceEnergy

Get the value of “Surface Energy”.

SetSurfaceEnergy

Set the value of “Surface Energy”.

GetTangentialStiffnessRatio

Get the value of “Tangential Stiffness Ratio”.

SetTangentialStiffnessRatio

Set the value of “Tangential Stiffness Ratio”.

GetVelocityExponent

Get the value of “Velocity Exponent”.

SetVelocityExponent

Set the value of “Velocity Exponent”.

GetVelocityLimit

Get the value of “Velocity Limit”.

SetVelocityLimit

Set the value of “Velocity Limit”.

Import detail#

from ansys.rocky.app.ra_materials_interaction import RAMaterialsInteraction

Method detail#

classmethod RAMaterialsInteraction.GetWrappedClass()#
classmethod RAMaterialsInteraction.GetClassName() str#
RAMaterialsInteraction.GetFirstMaterial() ansys.rocky.app.ra_solid_material.RASolidMaterial#

Get this interaction’s first material.

RAMaterialsInteraction.GetSecondMaterial() ansys.rocky.app.ra_solid_material.RASolidMaterial#

Get this interaction’s second material.

RAMaterialsInteraction.GetAdhesiveDistance(unit: str | None = None) float#

Get the value of “Adhesive Distance”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m”.

RAMaterialsInteraction.SetAdhesiveDistance(value: str | float, unit: str | None = None) None#

Set the value of “Adhesive Distance”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m”.

RAMaterialsInteraction.GetAdhesiveFraction(unit: str | None = None) float#

Get the value of “Adhesive Fraction”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetAdhesiveFraction(value: str | float, unit: str | None = None) None#

Set the value of “Adhesive Fraction”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetContactStiffnessMultiplier(unit: str | None = None) float#

Get the value of “Contact Stiffness Multiplier”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetContactStiffnessMultiplier(value: str | float, unit: str | None = None) None#

Set the value of “Contact Stiffness Multiplier”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetRestitutionCoefficient(unit: str | None = None) float#

Get the value of “Restitution Coefficient”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetRestitutionCoefficient(value: str | float, unit: str | None = None) None#

Set the value of “Restitution Coefficient”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetDynamicFriction(unit: str | None = None) float#

Get the value of “Dynamic Friction”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetDynamicFriction(value: str | float, unit: str | None = None) None#

Set the value of “Dynamic Friction”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetStaticFriction(unit: str | None = None) float#

Get the value of “Static Friction”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetStaticFriction(value: str | float, unit: str | None = None) None#

Set the value of “Static Friction”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetSurfaceEnergy(unit: str | None = None) float#

Get the value of “Surface Energy”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “J/m2”.

RAMaterialsInteraction.SetSurfaceEnergy(value: str | float, unit: str | None = None) None#

Set the value of “Surface Energy”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “J/m2”.

RAMaterialsInteraction.GetTangentialStiffnessRatio(unit: str | None = None) float#

Get the value of “Tangential Stiffness Ratio”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetTangentialStiffnessRatio(value: str | float, unit: str | None = None) None#

Set the value of “Tangential Stiffness Ratio”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetVelocityExponent(unit: str | None = None) float#

Get the value of “Velocity Exponent”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “-“.

RAMaterialsInteraction.SetVelocityExponent(value: str | float, unit: str | None = None) None#

Set the value of “Velocity Exponent”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “-“.

RAMaterialsInteraction.GetVelocityLimit(unit: str | None = None) float#

Get the value of “Velocity Limit”.

Parameters:

unit – The unit for the returned value. If no unit is provided, the returned value will be in “m/s”.

RAMaterialsInteraction.SetVelocityLimit(value: str | float, unit: str | None = None) None#

Set the value of “Velocity Limit”.

Parameters:
  • value – The value to set. This value can be an expression with input variables or float type.

  • unit – The unit for value. If no unit is provided, value is assumed to be in “m/s”.