transient options: full vs. msup... 1 1-800-293-padt september 8, 2006 the focus issue 51 september...

6
www.padtinc.com 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full vs. MSUP By Rod Scholl Ever try to do a transient analysis over a small time domain… and get the feeling maybe you’re using the wrong tool? Ever watch time march painfully forward in mil- liseconds and still get spikey response curves out of /Post26 like this one? Perhaps you’ve overlooked the MSUP op- tion on the TRNOPT command. TRNOPT,FULL – The Default The full transient analysis uses the force equation you might expect: And the main requirement is that one chooses time steps small enough to capture the system response (and of course required resolution on input BC’s). If you’re not interested in any response due to fundamen- tal vibration modes… meaning all your loads are applied at rates well below the first fundamental mode… then time step size probably isn’t that critical… But then again, why not just do a static solution given the quasi-static nature of the problem? More likely the first frequency of the sys- tem and hence its response is around or below the boundary condition input fre- quency – which means one needs to take small time steps. When watching the lines on the screen (see link on how) creep along, I find lots of time to do little calculations like this. A good minimum rule is 8 points on each ½ sin curve… or: 1 / (highest frequency of interest * 16) But then again… this is being quite skimpy. If the excitation is only expected to excite the lowest fundamental mode… then this might be doable depending on your prob- lem definition. But if you need the 3rd mode… or 8th mode… or aren’t sure, and just need “as many as you can”… then we may be talking about A LOT of time steps… If your DOF count is high… this might take, well, way too long. TRNOPT,MSUP The alternative is to use the Modal Super- position Method (TRNOPT,MSUP). This method first solves the mode shapes up to the specified highest response frequency of interest. Then given an input profile of BC’s in the time domain, it is a simple matter of superposition to predict the re- sponse (handled internally in ANSYS with just a few commands). You can even take large time steps in regions of the time do- main where you have little interest. Read the theory manual to convince yourself that this is more than just an approximation and will yield accurate predictions. Whats the catch? With MSUP one has to CHOOSE which higher modes to ignore. And by ignore… they just will not be present. If this mode is excited in your part, and it fails… they may come looking for you. But with FULL method, one has to CHOOSE time step size. This thereby de- termine which responses are ignored, de- pending on the times step size used (if AUTOTS is off) or by the roll of the dice if one allows AUTOTS to by chance skip over peak responses. If the response curve is spiky as shown above, it will hopefully be noticed and more time points requested… However, many peaks are just plain stepped over and you are none the wiser. If the skipped response is excited and your part fails… they may come looking for you. The difference here being with MSUP you can claim you didn’t have “time” or “budget” to investigate using the outdated 8086 XT grafted on to the Tandy 1000 motherboard they supplied you – whereas with FULL, the missed frequency of re- sponse will look less “deliberate” and there- fore you will be burned by FSI in Workbench By Doug Oatis One topic that hasn’t been discussed in quite a while has been the FSI (Fluid-Struc- ture Interaction) capability within ANSYS Workbench. This article is aimed at de- scribing a one-way analysis, where the pressure results are taken from CFX and mapped onto a structural analysis. If need- ed, a two-way analysis is available (with the appropriate license) where the fluid and structural domains are solved until both are in equilibrium. For a one-way FSI analysis, the underlying assumption is that the deflections caused in the structure do not signifi- (Cont. on Pg. 2.) (Cont. on Pg. 3.) Full vs. MSUP ................................1 FSI in Workbench ...........................1 The Magic of PGR ..........................3 Welcome to CFX.............................4 4D Table Macro...............................5

Upload: others

Post on 23-Apr-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 1 1-800-293-PADT

September 8, 2006 The Focus Issue 51

September 8, 2006 A Publication for ANSYS Users Issue 51

Contents

Transient Options: Full vs. MSUPBy Rod Scholl

Ever try to do a transient analysis over asmall time domain… and get the feelingmaybe you’re using the wrong tool? Everwatch time march painfully forward in mil-liseconds and still get spikey responsecurves out of /Post26 like this one?

