Parametric Modeling Chapter Two. Training Manual January 30, 2001 Inventory #001449 2-2 2. Parametric Modeling The basic requirement for optimization.

Slides:



Advertisements
Similar presentations
Module 2 Modal Analysis ANSYS Dynamics.
Advertisements

Chapter 14 設計最佳化 Design Optimization. 2/33 Contents 14.1 何謂設計最佳化 ? What is Design Optimization? 14.2ANSYS 設計最佳化 Design Optimization with ANSYS 14.3 實例.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
3-D Bracket Workshop 10A Loading and Solution. Workshop Supplement February 7, 2006 Inventory # W A. Loading and Solution 3-D Bracket Description.
Array Parameters Module 2. Training Manual October 30, 2001 Inventory # Array Parameters Array Parameters are parameters that can take on.
Beams and Frames.
Module 5 Beam Modeling.
Chapter 8 and 9 Review: Logical Functions and Control Structures Introduction to MATLAB 7 Engineering 161.
Automating Tasks With Macros
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Guide To UNIX Using Linux Third Edition
DesignXplorer Parameter Manager Workshop 9. DesignXplorer Parameter Manager Workshop Supplement August 26, 2005 Inventory # WS9-2 Workshop 9 – Goals.
Coupling and Constraint Equations Module 3. Training Manual October 30, 2001 Inventory # Coupling & Constraint Equations Just as DOF constraints.
Module 7 Modal Analysis.
Verifying Pressures Workshop 9 Macro Basics. Workshop Supplement October 30, 2001 Inventory # W Macro Basics Verifying Pressures Create a.
9.0 New Features Large Deformation Analysis of thin plate assembly spotwelded together Workshop 2 Spotwelds.
Chapter 9 CAD & Parameters
ANSYS Fundamentals This document contains no technical data subject to the EAR or the ITAR.
Large Deflection Arched Beam Workshop 7 Nonlinear Analysis.
Optimization of Plate Forming Process Parameters By Mohamed Jolgaf Prof. Dr. S.B. Sulaiman, Dr. M. K. A. Ariffin Dr. A. A. Faieza and Dr. B. T. H. T. Baharudin.
Written by Changhyun, SON Chapter 2. Parameters - 1 CHAPTER 2 Parameters.
Select Logic Module 11. Training Manual January 30, 2001 Inventory # Select Logic Overview Suppose you wanted to do the following: –Plot all.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
APDL Basics Module 12. Training Manual January 30, 2001 Inventory # APDL Basics Overview APDL is an acronym for ANSYS Parametric Design Language,
Written by Changhyun, SON Chapter 6. ANSYS Implementation - 1 CHAPTER 6 ANSYS Implementation.
Axisymmetric Wheel Workshop 1 Array Parameters. Workshop Supplement October 30, 2001 Inventory # W Array Parameters Axisymmetric Wheel Determine.
Chapter Five Vibration Analysis.
GTSTRUDL Using the GTSTRUDL Base Plate Wizard Example of Creating and Analyzing a Base Plate Rob Abernathy CASE Center GTSUG June, 2009 Atlanta, GA.
Problem 1: Structural Analysis of Signs Post University of Puerto Rico at Mayagüez Department of Mechanical Engineering Modified by (2008): Dr. Vijay K.
1) Structural Symmetry 2) Bookshelf Problem Jake Blanchard Fall 2009.
9.0 New Features Metal Shaft with Rubber Boot Workshop 7 Load Steps in Workbench.
Shape Finder Appendix Thirteen. Training Manual Shape Finder August 26, 2005 Inventory # A13-2 Chapter Overview In this chapter, using the Shape.
Collapse of Frame Workshop Thirteen REFERENCE: Training Manual Geometric Instability (9-74)
ANSYS/LS-DYNA Drop Test Module
Submodeling Module 6. Training Manual January 30, 2001 Inventory # Submodeling Submodeling is a finite element technique used to get more.
Written by Changhyun, SON Chapter 5. Introduction to Design Optimization - 1 PART II Design Optimization.
Exploring the Design Domain Chapter Four. Training Manual January 30, 2001 Inventory # Exploring the Design Domain A. Overview Exploring the.
Short Topics Chapter 14. Training Manual October 30, 2001 Inventory # In this chapter, we will present some general tips and “tricks” on how.
REFERENCE: Training Manual Obtaining the Solution (3-28) Fishing Rod (part 2) Workshop Three Results File Options.
Explicit-to-Implicit Sequential Solution
REFERENCE: Training Manual Node-to-Surface Elements (8-16) Beam Tip Contact Workshop 12 Node-to-Surface Elements.
Introduction Chapter One. Training Manual January 30, 2001 Inventory # Introduction Course Overview This Design Optimization course is designed.
Axisymmetric Rotating Disk Workshop 3A Optimizing the Design.
Batch Mode: Plate with Hole at Center Workshop 13A Short Topics.
Surface-to-Surface Simulation
Workshop 13 Bolt Pretension
Workshop 1 Contact Stiffness
Chapter Nine Bolt Pretension.
Rib Forging Workshop Nine REFERENCE: Training Manual Viscoplasticity (5-35)
Volumetric Locking Workshop Two REFERENCE: Training Manual Element Technology (2-64)
Lathe Cutter Workshop 2A Stress Analysis. Workshop Supplement January 20, 2001 Inventory # W2-2 2A. Stress Analysis Lathe Cutter Description Solve.
Optimizing the Design, II Chapter Five. Training Manual January 30, 2001 Inventory # Module 5 Optimizing the Design, II In this section, we.
Modal Analysis Advanced Topics Module 8. Training Manual January 30, 2001 Inventory # Module 8 Modal Analysis - Advanced Topics A. Learn how.
Snap Fit Workshop Seventeen Introduction to Contact REFERENCE: Training Manual Introduction to Contact (7-69)
Workshop 2 Steel Bracket Modified by (2008): Dr. Vijay K. Goyal Associate Professor, Department of Mechanical Engineering University of Puerto Rico at.
Workshop 3 Various Workshops for SOLSH190 Solid-Shell Element
NLISO Material Model Workshop Four REFERENCE: Training Manual Rate-Independent Plasticity (3-65)
Part Definitions Chapter 3. Training Manual March 15, 2001 Inventory # Chapter Objectives Upon completion of this chapter, students will be.
Simulating a Deep Drawing Process Workshop 2. Workshop Supplement March 15, 2001 Inventory # WS2-2 Utility Menu > File > Read input from …> deep.inp.
COUPLED ANALYSES Chapter 7. Training Manual May 15, 2001 Inventory # Fluid-Structure Analysis “One Way” Analysis –Structural deformation effect.
Truss Structure Workshop Five Convergence Criteria REFERENCE: Training Manual Obtaining the Solution (3-51)
Crank Shaft Workshop 5 Submodeling. Workshop Supplement October 30, 2001 Inventory # W Submodeling Crank Shaft Description Perform a submodeling.
REFERENCE: Training Manual Friction (4-18) Planar Seal (part 2) Workshop 2 Contact with Friction Constant Friction Coefficient.
Chapter 5 Armature Gap Sweep Workshop 4. Training Manual Electromagnetic Analysis in Workbench March 4, 2005 Inventory # Workshop #2: Armature.
Stress Relaxation Workshop Six REFERENCE: Training Manual Implicit Creep (4-32)
IBM Rational Rhapsody Advanced Systems Training v7.5
Module 2 Array Parameters.
SECTION 3 MACROS: OVERVIEW.
Module 6 Submodeling.
Designing and Debugging Batch and Interactive COBOL Programs
Presentation transcript:

