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.

PADT-ANSYS-Random-Vib-Reaction-Forces-2017_11_22-1

As always, please contact PADT for your ANSYS simulation, training, and customization needs.

 

 

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.

PADT-ANSYS-Tabular-loads-2

Working Wonders with ADPL Math Illustrated: Thermal Modal Analysis

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.

Secant or Instantaneous CTE? Understanding Thermal Expansion Modeling ANSYS Mechanical

One of the more common questions we get on thermal expansion simulations in tech support for ANSYS Mechanical and ANSYS Mechanical APDL revolve around how the Coefficient of Thermal Expansion, or CTE. This comes in to play if the CTE of the material you are modeling is set up to change with the temperature of that material.

This detailed presentation goes in to explaining what the differences are between the Secant and Instantaneous methods, how to convert between them, and dealing with extrapolating coeficients beyond temperatures for which you have data.

PADT-ANSYS-Secant_vs_Instantaneous_CTE-2017_07_05

How-To: Connecting Shells Elements in Surface Models with ANSYS SpaceClaim and ANSYS Mechanical

By using the power of ANSYS SpaceClaim to quickly modify geometry, you can set up your surface models in ANSYS Mechanical to easily be connected.  Take a look in this How-To slide deck to see how easy it is to extend geometry and intersect surfaces.

PADT-ANSYS-Connecting-Shells-SpaceClaim-Mechanical

Coupling ANSYS Mechanical and Flownex

The below example demontrates how to couple Flownex and ANSYS mechanical using the Mechanical Generic Interface component.

For those that don’t know, Flownex is a thermal-fluid system modeling tool that is great for modeling heat, flow, pressure, etc… in systems.  At PADT we often connect it to ANSYS Mechanical to do more detailed component level simulation when needed. 

Why the need for the link in the fist place?

  • It is an automated workflow to couple Flownex and ANSYS through direct mapping of Flownex results (HTC and bulk temperatures) as boundary condition to an ANSYS thermal analysis.
  • Represents a conjugate heat transfer model with fluid calculations handled in Flownex
  • Allows one to easily/quickly investigate fluid flow and heat transfer properties under a wide range operating conditions.

First we will discuss the steady state thermal ANSYS Mechanical model that will be linked to Flownex.

We have a pipe Pipe with arbritraty geometry and material properties. Convection boundary conditions have been applied to both the internal and external pipe walls. The inernal Bulk Temperature will be supplied by Flownex.

  • External BC
    • HTC 100 w/m2K
    • Bulk Temperature 22C
  • Internal BC
    • HTC 1500 w/m2K
    • Bulk Temperature will be supplied by Flownex

A command snippet, which will calculate the total heat flow through the inner wall surface and write the value out into a text file called d_result, has been inlcuded in the ANSYS Mechanical model.

In order to achieve a bidirectional coupling, Flownex will execute the Mechanical APDL batch file. We can generate the Mechanical APDL batch file (ds.dat), from within Mechanical.

The soluiton procedure is as follows

  1. Flownex modifies the ds.dat file
  2. Flownex executes the modified ds.dat file
  3. The modified ds.dat file generates the d_result.txt file
  4. Flownex reads the d_result.txt file
  5. Flownex executes an iteration, using value from d_result.txt
  6. Repeat untill solutions are converged.

The next step after creating the ds.dat file is to set up your Flownex model.

The Flownex model comprises of a pipe component with arbritrary geomery, filled with air with an inlet temperature and pressure of 500˚C and 120 kPa respectilvy and a flow rate of approximatly 1kg/s.

We have connected the pipe component to the Mechanical Generic Interface using data transfer links.

The data transfer links pass the bulk fluid temperature form the pipe to the Mechanical Generic Interface component, and return the heat flow value calculated using ANSYS to the pipe.

Next we need place the ds.dat file in the AnsysMechanical_Files folder which is located in the Flownex project folder. It is necessary to create a copy of the ds.dat called ModifiedData.dat in the same location.

Let’s go over the inputs to the Mechanical Generic Interface component in Flownex:

1) Executable location

