We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General Mechanical

General Mechanical

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

Inserting an APDL Command to Multiple Objects/Elements

    • kreggy
      Subscriber

      Hello, my concern seems simple, but I appreciate any help I can get.

      Within ANSYS Mechanical, under the Geometry tree, is there any way to paste a single APDL command to multiple elements? What I am doing right now is I am copying and pasting the APDL command to each element (2499 in total), and this is very time consuming. Given that I may opt to change the commands in the future, this will help save me some time.

      Thank you.

    • BenjaminStarling
      Subscriber
      What is in the command snippet? It may be more efficient to create one command snippet in the analysis environment that selects the required elements and performs the changes. Otherwise, this can probably be done with scripting, but it would require further time and consideration
    • kreggy
      Subscriber
      Here is snapshot of the command. I needed to define the element type (i.e. LINK 180 for steel and SOLID 65 for concrete) and other material properties. Can you please elaborate on how I can implement your suggestion? Also, if there is an alternative method, aside from APDL, to change the element type and define these properties?
      Thank you.

    • BenjaminStarling
      Subscriber
      Your command snippet is nothing but changing the element type to links, and then specifying a material property. You can set Model Type to Link/Truss and this acheives the same thing as specifying LINK180. You can then also create a new material in engineering data that has the material properties (Modulus, Poissons, and biliniear isotropic hardening) that are in your script and apply that material to the links
      I also noticed in your first picture that Model Type is set to Reinforcement. With this command snippet the solve would fail, as reinforcing elements do not have the same shape (number of nodes) as link elements.
      Solid 65 is an archived element type so the only way to modify this is through command snippets. To do many elements at once, insert a snippet in the analysis environment with the following. you will need a named selection of the concrete bodies that you wish to change.
      /PREP7
      CMSEL,S,**NAMED SELECTION OF YOUR GEOMETRY (BODIES)**
      CM,E_TEMP,ELEM
      e_next=elnext(0)
      *DOWHILE,e_next
      !change element type
      *GET,E_TYPE,ELEM,E_NEXT,ATTR,TYPE
      ET,E_TYPE,SOLID65

      !remove current element from loop
      CMSEL,S,E_TEMP,ELEM
      ESEL,U,TYPE,,E_TYPE
      CM,E_TEMP,ELEM
      e_next=elnext(0)
      *ENDDO
      ALLSEL
      /SOLU
    • kreggy
      Subscriber
      Let me try this out soon.
      Thank you very much for your help, BenjaminStarling.
    • kreggy
      Subscriber
      Hello again, sorry but I have another question. Say I am modelling an RC load bearing wall, do I need to insert an APDL command in the pre-processor to connect the nodes of the concrete (SOLID65) and steel (LINK180)? If not, how can I ensure that all their nodes are connected (since I need them to move together under in-plane loading)?
      Here is my initial command. For the steel, I did not use an APDL command, instead, I went with your suggestion to modify the Engineering Data contents.
      Thank you.

Viewing 5 reply threads
  • The topic ‘Inserting an APDL Command to Multiple Objects/Elements’ is closed to new replies.