Contents The Focus - Issue 23 A Publication for ANSYS Users Contents Feature Articles l S urface Commands l A NSYS Memory and Disk Space Management l B enchmarking ANSYS On the Web l P ADT’s Rapid Manufacturing Solutions l P ADT’s Enhanced Tech Support Resources l P ADT Support: How can we help? l U pcoming Training at PADT l A bout The Focus m T he Focus Library m C ontributor Information m S ubscribe / Unsubscribe m L egal Disclaimer © 2002, by Phoenix Analysis & Design Technologies, Inc. All rights reserved. http://www.padtinc.com/epubs/focus/common/contents.asp [11/23/2004 3:06:21 PM] Surface Commands The Focus - Issue 23 A Publication for ANSYS Users Surface Commands by Joe Woodward, PADT Until now, to get a cross-sectional view of the results of a model, you could use the /TYPE command, or make sure that you had a cut through your model at the right position. The /TYPE command worked fine for getting plots, but you could not get information about the cross-section. In version 8.0, ANSYS has added a new set of commands for getting plots and information from cross-sections. These Surface commands are used to setup, plot, store, and resume information mapped onto the surface. Here is a brief description and example. The SUCR command creates the surface onto which results will be mapped. Each surface is given an arbitrary name, which is used in subsequent commands like SUSEL that selects individual surfaces. Currently the surfaces can be flat or a sphere of specified radius. Flat surfaces use the working plan and spherical surfaces have their center at the origin of the working plane. There is an argument on the SUCR command for the level of refinement for the created surface. This refinement is a factor of how many interpolation points are created per element that the surface crosses. The SUMAP command maps results from the database onto all of the currently selected surfaces. Each result set is given an arbitrary name so that several result sets can be stored for each surface. The results are mapped in the current results coordinate system and can be any of the quantities available through the PLNSOL command. Surface results are then plotted with the SUPL command, which specifies which surface and result set to plot. You can also choose whether to show just the surface or to include the outline of the selected elements. As shown in figure at right, more than one surface can be shown at a time, which, for me, beats using the /TYPE command. http://www.padtinc.com/epubs/focus/2003/0023_1211/article1.htm (1 of 5) [11/23/2004 3:06:45 PM] Surface Commands The Focus - Issue 23 A Publication for ANSYS Users But wait, it gets better& ANSYS has stepped up to answer the users(cid:25) requests for usable cross-sections. When the surface is created with the SUCR command, data about the interpolation points are stored automatically. The coordinates of each point, the normal vector of the surface, and the discritized area at the point are all stored. As results are mapped to the surface, they are stored with this data and can be accessed by several other commands. The data can be dumped to an array variable using the SUGET command, which by the way, initializes the array so that no *DIM command is needed. The data can also be accessed directly by the SUCALC, SUVECT, and SUEVAL commands. The SUCALC command creates a new mapped result on the surface by performing mathematical functions on two other mapped quantities, much like the *VOPER command does with arrays. This is shown in the example below. The SUVECT command is used to perform vector calculation on the surface data. The cross product, for example, can be used to find the flow normal to the surface in a Flotran model. The last command used to manipulate the data is SUEVAL. This command will integrate, average, or sum the given data over the surface. This can be used to find the force and moment through an arbitrary cross-section as I have done in the example below. The amount of data, and the accuracy of the SUEVAL integration function, depends on both the refinement value given in the SUCR command and on the density of the mesh in the area of interest. On a sample problem comprised of a thick walled tube with internal pressure and a 100 lb axial force, the calculated cross-section force varied greatly with the number of elements through the thickness. The results of the integration of the axial stress are listed in Table 1. Notice that there is a greater dependency on the mesh density than there is on the refinement level. However, the example at the end of this http://www.padtinc.com/epubs/focus/2003/0023_1211/article1.htm (2 of 5) [11/23/2004 3:06:45 PM] Surface Commands The Focus - Issue 23 A Publication for ANSYS Users article, of an L-shaped beam under load, delivered very accurate force and moment calculations despite the mesh density. So it is always a good idea to refine the mesh density and run the surface calculations again to assure proper convergence of the integration operation. Table 1. Calculated force value. The correct value is 100. Once surfaces are setup, they can then be written to a file with the SUSAVE command. This stores all the surface geometry information and any result sets that have been mapped to the surfaces. This information can then be reloaded into the database using the SURESU command. You can resume the surface information without having the original model loaded. This will allow you to share cross-section plots and data without having to send the whole model. I have been quite impressed with the functionality and forethought that ANSYS put into this set of commands. They should allow you to have greater plotting and model checking flexibility. Play with them and explore their potential. It is definitely worth the short amount of time that it takes to learn them. !############# L-Shaped Beam Example ########################## /prep7 b=1 !beam section width h=1 !beam section height nelem=2 !Number of elements through the thickness mp,ex,1,30e6 mp,nuxy,1,.3 wpcs,1,0 block,-b/2,b/2,-h/2,h/2,0,10 !build horizontal (cid:24)beam(cid:25) block,-b/2,b/2,-h/2,h/2,10,10+h !build corner section block,-b/2,b/2,h/2,10,10,10+h !build vertical section nummrg,kp http://www.padtinc.com/epubs/focus/2003/0023_1211/article1.htm (3 of 5) [11/23/2004 3:06:45 PM] Surface Commands The Focus - Issue 23 A Publication for ANSYS Users et,1,95 !High order solid hex elements esize,min(b,h)/nelem vsweep,all asel,s,loc,y,10,,,1 !Area at the top of vertical section f,all,fz,100/ndinqr(0,13) !100 lb force in the Z direction csys,0 asel,s,loc,z,0,,,1 !Area the end of horizontal section d,all,uz,0 !Symmetry conditions nsel,r,loc,x,-b/2 d,all,ux,0 d,ndnext(0),uy,0 save /solu eqslv,pcg alls solve /post1 wpcs,1,0 !Position the work plane wpoff,,,2 sucr,cut1,cplane,3 !Create a planar surface (cid:28)CUT1(cid:29) using !refinement of 3 sumap,sz,s,z !Map Z-direction stress and name it SZ supl,cut1,sz,1 !Plot result set (cid:24)SZ(cid:25) on surface (cid:24)CUT1(cid:25) sueval,f1,sz,intg !Get axial force by integrating axial stress sueval,a1,da,sum !Get cross-section area by summin !the dA geometry data sucalc,szadj,sz,exp,,1,,-f1/a1 !Create (cid:24)pure moment(cid:25) results !by subtracting axial stress suget,cut1,szadj,data,1 !Dumps the (cid:24)szadj(cid:25) result set !from surface cut1 to an array !called (cid:24)data(cid:25). You can used the !*Vxx set of commands to find !where (cid:24)szadj(cid:25) is zero to find http://www.padtinc.com/epubs/focus/2003/0023_1211/article1.htm (4 of 5) [11/23/2004 3:06:45 PM] Surface Commands The Focus - Issue 23 A Publication for ANSYS Users !the neutral axis. fyoff=0 !In my case, this should be !the neutral axis. sucalc,yc,gcy,exp,,1,,-fyoff !Use the EXP function to add !constants to the results. sucalc,mom1,sz,mult,yc sueval,zmom,mom1,intg !Integrates (yc*sz) to get moment sucalc,ysquare,yc,exp,,2 sueval,I1,ysquare,intg !Integrates yc^2 to get the !moment of inertia suget,cut1,yc,cut1data,1 !Dumps global Y coord. to array *VABS,0,1 *vscfun,c,max,cut1data(1,8) !Finds the max fiber distance. !This would need to be adjusted !if section is not on the origin. poa=f1/a1 !Hand calculation for P/A mcoi=zmom*c/I1 !Hand calculation for Mc/I http://www.padtinc.com/epubs/focus/2003/0023_1211/article1.htm (5 of 5) [11/23/2004 3:06:45 PM] ANSYS Memory and Disk Space Management The Focus - Issue 23 A Publication for ANSYS Users ANSYS Memory and Disk Space Management by Ted Harris, PADT The way that ANSYS utilizes memory has been enhanced over the last few releases. In the old days, we specified workspace and database memory allocations (or accepted the defaults) and those are the amounts of memory ANSYS used for the entire session. Starting around release 5.5, ANSYS started to dynamically allocate memory under certain circumstances. Normally this was during model solution, for certain solvers. ANSYS still does dynamic memory allocation, but now there are more options in implementing this. We’ll describe the different options and how they work. First, some terminology. Total Workspace. This is the total amount of memory that ANSYS can use, whether it be for the nodes and elements, loads, results database, as well as memory needed to perform Boolean operations or solution calculations. Database Space. This is a subset of the total workspace that has been designated for items contained in the ANSYS database. This includes nodes, elements, loads, geometry, and also includes results data once we issue the SET command in the General Postprocessor. Database. This is the in-memory data that describes your model’s nodes, elements, geometry, loads, material properties, etc. This is what gets written to the hard disk when you perform the SAVE operation. Database File or .db File. This is the file that resides on your hard disk after you perform the SAVE operation. It is a “snapshot” of the state of your model when you performed the save. Scratch Space. Sometimes called heap space. This is the amount of memory that is the difference between the total workspace and the database space. This is the memory available for calculations, such as Boolean operations in the preprocessor, as well as solution calculations. http://www.padtinc.com/epubs/focus/2003/0023_1211/article2.htm (1 of 7) [11/23/2004 3:06:45 PM] ANSYS Memory and Disk Space Management The Focus - Issue 23 A Publication for ANSYS Users Page File. In regards to running ANSYS, this is the ANSYS-created jobname.page file in the working directory on your hard disk. If it has nonzero size, it is being used as virtual memory to increase the database space memory over what has been specified. Note that there may also be operating system usage of a page file (see system page file ), which is a different concept that happens to share the same terminology. System Page File. This is the computer operating system’s virtual memory. It is a portion of your hard disk that has been set aside for the operating system to use as supplemental memory above and beyond the physical amount of RAM in your computer. There are two scenarios we’ll look for utilizing memory in ANSYS. Scenario 1. Explicitly specifying workspace and database space. This is done either on the command line using –m and –db, or from the ANSYS launcher by specifying values in the Total Workspace and Database fields. The default values for ANSYS 7.1 and 8.0 are shown in Table 1. Version Database SpaceTotal Workspace ANSYS 7.1 Windows32 MB 64 MB ANSYS 7.1 Unix 64 MB 128 MB ANSYS 8.0 Windows256 MB 512 MB ANSYS 8.0 Unix 256 MB 512 MB Table 1. ANSYS default memory allocations. We can specify our own settings to change the values from the defaults. Note that since the database space will always be a subset of the total workspace, the value specified for the database must be less than that specified for the total workspace. As a rule of thumb, we normally recommend making the total workspace at least twice the value specified for the database. So how does a user know when to use the default settings and when to specify explicit values? Two main considerations come into play. First, are we solving, or are we pre- or post-processing? If we are just solving, then we can live with a small value for the database space, and therefore maximize the amount of memory available as scratch space. It’s scratch space that will be most used for solving. On the other hand, if we’re doing mostly pre- or post-processing, we’ll be accessing the database space a lot, so we’ll want to make sure we specify enough database space that ANSYS won’t create its jobname.page file. The .page file tends to really slow down our http://www.padtinc.com/epubs/focus/2003/0023_1211/article2.htm (2 of 7) [11/23/2004 3:06:45 PM] ANSYS Memory and Disk Space Management The Focus - Issue 23 A Publication for ANSYS Users plotting. If you’re working interactively and you see the message, Note: ANSYS page file being use. This is your cue to save what you’re doing, get out of ANSYS and get back in with a larger specification for the database space. How do you know how large of an amount to specify? You want the amount of memory allocated for the database space to be larger than the hard disk space that will be taken up when you save the database. In other words, if your .db file takes up 120 MB on your hard disk, you’ll want to specify more then 120 MB for the database space. If you don’t, ANSYS will create its jobname.page file and your plotting will get very slow. Further, if you are doing postprocessing, your results will also be stored in the in-memory database. The results typically take up the same amount of room in memory as the “preprocessing”' database. This means that when you’re postprocessing you should make the database space allocation at least twice the amount of space that the .db file takes up on the hard disk. Otherwise, the .page file will be created and your plotting will bog down. One thing to be aware of is that although ANSYS cannot increase the amount of memory allocated to the database space, it can and does dynamically allocate the total workspace, if necessary (unless one uses the –f option discussed below). This increased allocation may happen during Boolean operations or during a solution. If not enough memory is available to the solver, for example, ANSYS will attempt to allocate more, including the memory available in our RAM as well as system virtual memory. ANSYS cannot dynamically allocate forever, though, as it is limited by the amount of contiguous memory available, as well as a system limitation. The amount of memory available depends on how much RAM we have, how much virtual memory is specified on our system, and how much memory is being utilized by the operating system and other applications. The system limitation for ANSYS memory allocation on most Windows systems is 1,700 MB (and only 1,400 MB are available via the –m option). This means that no matter how much RAM and virtual memory you have, ANSYS cannot allocate more 1.7 GB of total workspace. The exception to this limit is with Windows 2000 Server and Windows XP when there is 4 GB of physical RAM on the computer. When this is the case, there is a 3 GB operating system switch that can be set that will allow ANSYS to address 3 GB for the database. Table 2 shows ANSYS total workspace limits for various operating systems. http://www.padtinc.com/epubs/focus/2003/0023_1211/article2.htm (3 of 7) [11/23/2004 3:06:45 PM] ANSYS Memory and Disk Space Management The Focus - Issue 23 A Publication for ANSYS Users Hardware Platform Maximum -m Value Compaq Alpha 16,383 MB HP PA8000 32-bit 1,880 MB HP PA8000 64-bit 16,383 MB HP Itanium IA64 16,383 MB IBM RS/6000 32-bit 2,047 MB IBM RS/6000 64-bit 16,383 MB SGI 32-bit 2,047 MB SGI 64-bit 16,383 MB Sun UltraSPARC 32-bit 2,047 MB Sun UltraSPARC 64-bit 16,383 MB Intel IA-32 Linux 2,040 MB Intel IA-32 Windows 2000 1,700 MB Intel IA-32 Windows NT 4.01,700 MB Table 2. ANSYS memory limits for various operating systems. Scenario 2. Using the default memory model. Starting with version 6.1, ANSYS has implemented the default memory model, which attempts to take some of the difficulty out of memory allocation, and it attempts to allow more memory to be utilized for scratch space by reducing the dependency on the availability of contiguous blocks of memory. The default memory model starts with the default settings (see Table 1) and will dynamically allocate total workspace as needed. Memory that we explicitly specify for the workspace (-m) must be in one contiguous block. Whereas if we allow ANSYS to dynamically allocate it, the memory does not have to be in one contiguous block. Also, with the default memory model we’re not tying up memory allocated to the workspace that may be too big. This means we’ll have more memory available to other applications or the ANSYS help system. The big drawback of the default memory model in versions 6.1 through 7.1 is that the amount of memory allocated to the database space remains fixed at 32 MB. That means that if you need more than that for pre- and post-processing a model, ANSYS will create its jobname.page file and your plotting will slow down dramatically. For this reason, we at PADT recommend the default memory model for solving, but not for pre- and post-processing, unless you’re working with a fairly small model for which the database space never exceeds 32 MB. http://www.padtinc.com/epubs/focus/2003/0023_1211/article2.htm (4 of 7) [11/23/2004 3:06:45 PM]
Description: