Sie sind auf Seite 1von 49

A Constraint Equation Primer:

How to Tie Degrees of Freedom Together

Eric Miller
Co-Owner Principal, Simulation and Business Technologies
04/26/2012 PADT, Inc.

DX R13: 02/17/2011 1

Agenda
Note: This presentation is being recorded Introductions Theory and Basic Info The CP and CE Commands Internal CEs (MPC) CEs in Workbench

DX R13: 02/17/2011 2

Introductions

DX R13: 02/17/2011 3

Upcoming Webinars
Upcoming Webinars
Feb 9, 2012 - 12:00 MST Working Directly with Nodes and Elements in ANSYS Mechanical Feb 23, 2012 - 12:00 MST Assembly Meshing in ANSYS R14 CANCELED March 8, 2012 - 12:00 MST Intro to Workbench Framework Scripting - Controlling projects, materials, and solution execution with python March 22, 2012 - 12:00 MST Mastering the Remote Solver Manager (RSM) at R14

April 12, 2012 12:00 MST A POST26 Primer: Post Processing over Multiple Time/Load Steps in Mechanical APDL April 27, 2012 12:00 MST A Constraint Equation Primer: How to Tie Degrees of Freedom Together May 10, 2012 12:00 MST Optimization with ANSYS DesignXplorer at R14 May 24, 2012 12:00 MST Modeling Moisture Diffusion in ANSYS Summer Break: June & July (maybe August)

Primers are new:


Oriented towards newer users or Workbench users who may not have experience with some of the fundamentals in the ANSYS Mechanical APDL solver

See upcoming and past webinars at:


padtincevents.webex.com
Click on ANSYS Webinar Series
DX R13: 02/17/2011 4

About PADT
PADT is an Engineering Services Company
Mechanical Engineering 18 Years of Growth and Happy customers 70ish Employees

3 Business Areas
CAE Sales & Services
Consulting, Training, Sales, Support

Product Development Rapid Prototyping & Manufacturing

Learn More: www.PADTINC.com

We Make Innovation Work


DX R13: 02/17/2011 5

Cube HVPC Systems


Balance between speed and cost
Mini-Cluster 96 Cores / 512 GB RAM / 6 TB Disk Mobile Rack / UPS / Monitor / Keyboard $34,900 Compute Server 32 Cores / 256 GB RAM / 3 TB Disk $14,250 Simulation Workstation (Intel) 12 Cores / 96 GB RAM / 3 TB Disk $11,750 Simulation Workstation (AMD) 12 Cores / 64 GB RAM / 3 TB Disk $6,300

www.CUBE-HVPC.com

DX R13: 02/17/2011 6

PeDAL The APDL Editor


Side-by-side editor and help viewer layout. Instant help on any documented APDL command by pressing F1. Full syntax highlighting for ANSYS v12 Mechanical APDL. Auto-complete drop downs for APDL Commands. APDL Command argument hints while typing commands. Search ANSYS help phrases and keywords. Multiple tabs for the editor and html viewer. Full capability web browser built in allows for rich web experience and web searches.

DX R13: 02/17/2011 7

Connect with PADT


Facebook: facebook.com/padtinc Email Subscriptions:
www.padtinc.com/epubs

Twitter: #padtinc

Web: www.PADTINC.com

LinkedIn: Search on PADT, Inc.

ANSYS User Blog: padtinc.com/focus

DX R13: 02/17/2011 8

Theory and Basic Info

DX R13: 02/17/2011 9

What is a Constraint Equation


Remember you are solving a series of linear equations: Structural: (F) = [K](u)
Every node has a force (F) in each direction and a deflection (u). You are solving for (F) and (u) The deflections are called the Degrees of Freedom or DOF

Generalized to solve many types of physics, the meaning of (F), [K] and (u) change. But (u) is still a DOF Constraint equations are equations that tie the value of one DOF to the value of one or more DOFs Added into set of linear equations before solve

We will call them CEs most of the time

DX R13: 02/17/2011 10

There are Really 3 Types


Constraint Equations (CE)
Equations fed to the solver that describe relations between DOFs (what we will mostly talk about)

Couples (CP)
All DOFs are equal

Multipoint Constraint (MPC)


Actually internal MPC No equations are written by the users, created at runtime in the matrix

DX R13: 02/17/2011 11

Defined In Terms of a Sum


Constant =
=1(

N = number of terms in the equation U(I) = the DOF solution for term I

You write equations that relate one or more DOF in linear way:
After a solve, the sum of the user defined coefficients times their deflection equals some constant

DX R13: 02/17/2011 12

Example: Beam to Plane Stress Elements


(from MAPDL help) If you have a beam attached to a block, the ROTZ DOF is free, and it can spin like a hinge So, we know for small deflections and a rigid connection, that ROTZ in radians is equal to the distance from the connection to the corner nodes times the rotation in radians.
So if it was one node, it would be a multiplier of 5, but because there are two sharing the deflection, one up and one down, it is 10 and the coefficients on the UY direction are 1 and -1. 2 = 31 10 0 = UY3 UY1 10*ROTZ2

DX R13: 02/17/2011 13

Example: Cyclic Symmetry


Assumption when a disk shape is made up of a repeated chunk of geometry. The DOF solution at the boundary of the repeatable chunk are identical Enforced with CEs
In a cylindrical coordinate system Uaxial129 = -1*Uaxial363 Uhoop129 = -1*Uhoop363 Uradial129 = -1*Uradial363 0.0 = Uaxial129 + Uaxial363 0.0 = Uhoop129 + Uhoop363 0.0 = Uradial129 + Uradial363

DX R13: 02/17/2011 14

All Sorts of Uses


There are many situations where you want to relate DOFs:
Coupling: Setting one DOF equal to Another Cyclic Symmetry: forcing cyclic (and anti-cyclic) behavior at the repeatable boundary Contact: contacts are CEs that turn on and off based on proximity Joints: Constrain some DOFs and leave other free
Pin type stuff that NASTRAN users do all the time

Gears and linkages: relate rotational DOFs or rotation to displacment Connect mesh regions with more DOFs to regions with less Connect Dissimilar Meshes Represent behavior of rigid elements

DX R13: 02/17/2011 15

DOF Elimination
One of the DOFs in the equation needs to be set free and solved for: eliminated from the equation It can not have any DOF value imposed on it with a displacement, master DOF, or couples.

DX R13: 02/17/2011 16

Coordinate Systems
The DOFs on a node are defined in that nodes coordinate system
Each node in an ANSYS model has a unique rotation defined relative to the global coordinate system

Make sure that when you define a CP or CE that the nodes are all rotated in the same Cartesian, radial, or spherical coordinate system
Very important if you are using Mechanical, you may not know what coordinate system nodes are in.

Critical for cyclic symmetry

DX R13: 02/17/2011 17

Creation
MAPDL
Several commands to define by hand you enter the equation More commands to automatically generate between specified nodes Automatically created as part of contacts

Mechanical
Created automatically with contacts Created automatically with remote points Created automatically as part of repeatable boundary Defined by hand between points

DX R13: 02/17/2011 18

Viewing
Using the /PBC,ce,1 command turn on CEs Any plots show the CEs Little arrows show DOF at each node
Way to check the nodal rotation

Lines connect all the DOFs in a CE Unselected nodes are not shown If Mechanical is making CEs, put a CE plot into your snippets to check them.

DX R13: 02/17/2011 19

The CP and CE Commands

DX R13: 02/17/2011 20

Some Background
Most CE related commands start with CE Each CE in a model has a unique number
You define the number when you create the CE You refer to the CE number when you want to look at it, modify it, delete it, add to it

All Holds true for CPs as well

DX R13: 02/17/2011 21

Couples
A constraint equation, but not treated as one DOF1 = DOF2 Can be a CE: 0 = DOF1 DOF2 But more efficient to substitute DOF2 every place DOF1 was used Command:
CP, NSET, Lab, NODE1, NODE2, NODE3, NODE4, NODE5, NODE6, NODE7, NODE8, NODE9, NODE10, NODE11, NODE12, NODE13, NODE14, NODE15, NODE16, NODE17 Every node in the list will have the same value for whatever DOF you specify in Lab Repeat with same NSET to add even more nodes Supports picking (NODE1= p) and components Use NODEx to remove a node from the set

Valid Lab:
Structural labels: UX, UY, or UZ (displacements); ROTX, ROTY, or ROTZ (rotations) (in radians); HDSP (hydrostatic pressure). Thermal labels: TEMP, TBOT, TE2, TE3, . . ., TTOP (temperature). Fluid labels: PRES (pressure); VX, VY, or VZ (velocities). Electric labels: VOLT (voltage); EMF (electromotive force drop); CURR (current). Magnetic labels: MAG (scalar magnetic potential); AX, AY, or AZ (vector magnetic potentials); CURR (current). Diffusion label: CONC (concentration). Explicit analysis labels: UX, UY, or UZ (displacements).

DX R13: 02/17/2011 22

Couple Related Commands


CPDELE, NSET1, NSET2, NINC, Nsel
Delete a CP set If Nsel = ALL, only delete if all nodes are selected

CPINTF, Lab, TOLER


Puts all the nodes below a certain distance (Toler) from each other in a CP set with DOF = LAB Best used for coincident, or very close to coincident nodes

CPLGEN, NSETF, Lab1, Lab2, Lab3, Lab4, Lab5


Makes copies of an existing couple set (NSETF) using 1 or more new DOF labels

CPLIST, NSET1, NSET2, NINC, Nsel


Lists out coupled sets Use this in a Mechanical APDL snippet to set what CPs were made by workbench

CPNGEN, NSET, Lab, NODE1, NODE2, NINC


Like CP but uses node range to specify nodes Makes ITIME copies of existing CP sets, incrementing the nodes by INC

CPSGEN, ITIME, INC, NSET1, NSET2, NINC

DX R13: 02/17/2011 23

Couple Issues
Only the first DOF value in the set is used in the matrix, all others are replaced by it
Called the prime DOF Dont put displacements (D) on DOFs that are coupled out

CPs on Non coincident nodes, or nodes who do not lie on the DOF that is coupled, will induce moments. A DOF should never appear in more than one CP The set number in the CP command can be:
n: the set number HIGH: use the highest number currently defined NEXT: use the highest number + 1 (new) NOTE: The default is not NEXT!, it is HIGH.

DX R13: 02/17/2011 24

Making CEs: The CE Command


CE, NEQN, CONST, NODE1, Lab1, C1, NODE2, Lab2, C2, NODE3, Lab3, C3
NEQN can be: n, HIGH, or NEXT (HIGH is default!) CONST = the constant for the equation NODEn,Labn,C1 = the node, the DOF, and the multiplier.

So, our early example:


2 = 31 10 0 = UY3 UY1 10*ROTZ2 CE, next, 0, 3,uy,1, 1,uy,-1, 2,rotz,10

DX R13: 02/17/2011 25

Making CEs: The CE Command


Most hand CEs are pretty simple
Often an anti-symmetry Connecting a remote mass point to your model Doing your own cyclicsymmetry constraints Connecting rotation DOFs to axial based on distances Defining a joint or gear

Use APDL macro to generate Or use Excel for fancy ones (make sure your math is right) These days, they are almost always made for you

DX R13: 02/17/2011 26

Making Cyclic Symmetry Boundaries


Back in the day you had to make your own CEs for this
Kids today have it too easy

CECYC, Lowname, Highname, Nsector, HIndex, Tolerance, Kmove, Kpairs


Lowname, Highname are the component names of each side of your wedge Nsector is the number of times the sector gets repeated Hindex is the harmonic index no time to explain Tolerance specifies how close in the axial/radial/tangential+sector angle nodes need to be to be coupled Kmove = 1 says you can move the high nodes to match the low (dont use!) Kpairs = 1 prints out a list of pairs when it executes

It rotates the nodes into CSYS = 1 !!!!!!!!!!


This may not be the same axis as your model, check Do your won CEs if that is true

DX R13: 02/17/2011 27

Join Interfaces with CEINTF


Use this to tie two meshes together at an interface Uses weighted averages of distance to smear the constraint equations Connects the nodes on the first surface to all the nodes on the surface elements on the second surface CEINTF, TOLER, DOF1, DOF2, DOF3, DOF4, DOF5, DOF6, MoveTol
Toler: fraction of element size, find all nodes within that fraction from element DOF1 DOF6: DOFs to write CEs for MoveTo1: if not 0, move the nodes onto the surface of the elements if they dont sit exactly on. Value is fraction of element size

Hints
Use components to set up Nodes should be smaller and denser of the two sides Dont use to attach 6DOF elements to 3DOF elements Use CPEINTF if the nodes line up

DX R13: 02/17/2011 28

CEINTF Example: Joining Two Blocks


finish /clear /prep7 blc4,-1,-1,2,2,2 vatt,2 blc4,-3,-2,6,4,-2 et,1,185
esize,.9 vmesh,all vsel,s,,,1 nslv,s,1 nsel,r,loc,z,0 vsel,s,,,2 nslv,s,1 nsel,r,loc,z,0 esln,s allsel /pnum,mat,1 /number,1 /view,1,1,1,1 /vup,1,z /triad,lbot,1 eplot ceintf,5,ux,uy,uz nsle,a /pbc,ce,1 eplot

DX R13: 02/17/2011 29

Looking at one CE in our CEITNF


CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 2 DIR= NODE= 141 DIR= NODE= 145 DIR= NODE= 146 DIR= NODE= 142 DIR= NO. UX UX UX UX UX 1 HAS COEFFICIENT= COEFFICIENT= COEFFICIENT= COEFFICIENT= COEFFICIENT= 5 TERMS. -1.000000 0.5000000 0.2500000 0.8333333E-01 0.1666667

Connects node 2 to all the corner nodes of the element it sits on. Coefficients are distance to node 2 divided by sum of all the distances.

DX R13: 02/17/2011 30

Create Rigid Regions CERIG


Make a bunch of nodes all have the same DOF response for connecting 6DOF nodes CERIG, MASTE, SLAVE, Ldof, Ldof2, Ldof3, Ldof4, Ldof5
MASTE is the node that drives the motion. All nodes will move like MASTE SLAVE is the node(s) that will be linked to MASTE.
Use ALL to slave all selected nodes

LDOF-LDOF5 are the degrees of freedom to fix


ALL, UXYZ, RXYZ, UX,UY,UZ,ROTX,ROTY,ROTZ

Assumes that the master node is a 6DOF node


Otherwise, just use a CP

No CE number, it assigns the next number Mostly replaced by contact elements

DX R13: 02/17/2011 31

CERIG Example
nsel,s,,,1000 cmsel,a,nb1 cerig,1000,all,uz

CONSTRAINT EQUATION NO. 0.000000 NODE= 113 DIR= UZ NODE= 1000 DIR= UZ NODE= 1000 DIR= ROTX NODE= 1000 DIR= ROTY

1 HAS

4 TERMS.

CONSTANT=

COEFFICIENT= 1.000000 COEFFICIENT= -1.000000 COEFFICIENT= 2.000000 COEFFICIENT= -3.000000

DX R13: 02/17/2011 32

NASTRAN Connections: RBE3


Added for NASTRAN users who wanted their RBE3 The motion of the master is the average of the motion of the slaves RBE3, Master, DOF, Slaves, Wtfact
Master is your 6 DOF node DOF is what DOFs you want to connect (usually all) Slaves is ALL or an array with node numbers (?!?!) Wtfact is a weighting factor you can apply to any slave node to lesson the effect of that node.

Does average (1/num_nodes) for translational Does distance average for rotational (distn/total_dist) Not rigid. Distributes forces and moments

DX R13: 02/17/2011 33

RBE3 Example
Connect a beam to 4 nodes
nsel,s,,,1000 cmsel,a,nn1 rbe3,1000,all,all
LIST ALL SETS FOR CONSTRAINT EQUATIONS WITH ANY NODES SELECTED CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 1000 DIR= NODE= 146 DIR= NODE= 147 DIR= NODE= 150 DIR= NODE= 151 DIR= CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 1000 DIR= NODE= 146 DIR= NODE= 147 DIR= NODE= 150 DIR= NODE= 151 DIR= CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 1000 DIR= NODE= 146 DIR= NODE= 147 DIR= NODE= 150 DIR= NODE= 151 DIR= CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 1000 DIR= NODE= 146 DIR= NODE= 147 DIR= NODE= 150 DIR= NODE= 151 DIR= CONSTRAINT EQUATION CONSTANT= 0.000000 NODE= 1000 DIR= NODE= 146 DIR= NODE= 147 DIR= NODE= 150 DIR= NODE= 151 DIR= NO. UX UX UX UX UX NO. UY UY UY UY UY NO. UZ UZ UZ UZ UZ NO. ROTX UZ UZ UZ UZ NO. ROTY UZ UZ UZ UZ 1 HAS 5 TERMS. COEFFICIENT= 1.000000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 2 HAS 5 TERMS.

COEFFICIENT= 1.000000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 3 HAS 5 TERMS.

COEFFICIENT= 1.000000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 COEFFICIENT=-0.2500000 4 HAS 5 TERMS.

COEFFICIENT= 1.000000 COEFFICIENT= 0.6250000 COEFFICIENT=-0.6250000 COEFFICIENT= 0.6250000 COEFFICIENT=-0.6250000 5 HAS 5 TERMS.

COEFFICIENT= 1.000000 COEFFICIENT=-0.5833333 COEFFICIENT=-0.5833333 COEFFICIENT= 0.5833333 COEFFICIENT= 0.5833333

CONSTRAINT EQUATION NO. 6 HAS 9 TERMS. CONSTANT= 0.000000 NODE= 1000 DIR= ROTZ COEFFICIENT= 1.000000 NODE= 146 DIR= UX COEFFICIENT=-0.2909739 NODE= 146 DIR= UY COEFFICIENT= 0.3117577 NODE= 147 DIR= UX COEFFICIENT= 0.2909739 NODE= 147 DIR= UY COEFFICIENT= 0.3117577 NODE= 150 DIR= UX COEFFICIENT=-0.2909739 NODE= 150 DIR= UY COEFFICIENT=-0.3117577 NODE= 151 DIR= UX COEFFICIENT= 0.2909739 NODE= 151 DIR= UY COEFFICIENT=-0.3117577 DX R13: 02/17/2011 MAXIMUM CONSTRAINT EQUATION NUMBER= 6 34

CE Utility Commands
CELIST, NEQN1, NEQN2, NINC, Option
Lists the CEs Option is:
ANY list if any of the nodes in the CE are selected ALL list of all of the nodes in the CE are selected INTE List internal CEs created as MPCs (solu only) CONV conert internal to external (solu only)

CEDELE, NEQN1, NEQN2, NINC, Nsel


Deletes CEs Nsel is ANY or ALL

CESGEN, ITIME, INC, NSET1, NSET2, NINC


Generates CEs from a previous set Increments node numbers (used before automatic meshing)

DX R13: 02/17/2011 35

Internal CEs: MPCs

DX R13: 02/17/2011 36

Bonded Contact
Use with CONTA171/172/173/174/175/176/177 Advantages
No elimination of DOFs Works with large deflection Automatically generates equations at solve Does force distribution based on shape functions, more accurate Uses less memory than CEs

Does Rigid or Force Distributed Very detailed info in


Mechanical APDL // Contact Technology Guide // 9. Multipoint Constraints and Assemblies

DX R13: 02/17/2011 37

Just Like any Contact Definition


First, you tell it your want MPC: KEYOPT(2) = 2 Usually you also want bonded always: KEYOPT(12) = 5
But works with no separation (4) or bonded, initial contact (6) So much more flexible then CEs

Use KEYOPT(4) to control what DOFs to use


0 is typical, all that make sense 1 is no rotational 2 is all 6 DOFs

Handles connecting Beams/Shells/Solids to each other

DX R13: 02/17/2011 38

Example: Block on Block


et,11,170 et,12,175 r,11 real,11 keyopt,12,2,2 ! MPC keyopt,12,12,5 ! Bonded cmsel,s,nb1 type,11 esln,s,0 Esurf cmsel,s,nt1 type,12 esln,s,0 Esurf allsel

DX R13: 02/17/2011 39

CELIST,all,,,conv
LIST ALL SETS FOR CONSTRAINT EQUATIONS WITH ANY CONSTRAINT EQUATION NODE= 1 DIR= NODE= 463 DIR= NODE= 467 DIR= NODE= 468 DIR= NODE= 464 DIR= CONSTRAINT EQUATION NODE= 1 DIR= NODE= 463 DIR= NODE= 467 DIR= NODE= 468 DIR= NODE= 464 DIR= CONSTRAINT EQUATION NODE= 1 DIR= NODE= 463 DIR= NODE= 467 DIR= NODE= 468 DIR= NODE= 464 DIR= NO. UX UX UX UX UX NO. UY UY UY UY UY NO. UZ UZ UZ UZ UZ NODES SELECTED 0.000000

1 HAS 5 TERMS. CONSTANT= COEFFICIENT= 1.000000 COEFFICIENT=-0.1666667 COEFFICIENT=-0.8333333E-01 COEFFICIENT=-0.2500000 COEFFICIENT=-0.5000000 2 HAS 5 TERMS. CONSTANT= COEFFICIENT= 1.000000 COEFFICIENT=-0.1666667 COEFFICIENT=-0.8333333E-01 COEFFICIENT=-0.2500000 COEFFICIENT=-0.5000000 3 HAS 5 TERMS. CONSTANT= COEFFICIENT= 1.000000 COEFFICIENT=-0.1666667 COEFFICIENT=-0.8333333E-01 COEFFICIENT=-0.2500000 COEFFICIENT=-0.5000000

0.000000

0.000000

DX R13: 02/17/2011 40

Why Use CEs?


For most cases where you are gluing meshes together, use MPCs Use CEs:
If you need to control the equations Joints, gears, symmetry, etc You want to view the connections Where nodal rotations play a role You are working with DOFs other than UXYZ/ROTXYZ

DX R13: 02/17/2011 41

CEs In Workbench

DX R13: 02/17/2011 42

Mostly Hidden from User


When you make MPC bonded contact, it does internal CEs Some commands make CEs or CPs
View the *.inp file to see what it does But dominant method is with MPCs

DX R13: 02/17/2011 43

Two Ways to Make Your Own


APDL Commands in Code Snippet
Use named selections to grab the nodes you need You need to know how CEs work and the APDL commands

Insert into your model tree


Considered Loads CPs only available in modal analysis
Between geometry

CEs available between remote points and/or joints

DX R13: 02/17/2011 44

CEs in Workbench
First, make your remote points Then RMB on environment object and select Constraint Equation You get a Worksheet
Define your constant Then add lines for each remote point in the equation

DX R13: 02/17/2011 45

Displaying CEs in Workbench


After you solve you can see an CEs you made, or that Workbench made Click on the Solution Information Object Set the FE Connection Visibility to show CEs Also shows beams and springs

DX R13: 02/17/2011 46

Thoughts

DX R13: 02/17/2011 47

Understand CEs
As time goes by, the need to create your own CEs goes down
That is good

But you need to understand what the program is doing


Under/over constraint can screw things up

As always, read the help! If you need to do your own, crawl, walk, run
Do a single CE, then move up to the whole model.

DX R13: 02/17/2011 48

Thank You
PADT Enjoys doing these webinars Please consider us as your partner ANSYS Related
Training, Mentoring Consulting Services Customization Sales (if in AZ, NM, CO, UT, NV)

Stratasys 3D Printers and Systems CUBE HVPC Systems Product Development


High-end engineering with practical, real world application

Rapid Prototyping
SLA, SLS, FDM, PolyJet, CNC, Soft Tooling, Injection Molding

Help us by letting us Help you

DX R13: 02/17/2011 49

Das könnte Ihnen auch gefallen