## Evaluating Stresses and Forces in Threaded Fasteners with ANSYS Mechanical

Fasteners are one of the most common and fundamental engineering components we encounter.
Proper design of fasteners is so fundamental, every Mechanical Engineer takes a University course in which the proper design of these components is covered (or at least a course in which the required textbook does so).

With recent increases in computational power and ease in creating and solving finite element models, engineers are increasingly tempted to simulate their fasteners or fastened joints in order to gain better insights into such concerns as thread stresses

In what follows, PADT’s Alex Grishin demonstrates a basic procedure for doing so, assess the cost/benefits of doing so, and to lay the groundwork for some further explorations in Part 2, which can now be found here.

## Eigenvalue Buckling and Post-buckling Analysis in ANSYS Mechanical

As often happens, I learned something new from one of my latest tech support cases. I’ll start with the basics and then get to what I learned. The question in this case was, “Can I use the mode shape as a starting position for an Eigenvalue Buckling?” My first thought was, “Sure, why not,” with the idea being that the load factor would be lower if the geometry was already perturbed in that shape. Boy was I wrong.

For post-buckling analysis, ANSYS 17.0 or later lets you take the mode shape from a linear Eigenvalue Buckling analysis and feed it to another Static Structural analysis Model cell as the initial geometry. We use to have to do this with the UPCOORD command in MAPDL. Now you just drag the Solution cell of the Eigenvalue Buckling analysis on to the Model cell of a stand-alone Static Structural system. Also connect the Engineering Data cells.

The key is to look at the Properties window of the Solution cell of the buckling analysis. In the above picture, that is cell B6. (Right-click and hit Properties if needed.) This lets you choose the mode shape and the scaling factor for the new shape going into the structural analysis. Generally it will be Mode 1.

You can then apply the same BCs in the second structural analysis, but make the force be the buckling load of F*Load Factor (l), where F is your load applied in the buckling analysis. Make sure that Large Deflection is turned on in the second structural analysis. This will give you the deflection caused by the load just as buckling sets in. Increasing the load after that will cause the post-buckling deflections.

In this case, F is 10 lb, and load factor for the first mode (l) is 23.871, so the load at load step 1 is 238.71 lb, and load step 2 is 300 lb. You can see how there is very little deflection, even of the perturbed shape, up to the buckling load at load step 1. After that, the deflection takes off.

So what did I learn from this? Well there were two things.

First, doing another Eigen Value Buckling analysis with the perturbed shape, if perturbed in buckling mode shape 1, returns the same answers. Even though the shape is perturbed, as the post-buckling structural analysis shows, nothing really happens until you get to that first buckling load, which is already for mode 1. If the model is perturbed just slightly, then you have guaranteed that it will buckle to one side versus the other, but it will still buckle at the same load, and shape, for mode 1. If you increase the scale factor of the perturbed shape, then eventually the buckling analysis starts to get higher results, because the buckling shape is now finding a different mode than the original.

The second thing that I learned, or that I should have remembered from my structures and dynamics classes, a few <cough>23<cough> years ago, was that buckling mode shapes are different than dynamic mode shapes from a modal analysis with the same boundary conditions. As shown in this GIF, the Modal mode shape is a bit flatter than the buckling mode shape.

After making sure that my perturbed distances were the same, the scale factor on the modal analysis was quite a bit smaller, 2.97e-7 compared to .0001 for the Eigenvalue scale factor. With the top of the column perturbed the same amount, the results of the three Eigenvalue Buckling systems are compiled below.

So, now you know that there is no need to do a second Eigenvalue buckling, and hopefully I have at least shown you that it is much easier to do your post-buckling analysis in ANSYS Workbench than it used to be. Now I just have to get back to writing that procrastination article. Have a great day!

## World View talks about ANSYS usage on design of their Stratospheric Balloon Vehicles

We were pleased to see that PADT customer and ANSYS power users World View Enterprises were featured in the latest issue of ANSYS Advantage Magazine.

This is such a cool application of technology and a great example of ANSYS usage.  You need to read the article, but to entice you a bit:

They are using high-altitude balloons to launch what they call Stratollites, instead of satellites.  They can lift large payloads up to 95,000 and leave them up for weeks or months. As you can imagine, the loads a vehicle like that sees are extreme, and weight is at a premium.  A perfect application for ANSYS.

## Press Release: On-Demand High Performance Cloud Computing for Today’s Most Demanding Workflows Offered by PADT in Partnership with Nimbix

Sometimes if you look hard enough, you find what you need.  Ever since people started talking about running large simulation models in the “cloud” our engineers here at PADT have been looking for a good solution. We even offered our own service, and although it was fast and easy to use, we could not make it big enough. Then along comes Nimbix. And they nailed it.

First we asked, are they running on real HPC hardware, not souped up web servers with virtual machines on them? Yes. We found bare metal hardware striped down to fighting weight that is optimized for running simulation.

Then we asked, Is it easy to use or do I have to jump through hoops to just get a job running?  Indeed it was easy and powerful. We just wanted to submit jobs and found that the JARVICE™ interface does so much more to configure, setup, submit, and monitor even the most complex parallel solves.

OK, this looked good, but the real test is do we have access to whole machines or is this just a timesharing system with a great interface?  Turns out it is not.  It is true cloud-based high-performance computing.

We think we found what we were looking for, but we have been burned before.  So we did what any simulation engineer would do, we pounded on it with massive ANSYS FLUENT, Mechanical, and HFSS runs.  We knew it was real when we were monitoring a CFD run on a mobile phone from a coffee shop in-between customer visits.

We liked it so much that we asked if we could partner with them to offer it to our customers. And that is where we are today with this press release.

PADT is proud to announce that we are able to provide our customers with on-demand HPC resources that are fast, easy to use, and cost-effective.  If you are a simulation user who needs to run large jobs, access surge capacity, or just solve faster, Nimbix is the answer. And PADT is here to help determine the right configuration and guide you through the process.

Please read the press release below for more details on what we are doing.

This video explains Nimbix well:

You can also learn more about our experience by watching a free webinar we recorded where we shared our experience using this service: www.brighttalk.com/webcast/15747/330189

Please find the official press release on this new partnership below and here in PDF and HTML

If you have any questions about high-performance computing for simulation, either with local hardware or compute resources in the cloud, reach out to info@padtinc.com or call 480.813.4884.

# On-Demand High Performance Cloud Computing for Today’s Most Demanding Workflows Offered by PADT in Partnership with Nimbix

Nimbix Cloud Provides Access to ANSYS Applications Through Cloud Supercomputing, Removing the Requirement of Expensive Infrastructure and Hardware

TEMPE, Ariz., July 26, 2018 ─ Understanding the need for easy, affordable and reliable access to supercomputing capabilities, PADT has partnered with Nimbix to provide High-Performance Computing (HPC) in the cloud. The Nimbix Cloud is the industry’s first true Software-as-a-Service (SaaS) supercomputing cloud and will provide PADT’s customers with on-demand, mobile access to more than 15 ANSYS applications without needing expensive hardware and complex infrastructure to support it. Current ANSYS applications available with Nimbix are listed here.

“As long-time simulation users, PADT has always wanted to leverage the cloud for running ANSYS models, but no one could support it before Nimbix,” said Bob Calvin, manager, Simulation Solutions, PADT. “The Nimbix Cloud gives our customers a flexible way to run large models from anywhere and accommodate surge capacity when it is needed.”

The Nimbix Cloud is powered by the JARVICE™ platform, which Nimbix purpose-built from the ground-up to accommodate the most demanding workflows by providing superior performance, capabilities, and ease of use. PADT customers can manage start-up, execution, completion and notifications on full-featured ANSYS applications in the cloud, and send their data from any device including desktop, tablet and smartphones.

“With its global recognition as a provider of numerical simulation and product development, PADT is the ideal partner to leverage the JARVICE platform internally and as an offering to its customers,” said Chuck Kelly, senior vice president, Sales, Nimbix. “Nimbix high-performance computing in the cloud provides a competitive advantage by allowing users to more easily solve complex design problems and then send the data anywhere to turn results into actionable insights.”

“We use Nimbix frequently at PADT because of its reliability and performance when running ANSYS software in the cloud,” said Manoj Mahendran, lead application engineer, PADT. “The platform has allowed us to easily check and submit simulation test results off-site and on-the-go, providing more flexibility to our simulation teams.”

Nimbix Cloud is available today, and PADT invites customers to learn more about the challenges, tools, and mindset needed to run simulation in the cloud, and how the Nimbix platform can be an effective solution, in a webinar on August 8, 2018. To register for the webinar, please visit https://www.brighttalk.com/webcast/15747/330189.

About Phoenix Analysis and Design Technologies

Phoenix Analysis and Design Technologies, Inc. (PADT) is an engineering product and services company that focuses on helping customers who develop physical products by providing Numerical Simulation, Product Development, and 3D Printing solutions. PADT’s worldwide reputation for technical excellence and experienced staff is based on its proven record of building long-term win-win partnerships with vendors and customers. Since its establishment in 1994, companies have relied on PADT because “We Make Innovation Work.” With over 80 employees, PADT services customers from its headquarters at the Arizona State University Research Park in Tempe, Arizona, and from offices in Torrance, California, Littleton, Colorado, Albuquerque, New Mexico, Austin, Texas, and Murray, Utah, as well as through staff members located around the country. More information on PADT can be found at www.PADTINC.com.

# # #

## Can ANSYS Mechanical Handle My Required Modeling Precision?

Sometimes you need to use ANSYS Mechanical to model a big part as a way to determine a very small deflection.  The most common situation where this happens is optics. A lens that is around a meter in diameter may have nanometer distortions from mechanical or thermal loads that impact the optics. A customer asked if ANSYS Mechanical can handle that.  Please find Alex’s interesting and in-depth response in the attached presentation.   There is theory that explains the situation, then an example of how to determine if you can get the information you need, followed by advice on how to view the results.

## Updates and Enhancements in ANSYS Mechanical 19.1 – Webinar

Don’t miss this informative presentation – Secure your spot today!
Register Here

If this is your first time registering for one of our Bright Talk webinars, simply click the link and fill out the attached form. We promise that the information you provide will only be shared with those promoting the event (PADT).

