You are on page 1of 16

Chapter 7

Parametric Modeling

Introduction to ANSYS
DesignModeler
ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-1

Release 12.0
March 2010

Contents
Training Manual

Dimension References
Promoting Parameters
Promoting Dimension References
Promoting Feature Dimensions
Parameter Manager
Driven/Dependent Parameters
Auxiliary Variables
Parameter Functions

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-2

Release 12.0
March 2010

A. Dimension References
Training Manual

When sketches and features are created, their properties are controlled by
what are called dimension references.

Dimension references

Dimension references can be p


promoted to Design
g Parameters:
Allows parametric exchange of data.
Makes DM models more flexible to work with.
Is a key component in employing optimization techniques.
Can be sent to Mechanical
ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-3

Release 12.0
March 2010

B. Promoting Parameters
Training Manual

In the details box, click to promote a dimension reference to a design parameter


D.
Use the default name or assign a more meaningful name (no spaces
spaces,
underscore OK).
Notice, the value is no longer editable from the Details window.

Note: you cannot undo promotion of attached CAD parameters.


ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-4

Release 12.0
March 2010

C. Promoting Dimension References


Training Manual

Dimension parameters:
Default sketch dimension names indicate the associated plane as well as the
specific dimension
dimension.
Syntax is Plane_reference.Dimension_type_and_number.
Example:
Us
Using
g tthe
ee
example
a p e be
below,
o , the
t e de
default
au t name
a e for
o the
t e pa
parameter
a ete reads
eads
Plane4.D3.
Plane4: indicates on which plane the dimension is located.
D3: indicates the specific dimension is Diameter number 3.
It can be
b easily
il changed.
h
d

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-5

Release 12.0
March 2010

D. Promoting Feature Dimensions


Training Manual

Feature dimensions:
Default feature dimension names indicate the operation as well as the
dimension reference number (FD
( FD indicates Feature Dimension)
Dimension).
Syntax is Operation_type.Feature_Dimension_number.
Using the example below the default name for the parameter reads
Extrude6.FD1.

The name contains 2 pieces of information:


Extrude6: indicates the parameter references the sixth extrusion
created.
FD1: indicates its parameter value 1 for the extrusion (depth)
ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-6

Release 12.0
March 2010

E. Parameter Manager
Training Manual

After specifying parameters DM uses the Parameter manager to work with


them.
Click the Parameter button on the GUI to expose parameter manager
tools.
tools

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-7

Release 12.0
March 2010

Parameter Manager
Training Manual

The parameter manager window exposes 3 tabs allowing access to specific


parametric tools:

Design Parameters tab:


Each design parameter is listed here
Parameter values are reviewed and changed here
Use the # to add comments to parameter definitions

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-8

Release 12.0
March 2010

Parameter Manager
Training Manual

Parameter/Dimension Assignment tab:

Lists a sequence of left-hand-side = right-hand-side assignments


(equations) which are used to drive the model dimensions by the given
Design Parameters.
The left-hand side is a reference to one of the plane/sketch or feature
dimensions or a reference to an auxiliary variable.
The right
right-hand
hand side is an arbitrary expression in +,, -,, *,, and /, including
parentheses, referencing Design Parameters (here, the syntax uses the
'@' prefix) and feature dimensions, but also numeric constants or
references to auxiliary variables.
Can also use ^ for exponential
exponential, and % for modulus (remainder of x/y)
Functions (discussed later) can also be used.
ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-9

Release 12.0
March 2010

Parameter Manager
Training Manual

DesignModeler will evaluate the right-hand side of each expression, and


use the resulting value to drive the dimension referenced in the left-hand
side.
side
Design parameter names are preceded by @.
Comments can be added preceded by the #.
Example (from previous page):
Plane4.FD2 = @plane_distance
Indicates that a design parameter named plane_distance has been
defined as an offset of the Plane4 lying on the XY plane.
A sample comment has been added to the parameter assignment
assignment.

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-10

Release 12.0
March 2010

F. Driven/Dependent Parameters
Training Manual

Driven parameters are parameters which take on values based on


the value of a driving design parameter.
Goal: given the rectangular section shown here
here, with
dimensions S1 for height and S2 for width, drive the value of
the width according to the formula, S2 = 2*S1.

S2

S1

In DesignModeler
g
we would proceed
p
as follows:
Dimension the sketch height and width.
Create a design parameter called S1.
S1 will be our driving parameter.
Continued . . .
ANSYS, Inc. Proprietary
2010 ANSYS, Inc. All rights reserved.

7-11

Release 12.0
March 2010

Driven/Dependent Parameters
Training Manual

By inspecting the details for our sketch (previous page) we can see the
width dimension assignment is called H1.
Remember!: The H
H in H1 indicates a horizontal dimension while the
V in V2 indicates a vertical dimension.
From the Parameter/Dimension Assignments notice the dimension
assignment for S1 is:

Knowing the internal parameter name for our driven parameter will be
XYPlane.H1 we can type the following formula in the
Parameter/Dimension Assignment tab:

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-12

Release 12.0
March 2010

Driven/Dependent Parameters
Training Manual

At this point we could verify our formula by simply changing values for
S1, re-generating the model, and checking to make sure the width is
always equal to 2*S1.
WAIT! If the regeneration of the model fails due to a mistake in our
formula, we could encounter problems trying to undo the operation.
Fortunately DesignModeler contains a more elegant solution to validating
parametric formulae:
By moving to the Check tab, parametric assignments are evaluated
and the result displayed.

Lets take a closer look at the Check feature . . .

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-13

Release 12.0
March 2010

Driven/Dependent Parameters
Training Manual

The check window is split into two output sections:

Parameter/Dimension Assignments
g Parameter Assignments
g
Design

The sections are listed as output since each definition is displayed


according to its definition as well as its output value.
In the above case, it can be seen that our parameter S1 is assigned a
value of 35.000
35 000 (design parameter section).
section)
Similarly, our driven parameter XYPlane.H1 evaluates to 70.000.
Since we wish to drive XYPlane.H1 to the value 2*S1 we verify the value
of 70.000 makes sense.

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-14

Release 12.0
March 2010

G. Auxiliary Variables
Training Manual

Auxiliary variables are parameters that do not directly define a sketch or


feature dimension.
Typically used as a constant value or factor.
factor
Example:

Here we have defined 2 design parameters (@Height and @Length).


We
W now create
t a variable
i bl named
d factor
f t using
i the
th formula
f
l shown.
h
Finally, we set the radius dimension R5 equal to our variable.
Note, this example is for demonstration only. We could have simply
directly
y defined R5 with the formula used to define the variable.

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-15

Release 12.0
March 2010

H. Parameter Functions
Training Manual

Functions can be utilized to capture Design Intent and other relationships among
parameters.
Functions are operations that return a single value
ABS(X)
EXP(X)
LN(X)
( )
SQRT(X)
SIN(X) (in degrees)
COS(X)
TAN(X)
For X between 1 and +1:
ASIN(X) & ATAN(X)
(return value between -90 & 90 degrees)
ACOS(X)
(returns value between zero & 180 degrees)
Examples
A=acos(-1) #
evaluates to 90
B=abs(X)
#
evaluates to |X|

ANSYS, Inc. Proprietary


2010 ANSYS, Inc. All rights reserved.

7-16

Release 12.0
March 2010

You might also like