Vous êtes sur la page 1sur 114

Finite Element Analysis using

Open source Software


Mesh

Deformed shape

Von Mises

Tresca

- by Dharmit A. Thakore

Finite Element Analysis with


Open Source Software

First Edition

Finite Element Analysis with


Open Source Software
First Edition

Dharmit Thakore, CPEng, RPEQ


Moonish Ent. Pty. Ltd.
Brisbane, QLD, Australia

Moonish Enterprises Pty Ltd


GPO Box 1299, Brisbane, QLD 4001, Australia
2013

Credits and Copyright


Written by: Dharmit Thakore
dharmit@moonish.biz

Publisher: Moonish Ent. Pty. Ltd


engineering@moonish.biz
http://engineering.moonish.biz
Graphic Design / Layout: Lomesha Thakore

Edition 1 2013 Dharmit Thakore

No part of this publication may be reproduced, stored or transmitted in any form or by any means, electronic,
mechanical or otherwise, without prior written consent from the publisher, except for the inclusion of brief quotations in a review. You may store the pdf on your computer and backups. You may print one copy of this book
for your own personal use.
Disclaimer: The information contained in this book is based on the authors experience, knowledge and opinions. The author and publisher will not be held liable for the use or misuse of the information in this book.

To
My wife,
Our beloved son
&
Open Source Software

About the Author


Dharmit Thakore is the Director of Moonish Enterprises Pty Ltd at Brisbane, Queensland, Australia. He practices as a Mechanical / Piping Engineer in Queensland. He received his Bachelors degree from Birla Vishwakarma Mahavidhyalaya, Vallabh Vidhyanagar, Gujarat, India which was affiliated with Sardar Patel University.
He started his engineering career as a young Graduate in Larsen & Toubro Sargent & Lundy, Vadodara. He
came to Australia for further studies and settled here. He received his Registered Professional Engineer in
Queensland (RPEQ) recognition early in his career and subsequently obtained his Chartered Professional Engineer (CPEng) as a Mechanical / Piping Engineer.
Dharmit has broad interests, which include finite element analysis, design, optimization and Open Source software. He is a member of ASME, Engineers Australia and Board of Professional Engineers in Queensland.

Contents
Foreword1
What motivated me to write this book

This book is written for

This book is not written for

What software would you need to follow through

What are the steps in Finite Element Analysis

Study Cases

Case 1: Getting to know Salome-Meca

Case 2: Editing .comm file

Case 3: 1D FE Analysis

Case 4: 2D Frame FE Analysis

Case 5: Axi-symmetric FE Analysis

Case 6: 2D Shell FE Analysis

Case 7: Basic 3D FE Analysis

Case 8: Pseudo Assembly FE Analysis

Case 9: 3D Analysis with Hexahedral Linear Mesh

Case 10: 3D Analysis with Hexahedral Quadratic Mesh

Case 11: 3D Assembly FE Analysis

Getting to know Salome-Meca

Step 1: Purpose of the FE Analysis / Description of the problem

Step 2: Input values for the FE analysis

Step 3: Model Geometry

Step 4: Meshing Geometry

13

Step 5, 6, 7, 8 and 9: Salome-Meca Linear Static Analysis Wizard

16

Step 10: Run the analysis

20

Step 11: Post Processing of the Results

21

Summary35

Editing .comm file

37

Step 1: Purpose of the FE Analysis / Description of the problem

38

Step 2: Input values for the FE analysis

38

Step 3: Model Geometry

39

Step 4: Meshing Geometry

41

Step 5, 6, 7, 8 and 9: Salome-Meca Linear Static Analysis Wizard

43

Step 8 and 9 again: Manual editing of .comm file

45

Step 10: Running the analysis

49

Step 11: Post Processing of the Results

50

Summary51

1D FE Analysis

53

Step 1: Purpose of the FE Analysis / Description of the problem

54

Step 2: Input values for the FE analysis

55

Step 3: Model Geometry

55

Step 5, 6, 7, 8 and 9: Creating .comm file with Eficas

65

Step 10: Run the analysis

82

Step 11: Post Processing of the Results

84

Result85
Conclusion86

End of Preview

87

Appendix A
Other sources of information

Appendix B
Efficient Application to generate .comm file in English

89
89

91
91

Foreword

Foreword
During my university life, I had taken Computer Aided Design (CAD) and Finite Element Analysis (FEA) as
my elective subjects. As a young university student, I was fascinated by the power of computers and the help
that they provide to obtain results that are easy to understand for a complex simulation. Going from Drawing
boards, pencils and erasers to CAD with everything on the computer, having multiple revisions of the same
drawing and the powerful undo and redo functionality were one of the journeys that I will never forget.
At that time, our university was having education version of AutoCAD (I wont tell the version of AutoCAD
as that will reveal my age ) for drafting and Solid Edge for Finite Element Analysis. The only problem was
that outside university we were on our own. We even didnt have student versions of those software to use at
home.

What motivated me to write this book


It was not until 2006 that I was introduced to the world of Linux, Ubuntu (in particular) and Open Source
Software. I was captivated by the motivation of so many active developers around the world and the effort that
they put in to develop Open Source software. The only problem I had with Open Source Software was that
these software, even though powerful enough to compete with commercially available software, didnt had a
reference manual, a user guide or an easy step by step guided method on how to use the software starting from
scratch. Selected few do have excellent resources but most open source software lack them. Almost all software had expected that the user will figure out the way. This gap is bridged by so many active users of Open
Source who put on video tutorials and write how-to manuals and publish on the internet. A big kudos to those
Volunteers who put in their time and effort for Open Source software to help others.
I wrote this book so that someone can pick up this book, start using Salome, GMSH and Code Aster straight
away. I wanted the learning curve to be relatively easy. So I designed this book such that the user does a few
exercises by following the step by step guide in this book, feel confident in the procedure and are then able
to use the Open Source software the way they want. I wrote this book for the reason that the tutorials on the
internet and the videos on websites are scattered. I want to help someone have all the information in one single
place, in an easy to follow manner, which will enable them to learn the fundamentals of the software in a fun
and easy format.

This book is written for


Those who have a passion for learning Open Source software, particularly CAD and FEA software. This book
is written for those who are new to software like Salome and Code Aster.
If you are having trouble understanding where to start with Salome and Code Aster, this book is written for
you. If you are having troubles understanding the computer translated Code Aster User Documents (which are
rich in excellent source of information), this book is written for you. If you want easy reference to 75% of FEA
problems that are encountered by engineers in day to day life and want to do that by Open Source Software, this
book is written for you.
This book is for those who dont want to waste their time in finding tutorials online and trying to make logical
sense. This book starts with a very basic introduction of what to do to perform FE Analysis, and then with each
new Chapter it introduces new concepts in an easy to understand format. If you want to learn how to do FE

FEA using Open Source Software


Analysis with Open Source software in a weeks time, than this book is for you.

This book is not written for


Someone who is an advanced users of Salome and Code Aster, who already know how to use these software,
know what are their limitations and what are they capable of. This book will be of limited help to you unless
you want to gift it to someone who is starting out fresh and whom you are mentoring and dont want to answer
fundamental questions.
If you are the developers of Salome and Code Aster, then I doubt this book will be of any help to you, but if you
are developers of only Salome or only Code Aster, then this book might be of use to you.
In short, if you are advanced user and after reading the topics that I have covered in this book, if you can say to
yourself that the information covered in this book is something that I already know, this book is not for you.
This book is also not written for someone who does not know what Finite Element Analysis is. FE Analysis, as
a fundamental, should be known to the user of this book.

What software would you need to follow through


When I started out with Open Source CAD and FEA, I was very pleased to find out that a full-fledged operating system having all the software required for an engineer are packaged in a nice bundle named CAELinux.
CAELinux is an Operating system based on Ubuntu. All of the examples presented in this book can be run with
CAELinux 2011 operating system. CAELinux 2011 can be downloaded from the websites Download page.
This page is rich in information on how to use this OS as a Live DVD or how to install it side by side with your
existing Windows or Linux OS. If you dont want to install something permanent on your computers hard disk,
consider using it on a Virtual machine.
I will leave the actual decision of where to install the OS to the reader of this book.
The download link of CAELinux (at the time of writing this) is http://www.caelinux.com/CMS/index.php?option=com_content&view=article&id=51:caelinux-2011&catid=69&Itemid=58
Softwares used for this book are
1. Salome version 6.4
2. Code Aster version 10.3
3. GMSH version 2.5
All of the above software are available in CAELinux 2011 DVD so if you have installed it, dont worry about
any more installations. If you want to use latest software, install the above versions or latest versions of these
software on your computer. Please note that if you install a software that is of higher version than that mentioned above, the screenshots may differ, but the fundamental concepts remain the same.