C:\Program Files\ANSYS Inc\v180\ansys\bin\winx64\Ansys180.exe

This is the path to ANSYS executable. Pay particular attention to the version number (eg 180, 172), as this will be different depending on the version of ANSYS you have installed.

2) Command line parameters

-b -i ModifiedData.dat -o results

Flownex will launch ANSYS, and execute the ModifiedData.dat Mechanical APDL batch file from the command line, using the above command a detailed description of command line options can be found in another blog post here.

3) Project files folder, Data file name and Modified data file name

Here we specify location of the Mechanical APDL batch files

4) Inputs

Here we will define where in ModifiedData.dat the value from Flownex, fluid temperature in this case, will be placed. This is done by determining what the boundary condition variable and ID is, and finding the prefix before the boundary condition value in the ds.dat file. Typically the variable for temperature is _loadvari and for HTC it is _convari.

It is possible to know the boundary condition ID by activating the appearance of Beta options in WB.

5) Outputs

Here we will specify the location of the d_result.txt that ANSYS generates. It should appear in the same folder as the Mechanical APDL batch files after successful execution.

Flownex and ANSYS will pass data back and forth every time step of a transient Flownex run.

The simulation should continue to run up to, and beyond the point where the Flownex and ANSYS simulation have converged. If we plot out the heat input or temperature value vs time we should be able to visualize convergence, akin to residual plots when running a CFD simulation, and then manually stop the simulation after values have stabilized.

Below we increase the fluid inlet temperature form 500˚C to 1000˚C after 10 iterations, and observed a increase in heat flow from ~1.4kW to ~2.8kW.

ANSYS 18 Mechanical Ease of Use Webinar – Coming Soon

We here at PADT are proud to present the ease of use and productivity enhancements that have been added to ANSYS Mechanical in release 18.

With this new release, ANSYS Mechanical focuses on the introduction of a variety of improvements that help save the users time, such as smarter data organization and new hotkeys, along with additions that can help you to better visualize specific intricacies in your models.

This webinar is coming up soon

Join PADT’s Simulation Support & Application Engineer Doug Oatis for an overview of the current user friendly interfaces within ANSYS Mechanical, along with the numerous additions in this new release that help to improve efficiency tenfold, such as:

Pretension Beam Connection

A beam connection is a power idealization to connect parts without modeling the bolts. Now the beam connection can be pretensioned as well.

Register today to find out how you can use this highly requested feature and many others to improve your throughput and stay ahead of the curve!

Making Thermal Contact Conductance a Parameter in ANSYS Mechanical 18.0 and Earlier with an APDL Command Object

A support request from one of our customers recently was for the ability to make Thermal Contact Conductance, which is sort of a reciprocal of thermal resistance at the contact interface, a parameter so it can be varied in a parametric study.  Unfortunately, this property of contact regions is not exposed as a parameter in the ANSYS Mechanical window like many other quantities are.

Fortunately, with ANSYS there is almost always a way……in this case we use the capability of an APDL (ANSYS Parametric Design Language) command object within ANSYS Mechanical.  This allows us to access additional functionality that isn’t exposed in the Mechanical menus.  This is a rare occurrence in the recent versions of ANSYS, but I thought this was a good example to explain how it is done including verifying that it works.

A key capability is that user-defined parameters within a command object have a ‘magic’ set of parameter names.  These names are ARG1, ARG2, ARG3, etc.  Eric Miller of PADT explained their use in a good PADT Focus blog posting back in 2013

In this application, we want to be able to vary the value of thermal contact conductance.  A low value means less heat will flow across the boundary between parts, while a high value means more heat will flow.  The default value is a calculated high value of conductance, meaning there is little to no resistance to heat flow across the contact boundary.

In order to make this work, we need to know how the thermal contact conductance is applied.  In fact, it is a property of the contact elements.  A quick look at the ANSYS Help for the CONTA174 or similar contact elements shows that the 14th field in the Real Constants is the defined value of TCC, the thermal contact conductance.  Real Constants are properties of elements that may need to be defined or may be optional values that can be defined.  Knowing that TCC is the 14th field in the real constant set, we can now build our APDL command object.

