General Mechanical

General Mechanical

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

Element volume in USERMAT

    • Eric Schimanowsk
      Subscriber

      Hello, I would like to know how I can access the volume of each finite element in the USERMAT.

    • David Weed
      Ansys Employee

      Hi,

      The following code will give you the element volume fraction (volume per integration point):

      DOUBLE PRECISION vect2(1)INTEGER v_num
      v_num = 1
      print*,'element num',elemId
      print*,'int point num',kDomIntPt
      call get_ElmData ('EJAC',elemId, kDomIntPt,v_num,vect2)
      print*,'vect2 value',vect2
    • Eric Schimanowsk
      Subscriber

      Hello! Thank you for the response! From what I understood, with this code I would have the fraction of the volume of the element that each integration point represents. But I would like to know the total volume of the element in volume unit in USERMAT.

    • Eric Schimanowsk
      Subscriber

      Hi, I still need help on the topic mentioned. Can anyone help me?

    • David Weed
      Ansys Employee

      Hi Eric,

      If you add all of the contributions from the integration points, then you should get the total volume of the element. e.g., this is the print out of a 2x2x2 hex element with 8 integration points (which we would expect the volume to be 8 units^3):

      element num           1
       int point num           1
       vect2 value  0.999999999999100    
       element num           1
       int point num           2
       vect2 value  0.999999999999100    
       element num           1
       int point num           3
       vect2 value  0.999999999999100    
       element num           1
       int point num           4
       vect2 value  0.999999999999100    
       element num           1
       int point num           5
       vect2 value  0.999999999999100    
       element num           1
       int point num           6
       vect2 value  0.999999999999100    
       element num           1
       int point num           7
       vect2 value  0.999999999999100    
       element num           1
       int point num           8
       vect2 value  0.999999999999100

    • Eric Schimanowsk
      Subscriber

      Thanks for the response, but now a message is appearing when I use this code. "No material record exists at element 0, material point 0 for EJAC. Please send the data leading to this operation to your technical support provider, as this will allow ANSYS, Inc to improve the program."

    • David Weed
      Ansys Employee

      Hi,

      Can you let me know which version of ANSYS you are in and also which IFORT compiler and/or MS VS version you have installed? If in Linux, which GCC version?

    • Eric Schimanowsk
      Subscriber

      Hi,

      Thank you for your help.

      ANSYS 2021 R2 version. Compiler Intel OneAPI, and VS 2019.

    • David Weed
      Ansys Employee

      Hello,

      According to the documentation, we only support these software versions for v212:

      Microsoft Visual Studio Professional 2017 Version 15.0 (including the MS C++ compiler)

      Intel C++ 2019.3.203 and Intel Visual FORTRAN 2019.3.203 compilers

      So this may ultimately be a software compatibility issue. Please see if you can obtain these versions.

       

    • Eric Shimanowski
      Subscriber
      Hello, 
      I would really like to thank you for your help. I needed to access it through another account, but I'm still the same user who asked the initial question. The code is working properly and calculating the volume well for SOLID186 quadratic elements, but in the case of tetrahedral elements the calculated volume is incorrect. Any ideas on how we can get around this situation?
Viewing 9 reply threads
  • The topic ‘Element volume in USERMAT’ is closed to new replies.