ANSYS is a highly advanced program for performing a wide range of analyses based around a finite element analysis engine. Thanks to its well-developed feature set in static, non-static and CFD problems, it is well-used by mechanical engineers and the like, but less so in structural engineering, where programs such as Robot and GSA are preferred. However, a recent task called for a quick deflection analysis of a prototype building form, which turned into an opportunity to try out this program.
So, firstly, setting out the problem:
The building to analyse was generated in Rhino, and will need to be imported into ANSYS
The building is shaped like a stadium roof and is assumed to be fixed to supports along both the inner and outer edges
The question to answer is, if we imagine that the structure is made of an equal member size throughout and then turn on the gravity, how far does the building move down?
Step 1: Export geometry
ANSYS really isn’t a nice program for creating geometry in. It is much better if you can create the geometry in the form of a line drawing in a program you are more comfortable with. In the image above, I was using Rhino.
For this analysis, it is possibly better to ensure that all the curves are actually straight lines. The easiest way to do this is to use the “Rebuild” command. Select the entire model, and rebuild with 2 points and 1 degree.
There are two format choices for importing from Rhino to ANSYS:
SAT – best for surfaces, but can’t be used for lines or curves
IGES – can handle both curves and surfaces
For this project, we’ll be using IGES.
To export the project to IGES, select the model again. Then head to File > Export Selected and save as an IGES file. Remember the folder you saved it in, and keep the file name short and simple. I’ve called mine “roofmodel”.
The next window presents IGES options. Just allow it to save with a default type, and click OK.
Step 2: Load up the model in ANSYS
Load up ANSYS. You should see this splashscreen:
The splashscreen is the prettiest bit of the program you’ll ever see – here is what will actually appear when the program is loaded:
There are two windows – the main user interface (right) and the DOS control (left). It seems that the user interface is built upon this DOS control – all commands can be run through DOS, and a lot of information and warnings will be outputted here. Even though you’ll be working mostly in the user interface window, it’s good to keep the DOS window visible to one side.
And yes, the user interface is as terrible as it looks! The program does have a huge amount of power, but it does take some time to learn to navigate and to get it to do what you want it to do.
First thing’s first: before opening or working with a model, set up your job name and working directory first! The working directory is a folder where the program will save all the files related to your project. The program doesn’t remember which you last used – so you need to set it every time you open ANSYS. Head to File > Change Directory and set your folder here. I’d recommend one folder per project.
Then, set your job name. Mine is called “3-1”.
Then, I would recommend saving your model (yes, I know there’s nothing in it yet!). The first time you save, you must do a “save as jobname.db”!
If you then go back into Windows Explorer and look into your working directory, you should see this:
Remember that we set the jobname to “3-1”. So when we click “save as jobname.db”, we actually created a file called “3-1.db”.
Now, we can import our IGES model.
Just hit OK at the next window.
Ignore and close this error message that appears at the top-left. In fact, ANSYS really likes generating error messages, and most of them can be safely ignored.
Another window appears. Hit “Browse” to find the IGES file.
Then, hit OK to import the file.
We should then see our imported model!
Step 3: Set up model properties
At the moment, this is just a collection of lines – pieces of XYZ data with no real-world information on member sizes and forces. Firstly, we’ll set up the members of the model.
In order to set up the member sizes, we tell ANSYS about the member properties we would like to use, and then we apply these properties to the lines themselves.
Step 3a: Create an element type
In the menu on the left, select Preprocessor > Element Type > Add/Edit/Delete.
Then, click Add to create an element type.
There are many different kinds of element type, and the help file in ANSYS can help to choose one. For our model, we want a beam.
Using 3 node instead of 2 node gives more accurate results in modelling at the expense of processing speed. But the model isn’t particularly enormous, so let’s go for the 3 node (called Beam 189). Hit OK.
(Some other kinds of elements commonly used are Shell181 for shell structures and Link10 for trusses.)
The element types window should contain the beam we’ve added. Click close to return to the main screen.
ANSYS now knows that we have a type of member that we want to use that is a kind of 3-node beam. However, we still need to add some real-world properties to this beam so that it can be analysed.
Step 3b: Section sizes
Now, we need to apply some dimensions to our section sizes. Under preprocessor, this can be done through either the “Real Constants” option or the “Sections” option. The “Sections” is a little more intuitive, so let’s use this.
Head to the beam library on the left:
Under common sections, enter some beam properties. I want a circular section. Clicking “Common sections” will bring up the beam tool.
“ID” is the ID of the element type we created in step 3a. If you have multiple element types (which will usually be the case in all but simple examples like this) then you should match the ID value here with the ID in the element type you want to modify.
(Help provides good information on what each of the fields mean – these fields change depending on the type of section selected.)
Press OK when finished.
Now we need to define what the section is made from – useful for determining self-weight and elastic behaviour of the structure.
Step 3c: Material properties
Head to “Material Models”. Properties we need for this model are density, elasticity and Poisson’s ratio. You can add other relevant material properties for other projects in the same place.
For elasticity and Poisson’s ratio, head for “Isotropic”.
Bearing in mind the units of your model (N for force, kg for weight and whatever units for length your Rhino model was in – mine was in mm), enter the Young’s Modulus (200000N/mm2) and Poisson’s ratio (0.3 for steel):
Hit OK. Then find “Density”:
The density is 7850*10^-9 kg/mm3 (remember to consider the units again!).
On the previous screen again, you should notice that we now have two “material models defined”:
This seems correct. Close the window.
Step 4: Create the mesh
Now we need to create the mesh that ANSYS will use to analyse the model. Select the Mesh Tool.
In the following window, ensure that “Element Attributes” is set either to Global (for everything) or however you need it. Clicking ‘Set’ should allow you to confirm that our element properties will be applied to the global model:
Click OK to return. Click “Mesh”.
The following window should appear. We want to mesh the entire model (i.e. we will be analysing the whole model).
Select “Pick All”.
The model should go from this…
The model is now meshed.
Step 5: Set gravity
ANSYS does not assume there is a gravitational force, so we have to tell it about gravity. Head to the “global” gravity window.
Convention is that gravity acts in the opposite direction of the Z axis (i.e. gravity is negative), but for some reason we get the correct result if we enter gravity as positive. Enter “9.8” (i.e. gravitational force = 9.8m/s2).
Step 6: Apply boundary conditions
ANSYS treats boundary conditions (i.e. constraints) confusingly as a kind of load. Under the menus, we find:
Lines, areas and keypoints are of the geometry we imported from Rhino, while nodes are of the mesh. It is better to assign constraints to the geometry, so that if we have to re-mesh, we don’t lose our keypoints too. A keypoint in this context would mean a node of the geometry. I want to restrain each point, so let’s select Keypoints.
The following “Apply…” window should appear:
If you need to reposition your model, click the “pan zoom rotate” button. This brings up another window.
Back to the “Apply…” window, pick on the points you want to constrain.
Use “box” to select multiple points
Don’t use “polygon” – it seems to also select all detailed mesh points
Right click to change between select and deselect modes
When you have selected some points, click OK. In the following window, select the amount of restraint you want (All DOF means moment and displacement restraint in X, Y and Z) and click OK.
The points will now show a restraint.
Step 7: Final checks
Before we run the analysis, it’s good to make sure that the geometry is lined up, and that we have no duplicate data. (Not doing this is a common cause of a failed or strange analysis run.)
Head to merge items.
Under label, select ‘Nodes’.
Click OK, and go to the DOS window.
If the last 3 lines are like this, there are no problems and no changes to the model.
Otherwise, ANSYS will attempt to merge together any nodes that are a small distance apart, and the number will be reported here. As long as the changes were sensible (if the tolerance is small, they should be) then we can continue.
Step 8: Run analysis
We can now run the simulation. Click on Current LS.
The following window appears, giving the analysis parameters. This can be closed if you want.
Click OK below.
This starts the analysis. An analysis of a few thousand members will take about a minute.
Yay! Click close.
The results are now saved in memory, and we are now free to process and analyse these results.
Step 9: Sanity checks
It’s good practice to make sure that our results make sense, and that we haven’t made any mistakes. In this model there a few things we can do.
As one example, if we know the volume of material in our structure, its density and the gravitational constant used, we should be able to calculate the expected total sum of the Z component of the ground reactions. Firstly, calculate by hand what you would expect this to be, in our case 58270kN.
To verify this in ANSYS, head to Reaction Solution.
Then select FZ and press OK.
Head to the bottom, and check that the total value is correct.
Step 10: Analysing results
For some deflection results, head for Nodal Results.
Click on Displacement Vector Sum.
Here is our deflection plot! Looks like the maximum deflection is 59mm.
Many more kinds of results are available in the Postprocessing menu.
Step 11: Manipulating the contour map
The scale can be adjusted to any level. (You might want to set it to a certain level to make it comparable with other results.)
It can also be turned on and off.
Step 12: Saving
If the job number and directory has already been set up and a “save as…” has already been done once, then simply click save.
In Windows Explorer, you will notice that there is now a wide range of files (hence why it is useful to have a different directory for every project).
These files are very large, and contain all of the information contained about your project, including meshing, element properties and latest analysis results. This allows you to resume exactly where you left off when you re-open a project.
Step 13: Re-opening a saved project
Opening a project is NOT as simple as selecting ‘open’! There are a few steps.
First, set the working directory to the folder where your project files are contained (as in step 1). Then, set your job name to that of the project you wish to open.
Then, click on ‘resume jobname.db’.