You will only have to do this once! For all future webinars, you can simply click the link, add the reminder to your calendar and you’re good to go!

## 10 Great New Features in ANSYS Mechanical 19.0 and 19.1

ANSYS Mechanical version 19.0 has been available since late January 2018, while version 19.1 was released in May. If you haven’t had a chance to check them out, we thought it would be helpful to list what we see as 10 of the top newest features. We’ll start with five new features from version 19.0 and will then round it out with five from version 19.1.

# ANSYS Mechanical 19.0

## 1. 4 Cores HPC Solving with No Additional Licensing

Previously, you were limited to solving on 2 cores at a maximum without having additional ANSYS HPC or HPC Pack licenses. That limit has been raised to 4 cores at 19.0.
To utilize the cores while solving, from the Solution branch in Mechanical click on the Tools menu, then Solve Process Settings. Click the Advanced button. Set the Max number of utilized cores to 4 and click OK.

2. Topology Optimization Includes Inertial Loads

Topology optimization became a native option in ANSYS Mechanical in version 18.0. Topology optimization allows us to perform studies in which we preserve stiffness while reducing weight, for example. Since inertia loads are now supported in a topology optimization, one type of problem we can now solve is starting with geometry that has a mix of an inertial load (gravity in the downward direction) along with additional loading such as forces or pressures.

Solving the topology optimization and moving to the verification step we can see the optimization results (shape and contour results plot) for the combined loading.

The ability to include inertia loads adds quite a few more problems that can be considered for topology optimization.

## 3. Small Sliding Contact

The idea here is that if we have confidence that the contact and target elements within a contact region will not slide very much, we can turn on the small sliding assumption. This speeds up the computations because less checking is needed for the contact elements during the solution. It’s activated in the Details view for one or more contact regions. We’ve seen some marginal improvements in solution times for a couple of test models. It’s clearly worth trying this if it applies to your simulations.

## 4. Element Birth and Death

We now no longer have to use APDL command objects to incorporate element birth and death. If you’re not familiar with what this is, it’s the ability to selectively deactivate and/or activate portions of the finite element model to simulate forming operations, assembly, etc. Further, the implementation is fantastic in that unlike with the old MAPDL implementation, we no longer have to manually keep track of which elements have been ‘killed’ or made ‘alive’. The postprocessing in Mechanical 19.0 automatically displays only elements that are alive for a given results set.
Here is how it is implemented in the Mechanical tree, under the analysis type branch:

The entities to be killed or made alive can be selected by geometry or Named Selections. There is a handy table that shows the alive or dead status for each Element Birth and Death object once they are setup:

This animation shows a temperature results plot and demonstrates how the killed elements are made alive and automatically displayed when postprocessing:

## 5. Clipboard Tool

This new menu pick gives us an improved method for tasks such as selecting multiple faces. Rather than having to carefully pick all of them at once or use a combination of named selections, we can now simply select the faces that are easy to pick, add them to the clipboard, rotate the model, select more faces now that they are in view, etc.

Once all the desired faces are in the Clipboard, we simply use the Select Items in Clipboard dropdown and we can now assign a load or mesh control, etc. to the desired faces.

Note there are convenient hot keys for Adding to, Removing from, and Clearing the clipboard, shown in the screen captures of the menu dropdowns above.

# ANSYS Mechanical 19.1

## 6. Granta Design Sample Materials

Version 19.1 adds a whole new set of sample materials from Granta. To access them, open up Engineering Data, click on the Engineering Data Sources button, and then click on the Granta Design Sample Materials button. This adds a lot more sample materials than have been available in Engineering Data previously.

## 7. Materials folder in Mechanical

You’ll see a new branch in the tree in Mechanical 19.1: Materials. All materials that are part of your Engineering Data set will show up in this branch. For each material defined, we can click on the Material Assignment button or right click as shown here:

One the new Assignment branch is created for a material, we can then select the bodies for which that material should be assigned. Each material has its own color which can be changed in Engineering Data if so desired.

Important note for Mechanical APDL command users: Assigning material properties using the Materials branch results in all parts with the same material property having the same MAPDL material number. This is different from prior behavior in Mechanical in which each part in the geometry tree had its own material number identified with the ‘magic’ parameter name matid. Parameter matid now no longer is unique for each part if materials area assigned using the Materials branch. There is a new ‘magic’ parameter named typeids which identifies the element type number for each part in the tree. This new parameter is actually a 1x1x1 array parameter rather than a scalar parameter, so to make use of it in a command snippet we need to add the dimension (1) to the parameter name, like this:

thtest1=typeids(1)

or

et,typeids(1),solid65

## 8. Result Tracking During Solution

A new, useful capability is to be able to view a result item on a body, while the solution is running. You can now insert certain results items under Solution Information and view the status of the results while the solution is progressing. If birth and death is employed it will even display just the elements that are alive as the solution progresses. Here is an example of a temperature plot on a body while a transient solution is in progress:

## 9. Save Animations to .wmv and .mp4 Formats

We now have two new options besides the old .avi format for exporting animation files. The .mp4 and .wmv formats both tend to produce smaller files than .avi format. When you click on the Export Video File button the new options are available in the dropdown:

