Written by Changhyun, SON Chapter 2. Parameters - 1 CHAPTER 2 Parameters.

Slides:



Advertisements
Similar presentations
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Advertisements

Array Parameters Module 2. Training Manual October 30, 2001 Inventory # Array Parameters Array Parameters are parameters that can take on.
MATLAB ME1107 Y Yan Reference: MATLAB for Engineers by Holly Moore (Pearson Prentice Hall)
Lecture 6 MATLAB functions Basics of Built-in Functions, Help Feature, Elementary Functions (e.g., Polynomials, Trigonometric Functions), Data Analysis,
MATLAB Basics CS 111 Introduction to Computing in Engineering and Science.
Databases Lab 5 Further Select Statements. Functions in SQL There are many types of functions provided. The ones that are used most are: –Date and Time.
BIL101, Introduction to Computers and Information Systems Chapter 12 A Portable Scientific Visualization Program: GnuPlot Prepared by Metin Demiralp Istanbul.
Lecture 7 Sept 19, 11 Goals: two-dimensional arrays (continued) matrix operations circuit analysis using Matlab image processing – simple examples Chapter.
Lecture 6 Sept 15, 09 Goals: two-dimensional arrays matrix operations circuit analysis using Matlab image processing – simple examples.
Dr. Jie Zou PHY Welcome to PHY 3320 Computational Methods in Physics and Engineering.
EGR 105 Foundations of Engineering I Session 3 Excel – Basics through Graphing Fall 2008.
Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Introduction to Databases Chapter 6: Understanding the SQL Language.
9.0 New Features Large Deformation Analysis of thin plate assembly spotwelded together Workshop 2 Spotwelds.
Array Processing Simple Program Design Third Edition A Step-by-Step Approach 7.
Class 3 Programming in Visual Basic. Class Objectives Learn about input/output Learn about strings Learn about subroutines Learn about arrays Learn about.
Computer Science 111 Fundamentals of Programming I Basic Program Elements.
Fortran: Expressions and Assignments Session Two ICoCSIS.
Training Manual Aug APDL Enhancements ANSYS Parametric Design Language enhancements in ANSYS 5.7 include: A.Matrix output capability.
CHAPTER: 12. Array is a collection of variables of the same data type that are referenced by a common name. An Array of 10 Elements of type double.
Introduction to Engineering MATLAB – 2 Introduction to MATLAB - 2 Agenda Defining Variables MATLAB Windows.
APDL Basics Module 12. Training Manual January 30, 2001 Inventory # APDL Basics Overview APDL is an acronym for ANSYS Parametric Design Language,
1 Java Basics for AnyLogic 6 Dang van son. 2 Agenda Development Environment Types & Expressions Calling Methods and Accessing Fields Replicated Objects.
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 16: Using Lookup Tables to Match Data 1 STAT 541 ©Spring 2012 Imelda Go, John Grego, Jennifer Lasecki and the University of South Carolina.
Calculations Chapter 11 Library of math functions, and constants cos, sin, tan, abs, min, max, log, random, sqrt, pow, exp Constants.PI,.E Use care with.
Introduction to MATLAB ENGR 1181 MATLAB 1. Opening MATLAB  Students, please open MATLAB now.  CLICK on the shortcut icon → Alternatively, select… start/All.
Reports and Queries Chapter 3 – Access text Reports – Page Queries – Page
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
MA/CS 375 Fall 2002 Lecture 3. Example 2 A is a matrix with 3 rows and 2 columns.
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
Introduction to Matlab By E. Noura Semary. Contents MATLAB Environment  Command window, Workspace, Path window, Editor window,and Figure window) Basic.
The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Introduction to a Database Defining a database Database window in Access The six items in window: Tables, Queries Forms, Reports, Macros, Modules.
MATLAB Lecture Two Tuesday 5 July Chapter 3.
Collapse of Frame Workshop Thirteen REFERENCE: Training Manual Geometric Instability (9-74)
Introduction to MATLAB II Steve Gu Jan 25, Outline Matrix Operation –Matrix functions –Element-wise operations Dynamic Systems –Classification –2nd.
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.
Introduction to MATLAB Session 2 Simopekka Vänskä, THL Department of Mathematics and Statistics University of Helsinki 2010.
MA/CS 375 Fall 2003 Lecture 3. .* Multiplication We can use the.* operator to perform multiplication entry by entry of two matrices:
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
1 Chapter 3: Getting Started with Tasks 3.1 Introduction to Task Dialogs 3.2 Creating a Listing Report 3.3 Creating a Frequency Report 3.4 Creating a Two-Way.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Chapter 8 P 1 Arrays and Grids Single-dimension arrays Definition An array is a sequence of elements all referred to with a common name. Other terms: table,
Surface-to-Surface Simulation
Workshop 13 Bolt Pretension
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
Workshop 1 Contact Stiffness
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.
Snap Fit Workshop Seventeen Introduction to Contact REFERENCE: Training Manual Introduction to Contact (7-69)
Parametric Modeling Chapter Two. Training Manual January 30, 2001 Inventory # Parametric Modeling The basic requirement for optimization.
NLISO Material Model Workshop Four REFERENCE: Training Manual Rate-Independent Plasticity (3-65)
Matlab Tutorial Iman Moazzen First Session – September 11, 2013.
Truss Structure Workshop Five Convergence Criteria REFERENCE: Training Manual Obtaining the Solution (3-51)
CS100A, Fall 1998, Lecture 201 CS100A, Fall 1998 Lecture 20, Tuesday Nov 10 More Matlab Concepts: plotting (cont.) 2-D arrays Control structures: while,
Lecture #15 ARRAYS By Shahid Naseem (Lecturer). 2 ARRAYS DEFINITION An array is a sequence of objects of same data type. The objects in an array are also.
A Sample Program #include using namespace std; int main(void) { cout
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
Jake Blanchard University of Wisconsin Spring 2006.
Stress Relaxation Workshop Six REFERENCE: Training Manual Implicit Creep (4-32)
Module 2 Array Parameters.
© 2016 Pearson Education, Ltd. All rights reserved.
Seminar 1 for DCSP Using Matlab.
Presentation transcript:

