General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Change Material Property

TAGGED: 

    • zzhang868
      Subscriber

      Hello,

      I was wondering if there's a way to change material properties via APDL in ANSYS Mechanical, rather than manually adjusting them through the "Engineering Data Sources" in Workbench. Any guidance on this would be greatly appreciated.

    • Deepak
      Ansys Employee

      Hi,

      Yes, you can change the material properties by adding the following command line, 

      MP,DENS,1,5.2, ! tonne mm^-3
      MP,EX,1,1000, ! tonne s^-2 mm^-1
      MP, NUXY,1,0.3,
       
      please refer to the below image: you can observe the change in deformation.

      Please Refer: MP (ansys.com)

      Thanks,

      Deepak.

    • zzhang868
      Subscriber

      Thank you so much! If I have many parts, for example, 100 identical parts, but with different material properties, how can I use APDL to assign new materials to each part more effectively? In the current example, we only have two parts, but what if the number of parts is much larger? Can we still use a single APDL to change materials for all parts?

    • Deepak
      Ansys Employee

      Yes, u can do that,

      First assign the materials to all individual parts and note the list of material ID numbers. (Note Material ID can be found in solver files)

      In MP command, u can call specific material by its ID number and change the material properties.

      Thanks.

    • zzhang868
      Subscriber

      Question 1: When you say "First assign the materials to all individual parts," do you mean to do this via the GUI or APDL?
      Question 2: How do I find the ID of each part?
      Question 3: Could you please provide a sample code in APDL for assigning different materials to 3 parts, where each part has a different material (Material 1, Material 2, and Material 3)?




      Question 4: I’m wondering if this is the correct way (in the screenshot) to find the part ID.
      Question 5: However, since I have many parts in different locations, is there an easier way to identify the IDs without manually checking each part? Currently, I can only see the part names, and since I created them using copy and paste, they all have the same name.

      Question 6: Could you also provide an example of how to change the material properties for a specific part?
      Question 7: If the material properties are generated from a Gaussian distribution (with a given mean and variance), how can this be implemented using APDL?

      Many thanks for your kind help!

      • Deepak
        Ansys Employee

        1) Yes, using the GUI.

        2) Material data is stored in the material ID. You can find in the .dat file. Open this file in notepad.

        3) MP,,ID,, --> Change the ID number.

        MP,DENS,1,5.2, ! tonne mm^-3
        MP,EX,1,1000, ! tonne s^-2 mm^-1
        MP, NUXY,1,0.3,
         
        MP,DENS,2,5.2, ! tonne mm^-3
        MP,EX,2,1000, ! tonne s^-2 mm^-1
        MP, NUXY,2,0.3,
        4&5) Those are element IDs, in this case no need to use them.
        • Deepak
          Ansys Employee

          Open the solver files, here you can find the ds.dat file.

    • zzhang868
      Subscriber

      Question 8: What is the difference between material ID and part ID? If they are not the same, could you please show how to find both in ANSYS in an effective way? Thanks!

    • zzhang868
      Subscriber

      I have 100 identical parts with the same material property "X" set up in the GUI. I want to slightly modify the value of "X" for all parts. Based on your feedback, I can locate the ID of material property "X" and adjust it.

      Question 9: Since I have many parts, I want to change "X" for all parts efficiently. Is it possible to use APDL to modify "X" for all parts within a single script, perhaps by using a loop, instead of creating an individual APDL script for each part?

      Question 9.1: If so, I assume we need to obtain the ID of each part. How can we retrieve the ID of each part, along with visualization to identify each one from the interface?

      Question 9.2: How would I write an APDL script to handle this scenario?

      Thank you so much!

      • Deepak
        Ansys Employee

        Here 100 parts are assigned with a material ID of "X". As we are changing the "X" value, the changed value will be applicable for all 100 parts. No need for a part ID. In a single command, you can do it.

        X be the Material ID.

        MP,DENS,X,5.2, ! tonne mm^-3
        MP,EX,X,1000, ! tonne s^-2 mm^-1
        MP, NUXY,X,0.3,
        • zzhang868
          Subscriber

          To clarify my request, I want each part to have a slightly different value of X, instead of assigning the same X value to all parts simultaneously. For example, if X is set to 100, I would like to assign 100.1 to part 1, 100.2 to part 2, and so on.

          Could you please provide a sample APDL commands for this case? Many thanks!

        • Deepak
          Ansys Employee

          Then u need 100 material IDs for 100 parts, right? .Only specific value can be stored in one material ID.

           

        • zzhang868
          Subscriber

          I got your point. Thank you very much for your time and kind help! I will have a try.

    • zzhang868
      Subscriber

      Hello, I am wondering whether the number of outlines will correspond to the Material ID that we can use in APDL.

      • Deepak
        Ansys Employee

        No, it depends on the way you can assign the material to geometry in the mechanical. 

        you can use the *DO loop to change the material properties,

        There was only one material in engineering data and four solids in the model, a unique material ID will be generated for all solids based on the order of solids in geometry in mechanical outline.

        e = 200000000000 !Youngs Modulus Pa
        *DO, i, 1, 4, 1
            x=e+(1000000000*i)
            MP, EX, i, x,
        *ENDDO

        Refer: *DO (ansys.com)

        Thanks

        Deepak

Viewing 7 reply threads
  • You must be logged in to reply to this topic.