This is what the command object looks like, including some explanatory comments.  Everything after a “!” is a comment:

! Command object to parameterize thermal contact conductance
! by Ted Harris, PADT, Inc., 3/31/2017
! Note: This is just an example. It is up to the user to create and verify
! the concept for their own application.

! From the ANSYS help, we can see that real constant TCC is the 14th real constant for
! the 17X contact elements. Therefore, we can define an APDL parameter with the desired
! TCC value and then assign that parameter to the 14th real constant value.
!
! We use ARG1 in the Details view for this command snippet to define and enable the
! parameter to be used for TCC.

r,cid ! tells ANSYS we are defining real constants for this contact pair
! any values left blank will not be overwritten from defaults or those
! assigned by Mechanical. R command is used for values 1-6 of the real constants
rmore,,,,,, ! values 7-12 for this real constant set
rmore,,arg1 ! This assigned value of arg1 to 14th field of real constant

! Now repeat for target side to cover symmetric contact case
r,tid ! tells ANSYS we are defining real constants for this contact pair
! any values left blank will not be overwritten from defaults or those
! assigned by Mechanical. R command is used for values 1-6 of the real constants
rmore,,,,,, ! values 7-12 for this real constant set
rmore,,arg1 ! This assigned value of arg1 to 14th field of real constant

You may have noticed the ‘cid’ and ‘tid’ labels in the command object.  These identify the integer ‘pointers’ for the contact and target element types, respectively.  They also identify the contact and target real constant set number and material property number.  So how do we know what values of integers are used by ‘cid’ and ‘tid’ for a given contact region?  That’s part of the beauty of the command object: you don’t know the values of the cid and tid variables, but you alsp don’t need to know them.  ANSYS automatically plugs in the correct integer values for each contact pair simply by us putting the magic ‘cid’ and ‘tid’ labels in the command snippet.  The top of a command object within the contact branch will automatically contain these comments at the top, which explain it:

!   Commands inserted into this file will be executed just after the contact region definition.
!   The type number for the contact type is equal to the parameter “cid”.
!   The type number for the target type is equal to the parameter “tid”.
!   The real and mat number for the asymmetric contact pair is equal to the parameter “cid”.
!   The real and mat number for the symmetric contact pair(if it exists)
! is equal to the parameter “tid”.

Next, we need to know how to implement this in ANSYS Mechanical.  We start with a model of a ball valve assembly, using some simple geometry from one of our training classes.  The idea is that hot water passes through the valve represented by a constant temperature of 125 F.  There is a heat sink represented at the OD of the ends of the valve at a constant 74 degrees.  There is also some convection on most of the outer surfaces carrying some heat away.

The ball valve and the valve housing are separate parts and contact is used to allow heat to flow from the hotter ball valve into the cooler valve assembly:

Here is the command snippet associated with that contact region.  The ‘magic’ is the ARG1 parameter which is given an initial value in the Details view, BEFORE the P box is checked to make it a parameter.  Wherever we need to define the value of TCC in the command object, we use the ARG1 parameter name, as shown here:

Next, we verify that it actually works as expected.  Here I have setup a table of design points, with increasing values of TCC (ARG1).  The output parameter that is tracked is the minimum temperature on the inner surface of the valve housing, where it makes contact with the ball.  If conductance is low, little heat should flow so the housing remains cool.  If the conductance is high, more heat should flow into the housing making it hotter.  After solving all the design points in the Workbench window, we see that indeed that’s what happens:

And here is a log scale plot showing temperature rise with increasing TCC:

So, excluding the comments our command object is 6 lines long.  With those six lines of text as well as knowledge of how to use the ARG1 parameter, we now have thermal contact conductance which varies as a parameter.  This is a simple case and you will certainly want to test and verify for your own use.  Hopefully this helps with explaining the process and how it is done, including verification.

 

 

 

ANSYS 18 – Mechanical Ease of Use Webinar

We here at PADT are proud to present the ease of use and productivity enhancements that have been added to ANSYS Mechanical in release 18.

