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.

Ploting results with only certain elements – APDL

    • sanadros
      Subscriber

      I'd like to plot stress results of just a bunch of elements let's say of the elements no 10920, 10000, 10080. How can I write an APDL code with just these elements showing stress.

    • Sandeep Medikonda
      Ansys Employee

      Hi, Are you looking for a contour plot or a history x-y plot?

    • Samir Kadam
      Ansys Employee

      Hi, 


      For this,


      1) Create an Elemental Component of these elements using CM command.


       2) Select this Elemental Component using CMSEL command.


      3) Under /Post1, select last result set.


      4) Plot above selected Elements (under elemental component) using EPLOT.


      5) PLESOL,S,EQV for plotting stress results and PRESOL,S,EQV for printing stress results of selected elements.


      Regards,


      Samir.


       

    • sanadros
      Subscriber

      I think I was not precise enough. I have a simulation with extreme stresses at the boundary when I plot the nodal solution. So what I want to do is to exclude these elements at the boundary. Therefore I want to pick some elements in the middle and plot these stresses. I coded Samirs suggestion like this


      CM, MYELEM, ELEM
      CMSEL, S, MYELEM, ELEM
      EPLOT
      PLESOL,S,EQV


      Where I get all elements. Where can I get just my certain elements?


      This code also doesen't function (as it is a violation to the CMSEL command):


      CM, MYELEM, ELEM
      CMSEL, S, 10920, ELEM
      CMSEL, S, 11000, ELEM
      CMSEL, S, 11080, ELEM
      EPLOT
      PLESOL,S,EQV

    • Rohith Patchigolla
      Ansys Employee

      Hi Sanadros, 


      As Samir suggested, you would need to select the elements first before creating the component (step 1).


      Please try the below scripts. 


      Without component:


      esel,s,,,10920


      esel,a,,,11000


      esel,a,,,11080


      plesol,s,eqv


      With component (for reuse):


      esel,s,,,10920


      esel,a,,,11000


      esel,a,,,11080


      cm, myelem,elem


      cmsel,s,myelem,elem


      plesol,s,eqv


      Also, may I ask, if there is any reason to do the modelling/post-processing in APDL instead of Mechanical?


      Best regards,


      Rohith

    • sanadros
      Subscriber

      ah esel does the magic thx. The reason for APDL is that a similar script exists before I was dealing with this project in APDL and APDL turned out to be useful, using it in a parameter study where I write the the commands in Matlab and then hand it over to Ansys and then get back the data. I will implement this in my code and see if it runs.

    • sanadros
      Subscriber

      Ok at the end I adjusted the solution to my needs and used a location approach based on nodes found on xansys:


      NSEL,S,LOC,X,19.000000,21.000000,
      NSEL,R,LOC,Y,13.000000,16.000000,
      ESLN,S,1
      PLNSOL,S,X,
      NSEL,ALL
      ESEL,ALL


      The advantage of the location approach is that I don't need to know all element numbers. The disadvantage is that I need to know approximately where the elements are.

Viewing 6 reply threads
  • The topic ‘Ploting results with only certain elements – APDL’ is closed to new replies.