Creating custom contour plot in WB from APDL command object data?

U
ude@ramboll.com
Mon, Jun 27, 2022 10:05 AM

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible).

Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark

Hi there, I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible). Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all. It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc. Has anybody done anything like this before? I have looked at various things so far… I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter. \*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical. User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with \*VPUT). I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots. There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax. Thanks, Uffe Dal Eriksen Ramboll Energy/Marine Structures Denmark
EH
Ernst Hustedt
Mon, Jun 27, 2022 9:13 PM

Hi Uffe,

I have done stuff like this like many others but I have never used WB.

It's been quite a while and I vaguely remember switching from
overwriting/defining some result vector to using some load/property
parameter  to plot my special contour in PREP7. Can you fill an APDL 
array with  your values in WB and then in Mech use these values to
define element/nodal temperatures, pressures or even element material
numbers?

Naturally you save a cop[y of the original db file first.

Hope that helps

BTW just curious;  this is the first xansys mail I have received since
07 June ??

Ernst Hustedt (Ret)
Chch, NZ

On 27-Jun-22 22:05, Uffe Dal Eriksen via Xansys wrote:

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible).

Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark


Xansys mailing list --xansys-temp@list.xansys.org
To unsubscribe send an email toxansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS toxansys-mod@tynecomp.co.uk  and not to the list

--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Hi Uffe, I have done stuff like this like many others but I have never used WB. It's been quite a while and I vaguely remember switching from overwriting/defining some result vector to using some load/property parameter  to plot my special contour in PREP7. Can you fill an APDL  array with  your values in WB and then in Mech use these values to define element/nodal temperatures, pressures or even element material numbers? Naturally you save a cop[y of the original db file first. Hope that helps BTW just curious;  this is the first xansys mail I have received since 07 June ?? Ernst Hustedt (Ret) Chch, NZ On 27-Jun-22 22:05, Uffe Dal Eriksen via Xansys wrote: > Hi there, > > I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible). > > Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all. > > It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc. > > Has anybody done anything like this before? > > I have looked at various things so far… > > I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter. > > \*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical. > > User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with \*VPUT). > > I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots. > > There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax. > > Thanks, > > Uffe Dal Eriksen > > Ramboll Energy/Marine Structures > > Denmark > _______________________________________________ > Xansys mailing list --xansys-temp@list.xansys.org > To unsubscribe send an email toxansys-temp-leave@list.xansys.org > If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. > > Please send administrative requests such as deletion from XANSYS toxansys-mod@tynecomp.co.uk and not to the list -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
JZ
Jiaping Zhang
Mon, Jun 27, 2022 9:26 PM

Hi Uffe,

As far as I am aware of, one easy way is to use the free "CSV plot " app available in https://catalog.ansys.com/. It acts similar like"VPUT".

Jiaping Zhang
Qualcomm RFFE QCT – NPI BackEnd
jiapzhan@qti.qualcomm.com
+1-858-651-2960
WT-1160E

-----Original Message-----
From: Ernst Hustedt ernst.hustedt@ames.co.nz
Sent: Monday, June 27, 2022 2:14 PM
To: xansys-temp@list.xansys.org
Subject: [Xansys] Re: Creating custom contour plot in WB from APDL command object data?

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

Hi Uffe,

I have done stuff like this like many others but I have never used WB.

It's been quite a while and I vaguely remember switching from overwriting/defining some result vector to using some load/property parameter  to plot my special contour in PREP7. Can you fill an APDL array with  your values in WB and then in Mech use these values to define element/nodal temperatures, pressures or even element material numbers?

Naturally you save a cop[y of the original db file first.

Hope that helps

BTW just curious;  this is the first xansys mail I have received since
07 June ??

Ernst Hustedt (Ret)
Chch, NZ

On 27-Jun-22 22:05, Uffe Dal Eriksen via Xansys wrote:

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible).

Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark


Xansys mailing list --xansys-temp@list.xansys.org To unsubscribe send
an email toxansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS
toxansys-mod@tynecomp.co.uk  and not to the list

--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list

Hi Uffe, As far as I am aware of, one easy way is to use the free "CSV plot " app available in https://catalog.ansys.com/. It acts similar like"VPUT". Jiaping Zhang Qualcomm RFFE QCT – NPI BackEnd jiapzhan@qti.qualcomm.com +1-858-651-2960 WT-1160E -----Original Message----- From: Ernst Hustedt <ernst.hustedt@ames.co.nz> Sent: Monday, June 27, 2022 2:14 PM To: xansys-temp@list.xansys.org Subject: [Xansys] Re: Creating custom contour plot in WB from APDL command object data? WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros. Hi Uffe, I have done stuff like this like many others but I have never used WB. It's been quite a while and I vaguely remember switching from overwriting/defining some result vector to using some load/property parameter to plot my special contour in PREP7. Can you fill an APDL array with your values in WB and then in Mech use these values to define element/nodal temperatures, pressures or even element material numbers? Naturally you save a cop[y of the original db file first. Hope that helps BTW just curious; this is the first xansys mail I have received since 07 June ?? Ernst Hustedt (Ret) Chch, NZ On 27-Jun-22 22:05, Uffe Dal Eriksen via Xansys wrote: > Hi there, > > I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible). > > Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all. > > It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc. > > Has anybody done anything like this before? > > I have looked at various things so far… > > I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter. > > \*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical. > > User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with \*VPUT). > > I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots. > > There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax. > > Thanks, > > Uffe Dal Eriksen > > Ramboll Energy/Marine Structures > > Denmark > _______________________________________________ > Xansys mailing list --xansys-temp@list.xansys.org To unsubscribe send > an email toxansys-temp-leave@list.xansys.org > If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. > > Please send administrative requests such as deletion from XANSYS > toxansys-mod@tynecomp.co.uk and not to the list -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list
EE
Emre ERDEMİR
Mon, Jun 27, 2022 9:29 PM

Hello Uffe,

There are ways as you already explained such as using ACT, import data as
external data, you can use images taken from APDL and imported to
Mechanical using commands but If I were you I would choose CSV Plot ACT. I
think this one is the simplest way to do what you want.

Emre Erdemir
Turkish Engine Industry/Turboshaft Engine-HPT
Turkiye

On 27 Jun 2022 Mon at 13:06 Uffe Dal Eriksen via Xansys <
xansys-temp@list.xansys.org> wrote:

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’
for selected elements from a WB command object (postproc using APDL code
inside the Mechanical solution tree) to a custom contour plot for said
elements at the WB/Mechanical level (so manual selection/angle/zoom setup
is still possible).

