Videos > Ansys nCode Introduction
Jun 9, 2021

ANSYS nCode Introduction

Hi everybody, this is going to be a quick video going over how to use nCode within ANSYS. If you've never used nCode before and you want to learn how to do a quick run-through to get you up and running, this is going to be a perfect video for you.

Setting Up the Model in ANSYS Workbench

Here I am within ANSYS Workbench, and I have created a single static structural block. First, I'll go into the Engineering Data section. If you click on Engineering Data Sources and scroll down, you'll see that nCode has its own material library. This is beneficial because many materials already have their fatigue property material properties defined, which a lot of materials don't have by default. I'm using the Structural Steel material in my model.

  • Create a new material.
  • Choose the writing model.
  • Visualize the SN curve and strain life curve.

ANSYS Mechanical Setup

Now that we have the material defined, I'll go into ANSYS Mechanical to look at the static structural model I've set up. The model is a simple crankshaft with:

  • Two fixed supports, one on each end.
  • Three forces exerted straight away from the center of the shaft.

I've already solved this, so we can look at the equivalent stress. The maximum stress is on the ends near the fixed support.

Using nCode for Fatigue Analysis

Under Analysis Systems in Workbench, you have several different nCode options. I'll stick with the simplest one, which is Strain Life with constant loading. Drag and drop that onto the solution portion of the static structural, feeding the solution into the nCode analysis.

nCode Interface Overview

In the nCode interface, you'll notice several blocks. The key blocks are:

  1. Simulation Input: Brings in results from the static structural simulation.
  2. Stress Life Analysis: Set up the loading of your fatigue simulation and solve it.

For Stress Life Analysis, you can edit load mapping and adjust the min and max factors to simulate different loading conditions. Click Auto Configure to leave it from -1 to 1.

Solving the Simulation

To solve, click the blue play button. Once solved, you can view the results. By default, it shows damage, but you can switch to view the expected life of your model under this loading.

Alternative Method: Mechanical Embedded Design Life

If you prefer the mechanical interface, ANSYS offers Mechanical Embedded Design Life. Drag and drop it onto the static structural, similar to the nCode block. Adjust settings as needed, and solve the simulation to view results.

Conclusion

Both the nCode and mechanical interfaces are capable of running a simple fatigue analysis. It's a matter of preference which interface you choose.

About Ozen Engineering

This video is brought to you by Ozen Engineering. We use physics-based simulation to solve multidisciplinary engineering problems, including finite element analysis, computational fluid dynamics, and high and low frequency electromagnetic simulations.

For more information, you can:

[This was auto-generated. There may be mispellings.]

Hi everybody, this is going to be a quick video going over how to use Ansys nCode within Ansys. So if you've never used nCode before and you want to learn how to do a quick run through to get you up and running, this is going to be a perfect video for you.

So here I am within Ansys Workbench and what I've done is I've just created a single static structural block. So to begin, I will go into Engineering Data and if you click on Engineering Data Sources and scroll down, you'll see that nCode has its own material library.

This is really nice because there's many materials in there that already have their fatigue property material properties defined, which a lot of materials don't have those already defined by default. So it's a great place to get some starting materials for you.

I'm going to be using this structural steel material in my model. So I'm going to go ahead and create a new material. So I'm going to choose Writing Model, and if we look down here, we can see here's the SN curve and we can visualize that on the bottom right, and also here's the Strain Life curve.

So now that we have that the material defined, I'm going to go into Ansys Mechanical and we'll look at the static structural model I've set up. Okay, so here's the model, it's just a simple crankshaft.

If we click here, we can look at the geometry and see that I have a C14a5 panel here as well, so I have my model. I have two fixed supports, one on each end, and I have three forces on each of the middle sections here that are just the forces being exerted straight away from the center of the shaft.

So that's pretty simple and straightforward. If we look at the Equivalent Stress, I've already solved this, so we can look at the Equivalent Stress and see that of course on all of these edges there's pretty significant stress, the maximum being on the ends near the fixed support.

Okay, so that's a static structural, so that's pretty straightforward. So under Analysis Systems in Workbench, you have several different nCode options. I'm going to stick with the simplest one right now, which is nCode. So Strain Life, and Constant refers to constant loading.

So I'm going to drag and drop that onto the Solution portion of my static structural, and that's going to feed the solution from the static structural into my nCode analysis. So double click on Solution and nCode will open up in just a second. Okay, so here we are.

So the first thing you'll notice is there's all of these blocks here. Now, which of the nCode options we had chosen in Workbench is simply a different orientation of all of these blocks.

And each block has a different significance, but for the most part, there's only three that we're really going to be interested in, at least up front. So the first is the Simulation Input. This is where the input from the static structural simulation is brought in.

So we can click on the Display Block here and give it a second, and it brings in the results. So if you click on the button in the top right of that box, that expands it. And now we can pan around and look at our geometry brought in from Mechanical.

Now, if we right click anywhere in the window, and go to the top right of the box, we can see that the geometry is brought in from Mechanical. So if we right click anywhere in the window, and go to the top right of the box, we can see that the Simulation Input is brought in from Mechanical.

The first tab here is Selected Data, and it's just showing you where the data is being brought in from. If we go to FE Display, we can click on Results Case. And this is where we can decide what we want to look at. So Displacements, Stresses, Strains, Temperature.