Written by Changhyun, SON Chapter 2. Parameters - 1 CHAPTER 2 Parameters

Written by Changhyun, SON Chapter 2. Parameters - 2 Categories of Parameters There are two categories of parameters; scalar and array. During an ANSYS run, there may be up to 400 parameters active at any point. There are two categories of parameters; scalar and array. During an ANSYS run, there may be up to 400 parameters active at any point. Scalar parameters represent a single real value and are referenced by name. Scalar parameters represent a single real value and are referenced by name. Array parameters are 1, 2, or 3 dimensional and can hold many real values. A value in an array parameter is referenced by name and a subscript, where the subscript specifies the location of interest within the array. Array parameters are 1, 2, or 3 dimensional and can hold many real values. A value in an array parameter is referenced by name and a subscript, where the subscript specifies the location of interest within the array.

Written by Changhyun, SON Chapter 2. Parameters - 3 Defining Parameters To define a parameter, use the format Name = Value l Can be typed in the input window or in the Scalar Parameters dialog Utility Menu:Parameters > Scalar Parameters... l Name is the parameter name, eight alphanumeric characters or less. l Value may be a number, a previously defined parameter, a mathematical function, a parametric expression, or a character string.

Written by Changhyun, SON Chapter 2. Parameters - 4 Defining Parameters - Examples inrad=2.5outrad=8.2numholes=4thick=outrad-inradelastic=2.7e6density=0.283bb=cos(30)pi=acos(-1)g=386massdens=density/gcircumf=2*pi*radarea=pi*r**2dist=sqrt((y2-y1)**2+(x2-x1)**2)slope=(y2-y1)/(x2-x1)theta=atan(slope)jobname=‘proj1’

Written by Changhyun, SON Chapter 2. Parameters - 5 Naming Rules l Parameter names must be eight characters or less, beginning with a letter. l Only letters, numbers, and the underscore character ‘_’ are allowed. l Avoid underscore ‘_’ as starting character… reserved for ANSYS use. l Names are not case-sensitive, i.e, “RAD” and “Rad” are the same. All parameters are internally stored in capital letters. l Avoid common ANSYS labels such as STAT, DEFA, and ALL.

Written by Changhyun, SON Chapter 2. Parameters - 6 jobname=‘proj1’ /filnam,jobname! Jobname /prep7elastic=30e6 mp,ex,1,elastic! Young’s modulus force=500 fk,2,fy,-force! Force at KP 2 fk,6,fx,force/2! Force at KP 6 Using Parameters

Written by Changhyun, SON Chapter 2. Parameters - 7 Types of ANSYS Arrays l There are two types of ANSYS array parameters: u array type used to define discrete functions u table type used to define continuous functions via linear interpolation between tables entries Array type Table type

Written by Changhyun, SON Chapter 2. Parameters - 8 Types of ANSYS Arrays l Arrays can be one, two or three-dimensional. l A two-dimensional array has m rows and n columns; rows are identified by a row index number I, which varies from 1 to m columns are identified by a column index number J, which varies from 1 to n. l The quantities that make up the array are called array elements. Each array element is identified by indices (I,J) where I is its row number and J is its column number.

Written by Changhyun, SON Chapter 2. Parameters - 9 Definitions of ANSYS Arrays Using the GUI, in the Utility Menu:Parameters > Array Parameters > Define/Edit>Add Using command : *DIM, array_name, array_type, I_max, j_max, k_max