Parametric Modeling Chapter Two

Training Manual January 30, 2001 Inventory # Parametric Modeling The basic requirement for optimization in ANSYS (except topological optimization) is a parametric model (in file form.) In this module, we will: A.Define parametric modeling B.Review some APDL basics C.Present guidelines to build a parametric model and create an analysis file D.Work on one or two workshop exercises

Training Manual January 30, 2001 Inventory # Parametric Modeling A. Definition & Purpose What is a Parametric Model? A model built and analyzed in terms of parameters (variables) instead of numbers. By simply changing the values of certain parameters in the model, you can build and analyze a new model. H1 H2 A1 A2 A3 H1

Training Manual January 30, 2001 Inventory # Parametric Modeling...Definition & Purpose ANSYS allows you to “parameterize” not only the geometry but also other characteristics, e.g: –material properties –loads –number of constraints –maximum vertical deflection –minimum temperature –maximum stress

Training Manual January 30, 2001 Inventory # Parametric Modeling...Definition & Purpose The basic requirement is that quantities to be used as DVs, SVs, and OBJ must be parameters. For example: –If volume is to be minimized (objective function), then the total volume must be available as a parameter. –If height H1 is to be declared as a design variable, the model geometry must be built in terms of H1. –If the design is constrained by a limit on compressive stress (state variable), the maximum compressive stress must be available as a parameter.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Definition & Purpose Every optimization run begins with a parametric model. The “output” from the parametric model is the analysis file, which is used as “input” for the optimizer. Analysis File Explore the Design Domain Optimize the Design Initial Design Parametric Model & Loading Solution Parametric Results

Training Manual January 30, 2001 Inventory # Parametric Modeling...Definition & Purpose The analysis file contains ANSYS commands for the complete parametric analysis: –Modeling –Loading –Solution –Results review

Training Manual January 30, 2001 Inventory # Parametric Modeling...Definition & Purpose Notes on the analysis file: –Same as the.log file with non-essential commands (plots, lists, graphics controls, etc.) removed. –Think of the analysis file as a format in which the parametric model must be “stored” for optimization purposes. –The optimizer runs the analysis file multiple times, using new parameter values each time. Since parameters are the essence of a parametric model, we will first review some basic APDL concepts.

Training Manual January 30, 2001 Inventory # Parametric Modeling B. APDL Basics What is APDL? Acronym for ANSYS Parametric Design Language, a scripting language that allows you to parameterize your model and automate common tasks. Using APDL, you can: –input model dimensions, material properties, etc. in terms of parameters rather than numbers. –retrieve information from the ANSYS database, such as a node location or maximum stress.

Training Manual January 30, 2001 Inventory # Parametric Modeling...APDL Basics APDL also allows you to: –perform mathematical calculations among parameters. –use array parameters to create and operate on vectors and matrices. –define abbreviations (short cuts) for frequently used commands or macros. –create a macro to execute a sequence of tasks, with if-then-else branching, do-loops, and user prompts.

Training Manual January 30, 2001 Inventory # Parametric Modeling...APDL Basics In this section, we will concentrate on just the basic APDL capabilities: –how to define parameters –how to use them –how to retrieve information from the ANSYS database and assign them to parameters For details on other APDL capabilities, please refer to your APDL Programmer’s Guide.

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics Defining Parameters To define a parameter, use the format Name=Value –Can be typed in the input window or in the Scalar Parameters dialog (Utility Menu > Parameters > Scalar Parameters...) –Name is the parameter name, eight alphanumeric characters or less. –Value may be a number, a previously defined parameter, a mathematical function, a parametric expression, or a character string.

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Defining Parameters Examples: inrad=2.5 outrad=8.2 numholes=4 thick=outrad-inrad e=2.7e6 density=0.283 bb=cos(30) pi=acos(-1) g=386 massdens=density/g circumf=2*pi*rad area=pi*r**2 dist=sqrt((y2-y1)**2+(x2-x1)**2) slope=(y2-y1)/(x2-x1) theta=atan(slope) jobname=‘proj1’

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Defining Parameters Some naming rules: Parameter names must be eight characters or less (see note), beginning with a letter. Only letters, numbers, and the underscore character _ are allowed. Avoid underscore _ as starting character… reserved for ANSYS use. Names are not case-sensitive, i.e, “RAD” and “Rad” are the same. All parameters are internally stored in capital letters. Avoid common ANSYS labels such as STAT, DEFA, and ALL. Note: There are several undocumented features – use at your own risk! 1.Design variable names with up to 16 characters are recognized 2.Parameter names with a maximum of 32 characters may be entered

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics Using Parameters To use a parameter, simply enter its name in the appropriate field in the dialog box or on the command. For example, to define a rectangle using the parameters w=10 and h=5, –you can use the menu: Preprocessor > Create > Rectangle > By 2 Corners + –or commands: /prep7 blc4,,,w,h

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Using Parameters Note: Whenever you use parameters, ANSYS immediately substitutes their values. The rectangle in the previous example is stored as a 10x5 area, not as w x h. That is, if you change the value of w or h after creating the rectangle, the area will NOT be updated. This is true of most parametric substitutions and is the reason for storing the parametric model in the form of a command file (the analysis file).

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Using Parameters Other examples of using parameters: jobname=‘proj1’ /filnam,jobname! Jobname /prep7 ex=30e6 ! Exval would be safer mp,ex,1,ex! Young’s modulus force=500 fk,2,fy,-force! Force at KP 2 fk,6,fx,force/2! Force at KP 6

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Retrieving Database Information To retrieve information from the database and assign it to a parameter, use the *GET command or Utility Menu > Parameters > Get Scalar Data... A vast amount of information is available, including model and results data. Refer to the *GET command description for details.

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Retrieving Database Information Examples: *get,x1,node,1,loc,x! x1 = X coordinate of node 1 [CSYS]* /post1 *get,sx25,node,25,s,x! sx25 = X stress at node 25 [RSYS]* *get,uz44,node,44,u,z! uz44 = UZ displacement at node 44 [RSYS]* nsort,s,eqv! Sort nodes by von Mises stress *get,smax,sort,,max! smax = maximum of last sort etable,vol,volu! Store element volumes as vol ssum! Sum all element table columns *get,totvol,ssum,,ITEM,vol! totvol = sum of vol column *CSYS = In the active coordinate system (CSYS) RSYS = In the active results coordinate system (RSYS)

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Retrieving Database Information Some data can be retrieved with a get function. Examples: x1=nx(1)! x1 = X coordinate of node 1 [CSYS]* nn=node(2.5,3,0)! nn = node at or near (2.5,3,0) [CSYS]* k1=kpnext(0) ! k1 = lowest numbered keypoint (of selected) L1=lsnext(3) ! L1 = lowest numbered line > 3 (of selected lines) /post1 ux25=ux(25)! ux25 = UX at node 25 [RSYS]* temp93=temp(93)! temp93 = temperature at node 93 width=distnd(23,88)! width = distance between nodes 23 & 88 *CSYS = In the active coordinate system (CSYS) RSYS = In the active results coordinate system (RSYS)

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Retrieving Database Information You can use a get function directly in a field, just like a parameter. For example: k,10,kx(1),ky(3)! KP 10 at X of KP 1, Y of KP 3 [CSYS]* k,11,kx(1)*2,ky(3)! [CSYS]* f,node(2,2,0),fx,100! FX force at node(2,2,0) [CSYS]* lfillt,lsnext(0),lsnext(lsnext(0)),.5 ! Forms a fillet between 2 selected lines ! without referring to their numbers *CSYS = In the active coordinate system (CSYS)