Perhaps you’ve overlooked the MSUP op-tion on the TRNOPT command.TRNOPT,FULL – The Default

The full transient analysis uses the forceequation you might expect:

And the main requirement is that onechooses time steps small enough to capturethe system response (and of course requiredresolution on input BC’s). If you’re notinterested in any response due to fundamen-tal vibration modes… meaning all yourloads are applied at rates well below thefirst fundamental mode… then time stepsize probably isn’t that critical… But thenagain, why not just do a static solutiongiven the quasi-static nature of the problem?

More likely the first frequency of the sys-tem and hence its response is around orbelow the boundary condition input fre-

quency – which means one needs to takesmall time steps. When watching the lineson the screen (see link on how) creep along,I find lots of time to do little calculationslike this. A good minimum rule is 8 pointson each ½ sin curve… or:

1 / (highest frequency of interest * 16)

But then again… this is being quite skimpy.

If the excitation is only expected to excitethe lowest fundamental mode… then thismight be doable depending on your prob-lem definition. But if you need the 3rdmode… or 8th mode… or aren’t sure, andjust need “as many as you can”… then wemay be talking about A LOT of timesteps… If your DOF count is high… thismight take, well, way too long.

TRNOPT,MSUPThe alternative is to use the Modal Super-position Method (TRNOPT,MSUP). Thismethod first solves the mode shapes up tothe specified highest response frequency ofinterest. Then given an input profile ofBC’s in the time domain, it is a simplematter of superposition to predict the re-sponse (handled internally in ANSYS withjust a few commands). You can even takelarge time steps in regions of the time do-main where you have little interest. Read

the theory manual to convince yourself thatthis is more than just an approximation andwill yield accurate predictions.

Whats the catch?With MSUP one has to CHOOSE whichhigher modes to ignore. And by ignore…they just will not be present. If this mode isexcited in your part, and it fails… they maycome looking for you.

But with FULL method, one has toCHOOSE time step size. This thereby de-termine which responses are ignored, de-pending on the times step size used (ifAUTOTS is off) or by the roll of the dice ifone allows AUTOTS to by chance skip overpeak responses. If the response curve isspiky as shown above, it will hopefully benoticed and more time points requested…However, many peaks are just plain steppedover and you are none the wiser. If theskipped response is excited and your partfails… they may come looking for you.

The difference here being with MSUP youcan claim you didn’t have “time” or“budget” to investigate using the outdated8086 XT grafted on to the Tandy 1000motherboard they supplied you – whereaswith FULL, the missed frequency of re-sponse will look less “deliberate” and there-fore you will be burned by

FSI in WorkbenchBy Doug Oatis

One topic that hasn’t been discussed inquite a while has been the FSI (Fluid-Struc-ture Interaction) capability within ANSYSWorkbench. This article is aimed at de-scribing a one-way analysis, where thepressure results are taken from CFX andmapped onto a structural analysis. If need-ed, a two-way analysis is available (with theappropriate license) where the fluid andstructural domains are solved until both arein equilibrium.

For a one-way FSI analysis, the underlyingassumption is that the deflections caused inthe structure do not signifi-

(Cont. on Pg. 2.)

(Cont. on Pg. 3.)

Full vs. MSUP ................................1FSI in Workbench ...........................1The Magic of PGR ..........................3Welcome to CFX.............................44D Table Macro...............................5

Page 2: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 2 1-800-293-PADT

September 8, 2006 The Focus Issue 51

the angry mob of engineer non-believers.

What’s the OTHER catch?Because the MSUP method requires a mod-al solution, the memory required for a givenmodel is higher with MSUP than with theFULL method. I have found that if one hasmodels this large, though, the FULL meth-od is still prohibitive due to solve times formost common excitation pulses. And thuson today’s computers at least, speed and notmemory is the limiting factor on solvingtransients with small time steps.