## 10. Solution Statistics Page

Finally, there is a new Solution Statistics page, available under Solution Information when a solution has completed. This is a quick and easy way to view performance information from your solution and helps determine if more cores or more RAM could be beneficial in future solutions of the same model. Here is an example:

# Conclusions

These are just a few of the enhancements that have been implemented in versions 19.0 and 19.1. These should help you be more productive with your solutions in ANSYS Mechanical as well as increase your capacity for simulating reality, and creating new geometry when it comes to topology optimization.

## Extracting Relative Displacements in ANSYS Mechanical

A recurring theme in ANSYS Technical Support queries involves the separation of rigid-body from material deformations without performing an additional analysis. Many users simply assume this capability should exist as a simple post-processing query(or that in any case, this shouldn’t be a difficult operation). “Rigid-Body” displacements implies a transient dynamic analysis (as such displacements should not occur in static analyses), but as we’ll see, there are contexts within static structural environments where this concept DOES play an important engineering role. In static structural contexts, such rigid-body motion implies motion transmitted across multiple-bodies. There are two important and loosely related contexts we’ll look at; zero strain rotations of the CG and those rotations combined with strain-based displacement.

The following presentation explains the issues including the math behind it, offers solutions including useful APDL marcros, and then gives examples.

The models and macros used are in this zip file: PADT-ANSYS-Extract-Dsp-Files

Find this interesting? This is just a small sample of PADT deep and practical understand of the entire ANSYS Suite of products.  Please consider us for your training, mentoring, and outsourced simulation services needs.

## Save, Save, Save! Setting up a Save after Solution in ANSYS Mechanical

NOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!

Is this the reaction you have when you come in on Monday morning, and realize that another Windows update has, once again, rebooted your PC before you had a chance to save the 30-hour run that should have finished over the weekend? There a Workbench setting that can help relieve some of that stress.

The “Save Project After Solution” option will save the entire project as soon as the solution has finished. So when your model runs for 30 hours over the weekend, it gets saved before a Windows update shuts everything down.  These settings are persistent, so once you’ve changed them to ‘Yes’, then you are all set for next time. You just need to make sure that you change them for each ANSYS version if you have more than one installed.

Now on to my next blog… “How to recover a run if you forgot to change the settings above.” (Grumble Grumble!)

## Estimating Structural Response to Random Vibration in ANSYS Mechanical: Reaction Forces

One of the key outputs from any random vibration analysis is determining the response of the object you are analyzing in terms of reaction forces.  In the presentation below. Alex Grishin shares the theory behind getting accurate forces and then how to do so in ANSYS Mechanical.

## Using External Data in ANSYS Mechanical to Tabular Loads with Multiple Variables, Part 2

ANSYS Mechanical is great at applying tabular loads that vary with an independent variable. Say time or Z.  What if you want a tabular load that varies in multiple directions and time. In part one of this series, I covered who you can use the External Data tool to do just that. In this second part, I show how you can alternatively use APDL commands added to your ANSYS Mechanical model to define the tabular loading.

# Guest Blogger

We are pleased to publish this very useful post from Nicolas Jobert from Synchrotron SOLEIL in France. Nicolas is a Mechanical Engineer with more than 20 years of experience using ANSYS for engineering design and analysis in academia and industry. He currently is Senior Mechanical Engineer at Synchrotron SOLEIL, the French synchrotron radiation facility. He also teaches various courses on Design and Validation in the field of structural and optomechanics. He graduated from the Ecole Centrale Marseille, France, and is a EUSPEN member.

## As Time Goes By

Do you remember the moment you first heard about ANSYS introducing APDL Math?

I, for one, do, and I have a vivid memory of thinking “Wow, that can be a powerful tool, I’m dead sure it won’t be long before an opportunity arises and I’ll start developing pretty useful procedures and tools”. Well, that was half a decade ago, and to my great shame, nothing quite like that has happened so far. Reasons for this are obvious and probably the same for most of us: lack of time and energy to learn yet another set of commands, fear of the ever present risk of developing procedures that are eventually rejected as nonstandard use of the software and therefore error-prone (those of you working under quality assurance, raise your hand!), anxiety of working directly under the hood on real projects with little means to double check your results, to name a few.

That said, finally an opportunity presented itself, and before I knew it, I was up and running with APDL Math. The objective of this article is to showcase some simple yet insightful applications and hopefully remove the prevention one can have regarding using these additional capabilities.

For the sake of demonstration, I will begin with a somewhat uncommon analysis tool that should nevertheless ring a bell for most of you, that is: modal analysis (and yes, the pun is intended). You may wonder what is the purpose of using APDL Math to perform a task that is a standard ANSYS capability since say revision 2.0, 40 years ago? But wait, did I mention that by modal analysis, I mean thermal modal Analysis?

## Thermal Modal Analysis at a Glance

Although scarcely used, thermal modal analysis is both an analysis and a design validation tool, mostly used in the field of precision engineering and or optomechanics. Specifically, it can serve a number of purposes such as:

Q: Will my system settle fast enough to fulfill design requirements?
A: Compute the system Thermal Time Constants