Written by Changhyun, SON Chapter 2. Parameters - 10 Importing Values *VREAD, ParR, Fname, Ext, Dir (*VREAD Format Line) DescriptorEx.yFx.yGx.y‘text’HT/ Used for DATADATADATALITERALLITERALPOSITIONPOSITIONSampleE9.2F9.2G9.2 ‘SAMPLE TEXT’ 6HSAMPLET6/Description begin a new line *DIM,DAT,,3*VREAD,DAT(1),VREAD,DAT(3F6.1)VREAD.DAT

Written by Changhyun, SON Chapter 2. Parameters - 11 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. Retrieving Database Information

Written by Changhyun, SON Chapter 2. Parameters - 12 *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,,vol! totvol = sum of vol column Retrieving Database Information - Examples -

Written by Changhyun, SON Chapter 2. Parameters - 13 *GET,kx1,KP,1,LOC,X *GET,ky1,KP,1,LOC,Y *GET,kz1,KP,1,LOC,Z *GET,kx2,KP,2,LOC,X *GET,ky2,KP,2,LOC,Y *GET,kz2,KP,2,LOC,Z DIST=SQRT((KX2-KX1)**2+(KY2-KY1)**2+(KZ2-KZ1)**2) Retrieving into Array Parameters *DIM,NODEX,,100 *VGET,NODEX(1),NODE,1,LOC,X *VGET, array_name(1),.....

Written by Changhyun, SON Chapter 2. Parameters - 14 Scalar and Vector Parameter Operations NEW=A+4XX=(((A+B)*C**2)A=A+2 C(1)=A(1)+B(1)C(2)=A(2)+B(2)C(3)=A(3)+B(3)C(4)=A(4)+B(4)*VOPER,C(1),A(1),ADD,B(1) *VOPER, ParR, Par1, Operator, Par2 ADD, SUB, MULT, DIV, MIN, MAX, LE, LT, EQ, DOT, CROSS,...

Written by Changhyun, SON Chapter 2. Parameters - 15 Scalar Parametric Functions Trigonometric SIN, COS, TAN, ASIN, ACOS, ATAN, … Logarithmic LOG, EXP, LOG10, … Hyperbolic SINH, COSH, TANH, … Random Number RAND, GDIS, … Other ABS, NINT, SQRT, …

Written by Changhyun, SON Chapter 2. Parameters - 16 Viewing Parameter Values *VEDIT *STATUS, Par, IMIN, IMAX, JMIN, JMAX, KMIN, KMAX *STATUS,DAT(1,1),2,3,2,3 *VPLOT, ParX, ParY, Y2, Y3, …, Y8 ARRAY TABLE

Written by Changhyun, SON Chapter 2. Parameters - 17 Tabular Output *CFOPEN, Filename,Ext, Dir *VWRITE, Par1, Par2,..., Par10 (*VWRITE Format Line) VALUE1=0.56VALUE2=1.2*CFOPEN,OUTPUT,DAT*VWRITE,VALUE1,VALUE2,VALUE1+VALUE2 (F5.2, ‘ + ‘, F5.2, ‘ = ‘, F5.2) = = 1.76 Result Output

Written by Changhyun, SON Chapter 2. Parameters - 18 Exercise 300N200N3 100N300N2 200N100N1 F2F2F2F2 F1F1F1F1 Load Step F1F1F1F1 F2F2F2F2 1 m A = 0.01 m 2 I = 8.3E-6 m 4 H = 0.1 m E = 210 GPa Load Step Data File Results Data File (UY 3, UY 5 ) ANSYS

Written by Changhyun, SON Chapter 2. Parameters - 19 /prep7 et,1,3 r,1,0.01,8.33e-6,0.1 ex,1,210e9 n,6,5 fill e,1,2 egen,5,1,1 d,1,ux,,,,,uy d,6,uy *dim,force,,3,2 *vread,force(1,1),force,dat (f4.0) *vread,force(1,2),force,dat (t5,f4.0) force.dat Input File

Written by Changhyun, SON Chapter 2. Parameters - 20 /solu *do,i,1,3 f,2,fy,force(i,1) f,4,fy,force(i,2) lswrite,i *enddo lssolve,1,i /post1 *dim,disp,,3,3 *do,i,1,3 set,i disp(i,1)=i *get,disp(i,2),node,3,u,y *get,disp(i,3),node,5,u,y *enddo *cfopen,disp,res *vwrite,disp(1,1),disp(1,2),disp(1,3) ('LoadStep', f2.0, ' : ', 'UY3 = ', f10.8, ', ', 'UY5 = ', f10.8) LoadStep1. : UY3 = , UY5 = LoadStep2. : UY3 = , UY5 = LoadStep3. : UY3 = , UY5 = disp.res