NX FEA

From UR Baja SAE
Revision as of 23:26, 2 November 2017 by Agrier2 (talk | contribs) (3D Mesh)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

One of the many software packages which the UR Baja team has access to is Siemens NX/Unigraphics. It is a very powerful program and offers much better simulation tools than SolidWorks offers while being much more user-friendly than MacNeal Schwendler Corporation Patran/Nastran. This page should hopefully give a good overview on the basics of setting up an analysis in NX through importing either a sketch or solid body part from SolidWorks.

NX Settings to Change[edit]

There are several settings in the Customer Defaults which should be changed to greatly improve the ease of using NX successfully. After opening NX, Customer Defaults is found on the Home tab of the top ribbon. Below are listed the settings to change, where they are located, and what they should be set to:

  • Gateway > General > Part > Default Units
    • Inches
  • Gateway > General > Directories > Part File Directory
    • Go ahead and set this to My Documents or any other convenient folder, since NX automatically defaults to some system location

If you have a custom material XML file, you can define the directory where it is found here. Since NX doesn't have all the materials the UR Baja team typically uses, a material database containing all of these can be found in the FEA folder on Drive.

  • Gateway > General > Materials/Mass > Locations
    • Select Enable for Site MatML Library and User MatML Library
    • Set the Windows Directory Names and MatML File Names accordingly

Those are the most important settings to change, but NX offers control over virtually everything you could wish to change

Exporting and Importing[edit]

SolidWorks places all export options under the Save As dialog, rather than having a separate export dialog. Depending on the geometry you're trying to export, there are several different file formats you might use: IGES/IGS, STEP/STP, or Parasolid. The first is best for exporting sketch geometry, while the other two work best for exporting solid body geometry.

Wireframe Model[edit]

Sw wireframe export.PNG
Nx divide curve.PNG

Wireframe models are best suited to weldment or beam geometry. NX can mesh just the sketch lines with a beam profile and it creates a much simpler mesh than if you were to try to import the actual frame from SolidWorks to NX.

Exporting a SolidWorks Sketch[edit]

In order to export a wireframe from SolidWorks, there may be some preparation required. The sketches to export need to be isolated from the solid geometry they create so that you don't also export the edges of the solid bodies. SolidWorks allows us to copy a sketch from one part to another and it will preserve all relative dimensions, but it can only copy one at a time. If you have multiple sketches containing the geometry for export, copying everything individually may become tedious and prone to mistakes. To get around that, we must first create a single sketch which contains all of the curves to be exported

  1. In the part containing your sketch curves, create a new 3D Sketch and use the Convert Entities command to add all the relevant sketches too it
  2. In the Feature Tree in SolidWorks select the newly created 3D Sketch and pres Ctrl + C
  3. Create a new part and paste the sketches into it. Sketch relations and smart dimensions may not properly copy, but as long as you don't edit the copied sketch you should be okay
  4. Go to File > Save As and change Save as type to IGES (*.igs)
  5. Now, select Options... and select IGES wireframe (3D curves): B-Splines (Entity type 126) and deselect IGES solid/surface entites
  6. Also in the options dialog, go ahead and select the remaining check boxes
  7. Click OK and Save

Now you're done with SolidWorks, except perhaps for referencing dimensions and geometry as needed.

Cleaning up the Wireframe in NX[edit]

Next, the wireframe needs to be modified slightly before it can properly be meshed and used in a simulation.

  1. Now, in NX go to Open, change Files of type to IGES File (*.igs) and select your exported file
  2. Notice that any construction geometry present in the SolidWorks file was also exported as normal sketch geometry
    • Go ahead and select any sketch curves not needed and delete them
  3. The most important thing to do is to ensure that all curves are split by intersecting curves, that is to say that no curve should touch any other curve except at its endpoints
  4. In the Find a Command box type Divide Curve, press Enter and then select Divide Curve
  5. Change Type to By Bounding Objects if it is not already set accordingly
  6. This tool works by selecting the curve you wish to divide, and then the intersecting curve to split it at
  7. Click Apply, and then repeat for all curves which need to be split

If you forget any curve it will be obvious when reviewing simulation results, because you'll either get an error when trying to solve or a part of the mesh which should be connected is not.

Solid Body Model[edit]

A solid body simulation is suited to analyses where the geometry cannot be approximated as simple beams, such as the uprights, gears, and shafts. The process of exporting and importing is similar to that of a wireframe model, but there are a few key differences. There are many different file formats which can be used, but Parasolid is generally the best as it is what the underlying engine of both SolidWorks and NX use to define part geometry. The STEP format may also be used and the process exporting and importing the file is similar.