Q: Where should I place sensors to get information rich / robust measurements?
A: Compute Thermal modes and place your sensors away for large thermal gradients

Q: Can I develop a reduced model to solve large transient thermal mechanical problems?
A: Modal basis allows for the construction of such reduced problem effectively converting a high-order coupled system to a low order, uncoupled set of equations.

Q: How to develop a reduced order state-space matrices representation of my thermal system (equivalent to SPMWRITE command)?
A: Modal analysis provides every result needed to build those matrices directly within ANSYS.

Although you might only be vaguely familiar with many or all of those topics, the idea behind this article is really to show that APDL Math does exactly what you need it to do: allow the user to efficiently address specific needs, with a minimal amount of additional work. Minimal? Let’s see what it looks like in reality, and you will soon enough be in a position to make your own opinion on the matter.

## Thermal Modal Analysis using APDL Math

To begin with, it is worth underlining the similarities and differences between structural (vibration) modes and thermal modes.

Mathematically, both look very much the same, i.e. modes are solutions of the dynamics equation in the absence of forcing (external) term:

 Domain Equation solved Terms Explained Structural [K] is the stiffness matrix [M] is the mass matrix Thermal [K] is the conductivity matrix [C] is the capacitance matrix

Now, the fundamental difference is that the eigenvalues have completely different physical interpretations (This is a direct consequence of the fact that dynamical systems are 2nd order systems, whereas thermal systems a 1st order systems. While after being disturbed the former will oscillate around equilibrium position, the latter will return to its initial state via exponential decay. Mind you, there is no such thing as thermal resonances!) :

• Structural : λ=ω², i.e. the square of a circular frequency
• Thermal: λ=1/τ, i.e. the inverse of time constant

No big deal, right? Hence, the APDL Math code for Thermal Modal Analysis should be a straightforward adaption of the original. As it turns out, the modifications are quite small. Below is a table comparing input codes to perform both type of analyses, using APDL Math.

 Structural Thermal ```! Setup Model … ! Make ONE dummy transient solve ! to write stiffness and mass ! matrices to .FULL file /SOLU ANTYPE,TRANSIENT TIME,1 WRFULL,1 SOLVE ! Get Stiffness and Mass *SMAT,MatK,D,IMPORT,FULL,,STIFF *SMAT,MatM,D,IMPORT,FULL,,MASS ! Eigenvalue Extraction Antype,MODAL modopt,Lanb,NRM,0,Fmax *EIGEN,MatK,MatM,,EiV,MatPhi ! No need to convert eigenvalues ! to frequencies, ANSYS does ! it automatically ! Done !``` ```! Setup Model … ! Make TWO dummy transient solve ! to separately write conductivity ! and capacitances matrices to .FULL file /SOLU ANTYPE,TRANSIENT TIME,1 NSUB,1,1,1 TINTP,,,,1 WRFULL,1 ! Zero out capacitance terms … SOLVE ! Get Conductivity Matrice *SMAT,MatK,D,IMPORT,FULL, Jobname.full,STIFF ! Restore capacitance and zero out ! conductivity terms … SOLVE ! Get Capacitance Matrice *SMAT,MatC,D,IMPORT,FULL,,STIFF ! Eigenvalue Extraction Antype,MODAL modopt,Lanb,NRM,,0,1/(2*PI*SQRT(Tmin)) *EIGEN,MatK,MatC,,EiV,MatPhi ! Convert Eigenvalues for Frequency ! to Thermal time Constants ! *do,i,1,EiV_rowDim Eiv(i)=1/(2*PI*Eiv(i))**2 *enddo ! Done !```

The only data requested from the users is the number of requested modes (NRM) as well as the upper frequency (or for that matter, the shortest time constant of interest). Also, note that in the thermal case, one needs to perform two separate dummy analyses to store the conductivity and capacitance matrices, since internally those are merged into an equivalent stiffness (conductivity) matrix:

If you are familiar with APDL, some important differences are apparent here:

• Results from the eigenvalues are stored in a vector (EiV) and a matrix (MatPhi), which need not be declared but are created when executing the *EIGEN command (no *DIM required).
• For each APDL Math entity, ANSYS automatically maintains variables named Param_rowDim and Param_colDim, hence removing the burden to keep track of dimensions.

## But where on Earth is my eye candy?

Now that we have some procedure and results, we would like to be able to show this to the outside world (and to be honest, some graphical results would also help getting confidence in results).

The additional task to do so is really minimal. What we need to do is simply to put back those numerical results into the ANSYS database so that we can use all the conventional post-processing capabilities. This can be made using the appropriate POST1 commands, essentially: DNSOL. And, while we are at it, why not do a hardcopy to an image file? Here is the corresponding input.

