[APDL] Format descriptors for *VWRITE and text strings

RW
robert.wheeler@otis.com
Thu, Mar 16, 2023 5:06 PM

Hello,

I have an APDL input file I have written to set up and solve a simple model of a beam structure, then populate some text files with stress and deflection results for a number of load steps. I have macros to write and append the numeric results and all works smoothly but I was asked by an internal customer to write a file with text strings for each load case.

I am using *VWRITE with the format descriptors for the numeric values without issue, but *VWRITE for the text string file has me flummoxed. ANSYS Help and the PADT article are helpful with the concept, but I’m wondering if anyone has a sample snippet for the text format descriptors which they would toss over the wall.

Apologies in advance for my laziness and to the FORTRAN true believers.

Thanks.

Rob Wheeler, Otis Elevator

Hello, I have an APDL input file I have written to set up and solve a simple model of a beam structure, then populate some text files with stress and deflection results for a number of load steps. I have macros to write and append the numeric results and all works smoothly but I was asked by an internal customer to write a file with text strings for each load case. I am using \*VWRITE with the format descriptors for the numeric values without issue, but \*VWRITE for the text string file has me flummoxed. ANSYS Help and the PADT article are helpful with the concept, but I’m wondering if anyone has a sample snippet for the text format descriptors which they would toss over the wall. Apologies in advance for my laziness and to the FORTRAN true believers. Thanks. Rob Wheeler, Otis Elevator ###### ######
MD
Michael Dowhopoluk
Thu, Mar 16, 2023 5:13 PM

Hi Rob,

Here is a snippet:

*cfopen,bend_stress,txt
*vwrite
(/,'Bend',2X,'Chainage',3x,'L_Angle',3x,'V_Angle',2X,'Radius',4X,'DOC',2x,'Soil',3x,'Stress',3x,'Displ',3x,'Displ_z',2x,'Tensile
Strain %',2x,'Comp Strain %'/)
*vwrite,
Bnd_seq(1),Bnd_chn(1),Bnd_Lang(1),Bnd_ang(1),Bnd_rad(1),Bnd_doc(1),Bnd_soil(1),Bnd_str(1),Bnd_dpl(1),Bnd_dplz(1),Bnd_stn(1,1),Bnd_stn(1,2)
(F4.0,F11.0,F9.2,F10.2,F8.0,F7.0,F6.0,F9.1,F9.0,F9.0,F18.6,F15.6)
*cfclos

The columns all line up correctly in the text file, but I recall it being a
bit finicky to set up initially.

Michael Dowhopoluk*, M.Eng.**, P.Eng.*
Principal Engineer
*PVP Engineering Ltd. *
1.403.390.7341

On Thu, Mar 16, 2023 at 11:08 AM Robert Wheeler via Xansys <
xansys-temp@list.xansys.org> wrote:

Hello,

I have an APDL input file I have written to set up and solve a simple
model of a beam structure, then populate some text files with stress and
deflection results for a number of load steps. I have macros to write and
append the numeric results and all works smoothly but I was asked by an
internal customer to write a file with text strings for each load case.

I am using *VWRITE with the format descriptors for the numeric values
without issue, but *VWRITE for the text string file has me flummoxed.
ANSYS Help and the PADT article are helpful with the concept, but I’m
wondering if anyone has a sample snippet for the text format descriptors
which they would toss over the wall.

Apologies in advance for my laziness and to the FORTRAN true believers.

Thanks.

Rob Wheeler, Otis Elevator


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 Rob, Here is a snippet: *cfopen,bend_stress,txt *vwrite (/,'Bend',2X,'Chainage',3x,'L_Angle',3x,'V_Angle',2X,'Radius',4X,'DOC',2x,'Soil',3x,'Stress',3x,'Displ',3x,'Displ_z',2x,'Tensile Strain %',2x,'Comp Strain %'/) *vwrite, Bnd_seq(1),Bnd_chn(1),Bnd_Lang(1),Bnd_ang(1),Bnd_rad(1),Bnd_doc(1),Bnd_soil(1),Bnd_str(1),Bnd_dpl(1),Bnd_dplz(1),Bnd_stn(1,1),Bnd_stn(1,2) (F4.0,F11.0,F9.2,F10.2,F8.0,F7.0,F6.0,F9.1,F9.0,F9.0,F18.6,F15.6) *cfclos The columns all line up correctly in the text file, but I recall it being a bit finicky to set up initially. *Michael Dowhopoluk**, M.Eng.**, P.Eng.* *Principal Engineer* *PVP Engineering Ltd. * *1.403.390.7341* On Thu, Mar 16, 2023 at 11:08 AM Robert Wheeler via Xansys < xansys-temp@list.xansys.org> wrote: > Hello, > > I have an APDL input file I have written to set up and solve a simple > model of a beam structure, then populate some text files with stress and > deflection results for a number of load steps. I have macros to write and > append the numeric results and all works smoothly but I was asked by an > internal customer to write a file with text strings for each load case. > > I am using \*VWRITE with the format descriptors for the numeric values > without issue, but \*VWRITE for the text string file has me flummoxed. > ANSYS Help and the PADT article are helpful with the concept, but I’m > wondering if anyone has a sample snippet for the text format descriptors > which they would toss over the wall. > > Apologies in advance for my laziness and to the FORTRAN true believers. > > Thanks. > > Rob Wheeler, Otis Elevator > > ###### > > ###### > _______________________________________________ > 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
RP
Ramos, Pedro (The Hague)
Thu, Mar 16, 2023 5:16 PM

Hi Rob,

Something like this.. where RES is the array with columns of results...for example

*CFOPEN,results_file.csv
*vwrite,
("Node,LOCX,LOCY,LOCZ ,SEQV")
*vwrite,RES(1,1),RES(1,2),RES(1,3),RES(1,4),RES(1,5)
%8d,%16.9g,%16.9g,%16.9g,%16.9g
*CFCLOS

Regards,
Pedro

-----Original Message-----
From: Robert Wheeler via Xansys xansys-temp@list.xansys.org
Sent: Thursday, March 16, 2023 18:07
To: xansys-temp@list.xansys.org
Cc: robert.wheeler@otis.com
Subject: [Xansys] [APDL] Format descriptors for *VWRITE and text strings[External Sender]

** [EXTERNAL SENDER] Do not click links or open attachments unless you recognize the sender. **

Hello,

I have an APDL input file I have written to set up and solve a simple model of a beam structure, then populate some text files with stress and deflection results for a number of load steps. I have macros to write and append the numeric results and all works smoothly but I was asked by an internal customer to write a file with text strings for each load case.

I am using *VWRITE with the format descriptors for the numeric values without issue, but *VWRITE for the text string file has me flummoxed. ANSYS Help and the PADT article are helpful with the concept, but I’m wondering if anyone has a sample snippet for the text format descriptors which they would toss over the wall.

Apologies in advance for my laziness and to the FORTRAN true believers.

Thanks.

Rob Wheeler, Otis Elevator


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
*** WORLEY GROUP NOTICE *** "This email is confidential. If you are not the intended recipient, you must not disclose or use the information contained in it. If you have received this email in error, please notify us immediately by return email and delete the email and any attachments. Any personal views or opinions expressed by the writer may not necessarily reflect the views or opinions of any company in the Worley Group of Companies. How we use your personal data: https://www.worley.com/site-services/privacy"

Hi Rob, Something like this.. where RES is the array with columns of results...for example *CFOPEN,results_file.csv *vwrite, ("Node,LOCX,LOCY,LOCZ ,SEQV") *vwrite,RES(1,1),RES(1,2),RES(1,3),RES(1,4),RES(1,5) %8d,%16.9g,%16.9g,%16.9g,%16.9g *CFCLOS Regards, Pedro -----Original Message----- From: Robert Wheeler via Xansys <xansys-temp@list.xansys.org> Sent: Thursday, March 16, 2023 18:07 To: xansys-temp@list.xansys.org Cc: robert.wheeler@otis.com Subject: [Xansys] [APDL] Format descriptors for *VWRITE and text strings[External Sender] ** [EXTERNAL SENDER] Do not click links or open attachments unless you recognize the sender. ** Hello, I have an APDL input file I have written to set up and solve a simple model of a beam structure, then populate some text files with stress and deflection results for a number of load steps. I have macros to write and append the numeric results and all works smoothly but I was asked by an internal customer to write a file with text strings for each load case. I am using \*VWRITE with the format descriptors for the numeric values without issue, but \*VWRITE for the text string file has me flummoxed. ANSYS Help and the PADT article are helpful with the concept, but I’m wondering if anyone has a sample snippet for the text format descriptors which they would toss over the wall. Apologies in advance for my laziness and to the FORTRAN true believers. Thanks. Rob Wheeler, Otis Elevator ###### ###### _______________________________________________ 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 *** WORLEY GROUP NOTICE *** "This email is confidential. If you are not the intended recipient, you must not disclose or use the information contained in it. If you have received this email in error, please notify us immediately by return email and delete the email and any attachments. Any personal views or opinions expressed by the writer may not necessarily reflect the views or opinions of any company in the Worley Group of Companies. How we use your personal data: https://www.worley.com/site-services/privacy"