Exporting a SolidWorks Body[edit]

The first step is to show the Solid Body folder in SolidWorks if it is not already displayed.

  1. In the Feature Tree in SolidWorks, right click on any of the folders below the part name and choose Hide/Show Tree Items...
  2. Then change Solid Bodies to Show and click OK

This allows us to select the bodies for export. While this may seem redundant in a single body part, it is generally best to be as explicit as possible when using SolidWorks Save As commands.

  1. Select the bodies for export in the Solid Body folder in the Feature Tree and browse to File > Save As
  2. Change the Save as type to Parasolid (*.x_t), click Options and change Version: to the most recent version number (26.0 at the time of writing)
  3. Click OK and Save
  4. A dialog box will appear asking about the bodies to export. Change the selection to Selected body(ies) and click OK
Nx new part.PNG

Opening the Parasolid Part in NX[edit]

This is where the process differs significantly from importing a wireframe model. The IGES file defines its coordinate system and units based off the SolidWorks file it was exported from. NX then uses both of those upon opening the IGES file, i.e. if you SolidWorks part was in inches so will your NX part. Importing a Parasolid into a new part, however, is slightly different. The Parasolid contains all the information for the part to be imported in either millimeters or inches, but NX will automatically default to millimeters. If you're working in metric that's not an issue, but since most of the work we do is in inches it makes more sense to have the part units be inches as well. In order to accomplish that you must first create a new part where inches are the working unit, and then import the Parasolid into that part.

  1. In NX, browse to New > Model and ensure Units is set to Inches
  2. Go ahead and change the Name and Folder to what you desire and then click OK
  3. Now browse to File > Import > Parasolid, select the exported file and click OK

If you want to do a sanity check to make sure the units are right, click on the Analysis tab in the top ribbon and measure any known part geometry with the measurement tool.

Finite Element Model (FEM)[edit]

Nx adv sim.PNG
Nx new fem2.PNG

The Finite Element Model, or FEM, is the model in which you'll create any meshes and assign material properties to the geometry present in the part file. When creating the FEM model, NX gives an option to also create an Idealized Part. This part allows you to change part geometry without modifying the base part. This is not strictly necessary, but can be useful if you expect to run analyses on many alternate part geometries. It is most useful when the part itself is modeled in NX, which of course is not what we're dealing with.

Creating a FEM[edit]

The next step in performing Finite Element Analysis in NX is to create FEM. NX has a number of Applications which allow you to perform different tasks. While modeling a part you would, for example, use the aptly named Modeling Application. Once you're ready to create a FEM you must first switch to the Advanced Simulation Application. There are a number of different types of FEM, some of which are more useful than others. The only one discussed here is that for a structural analysis.

  1. With the part file open, go to File > Start > Advanced Simulation
  2. Click the text reading New FEM and Simulation and select New FEM
  3. Choose NX Nastran for a structural analysis
    • Make sure Name is your part name appended with _fem1.fem and that Folder reads the location of the part file
  4. Click OK

Now you can select whether or not to create an Idealized Part and choose the geometry to include in FEM. By default NX will not include sketch curves in the FEM, but that can be changed here as well.

  1. Create an Idealized Part as you wish, but make sure Bodies to Use is set to All Visible
  2. Click Geometry Options and select anything which you want included in the FEM
    • For a wireframe model, go ahead and click All > On
  3. Click OK

Setting up a FEM for a Simulation[edit]

After creating the FEM file, the part geometry still needs to be meshed and have material properties assigned to it.

Loading Library Materials[edit]

Nx load material.PNG

In order to use custom materials not included in the default NX material library, you'll need to first add them to your part. Assuming you have the material XML mentioned above, this process should be quick.

  1. Click Manage Materials on the top ribbon
  2. Expand Libraries if it is not already and deselect NX Material Library
  3. Select all of the materials in the custom XML file, right click, and choose Load Library Material
  4. Click Close and you should be all set

Creating a Physical Property[edit]

Nx phypro create.PNG
Nx create section.PNG

Depending on the type of geometry, you want to create 0D, 1D, 2D, or 3D meshes. 1D meshes are used for beam elements (sketch curves) while 3D meshes are used for solid body geometry. 0D meshes are used for points, and are useful primarily for creating point masses. This guide will go through the process for both a 1D and 3D Physical Properties, but the process is very similar for both 0D and 2D.