Training Manual January 30, 2001 Inventory # Parametric Modeling - APDL Basics...Retrieving Database Information APDL Summary: –Define parameters using the format Name=Value. –Value may be a number, a previously defined parameter, a mathematical function, a parametric expression, or a character string. –Use *GET or get functions to retrieve data from the ANSYS database. –ANSYS stores data in their actual form (numbers or strings), not in the form of parameter names.

Training Manual January 30, 2001 Inventory # Parametric Modeling C. Procedure / Guidelines The procedure to build and analyze a parametric model is the same as for a normal ANSYS analysis except that parameters are used wherever appropriate: 1.Define parameters 2.Build the model using parameters where appropriate 3.Apply loads and obtain the solution using parameters where appropriate 4.Review results and parameterize desired data 5.Create the analysis file.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Step 1 - Define Parameters Use the standard Name=Value format to define parameters, in the Input window or in the Scalar Parameters dialog ( Utility Menu > Parameters > Scalar Parameters… ). No need to define all parameters in this step, but keeping all parameter definitions together makes for easier editing later (if needed). For parameters to be used as DVs, the values specified are used for the initial design only.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Steps 2, 3 - Modeling, Meshing & Loading Using Parameters Use parameters instead of numbers wherever appropriate. Avoid using graphical picking or entity numbers for modeling and loading operations. Use select logic, component names, or get functions instead.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines For example, the following method is not recommended in a parametric model (except in very simple cases): SFL,4,PRES,500! Pressure on line 4 F,32,FY,-7500! Force on node 32 Instead, use select logic or get functions: LSEL,S,LOC,…! Select line by location SFL,ALL,PRES,500! Pressure on all selected lines LSEL,ALL F,NODE(1.5,3,0),FY,-7500 ! Node number by get function

