General Mechanical

General Mechanical

How can I be sure that materials are being assigned properly between load steps?

    • helen.durand
      Subscriber
      I was wondering if there is a way to verify that a section of my APDL code works properly.nBACKGROUND: nThe simulation consists of a transient thermal simulation in Workbench with commands objects. I defined material properties for two materials (with material reference numbers 5 and 6) using the MPTEMP and MPDATA commands. nAt the end of each load step, I select some of the elements using an *IF command that loops over every element, and I use the MPCHG command to change them from material 5 to material 6. I have included this section of my code (below) in case it helps clarify what I am describing. nMy thought is to use the *GET command to retrieve the material number for each element, but *GET,matType,ACTIVE,0,MAT always returns a value of matType = 1.nWhat can I do instead?nCODE SNIPPIT:nALLSELn*GET,numOfNodes,NODE,0,COUNT nselNode2 = 0n*DO,iter,1,numOfNodes,1n selNode2=NDNEXT(selNode2)n NSEL,S,NODE,,selNode2,selNode2n *IF,TEMP(selNode2),GT,1400,THENn ESLN,S,0,ALL n MPCHG,6,ALL ! Material 6 defined previously by MPTEMP and MPDATAn ALLSELn *ENDIFn ALLSELn*ENDDOnALLSEL
    • Ashish Khemka
      Ansys Employee
      nnOne way to check for the material assignment change is to issue esel based on material id and then issue elist.Regards,nAshish Khemkan
Viewing 1 reply thread
  • You must be logged in to reply to this topic.