1 / 8

Verifying Pressures

Workshop 9 Macro Basics. Verifying Pressures. 9. Macro Basics Verifying Pressures. Create a macro called SFEPLOT to verify and plot the pressure applied on a specified face of a surface effect element. The macro should have arguments as follows: SFEPLOT, TYPE , FACE

dextra
Télécharger la présentation

Verifying Pressures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Workshop 9 Macro Basics Verifying Pressures

  2. 9. Macro BasicsVerifying Pressures • Create a macro called SFEPLOT to verify and plot the pressure applied on a specified face of a surface effect element. The macro should have arguments as follows: SFEPLOT, TYPE, FACE where TYPE is the element type number for SURF154 and FACE is the face number for which effective pressure is desired. • Given: A database file containing a "bolt load" applied on a plate with a hole. October 30, 2001 Inventory #001572 W9-2

  3. 9. Macro BasicsVerifying Pressures 1. Enter ANSYS in the working directory specified by your instructor using “bpressure” as the jobname. 2. Resume the “bpressure.db1” database file. 3. Enter Solution and solve. 4. Enter POST1 and plot SY stresses. October 30, 2001 Inventory #001572 W9-3

  4. 9. Macro BasicsVerifying Pressures 5. Now do the operations you want the macro to do. We can then use the corresponding commands from the log file to create the macro. a) Select elements of type 1 (SURF154 elements) and all nodes attached to them: • Utility Menu > Select > Entities … • Choose [Elements], [By Attributes], "Elem type Num" and "From Full" • Min,Max,Inc = 1 • [Apply] • Choose [Nodes], [Attached to], and "Elements" • [Apply] • Or issue: ESEL,S,TYPE,,1 NSLE October 30, 2001 Inventory #001572 W9-4

  5. 9. Macro BasicsVerifying Pressures 5. (cont'd) b) Create an element table item containing effective pressure on face 5 of SURF154 elements. This is "SMISC 17" as documented in the Elements Reference manual. • Main Menu > General Postproc > Element Table > Define Table … • [Add…] • Lab = peff • Item = By Sequence Num • Comp = SMISC, 17 (type in the number 17 in the selection box) • [OK] • [Close] • Or issue: ETABLE,PEFF,SMISC,17 October 30, 2001 Inventory #001572 W9-5

  6. 9. Macro BasicsVerifying Pressures 5. (cont'd) c) Plot the element table item PEFF. • Element Table > Plot Elem Table… • Itlab = PEFF • Avgkey = No - do not avg • Or issue: PLETAB,PEFF d) Select everything. • Utility Menu > Select > Everything • Or issue: ALLSEL October 30, 2001 Inventory #001572 W9-6

  7. 9. Macro BasicsVerifying Pressures 6. List the log file to see the commands that were just executed in step 5, then create a macro with those commands. The only change is that the element type number and SMISC item number are replaced by ARG1 and ARG2+12, respectively. • Utility Menu > List > Files > Log File • Utility Menu > Macro > Create Macro … • Macro file name = sfeplot.mac • Then type one command per line as shown below. Note: The "Create Macro" dialog is suitable only for short macros such as this one. It is not an editor and cannot be used to edit an existing macro. Therefore, we recommend using your system's text editor to create macros. If you wish, you may use a system editor now (but please be aware that your favorite editor may not be available at this training facility!). esel,s,type,,arg1 nsle,s etable,peff,smisc,arg2+12 pletab,peff,noav allsel,all • [OK] October 30, 2001 Inventory #001572 W9-7

  8. 9. Macro BasicsVerifying Pressures 7. Test the macro by typing the following command: SFEPLOT,1,5 8. If time permits, edit the macro using a text editor and add if-tests for valid values of arg2. (Arg2 can only take values of 1 to 5.) Refer to the "Branching" section of Chapter 10 in your Training Manual for a sample if-test. 9. Exit ANSYS. October 30, 2001 Inventory #001572 W9-8

More Related