Training Manual January 30, 2001 Inventory # H1 H2 A1, A2, A3 Parametric Modeling...Procedure / Guidelines Remember that you can use parametric expressions and/or if- then-else branching to modify the parameters. Example: –If diameter is defined as a parameter, you can use diameter/2 to define a cylindrical volume using the CYLIND or CYL4 command. –If the truss bridge is modeled using half-symmetry, the cross- sectional area of the vertical member at the symmetry plane would be A2/2.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines –If thk is defined as a parameter in a shell model and only three shell thicknesses are available (e.g, 1/8”, 3/16”, 1/4”), you can use an if-then-else construct (along with the appropriate OPLOOP setting for optimization looping - discussed later): et,1,63! Shell element type *if,thk,lt,2.5/16,then thk=1/8! Use 1/8 if thk < 2.5/16 *elseif,thk,gt,3.5/16,then thk=1/4! Use 1/4 if thk > 3.5/16 *else thk=3/16! Otherwise use 3/16 *endif r,1,thk! Define shell thickness

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Step 4 - Parameterize the Results This means to retrieve results data and store them in parameters. Usually done in POST1, the general postprocessor. Results data, such as maximum deflection, maximum von Mises stress, and total volume, are typically used as state variables and objective functions. Use the *GET command ( Utility Menu > Parameters > Get Scalar Data… ) or get functions to retrieve results data.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Step 5 - Create the Analysis file The analysis file contains the command input used to build and analyze the parametric model. The optimizer uses it to loop through multiple designs. Analysis File Explore the Design Domain Optimize the Design Initial Design Parametric Model & Loading Solution Parametric Results

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines The sequence of commands on the analysis file follows the sequence you use to build and analyze the parametric model: –Parameter definitions (initial values) –Commands to define the geometry –Meshing commands –Commands for loads and boundary conditions –Solution commands –Commands to retrieve results data

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Two ways to create the analysis file: –“Dump out” the command log stored in the ANSYS database. –Edit a copy of the log file (jobname.log). We will concentrate on the first method in this seminar.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines To dump out the command log stored in the database, choose Utility Menu > File > Write DB Log File (LGWRITE command). –The default file name is jobname.lgw. –You can choose to write essential commands only or to write non-essential commands (plots, lists, etc.) as comments.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines You might want to edit the analysis file using a text editor and: –Add descriptive comments using the ! character. Any text following ! is ignored by ANSYS as a comment. –Add some plot commands such as EPLOT and contour plots (PLNSOL,…). This way, when you run the optimization process interactively, you can see the model changing from one iteration to the next.

Training Manual January 30, 2001 Inventory # Parametric Modeling...Procedure / Guidelines Be sure to test your analysis file and make sure it doesn’t cause errors or unrealistic models. To test the analysis file, simply re-input it into a new ANSYS session. –Use the /INPUT command –Or Utility Menu > File > Read Input from…

Training Manual January 30, 2001 Inventory # Parametric Modeling Summary A parametric model, stored in the form of an analysis file, is required for ANSYS design optimization. APDL parameters are used to build and analyze the parametric model. The analysis file typically contains commands for: –Initial parameter values –Model geometry and meshing –Boundary conditions, loads, and solution –Results review and retrieval …or it could be a single line defining the objective function in terms of the design variables with APDL: Obj = 0.5*dv1**3 - 21*dv2** *dv

Training Manual January 30, 2001 Inventory # Parametric Modeling D. Example Shown here is the analysis file for a rectangular plate model built with thickness defined as a discrete design variable thk. Other parameters defined are vol for volume and smax for maximum stress. thk=.25 /prep7 et,1,63 *if,thk,lt,2.5/16,then thk=1/8 *elseif,thk,gt,3.5/16 thk=1/4 *else thk=3/16 *endif vol=thk*400 r,1,thk! Plate thickness mp,ex,1,1e7 rect,,20,,20 amesh,1 finish /solu nsel,s,ext d,all,all! Fix exterior nodes nsel,all sf,all,pres,5! Pressure loading solve finish /post1 set,last top nsort,s,eqv *get,smax,sort,,max finish

Training Manual January 30, 2001 Inventory # Parametric Modeling...Example Optimization input for the rectangular plate is shown here. Notice the use of the OPLOOP,PREP,PROCESS command to make sure that the thk definitions are processed. Details of the optimization procedure are presented in the next chapter. /opt! Optimization commands opvar,thk,dv,1/8,1/4! thk is the DV opvar,smax,sv,,21000! smax is the SV opvar,vol,obj! vol is the objective function optype,subp oploop,prep,process! Read analysis file from /PREP7, process DV settings opexe! Execute optimization oplist,all finish

Training Manual January 30, 2001 Inventory # Parametric Modeling E. Workshop This workshop consists of two problems: 1.Parametric modeling of an axisymmetric rotating disk –A step-by-step description of the procedure. –You may choose to run this problem yourself, or your instructor may show it as a demonstration. 2.Parametric modeling of a hexagonal steel plate –Step-by-step description of most of the procedure. See your Design Optimization Workshop Supplement for details.