With this new release, ANSYS Mechanical focuses on the introduction of a variety of improvements that help save the users time, such as smarter data organization and new hotkeys, along with additions that can help you to better visualize specific intricacies in your models.

Join PADT’s Simulation Support & Application Engineer Doug Oatis for an overview of the current user friendly interfaces within ANSYS Mechanical, along with the numerous additions in this new release that help to improve efficiency tenfold, such as:

  • Hotkey Additions
  • Box Geometry Creation Within Mechanical
  • Free Standing Remote Points
  • Improved Status Bar Information
  • Pretension Beam Connection
  • Solver Scratch Directory Specification
  • Improved Probe Annotations

Register today to find out how you can use these enhancements to improve your throughput and stay ahead of the curve!

We look forward to seeing you there.

Making Solids Water Tight in ANSYS Spaceclaim for ANSYS Workbench Meshing

Occasionally when solid geometry is imported from CAD into ANSYS SpaceClaim the geometry will come in as solids, but when a mesh is generated on the solids the mesh will appear to “leak” into the surrounding space. Below is an assembly that was imported from CAD into SpaceClaim. In the SpaceClaim Structure Window all of the parts can be seen to be solid components.

When the mesh is generated in ANSYS Mechanical it appears like the assembly has been successfully meshed.

However, when you look at the mesh a little closer, the mesh can be missing from some of the surfaces and not displayed correctly on others.

Additionally, if you create a cross-section through the mesh, the mesh on some of the parts will “leak” outside of the part boundaries and will look like the image below.

Based on the mesh color, the mesh of the part in the center of the assembly has grown outside of the surfaces of the part.
To repair the part you need to go back to SpaceClaim and rebuild it. First you need to hide the rest of the parts.

Next, create a sketch plane that passes through the problem part.

In the sketch mode create a rectangle that surrounds the part. When you return to 3D mode in SpaceClaim, that rectangle will become a surface that passes through the part.

Now use the Pull tool in SpaceClaim to turn that surface into a part that completely surrounds the part to be repaired, making sure to turn on the “No Merge” option for the pull before you begin.

After you have pulled the surface into a solid, it should like the image below where the original part is completely buried inside the new part.

Now you will use the Combine tool to divide the box with the original part. Select Combine from the Tool Bar, then select the box that you created in the previous step. The cutter will be activated and you will move the cursor around until the original part is highlighted inside the box. Select it with the left mouse button. The Combine tool will then give you the option to select the part of the box that you want to remove. Select the part that surrounds the original part. After it is finished, close the combine tool and the Structure Tree and 3D window will now look like the following:

Now move the new solid that was created with the Combine tool into the location of the original part and turn off the original one and re-activate the other parts of the assembly. The assembly and Structure Tree should now look like the pictures below.

Now save the project, re-open the meshing tool, and re-generate the mesh. The mesh should now be correct and not “leaking” beyond the part boundaries.

Using External Data in ANSYS Mechanical to Tabular Loads with Multiple Variables

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. You can use the External Data tool to do just that. You can also create a table with a single variable and modify it in the Command Editor.

In the Presentation below, I show how to do all of this in a step-by-step description.

PADT-ANSYS-Tabular-Loading-ANSYS-18

You can also download the presentation here.

Connection Groups and Your Sanity in ANSYS Mechanical

You kids don’t know how good you have it with automatic contact creation in Mechanical.  Back in my day, I’d have to use the contact wizard in MAPDL or show off my mastery of the ESURF command to define contacts between parts.  Sure, there were some macros somewhere on the interwebs that would go through and loop for surfaces within a particular offset, but for the sake of this stereotypical “old-tyme” rant, I didn’t use them (I actually didn’t, I was just TOO good at using ESURF to need anyone else’s help).

Image result for old tyme

Hey, it gets me from point A to B

In Mechanical contact is automatically generated based on a set of rules contained in the ‘Connection Group’ object:

image

It might look a little over-whelming, but really the only thing you’ll need to play around with is the ‘Tolerance Type’.  This can either ‘Slider’ or ‘Value’ (or use sheet thickness if you’re working with shells).  What this controls is the face offset value for which Mechanical will automatically build contact.  So in the picture shown above faces that are 5.9939E-3in apart will automatically have contact created.  You can play around with the slider value to change what the tolerance

