LS PrePost - How to print beam element sectional dimensions in d3plot file

Hello, I am using LS-PrePost to postprocess with a research code, and I had a question regarding beam elements: how do I print the beam sectional dimensions in the d3plot file?

I understand that I need to have this information in the IX2() matrix, when I print the geometry information for the beam elements, but the database manual is a bit confusing. It reads that each 2-node element requires 6 numbers in the input, ordered as follows:

Connectivity, orientation node, 2 null entries, and the material number. But after that, the same description says "the last two number (sic) contain the beam type and length to width ratio*100 and length to height ratio*100".

Should the aforementioned 2 ratios be placed in the 4th and 5th values? If yes, do I also need to provide any additional information for the element, so that the sectional dimensions are read by PrePost?


  • I attach a screenshot from page 18 of the LS-DYNA Database manual, which provides the information for printing beam section information. I believe there are typos in these descriptions, as the markups in the screenshot explain.

  • Hi Koutromanos,

    You are right, the manual has several typos, it should be like the attached picture, let me know if you still think there is a problem.



  • Philip, thank you for your reply and for providing the correction. I have 2 follow-up questions:

    1) If ix2(5,*) =length/height*100, then why is the height = 0.01*length/ix2(5,*)? Shouldn't the height be 100*length/ix2(5,*) ?

    2) I am sorry for my ignorance, but is it possible for you to clarify what we mean by the operation: "ix2(4,*) & 0x3F"? Do we logically compare every single bit of ix2(4,*) and of the hexadecimal 0x3F, and then somehow return a single number? Also, what is the meaning of ix2(4,*)>>6? Is it a bit shift operation?

    I think what would help me a lot would be an example: if length/width = 9, length/height = 11, type = 5, what values would one assign to ix2(4,*) and ix2(5,*)?

    Again, thank you for your reply and help with my questions.


  • Hi Yannis,

    Again, you are right, I was not carefully about the statements on the manual, it should be divided by, see the new pciture

    For the example and explanation, read here:

      before we give the example, let explain the '& 0x3f' and '>>' operations:

      This is in C language, for single precision number, there is 32bit in an integer, using binary numbering system 


      there will be 01010101010101001010101011010111 to represent a number (32digit), 

      if you are using Hexadecimal number then, you will represent a single precision number

      like 0xFFFFFFFF, (only 8 digit), each digit will take 4 bits, when I use a number 0x3F, that is using 6 bits, see following table

      here is the equivalent table of the number convertion

      Hex  Binaray   Decemal

      0  -   0

      1  -   1

      2  -   10

      3  -   11

      4  -  100

      5  -  101

      6  -  110

      7  -  111

      8  -  1000

      9  -  1001

      A  -  1010  -  10

      B  -  1011  -  11

      C  -  1100  -  12

      D  -  1101  -  13

      E  -  1110  -  14

      F  -  1111  -  15

      3F  - 111111  -  63


      in the following statement:

      A = B & 0x3f,  Means we are masking the first 6 bits of B and put that in A

      C = D>>6,    means we are shifting the number D by 6 bits to the right, this is equivalent to take D/64

      Now the example:

      type = 5

      Length = 9.0,

      width = 1.0

      Height = 0.8181818

      L/W = Length/width = 9.0/1.0 = 9

      L/H = Length/height = 9.0/0.8181818 = 11

      ix(4,*) = ((L/W)*100.0)<<6 + type = 9*100*64 + 5 = 57605

      ix(5,*) = ((L/H)*100.0) = 11*100 = 1100

      to revers the process to get width and height

      W = Width = L / (0.01 * (ix(4,*)>>6) = 9 / 0.01* (57605/64) = 9/9 = 1.0

      H = height = L / (0.01 * ix(5,*)) = 9 / (0.01 * 1100) = 9/11 = 0.818181

  • Hi Philip,

    Thank you for your very detailed response.

    By coincidence, I found out what the specific expressions meant, at the same time as you were posting your reply. I realized that ix2(4,*) &0x3f = modulo( ix2(4,*), 64 ), while ix2(4,2) is simply the result of the integer division that you describe in your message.

    Thank you for the example you provide: this also clarifies everything.

    I only have one final question on this matter:

    I experimented with assigning different values to the beam type parameter, and was able to see that each value corresponds to a different cross-sectional shape. In fact, some values even lead to the element being printed as spring or damper. The only sectional shape which I was unable to reproduce was a solid (filled) rectangle. Is there any value of the beam type parameter, for which we have a filled rectangular cross-section in our beam elements?


  • Hi Yannis,

    I am glad we sorted through this BEAM SECTION data mess, hopefully now it is clear. For Solid rectangle cross section, the type should be zero.


  • Philip,

    OK, I had already tried setting the type = 0, but PrePost is drawing a triangular cross-section for this case.

    Anyway, it's not a problem if we cannot draw a rectangular solid section (we can do with drawing a rectangular hollow section, which I have already found).

    As I told you, I tried using different integer values for the beam type parameter. For what it's worth, I obtained the following sectional shapes in LS-PrePost, for the various values of the type parameter:

    type = 1: hollow circle

    type = 2: I-section

    type = 3: C-section

    type = 4: L-section

    type = 5: T-section

    type = 6: Rectangular hollow section,

    type = 7: "Z" section,

    type = 8: triangle

    type = 9: solid circle, 

    type = 13: cross,

    type = 14: H-section (rotated I!)

    type = 15: rotated T,

    type = 17: C-section,

    type = 18: U-section (rotated C),

    type = 19: inverted T,

    type = 21: Hexagon,

    type = 22: Inverted U with protrusions, 

    type = 23: Inverted Box girder with flange protrusions,

    type = 24: solid circle,

    type = 26: spring (the entire beam element is drawn as a spring)

    type = 27: damper (the entire beam element is drawn as a damper)


  • Hi Yannis,

    We have a beam database, where the type of the beam section is 0, and when drawing the beam prism, it is shows as rectangular section. Can you send us your data that is showing as triangular section?



  • Hi Philip,

    Yes, you are correct. I was not printing the orientation node information in my files (I was printing a 0 for orientation node ID), as I had (mistakenly) assumed that the orientation info should not affect drawing the beam elements as prisms.

    I have now fixed this issue (I print the orientation node in my binary files), and I can verify that type = 0 gives a solid rectangular section.

    I also need to correct my previous message: type = 9 does NOT correspond to a solid circular cross-section. If one wants to draw a solid circular section, they must set type = 24.

    Thank you for all your help on this.


Sign In or Register to comment.