What are the steps in Finite Element Analysis

What are the steps in Finite Element Analysis


This book does not teach you what Finite Element Analysis is. You need to be familiar with the general form of
Hooks law which states that For small deformations of the object, the amount of deformation / displacement
(Dx) is directly proportional to the deforming force or load (F). The constant of proportionality in the above
equation is the stiffness (k) of the object.
Generally the stiffness of the object is known due to the fact that we would have its shape and material properties as a given. If not, Either we would be optimising its shape by finding stresses generated in the object due
to applied loads (e.g. objective of the study can be optimise web thickness of gussets or optimise thickness of
a pressure vessel Nozzle saddle), or we would be checking which material is most suitable for the given object
(e.g. objective of the study can be can Aluminium alloy be used to reduce the weight of the object?). So stiffness k would be fixed for the given study based on shape and material selected.
The next step is boundary conditions. Any given object has to be sufficiently supported in the real world and
FEA will emulate these supports, either there is a fixed support (e.g. bolted or welded joint), sliding support
(e.g. shaft in hub or pipe shoe on structural steel). By applying these boundary conditions of supports, we are
providing / fixing values of displacement. There would be forces applied to the object, either by gravity (selfweight) or by pressure applied on a surface or force applied on the object. By adding these boundary conditions
of loads, we are providing / fixing values of force / load.
After all of the above is given to Code Aster, it tries to solve the equation which will be in matrix form with the
given input values of displacement and forces and obtain displacement for the entire object. These displacements (Strains) are converted to Stresses (Stress = Strain multiplied by Youngs Modulus of the material) and
are displayed as a coloured model or exported as a table.
Figure on the next page shows general steps to perform FEA.

FEA using Open Source Software

Geometric Model not 3D


model

In the coming chapters of this book, we will be using above philosophy to carry out Finite Element Analysis of
1D, 2D, 3D models of the objects and obtain Displacements, Forces and Stresses. Interpretation of results will
be left to the reader.

Study Cases

Study Cases
Real world examples are used in this book to describe each Study cases. Not only will this make it more interesting, it will give users a better understanding of how theory translates to practical analysis or what to do when
rubber meets the road.
To make this more interesting a small role play is introduced in this book (at the start of the chapters) in which
the main character Esha is a Fresh out of University Young Engineer who joined a Design firm and was given
responsibility to carry out FE Analysis of calculations that were traditionally performed by either hand calculations or the Rule of thumb method was used.
A supervisor John is appointed to mentor Esha. John is passionate about the use of Open Source software
and knows the power they possess. To break the ice, John shows Esha the use of Salome-Meca by giving a very
small example of a 1m cube with pressure of 1MPa applied on top face and in another example he shows stresses generated in a 30m tank when a hole is cut into it.
After showing how easy it is to conduct FE Analysis with Salome-Meca, John shows Esha what the fundamental steps to perform Stress Analysis are and how to replicate them in Salome-Meca and Code Aster.
John asks Esha to conduct FE Analysis of real world examples that will help her in building her capabilities and
confidence.
With every new example a new concepts will be discussed and explained in an easy to follow format.

Case 1: Getting to know Salome-Meca


In this case a very easy FE Analysis of a Solid cube will be stress analysed. It will be fixed at the bottom face
and a pressure of 1MPa will be applied on its top face.
A step by step procedure will be discussed that will take you on a journey from where you are now to knowing
Salome-Meca better. You will understand concepts of different modules of Salome-Meca viz. Geometry, Mesh,
Aster, Post-Pro etc. You will see how to make a simple geometry and make it ready for Meshing. You will
create the mesh (if you are following with the book) out of the Geometry. You will understand the Wizard that
Salome-Meca has and how to enter required parameters. After the analysis is complete, you will review the
results that are given by default, visualise them and try to make sense out of them.

Case 2: Editing .comm file


With the first case, you will be thinking that Salome-Meca can only be used with its limited Wizard Analysis. But in the Second case John will break this thought and show you how to edit the .comm file to give you
results and analysis type that you want.
You will understand how to use Salome-Meca Wizard to generate the default .comm file. How to edit this file
manually and then conduct the FE Analysis Also how to have two different analysis in a single hdf study file.

FEA using Open Source Software

Case 3: 1D FE Analysis
With this case, John will show how manually calculated results of a simple Pipe Guide which behaves as a cantilever beam are calculated by Salome Meca by the use of 1 Dimensional (1D) Analysis.
Here you will learn a new application, GMSH which will be used to generate the geometry and mesh it. John
will discuss what should be taken care of in 1D analysis as well as the use of Aster module, which has more
power than the Wizard.

Case 4: 2D Frame FE Analysis


This case takes 1D analysis carried out previously and adds one more dimension to it. A 2D frame is built and
Analysed in this study.
John shows how to model a 2D frame in GMSH, how to mesh it and finally how to perform FE analysis using
Salome-Mecas Aster module.

Case 5: Axi-symmetric FE Analysis


The next logical step in performing FE analysis is Axi-symmetric analysis. This is what will be discussed in
this section of the book.
How to generate 2D geometry for Axi-symmetric model of a Pressure Vessel. John will ask Esha to demonstrate that the thickness required of a hemispherical shell is half that of a cylindrical shell by analysing a Pressure Vessel shell and head junction using Axisymmetric model. If you are following along you will get a hands
on idea of the way Axi-symmetric analysis works and how Salome-Meca Wizard takes care of the minor details
of the analysis.

Case 6: 2D Shell FE Analysis


Some of the complicated 3D geometries are better modelled as 2D shells to reduce the burden on computing
power. In this case, a shell FE analysis will be carried out.
This will be another FE analysis that Esha is asked to do. Esha has to replicate the same 1D Pipe Guide results
by using Plate / Shell elements in Salome Meca. Esha will have some problems of understanding where to get
information for the analysis, but with careful guidance given by John she will be able to successfully perform
this analysis and demonstrate results to John.

Case 7: Basic 3D FE Analysis


This case re-introduces the world of 3D analysis, where a familiar Pipe Guide Analysis that was carried out by
1D and shell analysis will be carried out with 3D model.
Here additional concepts of How to apply Force on a Surface is described. Also described is the difference
between 1D, Shell and 3D analysis results. When Esha gets results in her 3D analysis that are inconsistent with
previously carried out 1D and shell analysis, John explains her the difference in results.

Study Cases

Case 8: Pseudo Assembly FE Analysis


Once you get a taste of 3D FE Analysis, and you get a very good feel of how to do it efficiently in Salome-Meca
and Code_Aster, the next step is to see stresses in individual parts of the Model.
In this case, John describes a way to conduct 3D FE Analysis for Pipe Shoe Weld Assembly which has only 1
mesh but the user can visualise stresses for individual Assembly Parts.

Case 9: 3D Analysis with Hexahedral Linear Mesh


This is the study which shows how to conduct FE Analysis with Hexahedral Linear mesh elements. John asks
Esha to conduct the analysis that they did for Axisymmetric Pressure Vessel with 3D hexahedral elements.

Case 10: 3D Analysis with Hexahedral Quadratic Mesh


After the first exposure to 3D analysis and Hexahedral elements, John thought that it is time to take this up a
notch and refine the mesh elements by Quadratic elements.
In this analysis a Pressure Vessel and Nozzle junction is analysed with Hexahedral mesh elements that are Quadratic in nature. A force of 10kN will be applied on the face of the nozzle and the stresses and deflection will be
obtained from the analysis.

Case 11: 3D Assembly FE Analysis


This case will show one of the true capability of Salome Meca where a previously conducted 3D FE analysis
will be re Analysed by separating individual parts and then conducting the analysis as an Assembly.
This analysis will be focused on stresses in individual parts and how they interact with each other at their Contact points.
After describing all the types of analysis they are going to have a look at, John showed Esha her desk where she
will be working as an intern. This computer was not a hi-fi top of the notch computer but a 2 years old computer which had seen better days. It has CAELinux preinstalled on it. John explained that CAELinux will work on
moderately powerful computers which are 64 bit, have around 2 to 4 GB Ram and a graphics processor.

