114
Mesh Deformed shape Von Mises Tresca - by Dharmit A. Thakore Finite Element Analysis using Open source Software

Finite Element Analysis using Open source Software...Finite Element Analysis with Open Source Software First Edition Dharmit Thakore, CPEng, RPEQ Moonish Ent. Pty. Ltd. Brisbane, QLD,

  • Upload
    others

  • View
    19

  • Download
    1

Embed Size (px)

Citation preview

  • Mesh Deformed shape

    Von Mises Tresca

    - by Dharmit A. Thakore

    Finite Element Analysis usingOpen source Software

  • Finite Element Analysis with

    Open Source Software

    First Edition

  • Finite Element Analysis withOpen Source Software

    First Edition

    Dharmit Thakore, CPEng, RPEQMoonish Ent. Pty. Ltd.

    Brisbane, QLD, Australia

    Moonish Enterprises Pty LtdGPO Box 1299, Brisbane, QLD 4001, Australia

    2013

  • Credits and CopyrightWritten by: Dharmit Thakore

    [email protected]

    Publisher: Moonish Ent. Pty. Ltd

    [email protected]

    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 quo-tations 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 author’s experience, knowledge and opin-ions. 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 AuthorDharmit Thakore is the Director of Moonish Enterprises Pty Ltd at Brisbane, Queensland, Australia. He prac-tices as a Mechanical / Piping Engineer in Queensland. He received his Bachelor’s degree from Birla Vishwa-karma 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 Engi-neer (CPEng) as a Mechanical / Piping Engineer.

    Dharmit has broad interests, which include finite element analysis, design, optimization and Open Source soft-ware. He is a member of ASME, Engineers Australia and Board of Professional Engineers in Queensland.

  • Contents

    Foreword 1

    What motivated me to write this book 1

    This book is written for 1

    This book is not written for 2

    What software would you need to follow through 2

    What are the steps in Finite Element Analysis 3

    Study Cases 4

    Case 1: Getting to know Salome-Meca 4

    Case 2: Editing .comm file 4

    Case 3: 1D FE Analysis 5

    Case 4: 2D Frame FE Analysis 5

    Case 5: Axi-symmetric FE Analysis 5

    Case 6: 2D Shell FE Analysis 5

    Case 7: Basic 3D FE Analysis 5

    Case 8: Pseudo Assembly FE Analysis 6

  • Case 9: 3D Analysis with Hexahedral Linear Mesh 6

    Case 10: 3D Analysis with Hexahedral Quadratic Mesh 6

    Case 11: 3D Assembly FE Analysis 6

    Getting to know Salome-Meca 7

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

    Step 2: Input values for the FE analysis 8

    Step 3: Model Geometry 9

    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

    Summary 35

    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

    Summary 51

    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

    Result 85

    Conclusion 86

    End of Preview 87

  • Appendix A 89

    Other sources of information 89

    Appendix B 91

    Efficient – Application to generate .comm file in English 91

  • Foreword

    — 1 —

    ForewordDuring 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 won’t 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 didn’t 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, didn’t 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 soft-ware 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 don’t 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

    — 2 —

    Analysis with Open Source software in a week’s 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 don’t 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 operat-ing 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 don’t want to install something permanent on your computer’s 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?op-tion=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, don’t 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 men-tioned above, the screenshots may differ, but the fundamental concepts remain the same.

  • What are the steps in Finite Element Analysis

    — 3 —

    What are the steps in Finite Element AnalysisThis book does not teach you what Finite Element Analysis is. You need to be familiar with the general form of Hook’s 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 proper-ties 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 stiff-ness “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 (self-weight) 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 displace-ments (Strains) are converted to Stresses (Stress = Strain multiplied by Young’s 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

    — 4 —

    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.

    MEPLPencil

    MEPLPencil

    MEPLTextboxGeometric Model not 3D model

  • Study Cases

    — 5 —

    Study CasesReal world examples are used in this book to describe each Study cases. Not only will this make it more inter-esting, 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 calcula-tions 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 stress-es 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 fundamen-tal 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 Analy-sis. 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

    — 6 —

    Case 3: 1D FE Analysis

    With this case, John will show how manually calculated results of a simple Pipe Guide which behaves as a can-tilever 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-Meca’s 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 demon-strate that the thickness required of a hemispherical shell is half that of a cylindrical shell by analysing a Pres-sure 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

    — 7 —

    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 Qua-dratic 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 Con-tact 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 comput-er 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

    — 8 —

  • Getting to know Salome-Meca

    — 9 —

    Chapter 1

    Getting to know Salome-MecaBefore 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

    — 10 —

    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 ap-plied 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

    Young’s Modulus: 2.1e5 MPa

    Poisson’s Ratio: 0.3

    Pressure Applied on Top face: 1MPa and 10MPa (As two separate load cases)

  • Getting to know Salome-Meca

    — 11 —

    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.

    # Description Figure

    1In CAELinux main toolbar, Click Applications -> CAELinux -> Salome-Meca 2011.2

    After Salome-Meca Application Loads it will look like figure below

    2

    Click Down Arrow where it says Salome and Select Ge-ometry.

    A window pops up like the fig-ure on the right. Information on the window are self-ex-planatory.

    Select “New”

  • FEA using Open Source Software

    — 12 —

    # Description Figure

    3

    In Salome-Meca main toolbar, Click New Entity -> Primi-tives -> Box

    In the Box Construction window that pops up select Second Algorithm (Option Button)

    Keep Default Name “Box_1”

    In the Dimensions at the ori-gin, fill in values as shown in the figure on the right

    Click “Apply and Close”

    4

    Select 5th Button from the left in the tool bar shown on the right and the Entire box will fit to screen.1

    5

    That’s it, you have created the geometry and are viewing it properly and this geometric model will be used for Anal-ysis.

    Now to give this geometry some Geometric groups that will be helpful in FE Analysis, we carry out following steps

  • Getting to know Salome-Meca

    — 13 —

    # Description Figure

    6

    Make sure that Box_1 is se-lected 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 select-ing the top face and name it “Press”. Add it and then instead of clicking “Apply” click on “Apply and Close”

  • FEA using Open Source Software

    — 14 —

    # Description Figure

    7

    Your Object Browser on the left should look like the adja-cent figure.

    Right click on Box_1 and se-lect “Show only” OR click on the “Eye” icon on the left of Box_1 and it will do the same thing.

    8

    Save your file at a proper des-tination and give it a meaning-ful 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 Sa-lome-Meca. John explained that the next step is to Mesh this Geometry.

  • Getting to know Salome-Meca

    — 15 —

    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 Figure

    1

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

    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 Ge-ometry 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

    2

    For the Hypothesis (which is grey at this stage and shows ) Click on the Gear Button and select “Netgen 3D parameters”.

    In the Hypothesis Construction window that pops up, keep default parameters and click “OK”

  • FEA using Open Source Software

    — 16 —

    # Description Figure

    3

    Now you will be back to the Create mesh window.

    Click “Apply and Close” button

    4

    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.

  • Getting to know Salome-Meca

    — 17 —

    # Description Figure

    5

    Right click Mesh_1 in the Ob-ject Browser and select “Com-pute”.

    After some time, if everything goes well a “Mesh computation succeed” Window will pop up which will give informa-tion 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)

    6

    Close Mesh Information win-dow 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”.

  • FEA using Open Source Software

    — 18 —

    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 Figure

    1

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

    Make sure that Mesh_1 is still selected in the Object Browser and in Salome-Meca main tool-bar, 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”.

    2

    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 select-ed, and if not, select this option and click “Next”

  • Getting to know Salome-Meca

    — 19 —

    # Description Figure

    3

    Next define the Material Prop-erties to be used in the analy-sis. This is “Step 5” in the FE Analysis figure.

    Add Young’s Modulus and Poisson’s Ratio.

    As we have our dimensions in Millimeters, our Young’s Mod-ulus should be in MPa.

    Input the values as shown in the adjacent figure and click “Next”.

    4

    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 select-ed by default, double click be-low Group and select “Fixed” from the options.

    If DX, DY and DZ values are not already “0” (zero) add it and click “Next”

  • FEA using Open Source Software

    — 20 —

    # Description Figure

    5

    Next input Load Boundary Conditions. This is “Step 7” in the FE Analysis figure.

    If “Press” is not already se-lected 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”

    6

    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 Pres-sure1.comm”

    Click Save

  • Getting to know Salome-Meca

    — 21 —

    # Description Figure

    7

    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.

    8

    A new branch “Aster” will be created in the Object Browser.

    Open “Aster” branch and you will see “linear-static” under-neath 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 John’s 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-Meca’s Aster module.”

  • FEA using Open Source Software

    — 22 —

    Step 10: Run the analysis

    “If you have created your geometry, meshed it properly and have created the Command file that tells the Pro-cessor 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 haven’t 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

    1

    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.

    2

    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, Pro-cessing 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.

  • Getting to know Salome-Meca

    — 23 —

    Step 11: Post Processing of the Results

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

    # Description Figure

    1

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

    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.

  • FEA using Open Source Software

    — 24 —

    # Description Figure

    2

    RESU____DEPL means, Result (RESU) of the Displace-ments (DEPL) of the nodes.

    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”

  • Getting to know Salome-Meca

    — 25 —

    # Description Figure

    3

    Click “Scalar Bar” Tab where if you want, you can change several parameters.

    At this moment keep every-thing to default.

  • FEA using Open Source Software

    — 26 —

    # Description Figure

    4

    Click “Input” Tab. Notice that the Face groups “Fixed” and “Press” are shown here greyed out.

    Nothing to do here at this stage.

    Just Click “Apply and Close”

  • Getting to know Salome-Meca

    — 27 —

    # Description Figure

    5

    A new sub-branch “Def.Shape” is created in “RESU____DEPL” -> “0 , -“ branch.

    The deformed Shape is shown as Wire frame model.

    6Notice 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

    7

    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)

  • FEA using Open Source Software

    — 28 —

    # Description Figure

    8

    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: sec-tion, 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.

  • Getting to know Salome-Meca

    — 29 —

    # Description Figure

    9

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

    Again, Right Click on “Def.Shape:1” and select Represen-tation -> 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.

    If you zoom in and rotate the model you will be able to see bulging occurring in the X direction.

    10You 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.

  • FEA using Open Source Software

    — 30 —

    # Description Figure

    11

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

    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”

  • Getting to know Salome-Meca

    — 31 —

    # Description Figure

    12

    A new sub-branch “Scalar Map” is created in “RESU____SIEQ_NOEU” -> “0 , -“ branch.

    The Entire geometry is co-loured with the Von Mises Stresses which is shown as a Solid model.

  • FEA using Open Source Software

    — 32 —

    # Description Figure

    13

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

    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 ex-pected) and zero displacement is at the bottom of the cube (again as expected)

    14Notice that at the bottom of the window a graph of Von Mises stresses with minimum and maxi-mum stresses is shown.

    The maximum stress here is 1.02521 MPa

  • Getting to know Salome-Meca

    — 33 —

    # Description Figure

    15

    In a similar fashion of showing multiple branches of Deflec-tion, multiple branches of Stresses can be shown. A Sca-lar Map of Tresca Stresses can be added to the study as well.

    Right Click on “0 , -“ sub-branch. From the pop up win-dow select “Scalar Map”

    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

    16

    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”

    Select “[1] SXX” (Stress in X direction) from the Scalar Mode and keep the rest as de-fault and Click “Ok”

    Right Click on “Scalar Map” and select “Show Only”

    Right Click on “Scalar Map” and select Representation -> Surface frame.

  • FEA using Open Source Software

    — 34 —

    Now let’s see how we can run a second analysis in the same hdf file by adding a new FE Analysis in Aster Mod-ule.

    # Description Figure

    1

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

    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 select-ed and click “Next”.

    Click the Curved Arrow and select Mesh_1 in the Object Browser (if not already select-ed).

    “Use geometrical groups” should be automatically select-ed, 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”.

  • Getting to know Salome-Meca

    — 35 —

    # Description Figure

    2

    Save this .comm file as “Pres-sure10.comm” to differentiate it from the previous analysis carried out.

    Click “Save”

    Click “Finish”

    3 A new analysis will be added to Aster “linear-static0”

  • FEA using Open Source Software

    — 36 —

    # Description Figure

    4

    Right Click “linear-static0” and select “Run”.

    If everything goes well a new branch will be created in the Post-Pro module called “lin-ear-static0.rmed”

    5To find out the Deflection and Stresses for this analysis, repeat steps 2 to 16 shown previously.

    “Well that’s 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.

  • Getting to know Salome-Meca

    — 37 —

  • FEA using Open Source Software

    — 38 —

    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 cre-ated 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 don’t 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”.

  • Editing .comm file

    — 39 —

    Chapter 2

    Editing .comm fileJohn 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.

  • FEA using Open Source Software

    — 40 —

    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 canti-levered 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)

    Young’s Modulus: 2.1e5 MPa

    Poisson’s 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)

  • Editing .comm file

    — 41 —

    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

    1

    For generating the Square Rod 3D model, we need to create a box.

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

  • FEA using Open Source Software

    — 42 —

    # Description Figure

    9

    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.

    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.

  • Editing .comm file

    — 43 —

    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

    1

    Select Mesh Module in Sa-lome-Meca.

    Click on “Box_1” in the Ob-ject Browser and then Click Mesh -> Create Mesh.

    In the Window, make sure Box_1 is selected as Geome-try.

    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”.

    2

    Your Create Mesh window should look like the adjacent figure.

    Click “Apply and Close”

  • FEA using Open Source Software

    — 44 —

    # Description Figure

    3

    A new Mesh_1 will be created in the Object Browser.

    Right Click Mesh_1 and select “Compute”.

    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.

  • Editing .comm file

    — 45 —

    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

    1

    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 Young’s Modulus and 0.3 for Poisson’s Ratio. Click “Next”

    For Geometric Boundary Condition select “Fix” and give it values 0, 0, 0

    2

    For Load Boundary Condition as we don’t have any other face to apply select “Fix” and leave default of 1 for Pressure. Click “Next”

  • FEA using Open Source Software

    — 46 —

    # Description Figure

    3Save the File by giving it a name “Gravity” and Click “Finish”

    “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.

  • Editing .comm file

    — 47 —

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

    # Description Figure

    1

    Open the folder location where you saved the “Gravity.comm” file recently by just double clicking it.

    If your CAELinux installation is unchanged, this file should open in gedit.

  • FEA using Open Source Software

    — 48 —

    # Description Figure

    2

    When the file opens, it should look like the figure shown here.

    Don’t 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

  • Editing .comm file

    — 49 —

    # Description Figure

    3

    Find the words “MA=DEFI_MATERIAU” which defines the Material that will be used for the Analysis. These are generally specified at the be-ginning of the file.

    At the end of the sentence that is highlighted in the adjacent figure we want to add Den-sity 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.

    4Add “RHO=7.8E-9,” as high-lighted in the adjacent figure. Density units are in Tonne / cubic millimetre.

  • FEA using Open Source Software

    — 50 —

    # Description Figure

    5

    Find the words “PRES_REP” which is the pressure term that we entered on face “Fix” with a value of 1.

    Select the entire sentence that is highlighted and delete it by pressing “Delete”.

    6 Replace the above sentence with the one shown here

    7

    So what did we do here? “PESANTEUR” literally means “GRAVITY” in French. Translate it and see for yourself.

    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.

  • Editing .comm file

    — 51 —

    Step 10: Running the analysis

    # Description Figure

    1

    Open Salome-Meca again and check that Case2.hdf file is running. Make sure that “Aster” mod-ule 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.

  • FEA using Open Source Software

    — 52 —

    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

    1

    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 “Sur-face”

    2

    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 “Sur-face”

    John said that at this stage don’t 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

  • Editing .comm file

    — 53 —

  • FEA using Open Source Software

    — 54 —

    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.

  • 1D FE Analysis

    — 55 —

    Chapter 3

    1D FE AnalysisAfter 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 Sa-lome-Meca to carry out the analysis and do Post Processing in Salome-Meca.

  • FEA using Open Source Software

    — 56 —

    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 sim-ple 1 Dimensional linear static FE analysis with Beam elements will be performed.

  • 1D FE Analysis

    — 57 —

    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

    Young’s Modulus: 2.1e5 MPa

    Poisson’s 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

    1

    When GMSH opens, the main window looks like the adja-cent figure.

    On the left is the 3D Canvas that will show the model that we will create.

    On the right is the Main Tool Bar.

  • FEA using Open Source Software

    — 58 —

    # Description Figure

    2

    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.

    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”

    3

    Next GMSH asks for whether you want to Save physical group labels.

    Keep the Check Box ticked and Click on “OK”

    4

    If you have noticed, still the canvas shows that the file is “untitled.geo”. So what’s happening here?

    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.

  • 1D FE Analysis

    — 59 —

    # Description Figure

    5 Now the Canvas shows the full path of the file Case3.geo.

    6

    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-Me-ca).

    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”

  • FEA using Open Source Software

    — 60 —

    # Description Figure

    7

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

    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 Pre-scribed mesh element size at point and Click “Add”

    8

    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 overlap-ping.

    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’

  • 1D FE Analysis

    — 61 —

    # Description Figure

    9

    There are several Buttons on the Bottom of Canvas.

    First Button is to select an Active Model

    Second, Third and Fourth but-ton 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.

    10

    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.

    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.

  • FEA using Open Source Software

    — 62 —

    # Description Figure

    9

    Next we need to give Names to the groups of Entities so it becomes easy to conduct FE Analysis.

    Click on the Left arrow be-sides Geometry three (3) times till you cannot go back any more.

    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.

    10

    Next we need to create a group of Line.

    In the Main Tool Bar, Click on “Line” and then select the only Line on Canvas (It turns Red).

    Press ‘e’ to end selection.

  • 1D FE Analysis

    — 63 —

    # Description Figure

    11

    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.

    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.

    12

    We need to add Names to the Groups so change “Physical Point(2)” to “Physical Point(“-Fix”)”

    Change “Physical Point(3)” to “Physical Point(“Load”)”

    Change “Physical Line(4)” to “Physical Line(“Guide”)”.

    Save this file by clicking “Save”

  • FEA using Open Source Software

    — 64 —

    # Description Figure

    13

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

    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.

    14 Creating Geometry is over. Next we will see how to Mesh this geometry

  • 1D FE Analysis

    — 65 —

    Step 4: Meshing Geometry

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

    # Description Figure

    1

    We need to create a mesh of the Line. Initially the Mesh Panel looks like the adjacent figure

  • FEA using Open Source Software

    — 66 —

    # Description Figure

    2

    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”

    3Once those two checkboxes are ticked, Canvas shows the Nodes and Node Numbers.

  • 1D FE Analysis

    — 67 —

    # Description Figure

    4

    Now it’s time to save the mesh.

    Click File -> Save As.

    In the Format drop down select MED File. Give it a name in Filename box, here we named it “Case3.med” and Click “OK”

    5

    GMSH asks for MED options.

    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 infor-mation 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 anal-ysis or create the .comm file manually”, said John.

  • FEA using Open Source Software

    — 68 —

    # Description Figure

    1

    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.

    2

    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

  • 1D FE Analysis

    — 69 —

    # Description Figure

    3

    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”

    4

    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.

  • FEA using Open Source Software

    — 70 —

    # Description Figure

    5

    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)

  • 1D FE Analysis

    — 71 —

    # Description Figure

    6

    From the second Column scroll down to reach “DEBUT”, Click it and then Click on “Valider”7 Button at the bottom.

    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.

  • FEA using Open Source Software

    — 72 —

    # Description Figure

    7

    Next we need to define Mate-rial to be used in the study.

    To add a new Command Click on “Nouvelle Commande” and Select “DEFI_MATERIAU” which means “DEFINE MA-TERIAL”, Click “Valider”.

    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.

    8

    Find “ELAS” (Elastic) from “Mots Clefs Permis” (Permit-ted 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 Mod-ulus ( E ) and Poissons Ratio ( NU ).8

  • 1D FE Analysis

    — 73 —

    # Description Figure

    9

    Click on “E” and add value 2.1e5 and Click “Valider”.

    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.

    10

    Click on “DEFI_MATERI-AU”, 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_MA-TERIAU” should turn Green.

    11

    Next we need to define the type of Mesh file that will be read as input.

    Click on “Nouvelle Com-mande” Tab and find “LIRE_MAILLAGE”, Double Click it to add to the file.

    Then Double Click “FOR-MAT” and then Double Click “MED”.

    Click on “LIRE_MAIL-LAGE” again and give it a Name “MAIL”.

  • FEA using Open Source Software

    — 74 —

    # Description Figure

    12

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

    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 Com-mande” Tab and find “DEFI GROUP” and Double Click it to add to file.

    Click on “MAILLAGE” and select “MAIL” that was de-fined previously

    13

    Next, we need to make a Group of the entire Mesh and call it “TOUT”.

    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.

  • 1D FE Analysis

    — 75 —

    # Description Figure

    14

    Next we need to convert this group of Mesh to group of Nodes.

    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.

  • FEA using Open Source Software

    — 76 —

    # Description Figure

    15

    Then we need to define the type of Modelling.

    Click on “Nouvelle Com-mande” Tab and find “AFFE_MODELE” (Assign Model), Double Click it to add to the file.

    Double Click “MAILLAGE” and then Double Click “MAIL”

    Double Click “AFFE”, Double Click “TOUT” and then Dou-ble 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 “MOD-ELISATION” and then Add “POU_D_E” to the file.

    Give a name of “MODE” to “AFFE_MODELE”

  • 1D FE Analysis

    — 77 —

    # Description Figure

    16

    Next we Add Material Proper-ties defined previously to the Model.

    Click on “Nouvelle Com-mande” Tab and find “AFFE_MATERIAU” (Assign Mate-rial), 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”

  • FEA using Open Source Software

    — 78 —

    # Description Figure

    17

    Now we need to define the Geometry of the Beam that we are going to analyse.

    Add a new Concept “AFFE_CARA_ELEM” and give it information as shown in adja-cent figure.

    Here we are defining it as a Rectangle Cross Section with Width (HY) = 100 and Thick-ness (HZ) = 10.

    Give it a Name “Guide”

  • 1D FE Analysis

    — 79 —

    # Description Figure

    18

    Next add Geometric Boundary Condition.

    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 de-grees of Freedom.

    Give it a name “GeomBC”

  • FEA using Open Source Software

    — 80 —

    # Description Figure

    19

    Next we add Load Boundary Condition.

    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”

  • 1D FE Analysis

    — 81 —

    # Description Figure

    20

    Next we define the type of Analysis and give it all the required information.

    Add “MECA_STATIQUE” (Static Mechanical Analysis) to the file and then add infor-mation as shown in adjacent figure.

    Note that we are adding two EXCIT commands to cater for two types of Boundary Con-ditions.

    Give it a Name “Result”

  • FEA using Open Source Software

    — 82 —

    # Description Figure

    21

    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.

    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)

  • 1D FE Analysis

    — 83 —

    # Description Figure

    22

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

    Add “CALC_NO” to the file and add the information as shown in adjacent figure.

    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)

    23

    Next we define the informa-tion to be written to MED file.

    Add “IMPR_RESU” to the file and add the information as shown in adjacent figure.

    Here we want DEPL (Deflec-tion), REAC_NODA (Reac-tion at Nodes), FORC_NODA (Force at Nodes) and SIPO_NOEU (Stress at Node).11

  • FEA using Open Source Software

    — 84 —

    # 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”.

  • 1D FE Analysis

    — 85 —

    # Description Figure

    1

    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 de-fault.

    Change Total memory to 1024MB and Time to 1200s12

    2

    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”

  • FEA using Open Source Software

    — 86 —

    # Description Figure

    3

    If you have done everything correctly, Analysis should complete and you should be able to see “Post-Pro” branch added to the Object Browser

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

    Step 11: Post Processing of the Results

    Now let’s have a look at what does the FE Analysis tell about our 1D Analysis of the Guide.

    # Description Figure

    1

    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 “De-formed 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

  • 1D FE Analysis

    — 87 —

    # Description Figure

    2

    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).

    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

  • FEA using Open Source Software

    — 88 —

    Analysis.

    Result Hand Calc. Value FE Analysis Value DifferenceDeflection 1.2857mm 1.29017mm 0.3%Stress 180MPa 180MPa 0%

    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.

  • 1D FE Analysis

    — 89 —

  • FEA using Open Source Software

    — 90 —

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

  • End of Preview

    — 91 —

  • FEA using Open Source Software

    — 92 —

    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 pro-vided to the websites are correct at the time of writing this; if by any chance these links don’t 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

  • Appendix B

    — 93 —

    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-of-writing-comm-file-for-code_aster/ for FREE.

  • FEA using Open Source Software

    — 94 —

    Selecting Start of the Document and Mesh Type

    Select the Analysis Type

  • Appendix B

    — 95 —

    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.

  • FEA using Open Source Software

    — 96 —

    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.

  • Appendix B

    — 97 —

    Finite Element Analysis withOpen Source Software

    First Edition

    by

    Dharmit ThakoreCPEng, 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.

  • FEA using Open Source Software

    — 98 —

    (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.

    3 If the mouse button is still selected, you won’t be able to select the face.

    4 You can also open Efficas from CAELinux main menu.

    5 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_MA-TERIAU 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-

  • Appendix B

    — 99 —

    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.

  • FEA using Open Source Software

    — 100 —