So I'll use Stresses, leave it as the default of Von Mises, and hit OK. And once that's brought in, we should now be able to look at exactly the same results from the static structural simulation. So this is just a check to make sure that the simulation data was brought in correctly.

But there's nothing we really need to do in that block. Now the next block that we're interested in is Stress Life Analysis. And this is the block where you set up the loading of your fatigue simulation and solve it. So if we right click there, we can go to Edit Load Mapping. Click Yes.

And there's a few things to look at here. So first of all, on the left side, this is the description of our static structural simulation that we're bringing in. So I only linked one static structural simulation to nCode. But if you want, you can link as many as you want.

And so if you have multiple, you can use the left and right arrows here in the middle to bring those in to actually be used in your simulation and your fatigue simulation. Or you can link them in the middle. Or you can leave them on the left side and not actually have those used.

But then for each simulation that you do have brought in, you'll see a row here in this table. So again, Load Case Number One. Here's the description. It's just called crankshaft static structural. And then there's this Min and Max Factor.

And what this is saying is it's going to apply the stresses calculated in the static structural block. And then it's going to alternate those between a factor of negative one and a factor of negative two. And then it's going to apply the stresses calculated in the static structural block.

And then it's going to elliptic two. Or if it's going to be a positive one. So we can adjust those if we want. So let's say maybe your fatigue stress doesn't go from negative one to positive one. Maybe there is no reverse loading on this. So we can switch this to zero to positive one.

And then the fatigue analysis, it will go from zero stress to the positive one stress. Or maybe you want to play around with this a little bit more and you can increase this from zero to three or whatever you want. However you want to play around.

With the imported stresses and see what the fatigue analysis is as a result of those. You can play with these Min and Max Factors. But I'm going to click on Auto Configure and leave it from negative one to positive one. Hit OK. All right, and then that's it. And now we're ready to solve.

To do that, come up to the top here. There's a little blue Play Button. Hit that and in just a few seconds, your simulation will be solved. All right, so now the simulation is solved. That took maybe about 45 seconds or so. As soon as it's solved, it generated this image here.

So again, this is the Post-Processing Block. So we'll right click in the top right there to enlarge that. And now we can look at the results here. So by default, you're looking at Damage. But most people, usually you're interested in Fatigue Analysis.

So you're interested in the Lifespan of your geometry. So if you right click and go to Properties. And here. Under Result Type, instead of Damage, go to the bottom and it'll say Life. Click OK. Give it just a couple seconds to calculate the life.

And now we're looking at the Expected Life of your model under this loading. So you can see we're around 13,000 cycles. And again, the maximum is right at the same point of maximum stresses found in a static structural analysis. So that means this part should.

Last about 13,000 cycles before fatiguing. Okay. So that's nCode. So there is another way of doing this. If you don't like the nCode interface and you're used to the Mechanical interface. Ansys has made an ACT, that's called Mechanical Embedded Design Life.

So we can take that and drag and drop that onto our static structural, the same way we did with the nCode block. And it's going to import that solution into. This Mechanical Embedded Design Life. So double click on Setup and here we are back in Mechanical.

So you can see the static structural simulation is right here, but now it's added a nCode Design Life block right below it. So it's just a few settings we need to adjust here. But again, it's the same setting, same inputs, basically that I just discussed in nCode, just in a different user interface.

So first is the Analysis Type. We can choose Strain Life, Stress Life, or Seam Weld. We'll do Stress Life. And then we'll do the End Code. And then we'll do the End Code. So we'll do the End Code. So we'll do the End Code. Since that's what we did in nCode as well.

And then a few things automatically happen as soon as you click that. First, it's a Solution Group. So in this case, it automatically selects all bodies in your model, but if you don't want to run into fatigue analysis on all of the bodies in your model, you can adjust that here.

Next is Load Mapper. So we need to apply the load to our model in order to make this run. So first we just right click and go to the bottom and say, Add Loading Event. And then on Loading Events, we right click again and say, Add Loading Event.

And then on Loading Events, we right click again and say, Add Load. And this is where you add in the load. Same thing as we did in nCode. So the Environment right now is Static Structural.

Again, if you have multiple simulations that you're inputting into your fatigue analysis, you can right click on Loading Event and add another load and then add a second Static Structural Analysis to it or whatever your case may be. And then here we have the same Minimum Maximum Factors.

So I'll just leave those again from negative one to positive one. And so with that, our simulation is complete. And our simulation is ready to go. So if you right click on Solution and go to Insert, you can see most of the normal results aren't here.

But we can look at Damage and Life just like we did in nCode. So now you hit Solve and again, wait about a minute and it should be ready. All right. So our simulation has solved now. And once again, we can look at, say, look at the Damage here.

And again, we can look at the Damage at the same locations at the edges of the fixed supports. And similar with Life where we look again, our Minimum Life is about 13,000 cycles and also occurs at the same locations.

So not much difference between the nCode user interface and the Mechanical user interface as far as capabilities. Both of them are certainly capable of running a pretty simple fatigue analysis. And so it's really just a matter of preference. And you can choose which interface you like better.

Thank you for your attention. This video is brought to you by Ozen Engineering. We use physics-based simulation to solve multidisciplinary engineering problems, including Finite Element Analysis, Computational Fluid Dynamics, and High and Low Frequency Electromagnetic.

If you'd like to learn more, you can email us at info at Ozeninc.com, call our office phone number or visit our website at www.ozeninc.com.