Macros

  • vslm_bw.mac

    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.

  • vthick.mac

    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."

  • wfmin107.mac

    Jan Christian Anker (Anker-Zemer)

    Wavefront optimization. Original link can be found here on Anker-Zemer's website.

  • writearr.mac

    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);"
  • x_bcslope.mac

    Shen-Yeh Chen (Honeywell)

    "This macro will apply slope BC value on the selected nodes according to the active coordinate value in sepcified DOF."

  • x_cecyc.mac

    Shen-Yeh Chen (Honeywell)

    "This macro will create CE for cyclic sysmtric sector, even if the mesh on the two sectors interfaces are dissimillar."

  • x_demo_vread.mac

    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"

  • x_esum.mac

    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."

  • x_nfor2f.mac

    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."

  • x_plldst.mac

    Shen-Yeh Chen (Honeywell)

    "This macro will get/plot (reponse vs load level) graph on the screen."

  • x_shl2sld.mac

    Shen-Yeh Chen (Honeywell)

    "This macro will sweep the currently selected or assigned SHELL elements into SOLID elements."

  • x_th2st.mac

    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)

  • yzcurv.mac

    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."