Basically I am performing some custom postprocessing inside a command
object giving me specific data values (here, utitlsation ratios between 0
and 1, and above) for specific elements or element groups. I would like to
be able to pass this data to the Mechanical interface and create contour
plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB
project page, because the final solution should be easily implemented by a
variety of users in a variety of projects. Also, I would like to avoid
setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read
it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some
extent, but only using APDL. The data does not seem to be passed on to
Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use
(was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL
environment of the Command Object, and these plots could be linked out onto
the Mechanical tree. However, I need my solution to be usable for any
generic model, so there will be issues with getting the right angle and
zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is
a poor man's ACT module(?). This might be exactly what I need, because it
seems to require no setup/installation, but the learning curve is almost
vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark


Xansys mailing list -- xansys-temp@list.xansys.org
To unsubscribe send an email to xansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing
account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list

--
Emre ERDEMİR

Hello Uffe, There are ways as you already explained such as using ACT, import data as external data, you can use images taken from APDL and imported to Mechanical using commands but If I were you I would choose CSV Plot ACT. I think this one is the simplest way to do what you want. Emre Erdemir Turkish Engine Industry/Turboshaft Engine-HPT Turkiye On 27 Jun 2022 Mon at 13:06 Uffe Dal Eriksen via Xansys < xansys-temp@list.xansys.org> wrote: > Hi there, > > I would like to be able to pass data in the form of ‘utilisation ratios’ > for selected elements from a WB command object (postproc using APDL code > inside the Mechanical solution tree) to a custom contour plot for said > elements at the WB/Mechanical level (so manual selection/angle/zoom setup > is still possible). > > Basically I am performing some custom postprocessing inside a command > object giving me specific data values (here, utitlsation ratios between 0 > and 1, and above) for specific elements or element groups. I would like to > be able to pass this data to the Mechanical interface and create contour > plots of it all. > > It is important for me to avoid ‘clutter’ and complicated setup in the WB > project page, because the final solution should be easily implemented by a > variety of users in a variety of projects. Also, I would like to avoid > setup/installation of ACT modules etc. > > Has anybody done anything like this before? > > I have looked at various things so far… > > I can easily write out my data to an ASCII file and then (supposedly) read > it back into Mechanical using an External Data link, but … clutter. > > \*VPUT allows me to replace custom data (in memory) and plot it to some > extent, but only using APDL. The data does not seem to be passed on to > Mechanical. > > User Defined Results in Mechanical do not seem to have anything I can use > (was hoping to use this in combanation with \*VPUT). > > I could also just create static plots of my results within the APDL > environment of the Command Object, and these plots could be linked out onto > the Mechanical tree. However, I need my solution to be usable for any > generic model, so there will be issues with getting the right angle and > zoom level for the plots. > > There is an option for inserting a Python Result object, which is guess is > a poor man's ACT module(?). This might be exactly what I need, because it > seems to require no setup/installation, but the learning curve is almost > vertical for the Python-ANSYS syntax. > > Thanks, > > Uffe Dal Eriksen > > Ramboll Energy/Marine Structures > > Denmark > _______________________________________________ > Xansys mailing list -- xansys-temp@list.xansys.org > To unsubscribe send an email to xansys-temp-leave@list.xansys.org > If you are receiving too many emails from XANSYS please consider changing > account settings to Digest mode which will send a single email per day. > > Please send administrative requests such as deletion from XANSYS to > xansys-mod@tynecomp.co.uk and not to the list -- Emre ERDEMİR
SM
Sagues Mitjana Carles
Tue, Jun 28, 2022 6:57 AM

Uffe,

If you could write out the specific data values you are getting from your custom postprocessing into a text file, then you could:

  1. duplicate your WB analysis
  2. delete all settings for this new second analysis and insert a command object that will read the utilisation ratio back in as a UX result:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!example for a file with following structure:
!Header1
!total number of nodes considered
!Header3
!Header4
!Node_id_1
!Custom_result for Node_id_1
!Node_id_2
!Custom_result for Node_id_2
!Node_id_3
!Custom_result for Node_id_3
!......
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

*DIM,current_wd,STRING,200,1
*DIM,file_rst,STRING,200,1
*DIM,file_ans,STRING,200,1
*DIM,file_ans2,STRING,200,1
*DIM,tmp_string,STRING,200,1

/INQUIRE,current_wd(1),DIRECTORY                                                        ! Returns the pathname of the current directory
file_rst(1)= 'D:\test\test_files\dp0\SYS\MECH'                                          ! folder where original rst is (initial Analysis)
file_ans(1)=' D:\test\test_files\dp0\SYS\MECH'                                          ! folder where utilisation ratio file is
file_ans2(1)='\utilisation ratio.csv'                                                          !file name
file_ans(1)=strcat(file_ans(1),file_ans2(1))
tmp_string(1)=strcat(current_wd(1),'\file')
/CWD,file_rst(1)                                        ! changes current working directory
file_rst(1)=strcat(file_rst(1),'\file')
/POST1
FILE,file,rst                                          ! read results file
SET,FIRST
*GET,lstp,ACTIVE,0,SET,LSTP
*GET,first_substp,ACTIVE,0,SET,SBST

*DIM,nds_v,,2
*VREAD,nds_v(1),%file_ans(1)%,ans,,IJK
(E13.7)
nds=nds_v(2)                                            ! number of considered nodes
DIM,fatigue,,nds2
*DIM,nodelist,,nds
*DIM,tmp,,nds
*VREAD,fatigue(1),%file_ans(1)%,ans,,IJK,,,,4  ! skip first 4 lines
(E13.7)
VLEN,nds2,2
*VFUN,nodelist,COMP,fatigue(1)
VLEN,nds2,2
*VFUN,tmp,COMP,fatigue(2)
ALLSEL
/NOPR
DNSOL,ALL,U,X,11                                        ! set all UX values to 11 (avoids showing "true" UX results
DNSOL,nodelist(1:nds),u,x,tmp(1:nds)                    ! for nodes that have not been considered in custom postproc)
/GOPR
/POST1
LCDEF,2,lstp,first_substp
RESWRITE,file_fatigue,
/COPY,file_fatigue,rst,,%tmp_string(1)%,rst
/DELETE,file_fatigue,rst
/CWD,current_wd(1)                                      ! back to original folder
FINISH
/EOF

!!!!!!!!!!!!!!!!!!!!!!!!!!!

I hope it helps!

Regards,

Carles SAGUÉS MITJANA

BOBST
BU Sheet Fed R&D Support
Numerical Simulation Expert & Material Adviser

Bobst Mex SA
PO Box, CH-1001 Lausanne
Tel.: +41 21 621 21 11
Fax: +41 21 621 20 70
www.bobst.com

-----Original Message-----
From: Uffe Dal Eriksen via Xansys xansys-temp@list.xansys.org
Sent: lundi 27 juin 2022 12:05
To: xansys-temp@list.xansys.org
Cc: ude@ramboll.com
Subject: [Xansys] Creating custom contour plot in WB from APDL command object data?

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible).

Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list