FEA using Open Source Software

Getting to know Salome-Meca

Chapter 1
Getting to know Salome-Meca
Before starting straight on FE Analysis, John explained
that a bit of homework before hand will make sure that the
study goes smooth. It is always good to accumulate all the
required information viz. What are the geometric inputs, what
the material properties are and what is the Specific results that
are required off this analysis.
Even though John was showing Esha how to operate Salome-Meca,
he explained the input values, the geometry they were dealing with
and the specific results they were after. Esha was writing down the
information that she got from John verbally.

FEA using Open Source Software

Step 1: Purpose of the FE Analysis / Description of the problem


As far as Esha understood, the FE Analysis that John was doing was a very simple FE Analysis of a Carbon
Steel Cube that is fixed at the bottom end and a pressure of 1MPa and 10MPa (2 different Load Cases) is applied on the top face. The main purpose was to get familiar with Salome-Meca and getting in the mind set of
how to conduct FE Analysis.

Step 2: Input values for the FE analysis


Dimensions of the Cube: 1000mm x 1000mm x 1000mm
Youngs Modulus: 2.1e5 MPa
Poissons Ratio: 0.3
Pressure Applied on Top face: 1MPa and 10MPa (As two separate load cases)

10

Getting to know Salome-Meca

Step 3: Model Geometry


Booting the computer was fast and CAELinux was ready for inputs. John showed Esha where the Software she
would be using were and where to save files. Step by Step example of what needs to be done to generate the
geometric model of a cube is shown below by using Screen Shots.
Following steps are to be taken after you have started you CAELinux OS.
#
1

Description
Figure
In CAELinux main toolbar, Click Applications -> CAELinux -> Salome-Meca 2011.2
After Salome-Meca Application Loads it will look like figure below

Click Down Arrow where it


says Salome and Select Geometry.
2

A window pops up like the figure on the right. Information


on the window are self-explanatory.
Select New

11

FEA using Open Source Software


#

Description

Figure

In Salome-Meca main toolbar,


Click New Entity -> Primitives -> Box

In the Box Construction


window that pops up select
Second Algorithm (Option
Button)
Keep Default Name Box_1
In the Dimensions at the origin, fill in values as shown in
the figure on the right
Click Apply and Close

Select 5th Button from the left


in the tool bar shown on the
right and the Entire box will fit
to screen.1

Thats it, you have created the


geometry and are viewing it
properly and this geometric
model will be used for Analysis.
Now to give this geometry
some Geometric groups that
will be helpful in FE Analysis,
we carry out following steps

12

Getting to know Salome-Meca


#

Description
Figure
Make sure that Box_1 is selected in the Geometry Tree on
the Left, then
In Salome-Meca main toolbar,
Click New Entity -> Group ->
Create
In the window that pops up,
select third Algorithm (Option
Button) for selecting Faces on
the Geometry.
Give it a name Fixed.
Rotate the model so that you
can see the bottom face.2

Once you can see the Bottom


face, Click the mouse button
again to deselect it so that you
can select the face.3
Click on the Bottom face and
it will be highlighted with
White edges.
Click Add button in the
Create Group window and the
face number will be added as
shown.
Click Apply.
Repeat the steps for selecting the top face and name
it Press. Add it and then
instead of clicking Apply
click on Apply and Close

13

FEA using Open Source Software


#

Description

Figure

Your Object Browser on the


left should look like the adjacent figure.
7

Right click on Box_1 and select Show only OR click on


the Eye icon on the left of
Box_1 and it will do the same
thing.

Save your file at a proper destination and give it a meaningful name. Here John gave it a
name Case1.hdf

As John saved the file, Esha was intrigued by the ease with which simple geometries can be done in Salome-Meca. John explained that the next step is to Mesh this Geometry.

14

Getting to know Salome-Meca

Step 4: Meshing Geometry


Step by Step example of how to mesh the geometry are shown below.
Following steps assumes that you have completed Geometry Creation steps as per previous Section and have
saved the file to a meaningful location with a meaningful name.
#

Description
In Salome-Meca main toolbar,
Click the down arrow where
it says Geometry and Select
Mesh.

Figure

Make sure that Box_1 is still


selected in the Object Browser
and click Mesh -> Create mesh
and a window will pop up as
shown here.
Keep default name of the mesh
as Mesh_1.
Make sure Box_1 is in the Geometry field. (If not, select the
curved arrow next to Geometry
and select Box_1)
In the 3D, Algorithm drop
down select Netgen 1D-2D-3D

For the Hypothesis (which is


grey at this stage and shows
<None>) Click on the Gear
Button and select Netgen 3D
parameters.
In the Hypothesis Construction
window that pops up, keep
default parameters and click
OK

15

FEA using Open Source Software


#

Description

Figure

Now you will be back to the


Create mesh window.
Click Apply and Close
button

Nothing happens to the 3D


model. So where is the mesh?

If you check Object Browser


you will see three new entities
added to the Mesh Tree.
Hypotheses, Algorithms and
Mesh_1.
Mesh_1 has an exclamation
mark on it which suggests that
it needs to be updated.

16

Getting to know Salome-Meca


#

Description

Figure

Right click Mesh_1 in the Object Browser and select Compute.

After some time, if everything


goes well a Mesh computation
succeed Window will pop
up which will give information about the mesh that was
created.
It shows total number of Nodes,
Edges, Faces and Volumes. It
also shows whether the Mesh
is Linear or Quadratic (more on
this later)

Close Mesh Information window and you will be able to see


the mesh that was created for
your Analysis

It is this easy said John and then clicked on Save Button before going any further. Then John went on and
said that In the next section, we will discuss how to build information for a Linear Static FE analysis by using
Salome-Meca Wizard.

17

FEA using Open Source Software

Step 5, 6, 7, 8 and 9: Salome-Meca Linear Static Analysis Wizard


John said that we have completed Steps 1 and 2 for conducting a FE Analysis. We made our Geometric model
and gave it Geometric Groups and then we created a 3D mesh of the Geometric model which will be used for
FE Analysis. John re-iterated the steps as he knew that the more Esha repeats the steps the more confident she
will get.
#

Description
In Salome-Meca main toolbar,
Click the down arrow where it
says Mesh and Select Aster.

Figure

Make sure that Mesh_1 is still


selected in the Object Browser
and in Salome-Meca main toolbar, Click Aster -> Wizards ->
Linear Elastic, and a window
will popup.
The first step is to define the
type of Model. This is Step 3
in FE Analysis figure.
Select 3D, from the drop down,
if not already selected and click
Next.
The next step is to select the
Mesh that will be used for the
Analysis. This is Step 4 in
FE Analysis figure.

Click the Curved Arrow, now


if Mesh_1 was already selected
in the Object Browser, it will
be added to the Analysis, if not
Select Mesh_1 in the Object
Browser.
Use geometrical groups
should be automatically selected, and if not, select this option
and click Next

18

Getting to know Salome-Meca


#

Description

Figure

Next define the Material Properties to be used in the analysis. This is Step 5 in the FE
Analysis figure.

Add Youngs Modulus and


Poissons Ratio.
As we have our dimensions in
Millimeters, our Youngs Modulus should be in MPa.
Input the values as shown in
the adjacent figure and click
Next.
Next we input Geometric
Boundary Conditions. This
is Step 6 in the FE Analysis
figure.

This is where the Geometric


Groups that were defined at
Geometry creation stage comes
in handy.
If Fixed is not already selected by default, double click below Group and select Fixed
from the options.
If DX, DY and DZ values are
not already 0 (zero) add it
and click Next

19

FEA using Open Source Software


#

Description

Figure

Next input Load Boundary


Conditions. This is Step 7 in
the FE Analysis figure.
5

If Press is not already selected by default, double click


below Group and select Press
from the options.
If Pressure value is not already
1 (One) add it and click
Next

Till now we have defined all of


the information that is required
to complete the FE Analysis.
Now we save the .comm file
which is the command file that
passes on the information we
just input in the wizard to Aster.

Click on the Button with File


icon and by default you should
be taken to Save As window
with the location of the hdf
file that we had saved earlier.
Give a meaningful name so that
it becomes easy to remember
later.
John said that As we have
used Pressure of 1MPa, I have
given this a filename of Pressure1.comm
Click Save

20

Getting to know Salome-Meca


#

Description

Figure

After saving the file, you will