``` … User should place all nodes with non-prescribed temperatures in a component named MyNodeComponent

… First, convert Eigenvectors from solver to BCS ordering
! Conversion needed
*SMAT,Nod2Bcs,D,IMPORT,FULL,Jobname.full,NOD2BCS
*MULT,Nod2Bcs,TRAN,MatPhi,,MatPhi

! Then, read in mapping vector to convert to user ordering
*VEC,MapForward,I,IMPORT,FULL,Jobname.full,FORWARD

! Put the results in ANSYS database
/POST1
*do,ind_mode,1,NRM
cmsel,s,MyNodeComponent
curr_node=0
*do,i,1,ndinqr(0,13)
curr_node=ndnext(curr_node)
curr_temp=MatPhi(MapForward(curr_node),ind_mode)
dnsol,curr_node,TEMP,,curr_temp
*enddo
Tau=1/(2*3.14*EiV(ind_mode))**2

To=NINT(Tau*10)/10 ! compress to 1 digit after comma
/title,Mode #%ind_mode% - Tau=%To%s
plnsol,temp
! Hardcopy to BMP file
/image,SAVE,JobName_Mode%ind_mode%,bmp
*enddo```

This way, modes can be displayed, or even written to a conventional .RTH file (using RAPPND), and used as any regular ANSYS solver result.

## Nice, but an actual example wouldn’t hurt, would it?

Now you may wonder what the results look like in reality. To remain within the field of precision engineering, let’s use a support structure typically designed for high-stability positioning. From a structural point of view, it must have a high dynamic stiffness and a low total mass so that a Delta shaped bracket is appropriate. Since we want the system to rapidly evacuate any heat load, we choose aluminum as candidate material. We do know from first principles that any applied disturbance will exponentially vanish and the system will go back to equilibrium state. Now, what will be the time constants of this decay?

For the sake of simplicity we restrict the analysis to a highly simplified, 2D model of such a support. PLANE55 elements are used to model the structural part while the heat sink is accounted for using SURF151. Boundary conditions are enforced using an extra node.

After applying boundary conditions, we execute the modal solution to obtain say – the first 8 modes.

 Index Time Constant [s] Comment 1 535.9 Quasi-uniform temperature field (i.e. “rigid body” mode) 2 32.1 1st order (one wavelength along perimeter) 3 23.8 1st order (one wavelength along perimeter) 4 8.1 2nd order (two wavelengths  along perimeter) 5 6.8 2nd order (two wavelengths  along perimeter) 6 3.5 3rd order (three wavelengths  along perimeter) 7 3.1 3rd order (three wavelengths  along perimeter) 8 2.2 4th order (four wavelengths along perimeter)

The output is strictly the same as the one a standard modal analysis, except for the two additional lines at the end of the solving sequence.

```Allocate a [8] Vector : EIV

Allocate a [227][8] Dense Matrix : MatPhi```

Please note that the solution has 227 DOFs whereas the entire problem has 228 DOFs. This is the consequence of having introduced the boundary conditions as an enforced temperature on a node, which DOF is therefore removed from the DOF set to be obtained by the solver.

Also, we might want to use the modal shapes information to decide which locations are best suited to capture the entire temperature field on the structure. Without knowledge of the excitation source, one straightforward way to do so is to retain for each mode the node that has the largest amplitude. This is made even easier in this situation, since we have normalized each mode to have unit maximum amplitude we just need to select nodes having modal amplitude equal to 1 (or -1). On the figure below, each temperature sensor location is marked with a ‘TSm’ label where m is the mode index.

Doing so, we reach a pretty satisfactory distribution for the sensors locations, completely consistent with intuition. In numerical terms, we can also check that the modal matrix [Φ]_sensors, i.e. the original full matrix restricted to the selected DOF, has an excellent condition number. But there are many other things we could do starting from this. For example, with additional information, such as the location and the frequency content of the temperature fluctuations, one could further restrict the set of needed temperature sensors by running a dummy transient analysis and choosing locations where the correlation between sensors readings is as low as possible (using *MOPER,,,CORR). Even better, one can estimate the thermally induced displacements and select locations best suited to build an empirical model (typically using AR or ARMA), allowing one to predict structural displacements induced by temperature fluctuations using just a couple of sensors. This in turn can be used to select control strategies, check modal controllability… all within ANSYS.

## Conclusion

APDL Math was presented as an alternate route for users who need to include specialized steps in an otherwise standard FE process, and in my opinion it does just that. The benefits can be immense and the learning curve is steep but short. As long as the user knows what he/she is doing, there is little possibility to get lost: after all, APDL Math only comprises 18 additional commands.

What hindered me so far was the necessity to account for internal, BCS and user ordering, but it really is not a big deal, as seen from the above example.

What is more, the possibility to store the created results in the Mechanical APDL database (DNSOL and RAPPND are your friends!) provides every means to control your results and finally to build confidence in your developments.

And for those of us who prefer to stay within Workbench environment, there is nothing preventing from including APDL Math procedures into Workbench command snippets.

This was just an introductory example, since many other applications could be found, to name a few just in the fields of precision engineering and/or opto-mechanics:

• Speed up transient thermal mechanical analyses
• Perform harmonic analysis of thermal models
• Virtual testing of physical setup, including real-time control systems (model based)
• Modal testing, error localization, automated model updating

Let us know your opinion on the matter, and if further introductory articles on APDL Math could be of use to the ANSYS users community.

## Six Very Useful Enhancements in ANSYS Mechanical 18

By now you’ve probably heard that ANSYS versions 18.0, 18.1, and 18.2 have all been released in 2017. While 18.0 was the ‘point’ release in January, it should be noted that 18.1 and 18.2 are not ‘patches’ or service packs, but are full releases each with significant enhancements to the code. We’ll present some significant and useful enhancements for each.

