Beruflich Dokumente
Kultur Dokumente
Do Loops Extra! Extra! Training How can PADT Help? PADT Events ANSYS Focus Archives Subscribe / Unsubscribe
Case Study:
Apply many different uniform temperatures to a bi-metallic strip and store each solution.
Geometry:
Boundary Conditions: Apply uniform temperatures from 100, 110, 120 . . . 200. The two strips are bonded together by the geometry, so they share nodes. Fix the Lines at the Left End Input File or Equivalent M enu Picks
Approach:
A) B) C) D) Develop model for single temperature using GUI Build DO Loop M acro Run M acro Review Results
A) Develop working model for single temperature using GUI 1. Build your model using provided input files (1 and 2) or menu picks (1 and 2). 2. Verify that your model solves correctly MENU PICKS /Solution > Solve - Current LS OK Postprocessor > Plot Results > Contour Plot - Nodal Solution Translation USUM OK
3.
B) Build DO Loop Macro To utilize DO loops you must use APDL (ANSYS Parametric Design Language) a.k.a. macros, a.k.a. scripts. We will take advantage of one of the simplest of macros: Resume from a .db file Perform a single operation Solve. Although you can type *DO commands into the ANSYS input window, here we will use a small macro to implement the DO loop. This DO loop will repeat the TUNIF and SOLVE commands. We will now build the "macro" needed to implement *DO. 1. 2. Open a text editor select one that doesnt store hidden formatting charaters. Copy the following template: fini /clear RESUM E,bistrip,db *DO, icount,1,10,1 /Solu TUNIF,100+icount* 10 TIM E,icount Solve *ENDDO
!resumes saved database !counts on variable icount from 1 to 10 times !switches to solution processor !GUTS -- the action looped on sets new uniform temperature !Note how it uses the varible icount !solve with the new temperature settings !Go back and begin next loop on variable icount
3. Save as bistrip.mac. Note that saving any text file with extension .mac automatically creates a macro such that by simply typing the filename, such as bistrip at the ANSYS command line will cause ANSYS to check for the bistrip.mac file and read it as a series of input commands. ANSYS checks the working directory, the installation/docu directory and any directory specified by the /PSEARCH command for .mac files.
C) Run Macro 1. Inside a fresh session of ANSYS type bistrip at the command line.
D) Review Results 1. General Postprocessor > Results Summary. You should see a listing similar to this:
2. General Postprocessor > Read Results - By Time/Freq . . .Select Time=5 which corresponds to the 150F case 3. General Postprocessor > Plot Results > Contour Plots - Nodal Solution > Deflection > USUM It should look like this:
4. Review each of the 10 results in the results set -- or use Time History PostProcessing to summarize the results!
Now that you have BISTRIP.M AC, use it as a template to write other macros needing DO loops or to automate any task. As you build a library of macros your ANSYS productivity will greatly increase!
BONUS TIP! Variable values are stored within a database. Therefore if you resume a database within a loop, the variable that is being looped on (i or icount, for example) will no longer be defined! This will cause errors. If you ever need to resume a database withouth changing current variable values, utilize the PARSAV and PARRES commands!
To Table of Contents
March 21st , 2002
/PREP7 BLC4,0,0,3,.1 BLC4,0,.1,3,.05 AGLUE,all ET,1,42 ESIZE,.05*2 LSEL,S,,,2,4,2 LSEL,A,,,9,10 LESIZE,ALL,.05/3,,,,,,,0 /NUM BER,1 /PNUM ,M AT,1 AM ESH,1 M AT,2 AM ESH,3 !M aterial Properties M PTEM P,,,,,,,, M PTEM P,1,0 M PDATA,EX,1,,12e6 M PDATA,PRXY,1,,.3 M PDATA,EX,2,,20e6 M PDATA,PRXY,2,,.29 M PDATA,ALPX,2,,8e-6 M PDATA,ALPX,1,,3e-5
Preprocessor > Modeling - Create > Areas - Recangle > By 2 Corners WP X WP Y Width Height APPLY WP X WP Y Width Height OK 0 .1 3 .05 0 0 3 .1
Preprocessor > Operate > Booleans - Glue > Areas PICK ALL
Preprocessor > Element Type > Add/Edit/Delete ADD Structural - Solid - Quad 4node - 42 OK
Preprocessor > Meshing - Size Cntrls > Global - Size SIZE Element edge Length NDIV No. of element division OK .05*2 0
Preprocessor > Meshing - Size Cntrls > Lines - Picked Lines Select lines 2,4,9,10 OK SIZE Element edge length .05/3
Utility Menu > PlotCrtls > Numbering Elem / Attrib numbering [/NUM] Numbering shown with OK Material Numbers Color only
Select area 1 OK Preprocessor > Define > Default Attribs [MAT] Material number 2
Preprocessor > Meshing - Mesh > Areas - Free Select area 3 OK Preprocessor > Material Props > Material Models . . . Material Model Number 1 Structural Linear Elastic Isotropic EX PRXY OK Strutural Thermal Expansion Coef Isotropic ALPX 8e-6 Material New Model Define Material ID 12E6 .3
Material Model Number 2 Structural Linear Elastic Isotropic EX PRXY OK Strutural Thermal Expansion Coef Isotropic ALPX 5e-5 Material Exit 7E6 .29
Solution > Loads -- Apply > Temperature > Uniform Temp ... 100 OK Solution > Loads -- Apply > Displacement > On Lines Pick lines 4 and 10 OK Leave as ALL DOF Displacement Value - Constatnt value defaults to 0 OK
Supports Single Base Excitation Utilizes a Standard Modal Analysis (with large mass) as Input Stores modal information in efficient binary file that is an order of magnitude smaller than the equivalent *.RST modal result file. Solves in minutes or seconds User can request displacement, velocity, acceleration or component stress response at any node User can request "1 Sigma" displacement, velocity, acceleration or component stress information for the entire model or for sub-components of the model Response curves can be output for display in ANSYS or a spreadsheet "1 Sigma" results can be output for contour display in ANSYS Entire process can be run from within ANSYS, interactively or in batch.
This initial release was developed specifically to address the immediate needs of one of PADT's large aerospace customers. It is aimed at delivering the capabilities listed above with to the user community as soon as possible and does not have a lot of "bells and whistles". Future releases will include:
Graphical User Interface Direct output to an ANSYS *.RST file Multiple point force excitation One or more statistical approximations for the "1 Sigma" invariant stress values (principal and Von Mises stresses) Support for other FE solvers and generic modal results User requested enhancements
PADT has found this tool to be very useful and has resulted in significant productivity gains on our own internal and external analysis projects. If you would like to learn more, please take advantage of the following links:
xPSD Frequently Asked Questions (FAQ) xPSD BETA Request Form PADT is currently offering demonstration CD's to qualified potential customers. These fully functional versions of the tool require ANSYS Mechanical 5.7 or better and Windows NT. xPSD Brochure in PDF format xPSD On-Line Tutorial Even if you do not have a demo version, reading through the tutorial will give a good overview of how easy and powerful this tool is.
Specifications: Catalyst Softw are: STL File Import Part Orientation Multiple Parts Queue Management Material Status Status Reports via e-Mail Dimension 3D Printer: TCP/IP 100/10 base T 8" x 8" x 12" Build Volume 0.010" in or 0.013" Layer Thickness 27" x 36" Desktop Footprint 41" High 110 VAC, 60 Hz or 220VAC ,50 Hz No facility requirements Material: ABS Plastic White, blue, yellow, black, red, green Custom colors available Stored in Auto load Cartridge
Whether its one of our regularly-scheduled classes in our training room or a customized class tailored to your specifications and location, you can be assured that the training you receive will have immediate, positive results on your capabilities in design, analysis, and product and process improvement.
See the upcoming schedule below. Or, learn more about how training at PADT can save you time and money. (Or drop an e-mail to Ted Harris!)
Month Start End March 21 22 25 26 27 28 April 1 3 4 5 8 10 11 11 15 17 18 19 22 23 24 26 29 30 May 2 3 6 8 9 10 13 15 16 17 20 22 23 24 28 30 Class Design Opt. and Probabilistic Design Flotran II Intro to ANSYS, II Intro to ANSYS, I Heat Transfer Basic Nonlinearities Designspace Intro to ANSYS, I Intro to Customization Dynamics Intro to Electromagnetics ANSYS/LS-DYNA Intro to MEMS Intro to ANSYS, I Heat Transfer Basic Nonlinearities Dynamics Intro to ANSYS, I Advanced Nonlinearities Flotran I Course No. 701 602 102 101 301 201 103 101 801 203 401 501 901 101 301 201 203 101 202 601 Location LAX Gilbert ANSYS West Gilbert LAX Gilbert LAX LAX Gilbert Gilbert Gilbert Gilbert Gilbert Gilbert Gilbert LAX ANSYS West ANSYS West Gilbert LAX
Subscribe / Unsubscribe
The ANSYS Focus is a periodical published by PADT. It contains information about ANSYS products and services provided by PADT. Freely distribute the ANSYS Focus in its entirety. Subscribe to ANSYS Focus by sending an e-mail to focus@padtinc.com with the Subscribe as the subject
Unsubscribe to ANSYS Focus by sending an e-mail to focus@padtinc.com with Unsubscribe as the subject.
Contribute
Send in your contribution! Articles, and information helpful to the user are welcomed and encouraged. E-mail Rod Scholl. (Sheldon this means you!) ANSYS Focus is a periodical publication provided by Phoenix Analysis & Design Technologies (PADT).
Next in Focus
ANSYS Focus is a periodical publication provided by Phoenix Analysis & Design Technologies (PADT).
The Nitty-Gritty
PHOENIX ANALYS IS AND DES IGN TECHNOLOGIES (PADT) MAKES NO REPRES ENTATIONS ABOUT THE S UITABILITY OF THE INFORMATION CONTAINED IN THES E DOCUMENTS AND RELATED GRAPHICS FOR ANY PURPOS E. ALL S UCH DOCUMENTS AND RELATED GRAPHICS ARE PROVIDED "AS IS " WITHOUT WARRANTY OF ANY KIND AND ARE S UBJECT TO CHANGE WITHOUT NOTICE. THE ENTIRE RIS K ARIS ING OUT OF THEIR US E REMAINS WITH THE RECIPIENT. IN NO EVENT, INCLUDING INACCURATE INFORMATION, S HALL PADT BE LIABLE FOR ANY DIRECT, CONS EQUENTIAL, INCIDENTAL, S PECIAL, PUNITIVE OR OTHER DAMAGES WHATS OEVER (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOS S OF BUS INES S PROFITS , BUS INES S INTERRUPTION, OR LOS S OF BUS INES S INFORMATION), EVEN IF PADT HAS BEEN ADVIS ED OF THE POS S IBILITY OF S UCH DAMAGES . THE VIEWS EXPRES S ED IN THE ANS YS FOCUS ARE S OLEY PHOENIX ANALYS IS AND DES IGN TECHNOLOGIES AND NOT THOS E OF ANS YS , INC.
ANSYS Focus is a periodical publication provided by Phoenix Analysis & Design Technologies (PADT).