image image image

As you can see, the smaller the tolerance slider the larger the ‘acceptable’ gap becomes.  If you change the Tolerance Type to be ‘Value’ then you can just directly type in a number.

Typically the default values do a pretty good job automatically defining contact.  However, what happens if you have a large assembly with a lot of thin parts?  Then what you run into is non-sensical contact between parts that don’t actually touch (full disclosure, I actually had to modify the contact settings to have the auto-generated contact do something like this…but I have seen this in other assemblies with very thin/slender parts stacked on top of each other):

image

In the image above, we see that contact has been defined between the bolt head and a plate when there is clearly a washer present.  So we can fix this by going in and specifying a value of 0, meaning that only surfaces that are touching will have contact defined.  But now let’s say that some parts of your assembly aren’t touching (maybe it’s bad CAD, maybe it’s a welded assembly, maybe you suppressed parts that weren’t important).

image

The brute force way to handle this would be to set the auto-detection value to be 0 and then go back and manually define the missing contacts using the options shown in the image above.  Or, what we could do is modify the auto-contact to be broken up into groups and apply appropriate rules as necessary.  The other benefit to this is if you’re working in large assemblies, you can retain your sanity by having contact generated region by region.   In the words of the original FE-guru, Honest Abe, it’s easier to manage things when they’re logically broken up into chunks.

image

Said No One Ever

Sorry…that was bad.  I figured in the new alt-fact world with falsely-attributed quotes to historical leaders, I might as well make something up for the oft-overlooked FE-crowd.

So, how do you go about implementing this?  Easy, first just delete the default connection group (right-mouse-click on it and select delete).  Next, just select a group of bodies and click the ‘Connection Group’ button:

image image image

In the image series above, I selected all the bolts and washers, clicked the connection group, and now I have created a connection group that will only automatically generate contact between the bolts and washers.  I don’t have to worry about contact being generated between the bolt and plate.  Rinse, lather, and repeat the process until you’ve created all the groups you want:

image

ALL the Connection Groups!

Now that you have all these connection groups, you can fine-tune the auto-detection rules to meet the ‘needs’ of those individual body groups.  Just zooming in on one of the groups:

image

By default, when I generate contact for this group I’ll get two contact pairs:

image image

While this may work, let’s say I don’t want a single contact pair for the two dome-like structures, but 2.  That way I can just change the behavior on the outer ‘ring’ to be frictionless and force the top to be bonded:

image

I modified the auto-detection tolerance to be a user-defined distance (note that when you type in a number and move your mouse over into the graphics window you will see a bulls-eye that indicates the search radius you just defined).  Next, I told the auto-detection not to group any auto-detected contacts together.  The result is I now get 3 contact pairs defined:

image image image

Now I can just modify the auto-generated contacts to have the middle-picture shown in the series above to be frictionless.  I could certainly just manually define the contact regions, but if you have an assembly of dozens/hundreds of parts it’s significantly easier to have Mechanical build up all the contact regions and then you just have to modify individual contact pairs to have the type/behavior/etc you want (bonded, frictionless, symmetric, asymmetric, custom pinball radius, etc).  This is also useful if you have bodies that need to be connected via face-to-edge or edge-to-edge contact (then you can set the appropriate priority as to which, if any of those types should be preserved over others).

So the plus side to doing all of this is that after any kind of geometry update you shouldn’t have much, if any, contact ‘repair’ to do.  All the bodies/rules have already been fine tuned to automatically build what you want/need.  You also know where to look to modify contacts (although using the ‘go to’ functionality makes that pretty easy as well).  That way you can define all these connection groups, leave everything as bonded and do a preliminary solve to ensure things look ‘okay’.  Then go back and start introducing some more reality into the simulation by allowing certain regions to move relative to each other.

The downside to doing your contacts this way is you risk missing an interface because you’re now defining the load path.  To deal with that you can just insert a dummy-modal environment into your project, solve, and check that you don’t have any 0-Hz modes.