Author Topic: TPLOT: export stress state in cylindrical system  (Read 5520 times)

Enginit

  • Jr. Member
  • **
  • Posts: 46
TPLOT: export stress state in cylindrical system
« on: March 29, 2020, 10:40:28 AM »
Dear all,
How can we export the stress state in format of cylindrical system, e.g. sigma_r sigma_theta sigma_z (such an example with a quarter of a pipe under internal pressure)? The default data which is exported by TPLOT is in cartesian. I know how to plot stress in cylindrical system by CYLI command but I could not find how to export these data out. The CYLI also works for displacement since we can type CYLI before typing disp,,all.
Any suggestion is really appreciated.
Thank you very much and best regards,

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: TPLOT: export stress state in cylindrical system
« Reply #1 on: March 29, 2020, 01:35:40 PM »
FEAP does not have this feature.  You have two options.  (1) Convert the data after it is output with a short post-processing program that you write yourself, or (2) you can modify the element you are using to output the polar values in the tplot stress slots (for example if you are using sld3d1.f, the displacement 3d solid element, then look for where tt( : ) is set
Code: [Select]
i = 6*(l-1)
            do j = 1,6
              tt(j+i) = sigp(j,l)
            end do ! j
and compute the cylindrical stresses and place them in tt( : ) instead of the Cartessian ones which are in sigp(1:6, l ).  Note the ordering in sigp is (11,22,33,12,23,31).

Enginit

  • Jr. Member
  • **
  • Posts: 46
Re: TPLOT: export stress state in cylindrical system
« Reply #2 on: March 30, 2020, 11:16:50 AM »
Dear Prof. Govindjee,
Thank you very much for your reply and suggestion.
Best regards,

Enginit

  • Jr. Member
  • **
  • Posts: 46
Re: TPLOT: export stress state in cylindrical system
« Reply #3 on: March 31, 2020, 02:23:26 PM »
Dear Professor,
May I also ask another question? I export stress from element 25 (Q4 element) at the first 2 gauss points (lower left and lower right) (8.265E-01,6.031E-01) and (8.846E-01,6.455E-01) by TPLOT command, as in the attached figure. But why the data exported out seems like the data from only the first gauss points.
In .str file:
-1.709E+03  and -1.709E+03
On screne:
Elmt Mat    1-coord    2-coord
                1-stress   2-stress      Angle   1-strain   2-strain      Angle
               11-stress  22-stress  33-stress  12-stress
               11-strain  22-strain  33-strain  12-strain
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       25   1  8.265E-01  6.031E-01
               1.994E+04 -1.469E+04     -52.25  1.417E-03 -1.320E-03     -52.25
              -1.709E+03  6.965E+03  2.014E+03 -1.676E+04
              -2.942E-04  3.911E-04  0.000E+00 -2.649E-03
       25   1  8.846E-01  6.455E-01
               1.507E+04 -1.957E+04     -52.25  1.237E-03 -1.319E-03     -52.25
              -6.587E+03  2.088E+03 -1.690E+03 -1.677E+04
              -3.614E-04  2.789E-04  0.000E+00 -2.475E-03

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: TPLOT: export stress state in cylindrical system
« Reply #4 on: March 31, 2020, 05:16:41 PM »
Looking at the code for sld3d1.f, it looks like it is storing the data tt = [sig_11-gp1 -- sig_31_gp1, sig_11_gp2 ... sig_31_gp2, ...].
Can you try tplot:  stre,25,1 and stre,25,7 to see if the correct data is being saved?

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: TPLOT: export stress state in cylindrical system
« Reply #5 on: March 31, 2020, 05:23:07 PM »
Follow up.  Looking at ptplot.f you can see that the coordinate feature only locates the element number that contains the point you have specified; i.e. using x,y,z is an alternate to specifying n2 in "Table 14.2 Time history plot options".  It will not locate Gauss points within elements.  If you want different Gauss points inside an element you need to stride through the saved values.

Enginit

  • Jr. Member
  • **
  • Posts: 46
Re: TPLOT: export stress state in cylindrical system
« Reply #6 on: April 01, 2020, 11:53:42 AM »
The command stre,25,7 yields a really strange number, not the expected stress at 2nd Gauss point.
Regarding the stre,,1 8.265E-01  6.031E-01, I follow the manual of FEAP v8.4, page 178 (as attached figure).
I finally take the data by hand in the output file via stress all command though this is a really slow way.
Please let me know if you have any suggestions.
Thank you very much, Professor

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: TPLOT: export stress state in cylindrical system
« Reply #7 on: April 01, 2020, 04:48:50 PM »
The manual is incorrect with respect to being able to get a stress at a point.  The coordinate feature only located elements not actual points.
You have to look at what is programmed in the real manual which is written in Fortran.  In this case what is in program/ptplot.f

I see you are interested in a 2D problem.  In that case, try the following:

Code: [Select]
BATCh
  TPLOt
END
STRE,7,1
STRE,7,11
SHOW

This should give you the stresses at GP 1 and 2 of element 7 if you are using the regular displacement element (sld2d1.f).  In the displacement based 2D solid element it stores 6 stress components and 4 strain components in the tplot arrays per Gauss point, so the stride is 10.  Note the storage, and hence the stride changes from element to element.  So for example if you are using the 2D mixed u-p-theta element (sld2d2.f) then the stride is 6.


Enginit

  • Jr. Member
  • **
  • Posts: 46
Re: TPLOT: export stress state in cylindrical system
« Reply #8 on: April 02, 2020, 08:26:52 AM »
Great, it works correctly. I will note down your suggestion on the stride.
Thank you very much for your time and help, Professor.