An example -Try this one: Note the listedsolve times. (I have to admit this script isadapted from one I found on my computer,and I don’t know who the original authorwas. So I thank you and apologize for notgiving you credit.) Also, this wasn’t set upto skip a transient peak during a run – butthat would be an even stronger demonstra-tion for the value of the MSUP method.

Below is a test case that attempts to capturethe response of frequencies of the first fivemodes.

In this last case, the number of time steps

was chosen to yield a solve time of 1.8 hrsto be equal to the MSUP method testedabove. You can see what kind of spikeyresponse one gets for an equivalent solvetime…

You can download the files used at:ftp.padtinc.com/public/downloads/full_msup.zip

cantly impact the fluid domain. One exam-ple is the pressurization of an actuator cap,seen below.

To begin, you must first create the fluiddomain volume and mesh. Design Modeleris an excellent choice to do this with its Filland Enclosure utilities. After the volume iscreated, you can use Simulation, CFX-Mesh, or ICEM-CFD to create the mesh.For the novice fluid mesher (of which Iconsider myself), Simulation or CFX-Meshare the best choices. For the power-meshersout there, ICEM is your song.

If you use CFX-Mesh or ICEM, you cancreate named selections/parts out of thesurfaces that interface with the solid andpass them to CFX-Pre. For this example, Ionly looked at the stresses in the cap, so Imade a named selection out of all the sur-faces that match up with the cap.

After you’ve solved the fluid domain, youcan post-process as usual. Once you’reready to solve the structural, you can re-open Design Modeler and prep the geome-try for the structural analysis. For this ex-ample, I removed the pin-holes on theactuator cap, and suppressed out all bodiesexcept for the cap.

Once you bring the geometry into Simula-tion, go through your normal setup (i.e.define material properties, specify mesh

controls, etc.). When you’re ready to loadthe part, simply apply a pressure to all thefaces that match up to your fluid domain. Inthe details window for the pressure, changethe ‘Constant’ to be ‘CFX Results’. You’llthen be prompted to select the result file(filename.res), region, and time step (ifapplicable). The regions will be listed forevery surface that you have applied aboundary condition in CFX. For this exam-ple, I manually applied a wall BC to the FSI

faces (even though all unconstrained faceshave a wall applied to them). This enabledme to easily pick the region of the CFXmodel to pull the pressures from.

After you specify the result file, region, andtime step, Workbench will go off and inter-polate the pressures onto the structural face.You’ll see 3 static isotropic pictures appearbelow the ‘Pressure’ in the tree. These willshow the pressure values interpolated fromthe CFX model. After you solve the model,you’ll see an additional 3 pictures showingthe pressures applied to the structural mod-el. With a decent mesh, you should see theexact same pictures on both the CFX andStructural side.

So now you’re probably thinking, “Well,that’s great, but what does this really do forme?” The short answer is that it allows youto better simulate your environment. In-stead of assuming some sort of pressuredistribution, you can use the actual gradientand better simulate reality. One thing youmust always keep in mind, however, is to

(Full vs. MSUP, Cont.)

(Cont. on Pg. 3.)

(FSI, Cont.)

Page 3: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 3 1-800-293-PADT

September 8, 2006 The Focus Issue 51

make sure you’re applying the proper pres-sure differential across the part. You needto make sure that the pressure calculatedfrom CFX-Post represents absolute pres-sure. If not, you will need to pressurize theouter portion of your model to get the prop-er delta.

The two-way FSI analysis is a bit morecomplicated, requiring ANSYS Classicknowledge in order to setup the Fluid andStructural interfaces (so each solver canpass info back and forth). The setup for thisanalysis should become easier in futurereleases as more ANSYS technologies arebrought underneath the Workbench inter-face.

Advantages &Disadvantages ofPowerGraphics?

Even if you don’t use the PGR file,you can change the default plotting toor from PowerGraphics with the/GRAPHICS command. When usingthis option you can realize the follow-ing advantages:

Faster plotting Curved element edges on quadraticelements

Captures discontinuity from differentmaterials

