Skip to main content
12-Amethyst
May 25, 2021
Solved

How to call out in a relation a user defined material property when changing the assigned material.

  • May 25, 2021
  • 1 reply
  • 2059 views

Hi All,

I am building a compression spring generic model, which I would like to have multiple materials available for selection. For example. Music wire ( ASTM A227), Stainless 302 ( ASTM A313) etc.

In each of the materials available I have a user defined parameter "shear modulus" in each of the materials.

In the spring model I have a relation which calculates the spring rate from the shear modulus of the material.

 

Example :  RATE= SHEAR_MODULUS:MTRL_570*(WIRE_DIA^4) / (8*AC*(OUT_DIA-WIRE_DIA)^3)

 

MTRL_570 is the current assigned material ( music wire), If I switch the assigned material to Stainless 302, how do I get the relation to update to the new material ID ( MTRL_407).

If I leave the material ID out of the relation I cannot get the Shear modulus value.

 

Any suggestions on how to have the spring rate calculated from the assigned material would be greatly appreciated.

 

Thanks.

Best answer by Paul6

Hi 

Thanks for your reply.

I have not used conditional relations before and would need to do some background research.

 

However I believe I have found the solution for the way I have built the model.

 

I have replaced  "SHEAR_MODULUS:MTRL_570" with "material_param ("SHEAR_MODULUS") " to give

RATE= material_param ("SHEAR_MODULUS")*(WIRE_DIA^4) / (8*AC*(OUT_DIA-WIRE_DIA)^3)

and this relation gives me the correct spring rates when switching materials.

 

1 reply

tbraxton
22-Sapphire II
May 25, 2021

Use conditional relations to determine which material is active. Then set the modulus value based on the material test conditions. Pass the current modulus value to the calculations.

I would also suggest looking into using a notebook file (.lay file type) to define these relations rather than in the part, it may make the reuse of the calculations more efficient if you have need to do that.

 

Conditional statements in relations support info.

http://support.ptc.com/help/creo/creo_pma/usascii/index.html#page/fundamentals/fundamentals/fund_seven_sub/Conditional_Statements_in_Relations.html 

Paul612-AmethystAuthorAnswer
12-Amethyst
May 25, 2021

Hi 

Thanks for your reply.

I have not used conditional relations before and would need to do some background research.

 

However I believe I have found the solution for the way I have built the model.

 

I have replaced  "SHEAR_MODULUS:MTRL_570" with "material_param ("SHEAR_MODULUS") " to give

RATE= material_param ("SHEAR_MODULUS")*(WIRE_DIA^4) / (8*AC*(OUT_DIA-WIRE_DIA)^3)

and this relation gives me the correct spring rates when switching materials.

 

tbraxton
22-Sapphire II
May 25, 2021

As long as the material definitions update the parameter for shear modulus then I would agree that is a better way than using conditional relations.