be taken back to the Wizard
where the file location will be
displayed.
Then you need to Click Finish.

A new branch Aster will be


created in the Object Browser.
8

Open Aster branch and you


will see linear-static underneath it.

This concludes the Pre-Processing stage of FE Analysis said John while he clicked on the Save button. He
added, Salome-Meca wizards make it very easy to conduct a basic analysis. Esha noted that it only took them
10 minutes to reach to this stage and most of Johns time was taken up to explain her how to use the Wizard. If
John had to do this analysis by himself, he would have reached this stage in no time. John said, Next, we will
discuss how to run a Linear Static FE analysis by using Salome-Mecas Aster module.

21

FEA using Open Source Software

Step 10: Run the analysis


If you have created your geometry, meshed it properly and have created the Command file that tells the Processor what is the type of analysis, what the boundary conditions are and what results we are after, the next step
becomes easy said John. But we havent mentioned anywhere what results we are after said Esha, quickly
pointing out to John that he might have missed a step somewhere. John smiled and he was happy that Esha was
paying attention. He said, Salome-Meca makes it easy for the first time users and depending on the Analysis
Type the user selects, it selects what results will be generated. He went on and said that This output type
can be changed based on the results we are after by editing the .comm file, but for this analysis we will use the
defaults
#

Description

Figure

Right Click the linear-static


branch in Object Browser and
click on Run.

A new window will pop up and


there will be numbers flying
around the screen.
Right now the information that
was passed on to the Processor
for Analysis is calculated.
If everything goes right and
new Branch Post-Pro will be
added to Object Browser.

John said that If you cannot see Post-Pro branch in the Object Browser, it means that there is
something wrong with the analysis.
If an error occurs at this stage, it would be better if the user Re-iterate all the steps carefully and
conduct the analysis again.

John clicked on the save button and said, As we can see that a Post-Pro node has been added to the tree, Processing has completed and that results are ready for us to be evaluated. Depending on the Type of Analysis,
it can take a few minutes as it happened now or it can take several hours said John. Next we will see some of
the ways we can visualize the results in Post Processing Module of Salome-Meca.

22

Getting to know Salome-Meca

Step 11: Post Processing of the Results


We will find out the results of our FE Analysis in this step said John.

Description

Figure

In Salome-Meca main toolbar,


Click the down arrow where it
says Aster and Select Post-Pro.
1

Open the Post-Pro branch till


you see three branches in the
parent branch of Fields.
Fields is the branch that
holds the results of the analysis.

23

FEA using Open Source Software


#

Description

Figure

RESU____DEPL means,
Result (RESU) of the Displacements (DEPL) of the nodes.
2

Open this branch and Right


Click on 0 , -. From the pop
up window select Deformed
Shape
Check Magnitude coloring and
keep the default Scale Factor

24

Getting to know Salome-Meca


#

Description

Click Scalar Bar Tab where


if you want, you can change
several parameters.

Figure

At this moment keep everything to default.

25

FEA using Open Source Software


#

Description

Click Input Tab. Notice that


the Face groups Fixed and
Press are shown here greyed
out.

Figure

Nothing to do here at this stage.


Just Click Apply and Close

26

Getting to know Salome-Meca


#

Description

A new sub-branch Def.Shape


is created in RESU____
DEPL -> 0 , - branch.

Figure

The deformed Shape is shown


as Wire frame model.

Notice that at the bottom of the window a graph of Deflection with minimum and maximum
deflections is shown.
The maximum deflection here is 0.004734mm

Right Click on Def.Shape


and select Show Only and
only the Deformed shape will
be visible.

Right Click on Def.Shape


again and select Representation
-> Surface frame and you will
be able to see the deformed 3D
model.
As can be seen maximum
deflection is at the top of the
cube (as expected) and zero
displacement is at the bottom of
the cube (again as expected)

27

FEA using Open Source Software


#

Description

Figure

Now, in this step, Right Click


on 0 , -. From the pop up
window select Deformed
Shape
Check Magnitude coloring and
keep the default Scale Factor

Click Scalar Bar Tab and


then in the Scalar range: section, Click the down arrow on
Scalar Mode and Select [1]
DX, -. Keep everything else
default and Click Apply and
Close
As can be seen two or more
different type of visualisation
can be added to the study if
required.

28

Getting to know Salome-Meca


#

Description
Right Click on Def.Shape:1
and select Show Only and
only the Deformed shape will
be visible.

Figure

Again, Right Click on Def.


Shape:1 and select Representation -> Surface frame and you
will be able to see the deformed
3D model.
Here you will be able to see
how the cube deforms in X
direction only.

10

If you zoom in and rotate the


model you will be able to see
bulging occurring in the X
direction.
You can view deflections in Y and Z direction by following step 8 above and Selecting DY or
DZ.
Play around with the Scale Factor in the Deformed Shape Tab and see the deformation change.

29

FEA using Open Source Software


#

Description

Figure

RESU____SIEQ_NOEU is the
Result (RESU) of the Stress
(SI__) Equivalent (__EQ) or
Equivalent Stresses at Nodes
(NOEU).
11

Open this branch and Right


Click on 0 , -. From the pop
up window select Scalar Map
Select [1] VMIS (Von Mises
Stress) from the Scalar Mode
and keep the rest as default
Click Ok

30

Getting to know Salome-Meca


#

12

Description

Figure

A new sub-branch Scalar


Map is created in RESU____
SIEQ_NOEU -> 0 , -
branch.
The Entire geometry is coloured with the Von Mises
Stresses which is shown as a
Solid model.

31

FEA using Open Source Software


#

13

14

Description
Right Click on Scalar Map
and select Show Only and
only the Von Mises Stresses
will be visible.

Figure

Again, Right Click on Scalar


Map and select Representation
-> Surface frame and you will
be able to see the Von Mises
Stresses as 3D model.
As can be seen maximum stress
is at the top of the cube (as expected) and zero displacement
is at the bottom of the cube
(again as expected)
Notice that at the bottom of the window a graph of Von Mises stresses with minimum and maximum stresses is shown.
The maximum stress here is 1.02521 MPa

32

Getting to know Salome-Meca


#

Description
In a similar fashion of showing
multiple branches of Deflection, multiple branches of
Stresses can be shown. A Scalar Map of Tresca Stresses can
be added to the study as well.

Figure

Right Click on 0 , - subbranch. From the pop up window select Scalar Map
15

In Scalar Bar Tab in the


Scalar range: section, Click the
down arrow on Scalar Mode
and Select [2] TRESCA, -.
Keep everything else default
and Click Apply and Close
Right Click on Scalar Map
and select Show Only
Right Click on Scalar Map
and select Representation ->
Surface frame
RESU____SIGM_NOEU is
the Result (RESU) of the Stress
(SIGM) or SIGMa at Nodes
(NOEU). Six stresses Sx, Sy,
Sz, Sxy, Sxz, Syz
Open this branch and Right
Click on 0 , - sub-branch.
From the pop up window select
Scalar Map

16

Select [1] SXX (Stress in


X direction) from the Scalar
Mode and keep the rest as default and Click Ok
Right Click on Scalar Map
and select Show Only
Right Click on Scalar Map
and select Representation ->
Surface frame.

33

FEA using Open Source Software


Now lets see how we can run a second analysis in the same hdf file by adding a new FE Analysis in Aster Module.
#

Description
Click the down arrow where
it says Post_Pro and Select
Aster.

Figure

Make sure that Mesh_1 is


selected in the Object Browser
and click Aster -> Wizards ->
Linear Elastic and a window
will popup.
Select 3D if not already selected and click Next.

Click the Curved Arrow and


select Mesh_1 in the Object
Browser (if not already selected).
Use geometrical groups
should be automatically selected, if not select this option and
click Next
Use the same Geometric
Boundary Condition. For Load
Boundary condition, instead of
Press value to be 1 double
click it and input a value of
10.
Click Next.

34

Getting to know Salome-Meca


#

Description

Save this .comm file as Pressure10.comm to differentiate


it from the previous analysis
carried out.

Figure

Click Save
Click Finish

A new analysis will be added to


Aster linear-static0

35

FEA using Open Source Software


#

Description

Figure

Right Click linear-static0 and


select Run.
4

If everything goes well a new


branch will be created in the
Post-Pro module called linear-static0.rmed

To find out the Deflection and


Stresses for this analysis, repeat
steps 2 to 16 shown previously.