1D Physical Property[edit]

This process can be repeated to create as many 1D physical properties as needed.

  1. Click Physical Properties in the top ribbon
  2. Change Type to PBeam, name the Physical Property something descriptive about the beam section, e.g. 1.00"x.049", and click Create
  3. Choose a Material and leave Section Type and the Nonstructural Mass options as default
  4. Now, click on Show Section Manager and click the Create Section icon
  5. Choose the section Type appropriately and add the required dimensions. Also Give the section a descriptive Name
  6. Click OK, Close, OK, and Close to close all dialog boxes

3D Physical Property[edit]

This process can be repeated to create as many 3D physical properties as needed.

  1. Click Physical Properties in the top ribbon
  2. Change Type to PSolid if it is not already, name the Physical Property something descriptive, e.g. Steel 4340 Annealed, and click Create
  3. Choose a Material and leave the rest of the options as default
  4. Click OK and Close to close all dialog boxes

Creating a Mesh Collector[edit]

In order to create a mesh and apply a physical property to it, we must first create what is called a Mesh Collector. A Mesh Collector is what a given physical property to any number of meshes. In creating a Mesh Collector, you must first choose the dimension of the mesh you wish to create. NX will then give you many different options for Collector Types of that dimension and corresponding Types. This guide will list simultaneously the relevant items for the Physical Properties created above, but in reality there are numerous other Collectors which you can create.

  1. Start by clicking Mesh Collectors in the top ribbon
  2. Choose the appropriate Element Family
    • Either 1D or 3D
  3. Now select the appropriate Collector Type
    • Either Solid or Beam Collector
  4. Select the correct Type
    • Either PBeam or PSolid
  5. Finally, select the Solid/Beam Property, give the Mesh Collector a Name, and click OK

Meshing Geometry[edit]

Nx 1d mesh.PNG
Nx 3d mesh.PNG

The final step before moving onto the Simulation file is to mesh any geometry with the given Mesh Collectors. The process is similar but has slight differences between 1D and 3D meshes. The Mesh Density or Element Type/Size settings are the most important things to set, and have several options which are discussed below.

1D Mesh[edit]

The Two options here for Mesh Density by are Size and Number They define either the distance between nodes or the number of nodes on any given curve. Both can be used, but greater control can be had with the Size option and is what will be used in this guide. As for choosing a size, it is somewhat arbitrary but should sufficiently small for any round curve has several nodes on it.

  1. Click on 1D Mesh to bring up the 1D Meshing dialog
  2. Make sure that Type is set to CBEAM
  3. Set Mesh Density by to Size set Element Size to 0.1 in
    • Note: this is arbitrary and may not be the best mesh size for your analysis. If you don't know what to use, experiment and find something that works
  4. Be sure to select the Merge Nodes box, ensuring that separate curve entities are connected together into one unified mesh
  5. Deselect Automatic Creation and choose a previously created Mesh Collector

Now we need to select the actual geometry to Mesh. Since a single Mesh Collector is only assigned one Physical Property, you'll need to create a different mesh for every different tube or beam profile in the model. Upon creating a mesh, only select the geometry you want assigned to the selected Mesh Collector.

  1. Click Select Objects and then choose all the curves in the graphics window to be meshed
  2. Click OK

3D Mesh[edit]

A 3D mesh does not use a "density" in the same way that a 1D mesh does, but instead assigns a type of element and a size for that element. The basic mesh types use either tetrahedral or cubic elements and are accessed using different mesh commands. Cubic elements below to what are called Swept Meshes and can be quite difficult to use. They are, however, much preferred for bodies which can be defined as a single extrusion. This guide will use tetrahedral mesh, but see Using a Swept Mesh in NX for details on swept meshes.

  1. Click on 3D Mesh to bring up the 3D Meshing dialog
  2. Type can be set to either CTETRA(4) or CTETRA(10). The latter places nodes on the midpoints of the tetrahedron's edges, resulting in a finer mesh despite a larger element size
    • Start with CTETRA(4) and move to the other if necessary
  3. Be sure to choose Element Size wisely. It needs to be fine enough to capture the necessary detail of the geometry, but not so fine as to take hours to solve
    • Start with 0.1 in and then refine the Element Size from there by editing the mesh after creating it
  4. Deselect Automatic Creation and choose a previously created Mesh Collector