## 18.0

Number 1: First and foremost – info on the new features is more readily accessible with the Mechanical Highlights list. The first time you launch Mechanical, you’ll see a hyperlinked list of new release highlights.

One you actually do something in Mechanical, though, that list goes away. There is a simple way to get it back: Click on the Project branch in the Mechanical tree, then click on the Worksheet button in the menu near the top of the window.
Clicking on the hyperlinks in the list or simply scrolling down gives us more information on each of the listed enhancements. Keep in mind the list is only highlights and by no means has all of the new features listed. A more detailed list can be found in the ANSYS Help, in the Release Notes.

Number 2: A major new feature that became available in 18.0 is Topology Optimization. We’ve written more about Topology Optimization here

Number 3: Another really useful enhancement in 18.0 is the ability to define a beam connection as a pretensioned bolt. This means we no longer need to have a geometry representation of a bolt if we want a simpler model. We can simply insert a beam connection between the two sides of the bolted geometry, and define the pretension on that resulting beam.
Beam connections are inserted in the Connections branch in Mechanical. Once the beam is fully defined, it can have a bolt pretension load applied to it, just like as if the beam geometry was defined as a solid or beam in your geometry tool. Here you can see a beam connection used for bolt pretension on the left, with a traditional geometric representation of a pretensioned bolt on the right:

## 18.1

Number 4: A very nice capability added in version 18.1 is drag and drop contact regions for contact sizing in the Mesh branch. Contact elements work best when the element sizes on both sizes of the interface are similar, especially for nonlinear contact. ANSYS Mechanical has had Contact Sizing available as a mesh control for a long time. Contact Sizing allows us to specify an element size or relevance level once, for both sides of one or more contact regions.

What’s new in 18.1 is the ability to drag and drop selected contacts from the Connections branch into the Mesh branch. Just select the desired contact regions with the mouse, then drag that selection into the Mesh branch. Then specify the desired mesh sizing controls for contact.
This is what the dragging and dropping looks like:

After dropping into the Mesh branch, we can specify the element size for the contact regions:

This shows the effect of the contact sizing specification on the mesh:

## 18.2

Number 5: An awesome new feature in 18.2 is element face selection, and what you can do with it. There is a new selection filter just for element face selection, shown here in the red box:

Once the element face select button is clicked, element faces can be individually selected, box selected, or paint selected simply by holding down the left mouse button and dragging. The green element faces on the near side have been selected this way:

The selected faces can then be converted to a Named Selection, or items such as results plots can be scoped to the face selection:

Number 6: Finally, to finish up, some new hotkeys were added in 18.2. Two really handy ones are:

• Z = zoom fit or zoom to the current selection of entities
• <Ctrl> K = activate element face selection
• F11 = make the graphics window full screen!
• Click F11 again to toggle back to normal size

Please realize that this list is just a tiny subset of the new features in ANSYS 18. We encourage you to try them out on your own, and investigate others that may be of benefit to you. Keep the Mechanical Highlights list from Number 1 in mind as a good source for info on new capabilities.

## ANSYS ACT Console Snippets

So this is just a quick post to point out a handy feature in ANSYS Workbench, the ACT Console. There are times when you want some functionality in Mechanical that just is not yet there. In this example, a customer wanted the ability to get a text list of all the Named Selections in his model.  A quick Python script does just that.

```import string,re

a=ExtAPI.DataModel.AnalysisList[0]  #Get the first Analysis if multiple are present
workingdir=a.WorkingDir
path=workingdir.split("\\\\")

#Put the output file in the "user_files" directory for the project.
userdir=string.join(path[:len(path)-4],"\\\\")+"\\\\user_files"

#Use the name of the system in case the snippet is
#used on multiple independent systems in the project.
system_name=re.sub(" ","_",a.Name)
model = ExtAPI.DataModel.Project.Model
nsels = model.NamedSelections                  #Get the list of Named Selections

if nsels:    #Do this if there are any Named Selections
f=open("%s\\\\%s_named_selections_checked.txt"%(userdir,system_name), "w")
for child in nsels.Children:
f.write("%s\n"%child.Name)
f.close()
```

So to use a piece of Python code, like this, we use the ACT Console in Mechanical. To access the ACT Console in Mechanical 17.0, or later, just hit this icon in the toolbar.

The Console allows you to type, or paste, text directly into the black command line at the bottom.  But if we are going to reuse this code, then the use of Snippets is the way to go. In R17.0 they were called ‘Bookmarks’, but they worked the same way.

When you add a Snippet, a new window allows you to name the snippet and type in, or paste in, your code.

When you hit Apply, your named snippet is added to the list

From then on, to use the snippet you just click on it, and hit ‘Enter’. The text is basically, repasted into the command window, so you can set any variables needed prior to hitting your snippet.

The snippets are persistent and remain in the console, so they are available for all new projects. Using snippets is a great way to reduce time for repetitive tasks, without having to create a full blown ACT extension.

Happy coding!

## Topological Optimization in ANSYS 18.1 – Motorcycle Component Example

We’ve discussed topological optimization in this space before, notably here:

