ansys.net search results
quick file search:
    home » search results
 
 
Postprocessing/Animation Macros (64 entries)
 
ACCURATE
  Vladimir Tkach (NPO Energomash)
  "This macro evaluate Mesh Discretization Error and Criteria for Accuracy of Finite Element Solutions based on Chandresh Shah’s article (2002). "
[permalink]
 
Average Rating: 9.4 (8 votes)  
Rate this item:
 
ANHARM
  Bill Bulat (CSI)
  Animates pressure results of harmonic analysis in /POST1 by contouring the real part of the solution while varying the phase angle. (While 5.6 has the feature, I like the way Bill has implemented this -- take a look: it's a bit more efficient than the 5.6 macro - STI)
[permalink]
 
Average Rating: 9.8 (31 votes)  
Rate this item:
 
ANOL
  Bram Weisman (SBM-IMODCO)
  "I wrote some macros to simplify common annotation tasks. They let me place annotation on the screen n lines above the title. This eliminates picking and placement guesswork. Below is the one that places annotation on the left side. Initially, I only had one argument for the actual text (arg3). Then I realized that the /tlab command allows up to 60 characters, but currently only 32 get passed through as arguments to macros. So I added a second one (arg4).

"Generally for ANOL, I won't use the second argument (the character offset). If you use a zero for ARG1, your text will precisely overlay the /title and I believe this is independent of screen resolution, but might be dependent on certain other text settings.

"To get a feel for this, try issuing the following:
ANOL,4,,'This is four lines above title',''
ANOL,3,,'This is three lines above title',''
ANOL,2,,'This is two lines above title',''
ANOL,1,,'This is one lines above title',''

"Also try the following:
/title,This is the title
ANOL,0,,'This is the title',''

The two are perfectly overlaid on my system."

[permalink]
 
Average Rating: 10.0 (13 votes)  
Rate this item:
 
ANVECT
  Bill Bulat (CSI)
  Animates velocity vectors from Flotran transient results
[permalink]
 
Average Rating: 10.0 (12 votes)  
Rate this item:
 
ANVOLT
  Bill Bulat (CSI)
  Animates voltage results of harmonic analysis in /POST1 by contouring the real part of the solution while varying the phase angle.

[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
AVE_TMP
  Ted Harris (PADT)
  Computes the average temperature (from a thermal analysis) of the selected set of nodes. Example of the use of *VMASK.
[permalink]
 
Average Rating: 9.5 (22 votes)  
Rate this item:
 
AVSUCD
  Ian Sigal (University of Toronto)
  "The macro writes an AVS UCD file that can be read by Amira. This allows quick display and post-processing. I use the macro to export a model formed of Solid92 tetrahedrals, but only the results in the four corners are written to the file. The macro also writes the element solutions, although these are not read by Amira, but are accepted in the AVS UCD standard."
[permalink]
 
Average Rating: 10.0 (4 votes)  
Rate this item:
 
BODE01
  Bill Bulat (CSI)
  Macro produces a bode plot using 2 predefined variables in /post26.
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
CVCTRL
  Chris Kennedy (Think PEAK, Inc.)
  Prompts for yield stress of material and uses it to set up /CVAL command so that post-processing plots will show elements that exceed the YIELD stress value as red, and elements which have a compressive stress lower than -YIELD as blue. If the minimum stress is not less than -YIELD than the actual minimum is used instead of -YIELD.
[permalink]
 
Average Rating: 7.8 (9 votes)  
Rate this item:
 
DCONTOUR
  Doug Woolridge (Mercury Marine)
  Creates a second contour using 2D annotation under the original color contour. The values on the new contour are scaled by 'scale_factor'.

A modified macro DCONTOU2 by Vincent Raillard changes this to have 2 - 9 uniform contours.
[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
DNSOL_VIEW
  Adam Shinbrot (Spine-Tech Inc.)
  "GLOBAL INFO: This macro is basically just a couple of routines that use dnsol to align two nodes (arg1 and arg2) on the theoretically fixed body, and adjusts the rest of the nodal results accordingly.
I needed to do this with a multi-body model where I wanted to look at the motion of one body relative to another with the motion of the first body subtracted from the global result."

Example input file can be downloaded here.
[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
EFATIGUE
  Hursha Narayan (Robert Bosch Corporation)
  "I wrote this macro to make fatigue life prediction in Ansys more interactive and also to plot damage accumulation in a structure. The macro works under Unix environment or with Unix utilities in Windows. The user has to make appropriate changes (very minimal) to the macro for it to work. I'm also including a sample file that the macro uses to direct the user how to input material properties."
[permalink]
 
Average Rating: 9.2 (42 votes)  
Rate this item:
 
EZ_RFOR
  Mitch Voehl (CEC Corporation)
  This is an ANSYS macro that stores and sums reaction forces for specified/selected nodes into POST26 variables. It will store the x, y, and z translational reaction forces for all selected nodes and then sum them up. Be sure that you have previously set NUMVAR to a sufficiently large value to store all of the reaction forces.
[permalink]
 
Average Rating: 10.0 (12 votes)  
Rate this item:
 
FFTDFT
  Juan Carlos Lancha (OHL, S.A.)
  From the author:
"These small APDL macros perform Fourier transforms (FFT and DFT) of discrete signals. This procedure decomposes a time domain signal into a sum of harmonic (frequency domain) signals. It’s a useful APDL tool when dealing with dynamic and harmonic problems in ANSYS."
[permalink]
 
Average Rating: 10.0 (13 votes)  
Rate this item:
 
FXFRM08
  Bill Bulat (CSI)
  Produces fourier transform of time domain response.
[permalink]
 
Average Rating: 10.0 (5 votes)  
Rate this item:
 
GETPATHNAME
  James Kosloski (CAEAI)
  There exists a *GET to get pathname based on path number. However, this macro gets the current pathname in case you don't know what the path number is.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
GSCONTOURS
  Darrel Hill (University of Saskatchewan)
  Macro (not CMAP file) to create grayscale contours.
"I coded this version only for the win32C (X11c) Graphics device. **Will not work at all with the default win32 (X11)**. Contours in contour plots should have 100 shades of grey with the default input. Parameters can be changed in the code to darken, lighten and/or make more/less shades of grey."
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
IM1
  Steve Varnam (IDAC)
  IM1.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element PIPE20.
[permalink]
 
Average Rating: 10.0 (4 votes)  
Rate this item:
 
IM10
  Steve Varnam (IDAC)
  IM10.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element COMBIN14.
[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
IM12
  Steve Varnam (IDAC)
  IM12.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element BEAM44.
[permalink]
 
Average Rating: 8.8 (4 votes)  
Rate this item:
 
IM26
  Steve Varnam (IDAC)
  IM26.MAC is used in POST1 of ANSYS 5.4 to read in as element table (ETABLE) items the post data required for element CONTAC48.
[permalink]
 
Average Rating: 2.5 (2 votes)  
Rate this item:
 
IM27
  Steve Varnam (IDAC)
  IM27.MAC is used in POST1 of ANSYS 5.4 to read in as element table (ETABLE) items the post data required for element COMBIN40.
[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
IM28
  Steve Varnam (IDAC)
  IM28.MAC is used in POST1 of ANSYS 5.4 to read in as element table (ETABLE) items the post data required for element LINK1.
[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
IM29
  Steve Varnam (IDAC)
  IM29.MAC is used in POST1 of ANSYS 5.4 to read in as element table (ETABLE) items the post data required for element LINK10.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
IM5
  Steve Varnam (IDAC)
  IM5.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element BEAM4.
[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
IM6
  Steve Varnam (IDAC)
  IM6.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element CONTAC12.
[permalink]
 
No rating yet  
Rate this item:
 
IM7
  Steve Varnam (IDAC)
  IM7.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element COMBIN39.
[permalink]
 
Average Rating: 9.2 (6 votes)  
Rate this item:
 
IM9
  Steve Varnam (IDAC)
  IM9.MAC is used in POST1 of ANSYS 5.3 to read in as element table (ETABLE) items the post data required for element BEAM3.
[permalink]
 
Average Rating: 10.0 (3 votes)  
Rate this item:
 
importJPEG1
  Mark Tate (Hamilton Sundstrand)
  "Here is a Word Macro that I hacked together a while back that copies a group of graphic files into Word, two per page, with figure numbers. You can change the extension from jpg to png. It looks for files with a root name and add numbers to form the full name, i.e. root001.jpg, root002.jpg, etc."
[permalink]
 
Average Rating: 9.3 (7 votes)  
Rate this item:
 
importJPEG2
  Gary Betts (Metso Minerals Ltd)
  "Here is a macro for MS Word that will count and import all the jpegs in a defined folder into Word."
[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
importPPT
  Mark Tate (Hamilton Sundstrand)
  A visual basic PowerPoint macro to import JPEG files into PowerPoint, one image per slide. Edit the file in a text editor to change variables or directory locations, etc.
[permalink]
 
Average Rating: 8.6 (7 votes)  
Rate this item:
 
JS_CURVEWRITE
  Jeff Strain (PADT)
  "A macro to write output PSD data at selected nodes with the number of selected nodes varying with each run. I did the "write a macro from a macro" thing and took advantage of two fairly recently added capabilities: C formatting in *VWRITE and string arrays, mainly for the 128 character capability.

"My macro creates a character array called p (I needed to conserve characters). The top row of the array starting at the second column contains selected node numbers. The second row starting at the second column contains GRMS values at each node. Starting in the third row, the first column is filled with frequency breakpoints; the second column over contains output PSD data for each of the selected nodes."

This can be used as an example of writing output to a file.
[permalink]
 
Average Rating: 10.0 (7 votes)  
Rate this item:
 
Legend Example
  Bob Weathers (Trane)
  Example of customizing legend with annotations. See "Read Me" file for details, along with AVI animation.

"Essentially, I turn off the legend and write annotations into this area. It gives me considerable control over what appears there. I have also found that I can better communicate results to my customers by, say, having a legend that's reads 1.23 mils rather than 0.123E-02 inches or by referencing drawing and revision numbers, test results, material properties, and so on."
"You might need to change some of the character size and line spacing dimensions in the macros. Again, though, they work just fine for my hardware."
[permalink]
 
Average Rating: 10.0 (7 votes)  
Rate this item:
 
MAPME
  Sheldon Imaoka (ANSYS, Inc.)
  General macro used to map one set of values & (x,y,z) coordinates to another. Uses *MOPER,,,MAP.

Example input file can be found here which uses this macro. In this input example, *VPUT is used to compare mapping UX, UY, and UZ from one mesh to another. This can be used to map pressures, heat flux, convection, etc. from CFD codes to ANSYS, for example.

Alternate macro also available here.
[permalink]
 
Average Rating: 10.0 (27 votes)  
Rate this item:
 
MAVGTEMP
  Joe Metrisin (Florida Turbine Technologies, Inc.)
  "Here is a macro to calculate the mass average temperature of the selected elements."
[permalink]
 
Average Rating: 10.0 (7 votes)  
Rate this item:
 
MIDSTRES
  Peter Budgell (Innovative Steam Technologies)
  From Analysis Solutions article "MIDSTRES: An ANSYS macro to aid mid-plane shell stress and load flow evaluation", Vol. 2 Issue 4 pg. 14. Useful for postprocessing shells, modifies results such that mid-plane stresses (or load/length) is copied to shell exterior. Used with PowerGraphics averaging/noaveraging.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
Miners-Rule
  Larry Bryant
  "I have attached a script to compute a Miners Rule summation of structural results from three different data bases.

It is not general for any case, however, one can see the logic and apply this to their specific case as required.

I also have a simple script here that can be used to dump out a table of results for an independent check of your results."
[permalink]
 
Average Rating: 3.3 (3 votes)  
Rate this item:
 
MODESHAP
  Sheldon Imaoka (CSI)
  Plots four modes on screen and annotates plots
[permalink]
 
Average Rating: 10.0 (8 votes)  
Rate this item:
 
MY_ROT
  Peter Budgell (Innovative Steam Technologies)
  A quick and dirty animation of rotation
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
MYANIM
  Peter Budgell (Innovative Steam Technologies)
  The following simple animation macro has worked for me with user-set contour level values. The user indicates the time delay for each frame, and the number of substeps to plot.
[permalink]
 
Average Rating: 10.0 (5 votes)  
Rate this item:
 
PLOT_MAT_AS_TEMP
  Przemyslaw Siedlaczek (MESco)
  Macro to plot material properties as temperatures. (Note that this macro will apply boundary conditions to your model, so save your model first prior to using this macro.)
[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
PLRV
  Rick Fischer (Marconi Communications)
  "This macro reduces the number of vectors plotted so that a velocity vector plot on a model with a fine mesh will be more ledgible. It works great for plotting velocity in the middle of a flat rectangular duct on a plane of symmetry. It creates a grid of points in the active coordinate system, finds an element that contains that point, and plots a velocity vector from that element's centroid."
[permalink]
 
Average Rating: 5.0 (5 votes)  
Rate this item:
 
PLVLN
  Mike Yaksh (NAC Int'l)
  Macro for displaying vector plots with element outline overlay.
[permalink]
 
Average Rating: 10.0 (4 votes)  
Rate this item:
 
PRINGET
  Mike Yaksh (NAC Int'l)
  "This macro computes the principle stresses and SI for the maximum node number or for the stress input by the input arguements."
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
PRNWP
  James Kosloski (CAEAI)
  "Macro to align working plane with principal stress directions at a node"
[permalink]
 
Average Rating: 9.6 (12 votes)  
Rate this item:
 
PSDOUT
  Jeff Strain (PADT)
  "psdout.mac retrieves PSD data, in G^2/Hz, at picked nodes and stores them as variables in the Time History postprocessor as well as the array parameter PSDDATA. PSDDATA excludes data for modes lying outside the input PSD spectrum. The user also has the options of plotting the PSD curves and/or exporting the data to the text file, psddata.txt.

Usage: psdout,dir,plot,list where dir = 'x', 'y', or 'z' (defaults to 'x'); plot = 1 to plot the PSD curves in ANSYS (defaults to 0); and list = 1 to export the data to psddata.txt (defaults to 0).

Acceleration results (load step 5) must be available for this macro to work."

Example output plot as PNG file
[permalink]
 
Average Rating: 10.0 (9 votes)  
Rate this item:
 
QZMULTI
  Peter Budgell (Innovative Steam Technologies)
  The following APDL code can do a stress plot for a Working Plane slice on top of a capped hidden display of the underlying elements. You will need to change the two /TYPE commands if you want to use a Z-Buffer approach. You may want to add a /TYPE command at the end to change back to a conventional hidden surface method. You have to be in /POST1 before calling this macro, and have defined the position of your Working Plane inside the body of your model. Customize as you wish.
[permalink]
 
Average Rating: 10.0 (3 votes)  
Rate this item:
 
RCS2ICS
  Mark Troscinski (ANSYS, Inc.)
  "Macro RCS2ICS transforms FLOTRAN velocities, computed in a rotating coordinate system (or frame of reference), into an inertial coordinate system, for post-processing purposes."
[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
RCYL
  Steve Hale (CAEAI)
  "A macro has been developed that calculates the actual radial and tangential displacements for a large rotation analysis in ANSYS. The macro, named RCYL.MAC , stores the actual radial and circumferential displacements in the following results quantities:
EPTOT,XY = radial displacement
EPTOT,YZ = circumferential displacement
The macro is valid for up to 180 degrees of rotation and it correctly handles the case when a node rotates from one quadrant to the next. Full Graphics mode must be used when plotting these results because a *VPUT command is used in the macro."

[permalink]
 
No rating yet  
Rate this item:
 
READSI
  David Gross (Dominion Engineering, Inc.)
  Example of a macro for stress intensity extraction. Dumps results of PRSECT to file, then *VREADs results into array.
[permalink]
 
Average Rating: 10.0 (3 votes)  
Rate this item:
 
REFORMAT
  Sheldon Imaoka (CSI)
  Provides a longer format listing for /POST1 (PRxxxx commands) with longer "pages". Makes for nicer-looking listings to import into third-party spreadsheets or programs such as Excel or Tecplot.
[permalink]
 
Average Rating: 10.0 (7 votes)  
Rate this item:
 
RFOR_TOTAL
  Adam Shinbrot (Zimmer Spine)
  "For a selected nodal set, macro creates vector r_f of dimension arg1 x 1 and fills it with successive values of reaction forces in y for successive time steps, the total number of which is specified by arg1.
"This macro assumes ultimate time step is number 1; this is easily changed, however."

[permalink]
 
Average Rating: 3.3 (6 votes)  
Rate this item:
 
SEQV_MAX
  Adam Shinbrot (Zimmer Spine)
  "For a selected nodal set, macro creates vector s_eqv of dimension arg1 x 1 and fills it with successive values of SEQV (Von-Mises stress) max for successive time steps, the total number of which is specified by arg1.
"This macro assumes ultimate time step is number 1; this is easily changed, however."

[permalink]
 
Average Rating: 10.0 (1 vote)  
Rate this item:
 
SET_L
  (ANSYS, Inc.)
  At 5.6, SET in GUI results in dialog box rather than text listing as in 5.5. This provides short results set summary (equivalent to SET,LIST in 5.5).
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
SET_L2
  (ANSYS, Inc.)
  At 5.6, SET in GUI results in dialog box rather than text listing as in 5.5. This provides long results set summary (equivalent to SET,LIST,2 in 5.5).
[permalink]
 
Average Rating: 9.4 (8 votes)  
Rate this item:
 
SHOWNRES
  Hursha Narayan (Robert Bosch Corporation)
  "This macro takes an result parameter as input and shows the value at the corresponding group of nodes selected in the model."
[permalink]
 
Average Rating: 10.0 (3 votes)  
Rate this item:
 
STRNE
  Mike Rife (CSI)
  This macro sums the strain energy at every substep for a transient analysis and then plots the values versus time.
[permalink]
 
Average Rating: 10.0 (9 votes)  
Rate this item:
 
STRPLOT
  Peter Bastian (Darmstadt University of Technology)
  This macro displays results as continuos contours using the PLNSOL command. For the display of the numbers in the legend, you can define the number of contours and the number of digits after the decimal point, to be displayed. If you do not want any digits after the decimal point, you can define, how many places should be displayed with a "0". For example 2100 instead of 2123.
[permalink]
 
Average Rating: 6.7 (6 votes)  
Rate this item:
 
SWP
  Barry O'Donnell (ODCS Ltd.)
  "This macro extracts the peak worst principal stress. The worst principal stress can be defined as:
max(S1,abs(S3)) and should be stored with the appropiate sign, e.g. S1=100,S3=-70,SWP=100 & S1=100,S3=-170,SWP=170."

[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
SXYZ
  John Crawford (Honeywell)
  It is often times nice to be able to get the stress at a specific location in space,whether a node is there or not. By some strange quirk of fate, I just happen to have a macro that does this. Here it is.
[permalink]
 
Average Rating: 10.0 (36 votes)  
Rate this item:
 
VectorRotation
  Bob Weathers (Trane)
  "These macros rotate a matrix of vectors from one set of Euler angles to another. One macro creates the rotation matrix and a second does the rotation. To test the macros, a pressurized cylinder (or optionally a sphere) is built, meshed, and solved in 6 different coordinate systems. To check accuracy, results are rotated from one CSYS to another by the macros and then compared to ANSYS. Set your text editor's tab stops to 2 for macro readability."

In the zip file, "zTestRotationVector.mac" is the test model macro, and "zRotateVector.mac" is the main macro to rotate vectors.

Update 02/07/2009: correction to zRotateVector.mac provided by David Creech.


[permalink]
 
Average Rating: 5.7 (7 votes)  
Rate this item:
 
VGET_SUBS
  Kiran Sreeram (GE Power Systems)
  "This macro stores the information requested by the user for a selected set of nodes or elements in an array called RESULT_COMP. This information can be any thing that is in the command *vget,for nodes & elements. The reason for this macro is that when using *vget the node or elem numbers must be sequential, in order to get any information. This macro deals with that i.e. by using *vmask, one can always do this manually, however this macro is helpful when needed to use regularly.
This macro also creates a txt file for the requested information."

[permalink]
 
Average Rating: 10.0 (14 votes)  
Rate this item:
 
WRITEARR
  Carl Olsard (noiseboard.com)
  "One command that is severely lacking from ANSYS is a simple way to export a matrix to a file, so that it can be imported into MATLAB. This script writearr.mac should be used with the companion MATLAB script readansysarray.m to export a matrix from ANSYS and import the array into MATLAB. At the moment the script is written to export 2D arrays of MxN (don't need to specify the dimensions). The output file contains the data i,j,data(i,j) where i and j are the array indices. The usage of the macro is:
writearr,'array','filename','ext'"

Here is the companion MATLAB script:
READANSYSARRAY
"This is the second part of the script, which uses the file exported by writearr.mac. This matlab script will import the file, and reshape the matrix into the correct format. The function is used as follows:
1. load the file into MATLAB: load press.txt
2. convert the matrix into the correct format: press2=readansysarray(press);"

[permalink]
 
Average Rating: 9.7 (17 votes)  
Rate this item:
 
X_PLLDST
  Shen-Yeh Chen (Honeywell)
  "This macro will get/plot (reponse vs load level) graph on the screen."
[permalink]
 
Average Rating: 10.0 (7 votes)  
Rate this item: