General Mechanical

General Mechanical

Get material data in ANSYS APDL

    • bhanu34
      Subscriber

      Hi


      Does anyone know how to get mat ID of material with certain young's modulus or Poisson's ratio through APDL commands ?

    • sathya
      Subscriber

      Hi Bhanu,


      I guess there must be command using *GET.


      In the meantime , you can use MPLIST,ALL to list all material data defined as a text file.


      Then just search for the corresponding magnitudes of EX or PRXY and find the mat ID associated with the data.


       

    • bhanu34
      Subscriber

      Hi Sathya


      Can you please be little more elaborate on *GET command?


      Thanks

    • jpasquerell
      Ansys Employee

      do a *get of the maximum material id number into a parameter- see the help for *GET with the entity of MAT


      create a do loop from 1 to the maximum material id number parameter


      *get of EX for the do loop counter number at the desired temperature - see the help for *GET with the entity of MPLAB  (MPLAB can be any of the actual material property labels including PRXY for Poisson's ratio).


      *IF the EX parameter matches the desired then


      set the output mat id to be the current loop parameter value then *EXIT so no more loops


      *ENDIF


      *ENDDO


       

    • sathya
      Subscriber

      Hi ,


      I am using the following syntax but it is not able to read for discontinuous mat id like 1,50,,etc.
      Can you correct me?


      *ask,ym,Enter the magnitude of EX in system units


      *get,matmax,MAT,0,num,max


      *do,i,1,matmax,1


      *get,prop,ex,i,,,


      *if,YM,eq,PROP,THEN


      mplis,i


      *Exit


      *endif


      *ENDDO

    • jpasquerell
      Ansys Employee

      I ran you commands and they worked for me but you can add another *if level to not test prop vs YM when there is no EX for a mat id as prop is an undefined parameter which has a value of 2**(-100) .  


       


       


      !*ask,ym,Enter the magnitude of EX in system units


      *get,matmax,MAT,0,num,max


       


      *do,i,1,matmax,1


      *get,prop,ex,i,,,


       


      *if,prop,ne,2**(-100),THEN


      *if,YM,eq,PROP,THEN


       


      mplis,i


       


      *Exit


       


      *endif


      *endif


      *ENDDO


       

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