If you’re not familiar with topological or topology optimization, a simple description is that we are using the physics of the problem combined with the finite element computational method to decide what the optimal shape is for a given design space and set of loads and constraints. Typically our goal is to maximize stiffness while reducing weight. We may also be trying to keep maximum stress below a certain value. Frequencies can come into play as well by linking a modal analysis to a topology optimization.

Why is topology optimization important? First, it produces shapes which may be more optimal than we could determine by engineering intuition coupled with trial and error. Second, with the rise of additive manufacturing, it is now much easier and more practical to produce the often complex and organic looking shapes which come out of a topological optimization.

ANSYS, Inc. has really upped the game when it comes to utilizing topology optimization. Starting with version 18.0, topo opt is built in functionality within ANSYS. If you already know ANSYS Mechanical, you already know the tool that’s used. The ANSYS capability uses the proven ANSYS solvers, including HPC capability for efficient solves. Another huge plus is the fact that SpaceClaim is linked right in to the process, allowing us to much more easily make the optimized mesh shape produced by a topological optimization into a more CAD representation set for use in validation simulations, 3D printing, or traditional manufacturing.

The intent of this blog is to show the current process in ANSYS version 18.1 using a simple example of an idealized motorcycle front fork bracket optimization. We don’t claim to be experts on motorcycle design, but we do want to showcase what the technology can do with a simple example. We start with a ‘blob’ or envelope for the geometry of our design space, then perform an optimization based on an assumed set of loads the system will experience. Next we convert the optimized mesh information into solid geometry using ANSYS SpaceClaim, and then perform a validation study on the optimized geometry.

Here we show our starting point – an idealized motorcycle fork with a fairly large blob of geometry. The intent is to let ANSYS come up with an optimal shape for the bracket connecting the two sides of the fork.

The first step of the simulation in this case is a traditional Static Structural simulation within ANSYS Workbench. The starting point for the geometry was ANSYS SpaceClaim, but the initial geometry could have come from any geometry source that ANSYS can read in, meaning most CAD systems as well as Parasolid, SAT, and STEP neutral file formats.
A single set of loads can be used, or multiple load cases can be defined. That’s what we did here, to simulate various sets of loads that the fork assembly might experience during optimization. All or a portion of the load cases can be utilized in the topological optimization, and weighting factors can be used on each set of loads if needed.
Here we see the workflow in the ANSYS Workbench Project Schematic:

Block A is the standard static structural analysis on the original, starting geometry. This includes all load cases needed to describe the operating environment. Block B is the actual topological optimization. Block C is a validation study, performed on the optimized geometry. This step is needed to ensure that the optimized shape still meets our design intent.

Within the topology optimization, we set our objective. He we choose minimizing compliance, which is a standard terminology in topology optimization and we can think of it as the inverse which is maximizing stiffness.

In the static structural analysis, 7 load cases were used to describe different loading situations on the motorcycle fork, and here all have been used in the optimization.
Further, we defined a response constraint, which in this example is to reduce mass (actually retain 15% of the mass):

Another quantity that’s often useful to specify is a minimum member constraint. That will keep the topology optimization from making regions that are too small to 3D print or otherwise manufacture. Here we have specified a minimum member size of 0.3 inches:

Since the topological optimization solution uses the same ANSYS solvers for the finite element solution as a normal solution, we can leverage high performance computing (distributed solvers, typically) to speed up the solution process. Multiple iterations are needed to converge on the topology optimization, so realize that the topo opt process is going to be more computationally expensive than a normal solution.

Once the optimization is complete, we can view the shape the topo opt method has obtained:

Notice that only a portion of the original model has been affected. ANSYS allows us to specify which regions of the model are to be considered for optimization, and which are to be excluded.

Now that we have a shape that looks promising, we still need to perform a validation step, in which we rerun our static simulation with the loads and constraints we expect the fork assembly to experience. To do that, we really want a ‘CAD’ model of the optimized shape. The images shown above show the mesh information that results from the topo opt solution. What we need to do next is leverage the ANSYS SpaceClaim geometry tool to create a solid model from the optimized shape.
A simple beauty in the ANSYS process is that with just a couple of clicks we proceed from Block B to Block C in the Workbench project schematic, and can then work with the optimized shape in SpaceClaim.

As you can see in the above image, SpaceClaim automatically has the original geometry as well as the new, optimized shape. We can do as much or as little to the optimized shape as we need, from smoothing and simplification to adding manufacturing features such as holes, bosses, etc. In this case we simply shrink wrapped it as-is.
Continuing with the validation step, the geometry from SpaceClaim automatically opens in the Mechanical window and we can then re-apply the needed loads and constraints and then solve to determine if the optimized shape truly meets our design objectives. If not, we can make some tweaks and run again.

The above image shows a result plot from the validation step. The geometry efficiently comes through SpaceClaim from the optimization step to the validation step. The needed tools are all nicely contained within ANSYS.

Hopefully this has given you an idea of what can be done with topology optimization in ANSYS as well as how it’s done. Again, if you already know ANSYS Mechanical, you already know the bulk of how to do this. If not, then perhaps what you have seen here will spark a craving to learn. We can’t wait to see what you create.