Now we need to select the actual geometry to Mesh. Since a single Mesh Collector is only assigned one Physical Property, you'll need to create a different mesh for every different tube or beam profile in the model. Upon creating a mesh, only select the geometry you want assigned to the selected Mesh Collector.

  1. Click Select Bodies and then choose all the solid bodies in the graphics window to be meshed
  2. Don't worry about the Curvature settings for now. They can be adjusted later if need be
  3. Click OK

Simulation Model (SIM)[edit]

Nx new sim.PNG

Now that you've finished meshing and setting up the FEM, you're ready to create the Simulation model, or SIM. This is the model which all loads and constraints are applied to, and uses the mesh present in the FEM.

Creating a SIM[edit]

  1. Click the text which reads New FEM and Simulation and choose New Simulation
  2. Select NX Nastran and choose a Name if you are not happy with the default
  3. Also be sure that Folder is set to the location of your FEM and Part files if it is not already
  4. Click OK
  5. The New Simulation dialog will now appear; simply click OK

Now the Solution dialog automatically opens and prompts you to create a New Solution. There are numerous options and case controls and output parameters, but generally the default settings are adequate.

  1. Just be sure that Solution Type reads SOL 101 Linear Statics - Global Constraints
  2. Click OK

Additional solutions can be created by clicking on Solution in the top ribbon. One other useful type of solution is SOL 103 Real Eigenvalues. It returns the natural frequencies of the part and since it doesn't require any loads or constraints be applied can help diagnose issues with node connection in a 1D mesh. If two curves aren't connected which should be, you'll see them separate in the deformation plot of the results.

Setting up a SIM for a Simulation[edit]

Nx new sol.PNG

Now that we have a solution created, it is finally time to add loads and constraints to the part. There are many different types of each, and they serve their own purposes.

Applying Loads[edit]

The most useful loads will be Force, Gravity, Pressure, and Bearing. They are each slightly different but--with the exception of the Gravity load--all follow the same general principle. You must specify some geometry or location in the mesh to apply the load to, and a direction for it to act in. Gravity differs in that it needs only a direction since it automatically applies to the entire model. There are numerous different ways to define the load vector and what it's applied to, and ultimately comes down to figuring out how you want the load applied.

Applying Constraints[edit]

Constraints are perhaps a little bit simpler on the surface, but finding realistic constraints can be the most difficult part of creating an analysis scenario. Typically a User Defined Constraint is used, which gives the most control over the constrained geometry. With it, a selected node, face, edge, et cetera can be fixed in any of the six degrees of freedom or have an enforced displacement applied in any of the six degrees of freedom. Enforced displacements will rarely be used, but are on occasion useful. The key is constrain the model sufficiently (i.e. in all six degrees of freedom) without having redundant constraints. Constraining a model beyond what is necessary adds unrealistic stiffness, and will have a large effect on the resulting deformation and stress.

Changing Simulation Parameters[edit]

Nx edit sol.PNG

There are a few options in the solution dialog you may wish to change. Right click the solution in the Simulation Navigator tab and select Edit to return to the Solution dialog.

  • Parameters > Inertia Relief is one such option. It provides a method to not need any constraints in order to solve a solution by balancing out any forces with an opposing acceleration. Think of a rocket taking off of a launch pad. There's a lot of force pushing up on the rocket via the thrusters and nothing really (obviously a huge over-simplification) pushing back
  • You may also wish for extra output requests beyond the default, such as reaction forces at constraints and forces inside beam elements. These options are found in Case Control > Output Requests > Edit

Running the Simulation[edit]

Finally, we need to run the simulation which we've created. Click on Solve in the top ribbon, and then click OK and wait. 1D Beam analyses will typically solve in a couple of seconds, while 3D mesh analyses may take significantly longer depending on how many elements there are in the mesh. After finishing, you can review the results by clicking on the Post Processing Navigator tab and double clicking Structural under the solution name. From there, different results plots can be viewed.

Common Simulation Errors[edit]

Also after the solution finishes solving, any errors will be displayed. Perhaps the most common error is USER FATAL MESSAGE 9137 (SEKRRS): RUN TERMINATED DUE TO EXCESSIVE PIVOT RATIOS. This usually just means that your model had infinite displacement in some form. This is either due to the model not constrained in all six degrees of freedom, or two 1D meshes have disconnected nodes where they should be merged. For the former, modify constraints, and for the latter make sure that Merge Nodes is selected in the meshing dialog. Otherwise, seek other resources to troubleshoot the error.

Gallery[edit]