Displays top and bottom stresses onshells at the same time

Allows use of Query command topick and see results on elements

But there are some drawbacks: Does not work for circuit elements Averaging only uses elements withfaces on the surface

Min and Max values are for surfaceelements only

No element coordinate system plot-ting

To understand how stresses change,look at the example below. To get thestresses on the top surface: in fullgraphics, stress from the green and reddotted element corners are averaged.For PowerGraphics, only the green dot-ted ones are used.

Faster Results from SmallerFiles: The Magic of PGR

By Eric Miller

Did you ever get frustrated by how long itsometimes takes to make a large and com-plex plot in ANSYS? Did you wonder whyANSYS has never done anything to speedup plotting and create smaller results files?Well guess what, they did do somethingyears ago but most users don’t know it isthere or have not made it a habit to use. Thesecret is the PGR file and a set of commandscreated to use it.

Standard and Power GraphicsBefore delving in to the PGR file, it is agood idea to look at why the RST files thatANSYS makes are so big and why plotstake so long. The answer is actually prettysimple and when you think about it, makessense and like a lot of things falls under theold 80-20 rule. Approximately 80% (+/-15% or so depending on your actual needs)of the time users are plotting nodal resultvalues on the external surface of their mod-els. But, sometimes you need to have inter-nal information, you want to do the nodalaveraging differently, you want to look atresults on a per-element basis, or you wantto calculate the quality of your model bylooking at the variation in results from ele-ment to element. For the 20% of the timeyou need to have the result that ANSYScalculated for each element at each node onthe element.

To understand this better think back to whathappens in a solve. The program solves for

the displacement of each node (DOF), thenuses those values at each node in each ele-ment to calculate a stress and strain for thatnode and that element based upon the for-mulation and material properties of the ele-ment. ANSYS stores the results for eachnode in each element in the result file. Asingle nodal value for each node is not cal-culated until the user requests a plot. Whenthis happens, the program must read theelement based nodal results, average overeach element that shares a given node, thenstore the resulting value in memory.

So, the RST file is bigger than one wouldexpect because each element stores resultsfor each node on the element. If a node isshared by six elements, all the stress andstrain information is stored six times! Also,all that data must be read into memory,sorted, averaged by node number, then plot-ted. That takes time and memory and isrepeated for every plot.

So to save memory and time, ANSYS intro-duced the PowerGraphics option manyyears ago. This changed the averaging al-gorithm to only look at nodes on the surfaceof an object when doing the averaging. Thisreduced the amount of memory requiredand speeds up the averaging calculation. Italso, as most of you should have noticed bynow, produces different results (searchpowergraphics at www.xansys.net).

Solving the Time and File IssueAfter introducing Power-

(FSI, Cont.)

(Cont. on Pg. 4.)

Page 4: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 4 1-800-293-PADT

September 8, 2006 The Focus Issue 51

Graphics, the next logical step was to by-pass the RST file and store thePowerGraphics information in a file duringthe solve. Now you have a much smallerfile, your averaging is done only once, andyou need a lot less memory.

To use this file you simply need totell ANSYS to create the PGR fileduring a solve, or if you forgetabout the command and want to doit after you have solved, you cangenerate a PGR file from a resultfile. The easiest way to do this is touse the GUI as shown in Figure 1.From the GUI you can see all theoptions that are available to youthrough the GUI or the PGWRITEcommand. Looking at these com-mands you can see that the PGR fileoffers a lot of control.

First off, you can specify the file-name. This way you can do thingslike create a separate file for eachload step or, if you are using the commandto extract key info from an existing RSTfile, you can create a PGR for each type ofresult data you want to store.

This is often done by changing the settingson the next option, which controls the typeof results to store. Since users usually only

want stress results, choosing only that op-tion can make the file much smaller.

By default, the PGR file only uses averagenodal values on the surface of your model.But if you need the internal information youcan set it with the next option. You can also

tell ANSYS to store unaveraged data,although doing so kind of destroys thepoint of using the PGR file. Lastly,you can tell the program to only storethe internal information that is re-quired for special plots like sectionsand vectors. This is a lot less datathan the internal nodal information.

Although it is much more efficient tocreate the file as part of the solution,

you can always create it from an exist-ing results file in POST1. When doingso you should be aware of a fewthings. First, you need to do a SETand a PGWRITE for each result set

you want to store. Second, the resultsare stored in the current result coordinatesystem (RSYS).

To use your PGR file you need to tell AN-SYS to not use the RST and point it to yoursmaller file with PGRPH,ON. Also, to getat different results sets, you simply use thePGRSET command instead of the SET

command. And, if you want to look at asubset of nodes in the PGR file, use thePGSELE command. That is about it.

How much Better is it?To get a feel for the difference, we dustedoff our handy-dandy generic low pressureturbine disk and blade model (shown to theleft as eye candy for the otherwise dullarticle) and did a static stress solution on itwith PGWRITE turned on. Here are somestatistics: Number of Nodes: 399,870 Number of Elements: 268,507 RST files size: 615,120 MB PGR file size: 50,790 MB Plot RST: 8.3 msec Plot PGR: 5.5 msec

Faster, Smaller is BetterThe first thing that the data above points outis that computers have gotten so fast (we ranon a DUAL Opteron with 8GB of RAM)that the speed difference for a fairly normalmodel is small. But for larger models thedifference becomes significant, and the filessize change is significant.

So, next time you start grumbling aboutshuffling around multi-gigabyte RST files,remember the lowly PGR file and give it atry.

ANSYS CFX: Welcome to CFXBy: J Luis Rosales, PhD

PADT has had the privilege of workingwith the world-class CFD program, CFX,for the past three years. During this time,we have solved small and simple models ofa few thousand nodes to large and complexmodels with many millions of nodes.Before moving onto specific instruction,such as importing a mesh from another tool(a good topic for a future article) let’s startwith a CFX overview.

CFX is composed of three modules similarto the ANSYS architecture: CFX-Pre (apreprocessor), CFX-Solver (the solutionsolver) and CFX-Post (a post processor).These modules are started from a CFX-launcher window. CFX-Pre assumes youalready have a meshed model and does notcreate the mesh. It is basically used todefine the problem, apply boundary condi-

tions and set up a few solver settings.CFX-Solver takes a *.def file created byCFX-Pre and solves the model to produce asolution. CFX-Solve can be as easy asclicking the solve button for a simple serialrun to setting up a large distributed run fora multi-million node model. CFX-Post iseasily one of the best post-processing toolsthat we have used for CFD results. Theregular CFX tutorials do a very nice job ofintroducing users to the features available inCFX-Post; however, some information thatmay be of interest to users may be coveredin future Focus articles. Also, CFX is amore advanced tool than the FLTORANCFD code available in ANSYS. Flotran isof course still available.

So pull out the CFX installation files, get atemp license from your ASD (if necessary)– and poke around the interface of this newmember to the ANSYS family.

Page 5: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 5 1-800-293-PADT

September 8, 2006 The Focus Issue 51

The Focus is a periodic publication of Phoenix Analysis & Design Technologies (PADT).Its goal is to educate and entertain the worldwide ANSYS user community. More informa-tion on this publication can be found at: http://www.padtinc.com/epubs/focus/about

MatWeb now supports the creation of Workbench XMLmaterial files. Visit www.matweb.com to see PADT’sfavorite on-line material repository

Want to know which third party vendors are partneredwith ANSYS, Inc? Visitwww.ansys.com/corporate/partnerships.asp for a sum-maryLinks

Upcoming Training ClassesMonth Start End # Title Location

Sep ‘06 7-Sep 8-Sep 301 Heat Transfer Albq, NM11-Sep 13-Sep 101 Introduction to ANSYS, Part 1 Tempe, AZ18-Sep 21-Sep 802 Advanced APDL & Custom. Tempe, AZ25-Sep 26-Sep 201 Basic Structural Nonlinearities Tempe, AZ27-Sep 28-Sep 204 Adv. Contact and Bolt Pret. Tempe, AZ

Oct ‘06 2-Oct 4-Oct 101 Introduction to ANSYS, Part 1 Albq. NM5-Oct 6-Oct 203 Dynamics Tempe, AZ9-Oct 10-Oct 100 Engineering with FE Analysis Irvine, CA

16-Oct 18-Oct 104 ANSYS Workbench, Intro Albq, NM19-Oct 19-Oct 105 ANSYS Workbench, Struc NL Albq, NM25-Oct 27-Oct 902 Multiphysics for MEMS Tempe, AZ

Nov ‘06 1-Nov 3-Nov 101 Introduction to ANSYS, Part 1 Tempe, AZ8-Nov 9-Nov 107 ANSYS WB DesignModeler Tempe, AZ

13-Nov 14-Nov 301 Heat Transfer Irvine, CA

16-Nov 17-Nov 102 Introduction to ANSYS, Part 2 Tempe, AZ27-Nov 28-Nov 604 Introduction to CFX Tempe, AZ

- China chooses ANSYS as standard in na-tional engineering exam link

- More Great Financial News:Highly Successful Second QuarterName as Fortune Small Business FastestGrowing Companies for Third ConsecutiveYear link

News

There have been lots of improvements to contact in recent years. Sheldon Imaoka shares a greatPowerPoint that summarizes everything at: ansys.net/ansys/papers/nonlinear/contact_tech.pdf

Ever thought about working for ANSYS, Inc? They have some nice jobs open right now. To seewhat is open, visit: ansys.recruitmax.com/candidates/default.cfm?szCategory=joblistResources

Awesome APDL: Writing a 4D Table to a File*dim,tabled,tab4,5,3,2,2

! Loop on each dimension,! filling the table with some data*do,i,0,5 *do,j,0,3 *do,k,1,2 *do,l,1,2 tabled(i,j,k,l)=i+10*j+100*k+1000*l *enddo *enddo *enddo*enddo

! Get a name from the user*ask,tab_name,Enter Tablename,'tabled'!>>>> END OF PART1

! Part 2 works on a table defined! by tab_name and can be! used in a generic way!! dimension size for*get,d_tabi,parm,%tab_name%,dim,x*get,d_tabj,parm,%tab_name%,dim,y

*get,d_tabk,parm,%tab_name%,dim,z*get,d_tabl,parm,%tab_name%,dim,4

k=1! Open a file to create the writingmacro in*cfopen,dtable,mac

! write out the command for! writing stuff*vwrite('*mwrite,%arg1%(0,0,k,l),d_test-%arg2%,txt')! Write out the format info*do,i,1,d_tabj+1 *vwrite('%10.4F '$)*enddo! Done creating macro*cfclose

!Loop on 4th dimension, calling! the macro you made*do,l,1,d_tabl dtable,tab_name,l*endd

This month’s APDL macro is a nice exam-ple of how to write data from a four dimen-sional array to a text file. It was createdbecause a customer needed to interpolatedata based on X, Y, Z position and time.Once they made their table they wanted tostore it in a text file for review.

On first glance a simple task but it turns outthat you need something special because the*MWRITE command only handles threedimensional arrays. So the solution is towrite a 3D array for each of the fourthdimensions.

This clever solution also shows how youcan use the *cfwrite command to have amacro create a macro. This is how you cando text replacement on commands thatdon’t support it outwrite, like the *vwritecommand. In this case, we use it so thename of the table can be a variable.

Enjoy, and notice that we avoided the use ofa tacky Twilight Zone joke...

Page 6: Transient Options: Full vs. MSUP... 1 1-800-293-PADT September 8, 2006 The Focus Issue 51 September 8, 2006 A Publication for ANSYS Users Issue 51 Contents Transient Options: Full

www.padtinc.com 6 1-800-293-PADT

September 8, 2006 The Focus Issue 51