LinkedInhttps://www.bobst.com/linkedin - Facebookhttps://www.bobst.com/facebook - Twitterhttps://www.bobst.com/twitter - YouTubehttps://www.bobst.com/youtube


This message and any attachments (the message) are intended solely for the addressees and are confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accordance with its purpose, any dissemination, copying or disclosure, either whole or partial is prohibited without prior formal approval. The internet cannot guarantee the integrity of the message. The companies of Bobst Group do not accept any liability for data corruption, delay, interception or any modification in relation with this message.


Uffe, If you could write out the specific data values you are getting from your custom postprocessing into a text file, then you could: 1) duplicate your WB analysis 2) delete all settings for this new second analysis and insert a command object that will read the utilisation ratio back in as a UX result: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !example for a file with following structure: !Header1 !total number of nodes considered !Header3 !Header4 !Node_id_1 !Custom_result for Node_id_1 !Node_id_2 !Custom_result for Node_id_2 !Node_id_3 !Custom_result for Node_id_3 !...... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *DIM,current_wd,STRING,200,1 *DIM,file_rst,STRING,200,1 *DIM,file_ans,STRING,200,1 *DIM,file_ans2,STRING,200,1 *DIM,tmp_string,STRING,200,1 /INQUIRE,current_wd(1),DIRECTORY ! Returns the pathname of the current directory file_rst(1)= 'D:\test\test_files\dp0\SYS\MECH' ! folder where original rst is (initial Analysis) file_ans(1)=' D:\test\test_files\dp0\SYS\MECH' ! folder where utilisation ratio file is file_ans2(1)='\utilisation ratio.csv' !file name file_ans(1)=strcat(file_ans(1),file_ans2(1)) tmp_string(1)=strcat(current_wd(1),'\file') /CWD,file_rst(1) ! changes current working directory file_rst(1)=strcat(file_rst(1),'\file') /POST1 FILE,file,rst ! read results file SET,FIRST *GET,lstp,ACTIVE,0,SET,LSTP *GET,first_substp,ACTIVE,0,SET,SBST *DIM,nds_v,,2 *VREAD,nds_v(1),%file_ans(1)%,ans,,IJK (E13.7) nds=nds_v(2) ! number of considered nodes *DIM,fatigue,,nds*2 *DIM,nodelist,,nds *DIM,tmp,,nds *VREAD,fatigue(1),%file_ans(1)%,ans,,IJK,,,,4 ! skip first 4 lines (E13.7) *VLEN,nds*2,2 *VFUN,nodelist,COMP,fatigue(1) *VLEN,nds*2,2 *VFUN,tmp,COMP,fatigue(2) ALLSEL /NOPR DNSOL,ALL,U,X,11 ! set all UX values to 11 (avoids showing "true" UX results DNSOL,nodelist(1:nds),u,x,tmp(1:nds) ! for nodes that have not been considered in custom postproc) /GOPR /POST1 LCDEF,2,lstp,first_substp RESWRITE,file_fatigue, /COPY,file_fatigue,rst,,%tmp_string(1)%,rst /DELETE,file_fatigue,rst /CWD,current_wd(1) ! back to original folder FINISH /EOF !!!!!!!!!!!!!!!!!!!!!!!!!!! I hope it helps! Regards, Carles SAGUÉS MITJANA BOBST BU Sheet Fed R&D Support Numerical Simulation Expert & Material Adviser Bobst Mex SA PO Box, CH-1001 Lausanne Tel.: +41 21 621 21 11 Fax: +41 21 621 20 70 www.bobst.com -----Original Message----- From: Uffe Dal Eriksen via Xansys <xansys-temp@list.xansys.org> Sent: lundi 27 juin 2022 12:05 To: xansys-temp@list.xansys.org Cc: ude@ramboll.com Subject: [Xansys] Creating custom contour plot in WB from APDL command object data? Hi there, I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible). Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all. It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc. Has anybody done anything like this before? I have looked at various things so far… I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter. \*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical. User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with \*VPUT). I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots. There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax. Thanks, Uffe Dal Eriksen Ramboll Energy/Marine Structures Denmark _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list ________________________________ LinkedIn<https://www.bobst.com/linkedin> - Facebook<https://www.bobst.com/facebook> - Twitter<https://www.bobst.com/twitter> - YouTube<https://www.bobst.com/youtube> ________________________________ This message and any attachments (the message) are intended solely for the addressees and are confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accordance with its purpose, any dissemination, copying or disclosure, either whole or partial is prohibited without prior formal approval. The internet cannot guarantee the integrity of the message. The companies of Bobst Group do not accept any liability for data corruption, delay, interception or any modification in relation with this message. ________________________________
U
ude@ramboll.com
Wed, Jun 29, 2022 10:35 AM

Thank you Carles (and the rest of the repliers).

I have had the CSV Plot app recommended from multiple sources. I might need to try it, although as mentioned I would like to avoid too much app installation etc.

Anyway, I discovered a reasonably easy method to actually do what I wanted, which I will try to explain so other users might benefit:

I am using ANSYS 2022R1, btw…

I had a User Defined Result set up in my Solution Tree (just showing some random element result as part of my testing). When I right-clicked the result in the tree I noticed that, at the very bottom, it showed “Import (beta)”. This option only shows up if the User Defined Result has been successfully imported (green check mark). It doesn’t seem to matter which result (although I assume it should be Element class for my particular use). The option allows the import of a text file, which is exactly what I wanted.

In order to get the proper syntax for the file, I just right-clicked the result and chose “Export text file” instead. It turns out it was a simple listing of element numbers and result values, separated by a Tab. The first line in the file was a header, which I just copied.

So with the syntax in place I could use *VWRITE inside the Command Object to write out a text file with my calculated results (fillet weld utilisations in my case). Upon import in Mechanical I now get a nice result contour plot with all the WB options as usual (filtering on scoping method, showing the parts without results as translucent, free rotation/zoom etc.).

Some observations:

The text file does not care about the element number sequence, and duplicates are ignored (or maybe overwritten).