Well thats the complete FE Analysis of a Carbon Steel Cube. The analysis I just showed you is very helpful
to understand the steps required in Finite Element Analysis. It might not have any practical use though, said
John.
John saved the entire Analysis and closed Salome-Meca. Now I understand the fundamental steps of how to
perform FE Analysis in Salome-Meca but there are quite a few questions that come to my mind said Esha.
John was happy to see that Esha had questions to ask as he now knew that she was paying attention.
What if I want to carry out Self Weight analysis, or apply Force instead of Pressure? How do we do that in
Salome-Meca? asked Esha. That is what I am going to show you next but before I do that lets recap of what
we did right now said John.

36

Getting to know Salome-Meca

37

FEA using Open Source Software

Summary
Esha listed out the steps that they followed to perform the analysis out loud
1. We Started Salome-Meca and entered Geometry Module and
created a New Study
2. We created a Primitive Cube and named the top
and bottom face which will be used in FE
Analysis
3. We meshed the model as Tetrahedral
mesh in Mesh Module
4. Then we entered Aster Module and created a new Analysis by using Linear Static
Analysis Wizard
5. We entered required information, save the
.comm file and completed the Wizard
6. We Ran the analysis and as everything went well,
we were presented with Post-Pro Module Option
7. We entered Post-Pro Module and saw Deflected Shape
of the Model, Von Mises Stresses and Tresca Stresses.
Very good said John, but dont forget that even before you start
the analysis make sure you have all the input and output parameters
for your study that has been discussed with the client.

38

Editing .comm file

Chapter 2
Editing .comm file
John explained that the analysis he was going to show next was a very simple analysis and follows the same
steps that he had shown her previously. In this analysis they will manually edit the .comm file, remove the
pressure load and apply Gravity load to the entire 3D model.

39

FEA using Open Source Software

Step 1: Purpose of the FE Analysis / Description of the problem


John told Esha that this analysis is for understanding how to edit a .comm file manually. He will show Esha
how gravity load applies to a cantilever beam and how does the analysis compare with Manual calculation. The
main aim of the study was to see the effect of self-weight on a 1m Long and 10mm square Carbon Steel cantilevered rod. Only self-weight of the rod was considered in this study. John said that here we will not be going
into details of matching the results of FE Analysis with hand calculations based on theory.

Step 2: Input values for the FE analysis


Dimensions of the rod are as follows
Width and Length of Rod: 10mm x 10mm
Length of Rod: 1000mm (1m)
Youngs Modulus: 2.1e5 MPa
Poissons Ratio: 0.3
Density of Carbon Steel: 7.8e-9 tonne/cubic mm (7800 kg/cubic meter)
Gravitational Acceleration: 9800 mm/square second (9.8 m/square second)

40

Editing .comm file

Step 3: Model Geometry


John started Salome-Meca and created a new Study. He then enabled Geometry Module and started the input
for Rod 3D model.

Description

Figure

For generating the Square Rod


3D model, we need to create
a box.
1

Click New Entity -> Primitives -> Box and enter the
values as shown in the figure
and leave its Name as Box_1.
Click on Apply and Close

41

FEA using Open Source Software


#

Description

Figure

Now we need to create a Face


group of the face which will
be used in FE Analysis to fix
the Geometry.
Rotate the model so that the
face on the YZ plane is visible.
Click New Entity -> Group ->
Create.
9

Select Third Option Button


Face.
Change the Name to Fixed
Now select the Face of the
square rod that is on the YZ
plane.
Once the correct Face is
selected Click Add and then
Click Apply and Close as
we do not need to create any
more Groups for this study

Save the file with a meaningful name. Next we will Mesh it, said John.

42

Editing .comm file

Step 4: Meshing Geometry


John said that in this study we will mesh the Model a bit finer than the default given by Salome-Meca.

Description

Figure

Select Mesh Module in Salome-Meca.


Click on Box_1 in the Object Browser and then Click
Mesh -> Create Mesh.

In the Window, make sure


Box_1 is selected as Geometry.
Select Netgen 1D-2D-3D as
the Algorithm and for the
Hypothesis Click on the Gear
Button and Click Netgen 3D
Parameters.
In the window that pops up,
leave the Default settings and
Click Ok.

Your Create Mesh window


should look like the adjacent
figure.
Click Apply and Close

43

FEA using Open Source Software


#

Description

Figure

A new Mesh_1 will be created


in the Object Browser.
Right Click Mesh_1 and select
Compute.
3

If Everything goes well you


will be presented with the
information of the mesh that is
created.
Click Close on this window.

John clicked on the Save button and asked Esha Are you ready for the next Step?
You bet I am was the answer John got.

44

Editing .comm file

Step 5, 6, 7, 8 and 9: Salome-Meca Linear Static Analysis Wizard


John said Esha, do you know what we do next?
Esha explained that the next step is to use Salome-Meca Linear Static Wizard to create a .comm file which will
hold information about the analysis that we are going to do. Then Esha paused and said, But as Salome-Meca
Linear Static Wizard does not have Gravity load case, you are going to show me how to edit the .comm file by
hand.
You know the steps further, so I am going to hurry and do it myself and explain them in short, said John.
#

Description
Figure
Click on Aster Module and Make sure that Mesh_2 is still selected in the Object Browser and in
Salome-Meca main toolbar, Click Aster -> Wizards -> Linear Elastic, and a window will popup.
Select 3D as type of analysis. Click Next

Select Mesh_1 in the next step if not already selected. Click Next
Enter 2.1e5 for Youngs Modulus and 0.3 for Poissons Ratio. Click Next
For Geometric Boundary Condition select Fix and give it values 0, 0, 0

For Load Boundary Condition


as we dont have any other
face to apply select Fix and
leave default of 1 for Pressure.
Click Next

45

FEA using Open Source Software


#

Description

Save the File by giving it a


name Gravity and Click
Finish

Figure

This completes the steps to generate a study and save the .comm file as we did earlier for the cube said John.
Now we want to edit the .comm file, remove Pressure term and add Gravity load to it.

46

Editing .comm file

Step 8 and 9 again: Manual editing of .comm file


#

Description

Open the folder location


where you saved the Gravity.
comm file recently by just
double clicking it.

Figure

If your CAELinux installation


is unchanged, this file should
open in gedit.

47

FEA using Open Source Software


#

Description

Figure

When the file opens, it should


look like the figure shown
here.
2

Dont worry if you do not


understand what all those lines
after lines of code are and how
they interact with Salome or
Code-Aster.
At this stage what we need to
do is very simple

48

Editing .comm file


#

Description
Find the words MA=DEFI_
MATERIAU which defines
the Material that will be used
for the Analysis. These are
generally specified at the beginning of the file.

Figure

At the end of the sentence that


is highlighted in the adjacent
figure we want to add Density of Steel to the Material
definition as it is not added by
default.
Density of material is required
if we want to apply Gravity
load on it.

Add RHO=7.8E-9, as highlighted in the adjacent figure.


Density units are in Tonne /
cubic millimetre.

49

FEA using Open Source Software


#

Description

Find the words PRES_REP


which is the pressure term that
we entered on face Fix with
a value of 1.

Figure

Select the entire sentence that


is highlighted and delete it by
pressing Delete.

Replace the above sentence


with the one shown here

So what did we do here? PESANTEUR literally means GRAVITY in French. Translate it


and see for yourself.
7

So we are writing a code that says that we want to add Gravity Load to the study. The amount
of load to be applied is 9800 mm/square second (Remember our units are mm, second, tonne,
Newton, Mega Pascals etc.) and it should have a direction of Negative Z (-Z) which is shown by
a vector (0,0,-1) => (X=0, Y=0, Z=-1)

John saved the file Gravity.comm and said that the next step is to run this analysis.

50

Editing .comm file

Step 10: Running the analysis

Description
Figure
Open Salome-Meca again and check that Case2.hdf file is running. Make sure that Aster module is selected.

Right Click the linear-static branch in Object Browser and click on Run.
A new window will pop up and there will be numbers flying around the screen.
If everything goes well you will be able to see Post-Pro appear in Object Browser.

The next step is to visualise the results.

51

FEA using Open Source Software

Step 11: Post Processing of the Results


As Esha just had a taste of what needs to be done in Post Processing stage, John let Esha carry out this step of
Post Processing.
#

Description
Figure
Esha opened the RESU____DEPL branch and added the Deformed shape.
To make the deformation more prominent, she changed the Scale Factor to 100 as shown in
adjacent figure and Clicked OK.
For this Deformed shape, she enabled Show Only and changed the Representation to Surface

Then she opened RESU____SIEQ_NOEU branch and added Scalar Map with the Mode as
VMIS
For this VonMises stresses, she enabled Show Only and changed the Representation to Surface

John said that at this stage dont worry if the results of the analysis are not what you would get from the Manual
Calculations. The sole purpose of this Analysis was to show you how to manually edit the .comm file
After Esha stopped fiddling with the Post Processing Module, she told John that when he started showing her
how to do FE Analysis with Wizards in Salome-Meca, she was not sure if it could be flexible and powerful but
after the second example she has more confidence in what she is learning and hopes that all of her queries will
be solved.
John told Esha that they have barely scratched the surface of what lies ahead of them. Salome-Meca is very

52

Editing .comm file

53

FEA using Open Source Software

powerful tool if the user knows how to use it.

Summary
Esha summarised her learning
1. How to manually edit the .comm file
to change default Linear Static Wizard
information.
2. How to add Gravity load
John said that now it was time for a coffee break as
they were doing this for more than an hour.

54

1D FE Analysis

Chapter 3
1D FE Analysis
After both John and Esha had a casual chat over coffee, when they returned to the computer John said, Now
that I have showed you what Salome-Meca looks like, next I will show you how to perform 1D Analysis.
John told that Salome-Meca is good for Geometry creation but CAELinux has other tools that can be used for
1D modelling, so for this FE Analysis he will show Geometry Modelling in GMSH. Then they will export the
geometry as a MED file, generate a .comm file by hand or by using Eficas, then use ASTER module of Salome-Meca to carry out the analysis and do Post Processing in Salome-Meca.

55

FEA using Open Source Software

Step 1: Purpose of the FE Analysis / Description of the problem


John showed Esha some of the Manual calculations that he had performed to find the maximum deflection and
stress generated in a Pipe Guide based on bending theory of cantilever beam.

He explained Esha that we will reproduce this manual calculation result by FE Analysis. In this instance a simple 1 Dimensional linear static FE analysis with Beam elements will be performed.

56

1D FE Analysis

Step 2: Input values for the FE analysis


Dimensions of the Pipe Guide are as follows
Width of the Plate: 100mm
Thickness of the Plate: 10mm
Height of the Plate: 150mm
Youngs Modulus: 2.1e5 MPa
Poissons Ratio: 0.3
Force applied to this plate: 2000N (2kN)

Step 3: Model Geometry


In CAELinux main Toolbar on the top, John Clicked Applications -> CAELinux -> GMSH.
#
Description
Figure

When GMSH opens, the main


window looks like the adjacent figure.
1

On the left is the 3D Canvas


that will show the model that
we will create.
On the right is the Main Tool
Bar.

57

FEA using Open Source Software


#

Description

Figure

First thing we do in GMSH is


to Save the File.
Click on File -> Save As and
a window opens asking for the
location where you want to
save the file.
2

Go to the location where you


want to save the file and then,
in the Filename box enter the
Name of the file followed by
geo.
In this instance, I have saved it
as Case3.geo

Next GMSH asks for whether


you want to Save physical
group labels.
Keep the Check Box ticked
and Click on OK

If you have noticed, still the


canvas shows that the file is
untitled.geo. So whats
happening here?
4

Well we need to open the file


that we saved earlier to start
working on it.
Click File -> Open and in the
window select Case3.geo
and click OK to open it.

58

1D FE Analysis
#

Description

Now the Canvas shows the


full path of the file Case3.geo.

Figure

Now we will start Modelling.


In GMSH Main Tool Bar,
just below File, you can see
Geometry, this means that
you are right now in Geometry
Module (Just like Salome-Meca).
6

Below Geometry, GMSH


shows the tool bar that is
available to us. When you
click on a button in this tool
bar, it will open another tool
bar replacing this, if you want
to come back to the previous
tool bar, just click on the Left
arrow besides Geometry

59

FEA using Open Source Software


#

Description
Click on Elementary entities
-> Add -> New -> Point.

Figure

A new window opens asking


for Co-ordinates of the Point.
Enter 0, 0, 0 for X, Y and Z.

Enter 10 for Prescribed mesh


element size at point. This is
the mesh element size when
we will mesh it. It is a bit
confusing but right now go
with it.
Click Add.
Next Enter 150, 0, 0 for X, Y
and Z and leave 10 as Prescribed mesh element size at
point and Click Add
When you Click Add for the
second point, the 3D Canvas
does not show a second point.
But that is due to the fact that
+X axis is pointing towards us
and both points are overlapping.

Right now your cursor still is


in Add Point mode so if you
click anywhere on the Canvas,
GMSH will create a point.
Check the Message GMSH
has on the top of the Canvas.
To come out of Add Point
mode, Press q

60

1D FE Analysis
#

Description

Figure

There are several Buttons on


the Bottom of Canvas.
First Button is to select an
Active Model
9

Second, Third and Fourth button when clicked changes the


view such that X, Y or Z axis
faces us (respectively).
Press Fourth Button Z and
you will be able to see two
points on Canvas.

Now we need to create a Line


with the two points.
Close Add Point window
and in the Main Tool Bar
Click on Straight Line
which is just below Point
and the Canvas gets ready for
Selection.
10

Click on the Left Point when


Canvas asks for a Start Point
(This point turns Red when
Selected) then Click on the
Right Point when Canvas asks
for an End Point.
A new line will be created.
Press q to abort Add
Straight Line
Close Add Straight Line
window.

61

FEA using Open Source Software


#

Description

Figure

Next we need to give Names


to the groups of Entities so it
becomes easy to conduct FE
Analysis.
Click on the Left arrow besides Geometry three (3) times
till you cannot go back any
more.
9

Click on Physical Groups ->


Add -> Point and on Canvas
Click on the Left side Point (It
turns Red).
Press e to end selection.
Click on the Right side Point
and then Press e to end
selection.

Next we need to create a


group of Line.
10

In the Main Tool Bar, Click on


Line and then select the only
Line on Canvas (It turns Red).
Press e to end selection.

62

1D FE Analysis
#

Description

Figure

Now we just created the


groups, we need to give them
names to distinguish them in
the FE Analysis. To give our
groups name do the following.
11

Open File Explorer and go to


the folder where you saved
Case3.geo. Double Click it
to Open.
You can see everything that
we entered here in this file. It
is a text file and can be edited
here.

We need to add Names to the


Groups so change Physical
Point(2) to Physical Point(Fix)
12

Change Physical Point(3) to


Physical Point(Load)
Change Physical Line(4) to
Physical Line(Guide).
Save this file by clicking
Save

63

FEA using Open Source Software


#

13

14

Description
Go back to Main Tool Bar in
GMSH, Click the Left Arrow
besides Geometry till the panel below does not change.

Figure

Click Reload and the edits


that we made manually will be
updated on Canvas.
Well here there was nothing
to update Physically as we
only changed names, but if we
would have added more points
or lines or added any more
entities, Canvas would update
to show it.
Creating Geometry is over. Next we will see how to Mesh this geometry

64

1D FE Analysis

Step 4: Meshing Geometry


John enabled Mesh Module in GMSH and started the procedure to generate the Mesh.
#

Description

We need to create a mesh of


the Line. Initially the Mesh
Panel looks like the adjacent
figure

Figure

65

FEA using Open Source Software


#

Description

Figure

Click on 1D and GMSH will


mesh the geometry.
But the Canvas does not
change. So where is our
Mesh?

On the Main GMSH Menu,


Click on Tools -> Options and
a window pops up as shown in
adjacent figure.
On the left click on Mesh
and Options for Mesh will be
displayed.
Tick the first two checkbox on
top with the option of Nodes
and Node labels

Once those two checkboxes


are ticked, Canvas shows the
Nodes and Node Numbers.

66

1D FE Analysis
#

Description

Figure

Now its time to save the


mesh.
Click File -> Save As.
4

In the Format drop down


select MED File. Give it a
name in Filename box, here
we named it Case3.med and
Click OK

GMSH asks for MED options.


5

Leave the Save all check box


un-ticked and Click OK
MED file is saved in the same
location as you had written in
Filename.

This concludes creation of the Mesh for the FE Analysis, said John. Next we will create a .comm file that will
give instructions to Aster about the Analysis.

Step 5, 6, 7, 8 and 9: Creating .comm file with Eficas


There are two ways in which we can generate .comm file, said John. One is to create it with the help of any
Text Editor and second is to use Eficas. Eficas is an application that generates syntactically correct .comm
files. This does not mean that they will make sense and that there will be no errors while running the Analysis.
This only means that there will be little to No chance of missing a comma or a Closing bracket, still the information to put in the file has to come from the user.
For this analysis I will show you the use of Eficas and then you can decide if you want to use it for future analysis or create the .comm file manually, said John.

67

FEA using Open Source Software


#

Description
Figure
Open Salome-Meca and in the
drop down menu where it says
Salome, select Eficas. As
you are starting Salome-Meca,
it asks if you want to create a
new file. Click New.4
Eficas has not been ported to
English yet so everything you
will be doing from now on
will have French language,
including Tool Tips.
In the Main Tool Bar, Click
on Eficas -> Eficas pour Code
Aster.
A new application Eficas
starts.
As said earlier, it is not in
English but the icons can be
understood.
From left to right, icons are

1. Create a new file


2. Open a file
3. Save a file
4. Cut
5. Copy
6. Paste
Click on Create a new file icon

68

1D FE Analysis
#

Description

Figure

In the next window it will ask


for the version of Code-Aster
that you want to use.
Select STA10.5 from the
drop down menu and Click
OK

Before we go any further lets


save this file as Case3.comm
in the location where we have
saved our MED file.
Click on Fichier -> Enregistrer
sous, give it a name, I have
used Case3 and Click Save.

69

FEA using Open Source Software


#

Description
Figure
After the file is saved, the Eficas window looks like that shown below. In the left column it
shows the file name Case3.comm in Red colour. This means that this file is not complete.
When the file will be complete, i.e. when it will have all parameters defined like Start, End,
Material definition, Mesh definition, Load and Boundary condition defined etc, it will become
Green. At this stage Eficas It is ready for Input from the user.
The second Column shows all the commands that are available in Code-Aster and these are
sorted Alphabetically. They can be sorted based on groups but in this instance we will stick to
Alphabetic sorting.
Information that needs to be entered in .comm file are called Concepts in Code_Aster and we
need to add following Concepts
1. DEBUT (This is the marker for file start)
2. Material Definition

3. What type of Mesh file to read5


4. Type of Modelling (1D, 2D, 3D, Mechanical, Thermal etc)
5. Add Material defined previously to the Model
6. Add Geometric Boundary Conditions
7. Add Load Boundary Conditions
8. Define type of Analysis (Static, Linear, Non-Linear, Dynamic etc)
9. Results to be calculated at the Elements
10. Results to be calculated at the Nodes
11. Save the results to a MED file6
12. FIN (This is the marker for file End)

70

1D FE Analysis
#

Description

Figure

From the second Column scroll down to reach DEBUT, Click it and then Click on Valider7
Button at the bottom.
6

When you do that, DEBUT gets added to the comm file and it has Green button which means
that no extra information is required to be entered.
Two Tabs Ajouter Mot-Clef (Add Keyword) and Nouvelle Commande (New Command) are
shown.

71

FEA using Open Source Software


#

Description
Next we need to define Material to be used in the study.

Figure

To add a new Command Click


on Nouvelle Commande and
Select DEFI_MATERIAU
which means DEFINE MATERIAL, Click Valider.
7

DEFI_MATERIAU gets added


to comm file with Yellow,
which means that you need to
add more information to it as
it is incomplete.
The middle section has a
new Tab Nommer Concept
which is to add the name of
the Concept.
Find ELAS (Elastic) from
Mots Clefs Permis (Permitted Keywords) and Double
Click it to add to the .comm
file.
Two other branches need to be
filled to make ELAS keyword
Green, they are Youngs Modulus ( E ) and Poissons Ratio (
NU ).8

72

1D FE Analysis
#

Description

Figure

Click on E and add value


2.1e5 and Click Valider.

10

Click NU and enter 0.3 and


Click Valider
Now, ELAS should turn Green
but DEFI_MATERIAU is still
Yellow. The reason is that we
need to save this Concept with
a Name.

Click on DEFI_MATERIAU, then Click on Nommer


Concept and enter MA as
the name of the Concept.9
Click Valider to add it to
file, and then DEFI_MATERIAU should turn Green.
Next we need to define the
type of Mesh file that will be
read as input.

11

Click on Nouvelle Commande Tab and find LIRE_


MAILLAGE, Double Click it
to add to the file.
Then Double Click FORMAT and then Double Click
MED.
Click on LIRE_MAILLAGE again and give it a
Name MAIL.

73

FEA using Open Source Software


#

12

Description
As we will need to apply
Boundary Conditions on the
Nodes, it is important that the
MED file has information for
the node group.

Figure

To do this, we will need to


define node group from the
element groups and that
means we need to add DEFI
GROUP to the file.
Click on Nouvelle Commande Tab and find DEFI
GROUP and Double Click it
to add to file.
Click on MAILLAGE and
select MAIL that was defined previously
Next, we need to make a
Group of the entire Mesh and
call it TOUT.

13

Click on DEFI_GROUP
and Double Click CREA_
GROUP_MA from Second
Column.
Click on NOM and give it
a name TOUT and Click
Valider.
Double Click on TOUT
and then Select OUI, which
means give name TOUT to
All Mesh elements.

74

1D FE Analysis
#

Description

Figure

Next we need to convert this


group of Mesh to group of
Nodes.

14

Click on DEFI_GROUP
and Double Click CREA_
GROUP_NO from Second
Column.
Click on b_option and
Select TOUT_GROUP_MA
and Click OUI which means
convert All Mesh Groups to
Node Groups.

75

FEA using Open Source Software


#

Description
Then we need to define the
type of Modelling.

Figure

Click on Nouvelle Commande Tab and find AFFE_


MODELE (Assign Model),
Double Click it to add to the
file.
Double Click MAILLAGE
and then Double Click
MAIL
15

Double Click AFFE, Double


Click TOUT and then Double Click OUI which means
that the modelling is for the
entire Mesh.10
Click on PHENOMENE
and Double Click
MECHANIQUE.
Click on b_mechanique
and Double Click MODELISATION and then Add
POU_D_E to the file.
Give a name of MODE to
AFFE_MODELE

76

1D FE Analysis
#

Description

Figure

Next we Add Material Properties defined previously to the


Model.

16

Click on Nouvelle Commande Tab and find AFFE_


MATERIAU (Assign Material), Double Click it to add to
the file.
Next add MAILLAGE =
MAIL,
For AFFE add
TOUT = OUI and
MATER = MA.
Give it a name MATE

77

FEA using Open Source Software


#

Description

Figure

Now we need to define the


Geometry of the Beam that we
are going to analyse.

17

Add a new Concept AFFE_


CARA_ELEM and give it
information as shown in adjacent figure.
Here we are defining it as a
Rectangle Cross Section with
Width (HY) = 100 and Thickness (HZ) = 10.
Give it a Name Guide

78

1D FE Analysis
#

Description

Figure

Next add Geometric Boundary


Condition.

18

Add a new Concept AFFE_


CHAR_MECA and give
it information as shown in
adjacent figure.
We are fixing this point by
adding value of 0 to all degrees of Freedom.
Give it a name GeomBC

79

FEA using Open Source Software


#

Description

Figure

Next we add Load Boundary


Condition.

19

Add a new Concept AFFE_


CHAR_MECA and give
it information as shown in
adjacent figure.
We are adding a Force in Z
direction with the value of
2000. As per our units, this is
2000N.
Give it a name LoadBC

80

1D FE Analysis
#

Description

Figure

Next we define the type of


Analysis and give it all the
required information.

20

Add MECA_STATIQUE
(Static Mechanical Analysis)
to the file and then add information as shown in adjacent
figure.
Note that we are adding two
EXCIT commands to cater for
two types of Boundary Conditions.
Give it a Name Result

81

FEA using Open Source Software


#

Description

Figure

Next we define the types of


results to be calculated at the
Elements.
Add CALC_ELEM to the
file, and add the information
as shown in adjacent figure.
21

Give it a name Result, same as


previous.
Here we are trying to get two
information out, SIEF_ELNO
(Effective Stresses / Effort per
Element at Nodes) and SIPO_
ELNO (Stress per Element at
Nodes)

82

1D FE Analysis
#

Description
Next we define the type of
results to be calculated at the
Nodes.

Figure

Add CALC_NO to the file


and add the information as
shown in adjacent figure.
22

Give it a name RESU, same as


previous.
Here we are trying to get
three information out, REAC_
NODA (Reaction at Nodes),
FORC_NODA (Forces at
Nodes) and SIPO_NOEU
(Stress at Node)

Next we define the information to be written to MED file.

23

Add IMPR_RESU to the


file and add the information as
shown in adjacent figure.
Here we want DEPL (Deflection), REAC_NODA (Reaction at Nodes), FORC_NODA
(Force at Nodes) and SIPO_
NOEU (Stress at Node).11

83

FEA using Open Source Software


#

Description

Figure

24

Last we Add FIN to show


that this is the end of the file.

25

Save this file and get ready to Run the Analysis.

Step 10: Run the analysis


John started the Aster Module in Salome-Meca and said Next we need to define a Study case in Aster that will
do the Analysis.

84

1D FE Analysis
#

Description
Figure
Click Aster -> Add study case.
A new window will pop up.
Give a Name Guide2kN

For Command File, Select


from disk from the drop
down menu and then select the
Case3.comm file we created
earlier.
For Mesh File, Select from
disk from the drop down
menu and then select the
Case3.med file we created
earlier.
Keep ASTK services as default.
Change Total memory to
1024MB and Time to 1200s12
When you Click OK a new
Branch gets added to Object
Browser named Aster.

Open it and you will be able


to see Guide2kN as a Node
within.
Save this Study in the location
that has mesh and comm file.
Right Click Guide2kN and
Select Run

85

FEA using Open Source Software


#

Description

If you have done everything


correctly, Analysis should
complete and you should be
able to see Post-Pro branch
added to the Object Browser

Figure

Save this study and next we will have a look at the Results, said John.

Step 11: Post Processing of the Results


Now lets have a look at what does the FE Analysis tell about our 1D Analysis of the Guide.
#

Description
Figure
First John enabled Deformed Shape for DEFI, showing the Deflection of the Free end of Guide.
Open Branch Result__DEPL._ and Right Click on 0, -. From the Pop up menu Select Deformed Shape. Leave everything default and Click OK.
As can be seen from the figure below, the Maximum deflection of the Right side edge is 1.29017
and based on our Units, it is 1.29017mm

86

1D FE Analysis
#

Description

Figure

Then John enabled Stress in SIPO_NOEU. This has many results embedded in it, but the one we
are interested in is SMFY (Stress due to Bending Moment MY).
2

As the beam is longitudinal to Global X axis, and so fortunately for us, Local and Global X, Y
and Z direction for this beam are the same13.
As can be seen from the figure below, the Maximum stress generated at the Fixed point (left
side) is 180 and based on our Units, it is 180MPa.

Result
Esha quickly made a Table to show the difference between Hand Calculated values and that obtained by FE

87

FEA using Open Source Software


Analysis.
Result
Deflection
Stress

Hand Calc. Value


FE Analysis Value
Difference
1.2857mm
1.29017mm
180MPa
180MPa

John explained that the difference in Deflection is mainly due to rounding error.

Conclusion
John asked Esha what she had learnt in this Case Study. Esha summarised her learnings
1. How to do 1D Geometry Modelling in GMSH
2. How to Mesh 1D Geometry in GMSH
3. How to export mesh from GMSH that can be used in Salome-Meca
4. How to create .comm file in Efficas
5. How to run FE Analysis by using Aster without the Wizard
6. How to do Post Processing of 1D FE Analysis
John said, next we will take this 1D analysis to 2D Frame Analysis.

88

0.3%
0%

1D FE Analysis

89

FEA using Open Source Software

End of Preview
This is the end of preview, to purchase a copy of the book go to http://engineering.moonish.biz/shop/

90

End of Preview

91

FEA using Open Source Software

Appendix A
Other sources of information
This section is provided here for motivated users who are hungry for more information on the two softwares
covered in this book. Links are provided to the Software home page and also to the User Forums. Links provided to the websites are correct at the time of writing this; if by any chance these links dont work, just use any
search engine to find relevant software.
1. Salome website http://www.salome-platform.org/
2. Code Aster website http://www.code-aster.org/V2/spip.php?rubrique2
3. CAELinux website http://www.caelinux.com/CMS/
4. Salome forum http://www.salome-platform.org/forum
5. Code_Aster forum http://www.code-aster.org/forum2/
6. CAELinux wiki http://www.caelinux.org/wiki/index.php/Main_Page

92

Appendix B

Appendix B
Efficient Application to generate .comm file in English
I am developing an application which can generate .comm file. The main language of sharing information will
be English. This application is not to replicate what Efficas is already doing, the main purpose is to be like
Salome-Meca Wizard but a bit more powerful and providing more options to the user.
Efficient is a powerful wizard to create a .comm file that can be used for Finite Element Analysis.
Features of Efficient are:
Fully in English
Easy to use Wizard Format
No need to remember Code Aster commands
No need to check if you have missed a comma , or a Bracket ( or ending Semi Colon ;
Can be used on Multi-Platform (Windows, Linux, Mac OSX)
Removes guesswork of what type of results are required
You can select the Units that you want (Unit Independent)
Types of Loads that can be applied : Gravity, Pressure, Force on Face and Force on Edge
Saves Boundary Condition and Loads separately in the .comm file
This application will be available to download from http://engineering.moonish.biz/blog/news/efficient-way-ofwriting-comm-file-for-code_aster/ for FREE.

93

FEA using Open Source Software


Selecting Start of the Document and Mesh Type

Select the Analysis Type

94

Appendix B
Add the Material that will be used in the Analysis. You can edit and delete material as well.

Add the Boundary Condition. You can edit and delete boundary condition as well.

95

FEA using Open Source Software


Finally select the Type of Load. Different types of loads that can be added to the analysis are Pressure, Gravity,
Force on Face and Force on Edge.

Once everything is defined, just Click Save .comm File and select the location where you want to save the file
and the software will do the rest.

96

Appendix B

Finite Element Analysis with


Open Source Software
First Edition

by

Dharmit Thakore
CPEng, RPEQ, Brisbane, QLD, Australia

Features:
Step by Step procedure to conduct Finite Element Analysis
Screen shots to help users visualise the procedure and understand efficiently
Real world examples used in the book to make users confident of their knowledge and the power of
Open Source software being used in real world
Each chapter introduces a new concept of conducting FE Analysis so that the user is not bombarded
with too much information in one Chapter.

97

FEA using Open Source Software


(Footnotes)
1
There is a hidden menu in this button as well, to reveal it, keep this button pressed for some time and three buttons
will be displayed that aids in zooming of the model.

2
Click Second button on the figure shown in Step 4 (looks like a mouse) which will help you to zoom, pan and
rotate the geometry.

If the mouse button is still selected, you wont be able to select the face.

You can also open Efficas from CAELinux main menu.

Code Aster can read IDEAS, GMSH and MED formats.

6
Code Aster results can be exported as a Text file with particular result or in a MED file, here we will save the result
in MED file.

7
If you do not understand what the word means, try to translate from French to English and most of the time you
will be able to understand it.

8
In defining material there are other parameters that can be defined as well, viz. Density, Thermal Conductivity etc.,
but as this is an Elastic Static Analysis only two properties are required.

9
More than one material can be defined and added to the study. To define another material just add DEFI_MATERIAU again and give it a different name.

10
If you are having a model that has a 1D element, a sheet metal and a 3D model, you can define different types of
modelling for each different type of element here. Instead of TOUT = OUI in AFFE, you need to select each GROUP_MA
and give it a different MODELISATION.

11
Instead of specifying what we want, we can ask Code_Aster to add all results that it calculated in the MED file.
This will be shown in 3D case of Pipe Guide.

12
To start with, you can leave default of 128MB memory but soon, for bigger analysis, Code_Aster will complain of
having insufficient memory and stop running, so it is good to give around quarter or half of the total memory of the com-

98

Appendix B
puter.

13
Local Co-ordinates for Beams are really interesting and worth investing time in. Local x axis always
runs in the longitudinal direction of the beam. Local y axis is perpendicular to local x axis and if local x axis is
not parallel to Global Y axis, then local y axis it is parallel to Global Y axis and local z axis is perpendicular to
both.

99

FEA using Open Source Software

100

Vous aimerez peut-être aussi