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.

Export .txt file with element ID and corresponding elastic modulus

    • camilla.gironi4
      Subscriber

      Hello everyone,

      i'm working on a Static Structural simulation. I have a named selection scoped with some elements of the mesh. I would like to export a .txt file containing the element ID of these elements and their corresponding elastic modulus. Any suggestion? I tried with some scripts but nothing working at the moment.

      Moreover, a doubt that I have is, if I create a second simulation consecutive to this one, with the same model, is it possible to read the previously saved .txt file and assign the specific elastic modulus indicated in that file to the elements included in the named selection?

      Thank you!

    • Erik Kostson
      Ansys Employee

       

       

       

       

       

       

       

      Hi

      Assuming it is Workbench mech. you are using.

      One way of doing this (get Young’s mod. for mesh/elements) using ACT mechanical scripting is shown here:

      https://discuss.ansys.com/discussion/4481/how-to-get-youngs-modulus-for-each-element-in-the-mesh

       

      If in APDL then looping over elements and using as below can do the same:

      enow = elnext(enow)

      *GET,mpid,ELEM,enow,ATTR,MAT ! get MP MAT number of el.

      *GET, mpex(ii, 1), EX, mpid ! Store it in array

       

      For the second part, that would need APDL.

      All the best

      Erik

       

       

       

       

       

       

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.