Helio C Bortolon
Mechanical
- Sep 1, 2016
- 4
Dear colleagues,
I am trying to circumvent a problem with a custom UDR in Mechanical by using APDL commands in the output section to generate ASCII file for posterior treatment of standards criteria.
The question is that when I put the following code:
______________________________________________________________________________________________________________________________________________________
! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command.
! Active UNIT system in Workbench when this object was created: Metric (m, kg, N, s, V, A)
! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system.
! See Solving Units in the help system for more information.
FINISH
/POST1
SET,LAST
alls !Select all
!*******************
! PIPES
!*******************
CMSEL,S,PIPES
etable, pfxI, smisc, 1
etable, pfxJ, smisc, 14
etable, pmyI, smisc, 2
etable, pmyJ, smisc, 15
etable, pmzI, smisc, 3
etable, pmzj, smisc, 16
etable, hs1, LS, 2
etable, hs2, LS, 8
*get,num_elem_,ELEM,0,COUNT
*GET,elem_,ELEM,0,NUM,MIN
*dim,resPIPES, array, num_elem_, 10
*do,i,1,num_elem_,1
resPIPES(i,1) = elem_
resPIPES(i,2) = NELEM(elem_, 1)
elem_ = elnext(elem_)
*enddo
*GET,elem_,ELEM,0,NUM,MIN
*vget, resPIPES(1,3), elem, 1, etab, hs1
*vget, resPIPES(1,4), elem, 1, etab, hs2
*vget, resPIPES(1,5), elem, 1, etab, pfxI
*vget, resPIPES(1,6), elem, 1, etab, pfxJ
*vget, resPIPES(1,7), elem, 1, etab, pmyI
*vget, resPIPES(1,8), elem, 1, etab, pmyJ
*vget, resPIPES(1,9), elem, 1, etab, pmzI
*vget, resPIPES(1,10), elem, 1, etab, pmzJ
*mwrite, resPIPES, PIPES, txt
(2(F8.0,', '),8(E10.3,', '))
!*******************
! SUPPORTS
!*******************
CMSEL,S,SUPPORTS
etable, supfxI, smisc, 1
etable, supfxJ, smisc, 14
etable, supmyI, smisc, 2
etable, supmyJ, smisc, 15
etable, supmzI, smisc, 3
etable, supmzJ, smisc, 16
*get,num_elem_,ELEM,0,COUNT
*GET,elem_,ELEM,0,NUM,MIN
*dim,resSUPS, array, num_elem_, 8
*do,i,1,num_elem_,1
resSUPS(i,1) = elem_
resSUPS(i,2) = NELEM(elem_, 1)
elem_ = elnext(elem_)
*enddo
*GET,elem_,ELEM,0,NUM,MIN
*vget, resSUPS(1,3), elem, 1, etab, supfxI
*vget, resSUPS(1,4), elem, 1, etab, supfxJ
*vget, resSUPS(1,5), elem, 1, etab, supmyI
*vget, resSUPS(1,6), elem, 1, etab, supmyJ
*vget, resSUPS(1,7), elem, 1, etab, supmzI
*vget, resSUPS(1,8), elem, 1, etab, supmzJ
*mwrite, resSUPS, SUPPORTS, txt
(2(F8.0,', '),6(E10.3,', '))
______________________________________________________________________________________________________________________________________________________
the results for the PIPES component got correctly retrieved, when compared to the BEAM_AXIAL_FX, BEAM_BENDING_MY and BEAM_BENDING_MZ default UDR, but for the SUPPORTS component, both being defined via Named Selections, I get what seems to be memory garbage (e.g., many XX.XXe-310 and XX.XXe+155 values) and this doesn't match what the predefined UDR gives.
I already tried to change the names of the tables, as you can see, the order of the groups of commands and separating them in two blocks of "Commands APDL". Nothing worked so far.
Could anyone point me what I am doing wrong?
Thank you very much in advance for any advice.
------------------------------------------------------------------------------
Hélio Carlos Bortolon
e-mail: heliocb@petrobras.com.br
------------------------------------------------------------------------------
I am trying to circumvent a problem with a custom UDR in Mechanical by using APDL commands in the output section to generate ASCII file for posterior treatment of standards criteria.
The question is that when I put the following code:
______________________________________________________________________________________________________________________________________________________
! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command.
! Active UNIT system in Workbench when this object was created: Metric (m, kg, N, s, V, A)
! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system.
! See Solving Units in the help system for more information.
FINISH
/POST1
SET,LAST
alls !Select all
!*******************
! PIPES
!*******************
CMSEL,S,PIPES
etable, pfxI, smisc, 1
etable, pfxJ, smisc, 14
etable, pmyI, smisc, 2
etable, pmyJ, smisc, 15
etable, pmzI, smisc, 3
etable, pmzj, smisc, 16
etable, hs1, LS, 2
etable, hs2, LS, 8
*get,num_elem_,ELEM,0,COUNT
*GET,elem_,ELEM,0,NUM,MIN
*dim,resPIPES, array, num_elem_, 10
*do,i,1,num_elem_,1
resPIPES(i,1) = elem_
resPIPES(i,2) = NELEM(elem_, 1)
elem_ = elnext(elem_)
*enddo
*GET,elem_,ELEM,0,NUM,MIN
*vget, resPIPES(1,3), elem, 1, etab, hs1
*vget, resPIPES(1,4), elem, 1, etab, hs2
*vget, resPIPES(1,5), elem, 1, etab, pfxI
*vget, resPIPES(1,6), elem, 1, etab, pfxJ
*vget, resPIPES(1,7), elem, 1, etab, pmyI
*vget, resPIPES(1,8), elem, 1, etab, pmyJ
*vget, resPIPES(1,9), elem, 1, etab, pmzI
*vget, resPIPES(1,10), elem, 1, etab, pmzJ
*mwrite, resPIPES, PIPES, txt
(2(F8.0,', '),8(E10.3,', '))
!*******************
! SUPPORTS
!*******************
CMSEL,S,SUPPORTS
etable, supfxI, smisc, 1
etable, supfxJ, smisc, 14
etable, supmyI, smisc, 2
etable, supmyJ, smisc, 15
etable, supmzI, smisc, 3
etable, supmzJ, smisc, 16
*get,num_elem_,ELEM,0,COUNT
*GET,elem_,ELEM,0,NUM,MIN
*dim,resSUPS, array, num_elem_, 8
*do,i,1,num_elem_,1
resSUPS(i,1) = elem_
resSUPS(i,2) = NELEM(elem_, 1)
elem_ = elnext(elem_)
*enddo
*GET,elem_,ELEM,0,NUM,MIN
*vget, resSUPS(1,3), elem, 1, etab, supfxI
*vget, resSUPS(1,4), elem, 1, etab, supfxJ
*vget, resSUPS(1,5), elem, 1, etab, supmyI
*vget, resSUPS(1,6), elem, 1, etab, supmyJ
*vget, resSUPS(1,7), elem, 1, etab, supmzI
*vget, resSUPS(1,8), elem, 1, etab, supmzJ
*mwrite, resSUPS, SUPPORTS, txt
(2(F8.0,', '),6(E10.3,', '))
______________________________________________________________________________________________________________________________________________________
the results for the PIPES component got correctly retrieved, when compared to the BEAM_AXIAL_FX, BEAM_BENDING_MY and BEAM_BENDING_MZ default UDR, but for the SUPPORTS component, both being defined via Named Selections, I get what seems to be memory garbage (e.g., many XX.XXe-310 and XX.XXe+155 values) and this doesn't match what the predefined UDR gives.
I already tried to change the names of the tables, as you can see, the order of the groups of commands and separating them in two blocks of "Commands APDL". Nothing worked so far.
Could anyone point me what I am doing wrong?
Thank you very much in advance for any advice.
------------------------------------------------------------------------------
Hélio Carlos Bortolon
e-mail: heliocb@petrobras.com.br
------------------------------------------------------------------------------