Macros
-
Bram Weisman (SBM-IMODCO)
Based on VLSM macro, created by John Crawford to select/reselect/unselect meshed volumes. Written to take advantage of vectors to execute faster.
-
Rick Fischer (Marconi Communications)
"This macro sets variable shell thickness based on thicknesses at corners of a surface. Only problem is that the attributes are being applied as a real constant. But, rthick creates r cards, one for each element, with real numbers the same as the argument. This could overwrite the reals used for the attributes, depending on how the model is numbered."
-
Jan Christian Anker (Anker-Zemer)
Wavefront optimization. Original link can be found here on Anker-Zemer's website.
-
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:
- load the file into MATLAB: load press.txt
- convert the matrix into the correct format: press2=readansysarray(press);"
-
Shen-Yeh Chen (Honeywell)
"This macro will apply slope BC value on the selected nodes according to the active coordinate value in sepcified DOF."
-
Shen-Yeh Chen (Honeywell)
"This macro will create CE for cyclic sysmtric sector, even if the mesh on the two sectors interfaces are dissimillar."
-
Shen-Yeh Chen (Honeywell)
"This macro will demonstrate how to read in a matrix ZREAD(ZNNODE,3) in one *VREAD command. The macro will get coordianates from the current model first, write them into the file x_demo_vread.tmp, and read the data from the file"
-
Shen-Yeh Chen (Honeywell)
"Calculate and print the summary of (selected) elements area or volume, and centroid. The result will be saved in the parameter _ParName."
-
Shen-Yeh Chen (Honeywell)
"I usually use the following macro to "extract" element force, add a negative sign, and transfer into nodal force. This can sometimes be used to get the cross-section force on the cutting face, and do a force-controlled (instead of displacement-controlled) sub-model."
-
Shen-Yeh Chen (Honeywell)
"This macro will get/plot (reponse vs load level) graph on the screen."
-
Shen-Yeh Chen (Honeywell)
"This macro will sweep the currently selected or assigned SHELL elements into SOLID elements."
-
Shen-Yeh Chen (Honeywell)
"This macro transfers the temperature distribution from a thermal analysis into structural temperature load. Only pre-selected nodes are dumped. The output file name is x_th2st.tld." (Note that there is a built-in ANSYS command called LDREAD command which does similar functionality)
-
Bill Bulat (OMM)
"Here's something I used recently (NOT FULLY TESTED!!). Edit as needed to obtain curvature in other global planes (I wrote this to obtain curvature in global yz plane - a symmetry plane in a half symmetry model I recently created). Also reports the average radius of curvature if you're inclined to ignore the speed control bumps. My intention was to make this applicable to arbitrarily large deformations."