Macros
-
James Kosloski (CAEAI) and Bram Weisman (SBM Atlantia)
"This macro gets the current value of SELTOL and stores it in the parameter SELTCUR"
-
Sheldon Imaoka (ANSYS, Inc.)
This macro searches for triangular elements in the selected element set. It then puts the number of triangular elements in a scalar parameter and selects those triangular elements (if any).
-
John Crawford (Honeywell)
Loops through repeated VSLA, ASLV commands
-
Eric Miller (PADT)
Simplified interface for GPLOT command
-
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." -
Don Shaffer (Siemens Westinghouse Power Corp)
"Here is a helix macro worked up from some xansys discussions several years ago. Several others on the list contributed parts of this."
-
Raziel Vallejo (GE)
A modified version of D. Shaffer's HELIX macro.
-
Zane Ullman (Dana Corp)
This macro is from the ANSYS Solutions, Vol 4 No 1 article, "Repairing FEA Geometry with ANSYS Macros."This macro finds missing holes after the user provides the line number from a failed VA error message. This facilitates finding and fixing holes in imported geometry.
-
Rod Scholl (PADT)
Generates a big long horizontal line at specified location
-
John Crawford (Honeywell)
A macro which creates a hardpoint on an area using existing keypoints
-
Sheldon Imaoka (ANSYS, Inc.)
Macro to get 'hotspot' of selected areas. Puts (x,y,z) and area numbers in an array, which can be used for selection, etc. of areas via APDL.
Note that while the 'hotspot' of areas should be the centroid, the actual hotspot slightly differs from this. Consequently, no ASUM/GSUM is required, and that is why an undocumented *VGET is used for obtaining hotspot locations.
-
Sheldon Imaoka (ANSYS, Inc.)
Macro to get 'hotspot' of selected volumes. Puts (x,y,z) and volume numbers in an array, which can be used for selection, etc. of volumes via APDL.
Note that while the 'hotspot' of volumes should be the centroid, the actual hotspot slightly differs from this. Consequently, no VSUM/GSUM is required, and that is why an undocumented *VGET is used for obtaining hotspot locations.
-
Steven 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.
-
Steven 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.
-
Steven 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.
-
(IDAC)
IM21 is a general utility that is used to obtain maximum numbers of all entities, with the option to merge and/or compress entity numbers before. This is useful when creating entity generation macros that work on an existing model.
-
Steven 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.
-
Steven 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.
-
Steven 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.
-
Steven 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.
-
Steven 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.
-
Steven 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.
-
Steven Varnam (IDAC)
IM60 modifies the currently selected line set to have an orientation keypoint, which is required for meshing the lines with either BEAM44 or BEAM188/189. The orientation keypoints are automatically generated and all the line attributes are kept.
-
Steven Varnam (IDAC)
Creates a spider between master and slave nodes.
-
Steven 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.
-
(IDAC)
"A macro that avoids the need for repetitive work when creating areas from many closed loops of Line geometry in ANSYS. This is particularly useful when the analyst has been supplied Line geometry containing many closed loops via CAD or has created closed loops that need to be converted to Areas for element meshing purposes."
-
Steven 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.
-
Tim Atchison (IDAC)
"A macro that makes it simple for users to apply a free moment to an area (or group of areas). It avoids the need to create "spider-webs"of stiff beams and only asks the user to enter the areas or component required and the magnitude of the moment. By providing simple access to the RBE3 command it doesn't stiffen the surface in the same way that stiff beams will and at the same time does all the setting up and implementing of RBE3 for you."
-
Bill Bulat (ANSYS, Inc.)
"You may be able to modify the following macro to suit your needs. I use it to calculate the inductance of excited MVP massive conductors. The volt DOF in ANSYS is not physical voltage, it's the time integral of voltage."
-
Sean Harvey (CSI)
This macro takes in parameters to pass to the EDIVELO command for rotational input, this macro prompt the user for two points instead of 3 angles. Two point input is often times easier to enter than 3 direction angles
-
Mitch Voehl (CEC Corp)
From the author: "I've attached a macro which can find interior areas (holes) in some circumstances. Prior to running the macro, first create all of your areas and then perform and area overlap or area partition to divide them up. Then run the macro. The macro will save the interior areas as the component 'int_a'."
-
Peter Frei (Rockwell Automation AG)
Converts 10-node SOLID87 tetrahedra to 20-node degenerate SOLID117 tetrahedra (need to specify element type for SOLID117 beforehand and enter that ID as the parameter "etMag").
-
John Swanson (SAS, Inc./ANSYS, Inc.)
A macro to apply JxB forces on a Flotran model. "FYI, here is a macro which I wrote for a Japan User Meeting. It calculates nodal forces from J X B and applies them as forces to the model. It is only for 8 node bricks, and it has NOT been tested."
-
Sheldon Imaoka (CSI)
Gets jobname, title, subtitle and puts in arrays
-
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.
-
Prasad S. (QuEST Pvt. Ltd.)
You can change the element type in the macro as per your requirement. At present shell63 is being used for the area mesh. In this macro a muliplication factor has been considered for the bent curves, so that when compared to the straight curves, bent curves will have element edge length smaller based on the input factor.
If the factor is >1, the bent curves contain finer divisions,
If the factor is <1, the bent curves contain coarser divisions." -
Joe Woodward (PADT)
This macro allows you to select the 'inside' surface of a volume, in case your volume has a 'void' inside of it.
-
Eric Miller (PADT)
"Below you will find a little macro that can be run to fix the more common issues with focus on the command line not behaving as expected at 6.1. It is a partial hack that needs to be run after the GUI is up, so you can't put it in your start61.ans file (sorry). It also does not fix focus loss with the picker (which is intentional) or the pan-zoom-rotate dialog (not so intentional). Those will require more than a simple Tcl/Tk script."
-
Don Shaffer (Siemens Westinghouse Power Corp)
Lists selected keypoints in CSYS 0 and 1.
-
G. N. S. Prakash
"The macro kll.mac adds the broken lines of the selected volumes. Normally some of the complex curves from the CAD software become segmented after importing into Ansys and also due to Boolean operations and require considerable effort in joining these segments into single curves. Typing 'kll' just after import would recognize and add all these segments. It works on the principle that the keypoints on edges have only 2 lines attached to them and keypoints at corners have 3 or mores lines attached to them. Hence, if it finds any keypoint on a edge, it would be removed by joining the adjoining lines.
"Please note, it works on lines attached to volumes only and not for independent areas or lines."