There is no need to list all elements in the file. Only the listed elements are shown with result colors… the rest are dark blue (or light grey as I prefer)

When performing a Solve (including updating the project) the User Defined Result reverts to the ‘actual’ values. I chose the =WEXT result since it turns out as zero for my analysis (and it sounds a bit like “weld” :) ). I then have to right-click/import the correct (updated) text file manually to get back the APDL results. But since a project update zeroes out the results, there is no great risk of forgetting the manual part.

Hope this may be useful for someone else, too.

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark

Thank you Carles (and the rest of the repliers). I have had the CSV Plot app recommended from multiple sources. I might need to try it, although as mentioned I would like to avoid too much app installation etc. Anyway, I discovered a reasonably easy method to actually do what I wanted, which I will try to explain so other users might benefit: I am using ANSYS 2022R1, btw… I had a User Defined Result set up in my Solution Tree (just showing some random element result as part of my testing). When I right-clicked the result in the tree I noticed that, at the very bottom, it showed “Import (beta)”. This option only shows up if the User Defined Result has been successfully imported (green check mark). It doesn’t seem to matter which result (although I assume it should be Element class for my particular use). The option allows the import of a text file, which is exactly what I wanted. In order to get the proper syntax for the file, I just right-clicked the result and chose “Export text file” instead. It turns out it was a simple listing of element numbers and result values, separated by a Tab. The first line in the file was a header, which I just copied. So with the syntax in place I could use \*VWRITE inside the Command Object to write out a text file with my calculated results (fillet weld utilisations in my case). Upon import in Mechanical I now get a nice result contour plot with all the WB options as usual (filtering on scoping method, showing the parts without results as translucent, free rotation/zoom etc.). Some observations: The text file does not care about the element number sequence, and duplicates are ignored (or maybe overwritten). There is no need to list all elements in the file. Only the listed elements are shown with result colors… the rest are dark blue (or light grey as I prefer) When performing a Solve (including updating the project) the User Defined Result reverts to the ‘actual’ values. I chose the =WEXT result since it turns out as zero for my analysis (and it sounds a bit like “weld” :) ). I then have to right-click/import the correct (updated) text file manually to get back the APDL results. But since a project update zeroes out the results, there is no great risk of forgetting the manual part. Hope this may be useful for someone else, too. Uffe Dal Eriksen Ramboll Energy/Marine Structures Denmark
BL
Bent Laursen
Wed, Jun 29, 2022 12:06 PM

You can generate Mechanical APDL plots in Mechanical, see "Mechanical APDL Application Plots in Mechanical" in the following link:

https://ansyshelp.ansys.com/Views/Secured/corp/v221/en/wb_sim/ds_using_cmds_obj_w_MAPDL.html#ds_cmd_mapdl_plots

This works by creating a command object under Solutions with plot commands.

In order to let users determine what should be plotted, you can use named selections in Mechanical, which are treated as components in the APDL in the command object.

Best regards,

Bent Laursen

Molde Engineering AS

Norway

-----Original Message-----
From: Uffe Dal Eriksen via Xansys xansys-temp@list.xansys.org
Sent: mandag 27. juni 2022 12:05
To: xansys-temp@list.xansys.org
Cc: ude@ramboll.com
Subject: [Xansys] Creating custom contour plot in WB from APDL command object data?

Hi there,

I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible).

Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all.

It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc.

Has anybody done anything like this before?

I have looked at various things so far…

I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter.

*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical.

User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with *VPUT).

I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots.

There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax.

Thanks,

Uffe Dal Eriksen

Ramboll Energy/Marine Structures

Denmark


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list

You can generate Mechanical APDL plots in Mechanical, see "Mechanical APDL Application Plots in Mechanical" in the following link: https://ansyshelp.ansys.com/Views/Secured/corp/v221/en/wb_sim/ds_using_cmds_obj_w_MAPDL.html#ds_cmd_mapdl_plots This works by creating a command object under Solutions with plot commands. In order to let users determine what should be plotted, you can use named selections in Mechanical, which are treated as components in the APDL in the command object. Best regards, Bent Laursen Molde Engineering AS Norway -----Original Message----- From: Uffe Dal Eriksen via Xansys <xansys-temp@list.xansys.org> Sent: mandag 27. juni 2022 12:05 To: xansys-temp@list.xansys.org Cc: ude@ramboll.com Subject: [Xansys] Creating custom contour plot in WB from APDL command object data? Hi there, I would like to be able to pass data in the form of ‘utilisation ratios’ for selected elements from a WB command object (postproc using APDL code inside the Mechanical solution tree) to a custom contour plot for said elements at the WB/Mechanical level (so manual selection/angle/zoom setup is still possible). Basically I am performing some custom postprocessing inside a command object giving me specific data values (here, utitlsation ratios between 0 and 1, and above) for specific elements or element groups. I would like to be able to pass this data to the Mechanical interface and create contour plots of it all. It is important for me to avoid ‘clutter’ and complicated setup in the WB project page, because the final solution should be easily implemented by a variety of users in a variety of projects. Also, I would like to avoid setup/installation of ACT modules etc. Has anybody done anything like this before? I have looked at various things so far… I can easily write out my data to an ASCII file and then (supposedly) read it back into Mechanical using an External Data link, but … clutter. \*VPUT allows me to replace custom data (in memory) and plot it to some extent, but only using APDL. The data does not seem to be passed on to Mechanical. User Defined Results in Mechanical do not seem to have anything I can use (was hoping to use this in combanation with \*VPUT). I could also just create static plots of my results within the APDL environment of the Command Object, and these plots could be linked out onto the Mechanical tree. However, I need my solution to be usable for any generic model, so there will be issues with getting the right angle and zoom level for the plots. There is an option for inserting a Python Result object, which is guess is a poor man's ACT module(?). This might be exactly what I need, because it seems to require no setup/installation, but the learning curve is almost vertical for the Python-ANSYS syntax. Thanks, Uffe Dal Eriksen Ramboll Energy/Marine Structures Denmark _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list
MG
Mohammad Gharaibeh
Wed, Jun 29, 2022 4:35 PM

Hi Uffe,

I can suggest using CBDOF command in WB to interpolate degrees of freedom
and temperature at specific nodes, then use submodeling technique to import
this data into Mechanical. I would also suggest importing data using /INPUT
command.

I can provide some examples if interested, but I need to dig into my
archives.

I hope this helps

Best,
Mohammad

--

---====
Mohammad A Gharaibeh, Ph.D.
Associate Professor
Department of Mechanical Engineering
The Hashemite University
P.O. Box 330127
Zarqa, 13133, Jordan
Tel: +962 - 5 - 390 3333 Ext. 4771
Fax: +962 - 5 - 382 6348

---====

Hi Uffe, I can suggest using CBDOF command in WB to interpolate degrees of freedom and temperature at specific nodes, then use submodeling technique to import this data into Mechanical. I would also suggest importing data using /INPUT command. I can provide some examples if interested, but I need to dig into my archives. I hope this helps Best, Mohammad -- ===================================== Mohammad A Gharaibeh, Ph.D. Associate Professor Department of Mechanical Engineering The Hashemite University P.O. Box 330127 Zarqa, 13133, Jordan Tel: +962 - 5 - 390 3333 Ext. 4771 Fax: +962 - 5 - 382 6348 =====================================