Design Optimization for 3D Printed Energy Absorbing

Design Optimization for 3D Printed Energy Absorbing Structures Inspired by Nature A theoretical geometry evaluation for maximizing specific energy abso...

0 downloads 156 Views 8MB Size
Design Optimization for 3D Printed Energy Absorbing Structures Inspired by Nature A theoretical geometry evaluation for maximizing specific energy absorption Master’s thesis in Material and Computational Mechanics

Alexander Olsson & Mattias Naarttijärvi

Department of Applied Mechanics C HALMERS U NIVERSITY OF T ECHNOLOGY Gothenburg, Sweden 2017

Master’s thesis 2017:34

Design Optimization for 3D Printed Energy Absorbing Structures Inspired by Nature A theoretical geometry evaluation for maximizing specific energy absorption Alexander Olsson Mattias Naarttijärvi

Department of Applied Mechanics Division of Material and Computational Mechanics Chalmers University of Technology Gothenburg, Sweden 2017

Design Optimization for 3D Printed Energy Absorbing Structures Inspired by Nature A theoretical geometry evaluation for maximizing specific energy absorption Alexander Olsson Mattias Naarttijärvi

© Alexander Olsson, 2017. © Mattias Naarttijärvi, 2017.

Supervisor: Spyros Tsampas, Swerea Sicomp Examiner: Leif Asp, Department of Applied Mechanics, Chalmers University of Technology

Master’s Thesis 2017:34 Department of Applied Mechanics Division of Material and Computational Mechanics Chalmers University of Technology SE-412 96 Gothenburg Telephone +46 31 772 1000

Cover: Final result represented as four by four repeated unit columns. Typeset in LATEX Printed by Department of Applied Mechanics Gothenburg, Sweden 2017 iv

Design Optimization for 3D Printed Energy Absorbing Structures Inspired by Nature A theoretical geometry evaluation for maximizing specific energy absorption Alexander Olsson Mattias Naarttijärvi Department of Applied Mechanics Chalmers University of Technology

Abstract Transportation is a major part of people’s every day life in today’s society allowing them to get to their jobs, commute, trade, travel etc. Motorcyclists and cyclists are among the most vulnerable road users and in case of an accident, they are highly dependent on bearing a helmet to protect against severe damage. Studies have shown that bearing a modern helmet provides 63% to 88% reduction of sustained head and severe brain injury in case of an accident for bicyclist. A route to further improve helmets, besides developing stiffer and tougher materials, is to develop a helmet that also relies on the material structure, i.e. its inner geometry and architecture, for energy absorption. Additive manufacturing or 3D printing allows three-dimensional objects or components to be manufactured with a complexity which would be difficult or near impossible to realize with today’s conventional manufacturing techniques used for helmets. With the possibilities and precision 3D printing enables in mind, structures based on geometries found in nature is investigated and theoretically optimized to absorb as much energy as possible on impact meanwhile keeping the mass low. Three main structures made up of beam elements were chosen and further investigated in a script. The script is designed to generate and optimize the structure by positioning its elements and varying their position, width, height and radius and evaluate it regarding specific energy absorption by doing a FEM analysis and a buckling analysis. Ultimately the script work as intended by successfully generate the sought structures and autonomously update the structures variables and return an optimized combination of the variables which maximized the structures ability to absorb energy on impact.

Keywords: Beam, helmet, energy absorption, 3D printing, optimization v

Designoptimering för 3D-printade energiabsorberande strukturer inspirerade av naturen En teoretisk utvärdering av geometri med avseende att maximera specifik energiabsorption Alexander Olsson Mattias Naarttijärvi Avdelning för Tillämpad Mekanik Chalmers Tekniska Högskola

Sammanfattning Transport är en stor del av människors vardag i dagens samhälle vare sig det är för att kunna komma till sitt jobb, pendla, handla eller resa. Motorcyklister och cyklister är bland de mest utsatta trafikanterna och i händelse av en olycka är de mycket beroende av att ha hjälm på sig för att skydda mot allvarliga skador. Studier har visat att ha på sig en hjälm minskar chansen att få en allvarlig hjärnskada med 63% till 88% vid eventuell olycka för en cyklist. Ett sätt att förbättra hjälmarna förutom att ta fram bättre och starkare material är att utveckla en hjälm som är beroende av materialstrukturen i hjälmen, dvs dess inre geometri för att öka dess energiabsorption. Additiv tillverkning eller 3D-printning gör att även mycket komplexa komponenter och strukturer kan tillverkas som annars med dagens tillverkningstekniker för hjälmar skulle vara svåra eller näst intill omöjliga att realisera. Med de möjligheter och precision som 3D-printning tillför i åtanke undersöks geometrier och strukturer som förekommer naturligt i naturen med avseende att finna strukturer som teoretiskt optimeras för att absorbera så mycket energi som möjligt samtidigt som dess vikt hålls låg. Tre huvudsakliga strukturer uppbyggda utav balkelement valdes och undersöktes vidare i ett datorskript. Skriptet är konstruerat för att generera och optimera strukturerna genom att skapa och placera dess element samt variera elementens position, bredd, höjd och radie samtidigt som strukturen utvärderas gällande dess förmåga att ta upp energi genom att göra en FEM-analys och en bucklingsanalys. Skriptet fungerade som förväntat genom att framgångsrikt generera de eftersökta strukturerna och autonomt uppdatera dess variabler samt returnera en optimerad kombination av variablerna vilka maximerar strukturens förmåga att absorbera specifik energi vid kollision.

Nyckelord: balk, hjälm, energiabsorption, 3D printing, optimering vii

Acknowledgements This report is submitted to fulfill the requirement to the Master’s degree at Chalmers University of Technology, Gothenburg and has been carried out in collaboration with SWERA SICOMP in Mölndal, Sweden. The work was conducted during the spring semester of 2017. It is with gratitude we acknowledge the help and support from our supervisor Leif Asp from Chalmers University of Technology for his genuine interest in the project and his resourceful feedback and help. We would also like to acknowledge and express our appreciation to our supervisors at SWEREA SICOMP, Spyros Tsampas and Vasan Churchill Srinivasan Chandrasekaran for their helpful feedback and giving us vast freedom and trust throughout the project. Lastly we would like thank Erik Svensson of the Material and Manufacturing Technology of Chalmers for his input and discussions regarding material characteristics.

Gothenburg, June 2017 Alexander Olsson & Mattias Naarttijärvi

ix

Contents List of Figures

xiii

List of Tables

xvii

1 Introduction and background 1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Challenges and limitations . . . . . . . . . . . . . . . . . . . . . . . . 2 Literature study and relevant research in the field 2.1 Personal protection - Helmets . . . . . . . . . . . . 2.2 Foams . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Energy absorbing structures in nature . . . . . . . . 2.3.1 Bones . . . . . . . . . . . . . . . . . . . . . 2.3.2 Teeth . . . . . . . . . . . . . . . . . . . . . 2.3.3 Tree . . . . . . . . . . . . . . . . . . . . . . 2.4 Energy absorption fundamentals . . . . . . . . . . . 2.5 Numerical simulation of energy absorption . . . . . 2.6 Failure criteria for structure - General buckling . . 3 Theory 3.1 Energy Absorption . . . . 3.2 Finite Element Method . . 3.2.1 The FEM problem 3.2.2 CALFEM . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

1 1 2

. . . . . . . . .

3 3 3 5 5 6 7 8 9 10

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

11 11 12 12 22

4 Methodology 4.1 Geometries and structures . . . . 4.1.1 Cellulose . . . . . . . . . . 4.1.2 Tetrahedron . . . . . . . . 4.1.3 Pyramid . . . . . . . . . . 4.2 Material . . . . . . . . . . . . . . 4.3 Applied force . . . . . . . . . . . 4.4 Design variables . . . . . . . . . . 4.5 Identification of design space . . . 4.5.1 Rough combination mesh . 4.5.2 Optimization algorithm . . 4.6 Compression test simulation . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

29 29 30 31 32 33 34 35 36 37 39 42

. . . .

. . . .

. . . .

xi

Contents

4.6.1 4.6.2 4.6.3 4.6.4

Determination of unit cell height Build geometry . . . . . . . . . . Buckling . . . . . . . . . . . . . . Specific energy absorption . . . .

5 Results and discussion 5.1 Design variable range and test setup . 5.2 Design variables impact on the mass . 5.3 Screening results from rough mesh . . . 5.4 Optimization algorithm . . . . . . . . . 5.4.1 Refinement of design variables . 5.5 Final geometries and their ranking . . 5.5.1 Performance of the optimization

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

43 43 44 46

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . procedure

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

49 49 49 52 54 57 60 63

6 Conclusion 65 6.1 Future work and recommendations . . . . . . . . . . . . . . . . . . . 66 Bibliography

67

A Appendix 1 - Result I A.1 Tetrahedron result . . . . . . . . . . . . . . . . . . . . . . . . . . . . I A.2 Pyramid result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV B Appendix 2 - Matlab code B.1 Main . . . . . . . . . . . . . B.2 Rough combination . . . . . B.3 Optimization algorithm . . . B.4 Simulate compression test . B.5 Solve FEM problem . . . . . B.6 Minor functions . . . . . . . B.6.1 Mass of the structure B.6.2 Energy absorption . B.6.3 Unit cell height . . . B.7 Build geometries . . . . . . B.7.1 Geometry factory . . B.7.2 Tetrahedron . . . . . B.7.3 Cellulose . . . . . . . B.7.4 Pyramid . . . . . . . B.7.5 Cube . . . . . . . . . B.8 Plot and store data . . . . . B.8.1 Generate plot . . . . B.8.2 Plot geometry . . . . B.8.3 Store data . . . . . .

xii

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . .

IX IX XIII XVII XXV XXX XXXI XXXI XXXII XXXIII XXXIV XXXIV XXXV XXXIX XLVII LI LIII LIII LIX LX

List of Figures 2.1 2.2 2.3 2.4 2.5 2.6 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13

Cross section of a Kali Avita Carbon XC helmet [5]. . . . . . . . . . . Compression stress-strain curve of a rigid foam [6]. . . . . . . . . . . An illustrative cross section of a human bone [9]. . . . . . . . . . . . Trabeculae [11]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The anatomy of a human tooth [14]. . . . . . . . . . . . . . . . . . . Cross-section of a sector of hardwood showing its different layers. R, L and T denotes the radial, longitudinal and tangential direction [15]. Idealised stress-strain curves: (a) elastic, perfectly plastic, (b) elastic, linear hardening and (c) elastic, power hardening [18]. . . . . . . . . An infinitely small beam element. . . . . . . . . . . . . . . . . . . . A beam element with one node at each end. In total, the beam has 12 degrees of freedom represented by u1−12 . . . . . . . . . . . . . . . A beam element with one node at each end. In total, the beam has 12 degrees of freedom represented by u1−12 . . . . . . . . . . . . . . . The CALFEM beam element in three dimensions displaying degrees of freedom and the local coordinate system (¯ x, y¯, z¯) [24]. . . . . . . The CALFEM beam element in three dimensions displaying degrees of freedom and the local coordinate system (¯ x, y¯, z¯) [24]. . . . . . .

3 4 5 6 7 8

. 11 . 13 . 18 . 22 . 23 . 25

Image of plant cells taken with a light microscope where one can clearly see the green chloroplast and the cell wall around each cell [25]. Cellulose unit cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tetrahedron unit cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . Pyramid unit cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Material comparison for 3D printable polymers [28]. . . . . . . . . . . Drop test setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applied force depending on unit cell width. . . . . . . . . . . . . . . . Overview schematics of the main steps in the code. . . . . . . . . . . Two design variables illustrating the result of all combinations. . . . . Coarse mesh of two design variables resulting in a large design range for the fine tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fine mesh of two design variables resulting in a smaller design range for the fine tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Schematics of the code structure for the optimization algorithm. . . . Best and worst case scenario for number of tests performed, assumed the four design variables have the same design range and resolution. .

30 31 32 32 33 34 35 37 37 38 38 39 42 xiii

List of Figures

4.14 4.15 4.16 4.17

Schematics of the test simulation script. . . . . . . . . . . . . . . . Effects of height factor. . . . . . . . . . . . . . . . . . . . . . . . . . Schematics over the procedure of building a geometry. . . . . . . . . Physical compression test for evaluating buckling case of a nylon structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.18 Force and displacement for a compression simulation test of a tetrahedral with 5 unit cells. . . . . . . . . . . . . . . . . . . . . . . . . 5.1 5.2 5.3 5.4

5.5

5.6

5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18

. 42 . 44 . 44 . 45 . 46

Mass dependency of beam radius. . . . . . . . . . . . . . . . . . . . . Mass dependency of height factor. . . . . . . . . . . . . . . . . . . . . Mass dependency of number of unit cells (left image) and width (right image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption of tetrahedron initialization. Failed combinations (*) are included in the left image and excluded in the right image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption of cellulose initialization. Failed combinations (*) are included in the left image and excluded in the right image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption of pyramid initialization. Failed combinations (*) are included in the left image and excluded in the right image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption for cellulose from rough mesh vs beam radius. Specific energy absorption for cellulose from rough mesh vs number of unit cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption for cellulose from rough mesh vs unit cell width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption for cellulose from rough mesh vs height factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption (left image) and buckled unit cells (right image) depending on beam radius. . . . . . . . . . . . . . . . . . . . . Specific energy absorption dependent on number of unit cells for the cellulose geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption and height factor (left image) or unit cell width (right image). . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific energy absorption for all successful tests for the cellulose structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Final geometry of tetrahedron as one unit column (left image) and 4 by 4 unit columns (right image). . . . . . . . . . . . . . . . . . . . . . Final geometry of cellulose as one unit column (left image) and 4 by 4 unit columns (right image). . . . . . . . . . . . . . . . . . . . . . . Final geometry of pyramid as one unit column (left image) and 4 by 4 unit columns (right image). . . . . . . . . . . . . . . . . . . . . . . Number of tests performed for the cellulose structure as percentage of all unique combinations. . . . . . . . . . . . . . . . . . . . . . . . .

A.1 Specific energy absorption for tetrahedron from rough mesh vs beam radius. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv

50 51 51

53

53

53 54 55 56 57 58 59 59 60 62 62 62 63 I

List of Figures

A.2 Specific energy absorption for tetrahedron from rough mesh vs unit cell width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II A.3 Specific energy absorption for tetrahedron from rough mesh vs height factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II A.4 Specific energy absorption for tetrahedron from rough mesh vs number of unit cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III A.5 Specific energy absorption for tetrahedron with varying beam radius. III A.6 Specific energy absorption for tetrahedron with varying height factor. IV A.7 Specific energy absorption for pyramid from rough mesh vs beam radius. IV A.8 Specific energy absorption for pyramid from rough mesh vs unit cell width. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V A.9 Specific energy absorption for pyramid from rough mesh vs height factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V A.10 Specific energy absorption for pyramid from rough mesh vs number of unit cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI A.11 Specific energy absorption for pyramid with varying beam radius. . . VI A.12 Specific energy absorption for pyramid with varying width. . . . . . . VII A.13 Specific energy absorption for pyramid with varying height factor. . . VII

xv

List of Figures

xvi

List of Tables 2.1

Results of static compression tests on EPS [6]. . . . . . . . . . . . . .

4.1 4.2

Material properties for 3D printable polymers [28]. . . . . . . . . . . 33 Different rough resolutions and it’s effects on best and worst case scenario for number of tests. . . . . . . . . . . . . . . . . . . . . . . . 41

5.1 5.2 5.3 5.4 5.5

Design variable range for test setup. . . . . . . Design variables’ influence on total mass. . . . Start guess from the rough combination test. . Optimized design parameters and final result. The performance of the script. . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

5

49 50 57 61 64

xvii

List of Tables

xviii

1 Introduction and background Helmets have been widely used by humans for many centuries in order to protect the brain from heavy impacts. Historically, soldiers have been using helmets in battles for a long time and as technology and weapons have developed the helmets composition and material have also changed. The evolution has gone from early usage when the helmets were made of leather and cloths to today where a new generation of ultra-high-molecular-weight polyethylene fibers (UHMWPE) are used in combat helmets to protect against ballistic impacts [1]. In civilian life, the advantages of helmets was recognized and used much later. Today helmets are used in a wide range, stretching from recreational activities and sports, dangerous work activities like mining and construction and also transportation such as bicycle and motorcycles. Motorcyclists and cyclists are among the most vulnerable road users. In Sweden around 2000 people get seriously injured every year in bicycles accidents, around 20-30 of these accidents are fatal [2]. Studies have shown that bearing helmets provide a 63% to 88% reduction of sustained head and severe brain injury for all ages of bicyclists. The core function of a helmet is that it absorbs mechanical energy from the impact, relieving the head from as much energy as possible, hence reducing the risk of brain and head injuries [3]. A route to further improve helmets, besides developing better and tougher materials, is to develop a helmet that is relying on the material structure, i.e. its inner geometry, for energy absorption. How the material in the helmet is structured is limited by available manufacturing techniques and materials. However, the manufacturing techniques are developing rapidly and with 3D printing it is now possible to manufacture complex geometries with very high precision. In nature there are many complex mineral-based and protein-based bio-composites designed to absorb and resist impact and crushing. With additive manufacturing (AM) or 3D printing now available it is motivated to look at the structures and organisms in nature, shaped by the millions of years of evolution to inspire new ways to structure the materials in helmets in order to make them safer. This further allows for individual customization through tailor made helmets specifically designed for the user and its use case.

1.1

Objectives

This thesis aims to generate bio-inspired material architectures for improved energy absorption with potential to improve helmets. New material architectures are identified via adjustable models to evaluate different layer thicknesses and densi1

1. Introduction and background

ties. Sponge-like structures are common in nature and such geometry will be sought determining parameters such as wall thickness and node density. With a flexible model, multiple analyses can be made to evaluate patterns that make a structure energy absorbent. The goal of this thesis is to provide direction and guidance for future research in order to realize micro-structural designs for improved energy absorption in helmets to make them safer. The work is expected to result in identification of energy absorbent material architectures and required material properties to construct better liners for helmets. Furthermore, the proposed material concepts are to be assessed for their processability with current and future 3D printing capabilities.

1.2

Challenges and limitations

The optimization problem is limited to the liner in a helmet, i.e. not the hard shell surrounding the outside. Each geometry case will be represented by unit cells stacked to form unit columns. These unit columns are repeatable and will generate the entire helmet, however not in this thesis. The unit columns are only to be investigated with symmetry boundary conditions on the sides, simply supported at the bottom face and an evenly distributed force applied on the top face. These symmetries represents a flat structure, and not the curvature seen in helmets. The force is calculated to represent the force of impact that a helmet is required to withstand, according to European standards. The load is vertical. Any shear forces that may occur in an actual helmet crash test are not taken into consideration. The material selection is limited to polymers that are currently 3D printable. The scale of each geometry and the beams constructing it is limited to the accuracy of the 3D printer in order to evaluate against physical tests for Swerea. The simulations are performed with Matlab constructed by an elastic finite element analysis and buckling models. Plastic analysis will not be evaluated due to its complexity and the time consuming computational procedure. Regarding nature’s influence of the thesis, it is limited to a conceptually inspiring level of the geometry due to material differences and the lack of documentation for mechanical properties of bio-composite micro-structures. Lastly, the thesis is 30 credits and limited time wise between January and June of 2017.

2

2 Literature study and relevant research in the field The literature review aims to investigate promising structures and geometries found in nature as well as structures found in helmets today. It is a limited study in which few organisms and materials with well known mechanical properties is considered and further investigated.

2.1

Personal protection - Helmets

Most of today’s helmets are of similar design. They have a hard outer shell which is attached to an inner layer consisting of some sort of foam. The core function of the outer shell is to protect the head from sharp objects and to distribute the impact load over a lager area. The outer shell dissipates a significant amount of the the mechanical energy (34%). The inner foam, absorbs the mechanical energy from the impact and distributes it over a large area, reliving the head from as much load as possible [3]. The foam can be of many types, but expanded polystyrene (EPS) is a common choice in bicycle helmets [4]. A cross section of a typical bicycle is depicted in Figure 2.1.

Figure 2.1: Cross section of a Kali Avita Carbon XC helmet [5].

2.2

Foams

For expanded polystyrene (EPS) foams the properties of cellular solids depend on two separate sets of properties, the geometry (cell size, shape, density, material 3

2. Literature study and relevant research in the field

distribution between cell edges and faces) and material properties. A typical compressive stress-strain curve of elastomeric foams is shown in Figure 2.2. The curve can be divided into three regions: I, shows linear elasticity at low stresses. II, is a wide collapse plateau and III is the densification where the stresses rise steeply [6].

Figure 2.2: Compression stress-strain curve of a rigid foam [6]. The three stages has the following characteristics. • I, The linear elasticity holds for small strains (3-5%) and consists of three types of strain: stretching of cell walls, bending of cell edges and compression of gas trapped into the cells. For the case of compressive load the plateau is associated with cell collapse due to the onset of plastic hinges. Opposing walls come into contact once the cells have almost completely collapsed, further compressive stresses arise leading to the final region of bottoming-out. • II, Foams with a plastic yield point displays a ductile failure as well if loaded beyond their linear-elastic region. The plastic collapse results in a wide horizontal plateau in the stress-strain curve where the strains are no longer recoverable. This plastic deformation is exploited in energy-absorbing systems. The plastic collapse depends on three mechanisms: When the bending moment acting at cell walls exceed the allowable moment of the edges, there is an onset of permanent hinges, cell wall plastic stretching occurs and pressure of fluid contained into the cell increases. • III, When cells are completely collapsed, at large compressive strains, the opposing walls are crushed together and the constituent material is compressed as well. As a consequence, the stress-strain curve rises steeply. In Table 2.1 different experimental data on specific energy absorption for expanded polystyrene is shown. The test resulting in these data was a static compression test on different EPS densities and were performed according to free- and confined volume methods. With a confined volume method means that the foam is prevented to expand in a certain direction. In this experiment the foam was fitted in a cylindrical steel frame, preventing any radial expansion during the compression [6].

4

2. Literature study and relevant research in the field Table 2.1: Results of static compression tests on EPS [6]. Specific Energy [kJ/kg] Nominal Density [kg/m ] Confined Free 28 4.29 3.93 40 4.50 4.25 55 5.09 4.55 70 5.57 5.43 3

2.3

Energy absorbing structures in nature

In this chapter we present an overview of energy absorbing materiel structures in nature. The overview is not an extensive review of such materials but rather limited to some materials with anticipated high energy absorption.

2.3.1

Bones

In the human body, there are only two types of bone tissue: cortical and cancellous bone. Cortical bone is very dense and strong which makes it more difficult to fracture. Its primal function is to provide structural support for the body and its organs and tissues [7]. Cortical bone is structured by many microscopic cylinders called osteons. These cells produces bone matrices known as a lamellae [8]. A cross section of a human bone is depicted in Figure 2.3.

Figure 2.3: An illustrative cross section of a human bone [9]. Together the osteons forms a system of concentric circles which builds up the compact bone. When bundled, they form a strong support with high structural strength and rigidity [7]. The other type of bone, the cancellous bone, is located at the ends of the long bones, i.e. the cortical bones. In the typical adult human body, the cancellous bones make up about 20% of the skeleton. Although cancellous bone is 5

2. Literature study and relevant research in the field

strong, it is more porous compared to cortical bones and thus more easily fractured. Cancellous bone is also known as spongy bone because of its similarity to a sponge or honeycomb. It has many open hollow spaces connected by flat planes of bone known as trabeculae [10]. Each time we move or do any physical activity, our hips, spine, and pelvis, is subjected to mechanical stresses. The strength that keeps the bones from breaking is provided by the trabeculae, see Figure 2.4.

Figure 2.4: Trabeculae [11]. The trabeculae might look randomly arranged since it is hard to see a clear pattern of how the the cell tissue is structured, but it is not. It is constructed and ordered by our body to support the areas which experience the highest stresses. The trabeculae can even grow and change shape and direction in order to give better support to our body, depending on the stresses the body is subjected to. Cancellous bone also contains red bone marrow which fills up the spaces between the trabeculae [12]. Inside the trabecule, there are three types of cells that cooperate to keep the bone strong and healthy: osteoblasts, osteocytes, and osteoclasts. The osteocytes senses when the bone is damaged or subjected to stress. The osteoblasts creates new bone tissue and the osteoclast destroys old or damaged bone in order to make room for the osteoblasts. The procedure of remolding bone tissue by removing old bone tissue and replacing it with new bone tissue is an ongoing and carefully regulated process. The trabeculae need to provide support for the bone without being too thick and dense since it would make the bone unnecessarily heavy and reduce the space for red bone marrow. If it would be too thin however it would make the bone more easily fractured [12].

2.3.2

Teeth

Human teeth are, like most other vertebrate teeth composed of dentin which is capped by a thin layer of enamel, see Figure 2.5. Fully matured enamel consists mainly of mineral (>95% per volume) in form of bundles of highly elongated crystals. This makes the enamel the hardest material in the body, but also brittle. Dentin 6

2. Literature study and relevant research in the field

contains approximately of 50% crystals, 20% water, and 30% organic matrix per volume. This composition makes it softer, but tougher compared to the enamel covering it [13]. The enamel and the dentin is subjected to cyclic mechanical loading, thermal and hydration stresses as we eat and use our teeth in daily life. The enamel cap transfers the load from its cap and distributes it into the dentin, without having a fracture. It is however the elastic properties of the enamel and the dentin that are important for normal tooth function rather than fracture properties, due to the fatigue damage is always an extreme result of load and normally related to extensive wear [13].

Figure 2.5: The anatomy of a human tooth [14].

2.3.3

Tree

There are two types of wood in trees, softwood and hardwood. The distinction between softwood and hardwood depends on the plants reproduction and its seeds. Hardwood are angiosperms, which means that its seeds have some sort of covering, like fruits or a hard shell like an oaks acorn, Figure 2.6. Softwood trees are gymnosperms, there seeds have no covering and fall to the ground as it is. For example, pine trees are categorized as a softwood tree, where its seeds are spread out in the wind as they are mature. The structures in hardwood are considered to be more advanced compared to softwood. Hardwood have four main cell types: fibers, vessels, tracheids and parenchyma cells. The fibers are from a mechanical perspective most interesting since they provide the mechanical support and strength to the tree [15]. The three major polymers in wood are cellulose, hemicelluloses, and lignin. Cellulose is the main structural component of the cell wall and the most common macromolecule on earth. The cell wall provides the cell with stability, stiffness, tensile strength and protection from 7

2. Literature study and relevant research in the field

mechanical stresses [16].

Figure 2.6: Cross-section of a sector of hardwood showing its different layers. R, L and T denotes the radial, longitudinal and tangential direction [15]. On nano-scale cellulose chains are bonded with each other through hydrogen bonds, forming flat sheets. The sheets are in turn stacked on each other forming bundles which is held together by van der Waals forces. These bundels, called fibrils, are orientated different depending its location in the cell wall. In the thicker secondary layer the fibrils are organized in a parallel manner, orientated with a certain angle towards the fibre axis called the microfibril angle. The angle is highly affecting the mechanical properties of the wood. Due to its diverse structure, the mechanical behavior of wood depends highly on the direction and which type of load that is applied [15]. The structure is effective in axial compression which makes the tree withstand its own weight due to gravity and also flexibility in order to be able to bend under windy conditions or external loading such as ice, snow or fruit loading [17].

2.4

Energy absorption fundamentals

Even though energy absorbing structures should suit the particular purpose and circumstances of which they are to work, the aim is to dissipate kinetic energy in a controlled manner or at a predetermined rate. There are fundamental principles that are generally valid for these structures, presented below [18].

8

2. Literature study and relevant research in the field

Irreversible Energy Conversion The energy conversion by a structure should be irreversible and convert the input kinetic energy into inelastic energy, such as plastic deformation, rather than storing it in an elastic manner. Meaning, the stresses in the structure should exceed the yield strength of the material.

Restricted and Constant Reactive Force Ideally the reaction force should remain constant during the deformation process of the energy absorbing structure. The peak reaction force should be kept below a threshold. This peak force correlates to the deceleration and the threshold should be set to a value above which would cause damage or injury. The standards for a bicycle helmet is a deceleration of 300g [19].

Long Stroke In order to keep the reaction force constant and below the threshold, the structure must have a sufficiently long deformation zone. The work done by the force is equal to it’s magnitude times the displacement, meaning in order to decrease the force, the displacement needs to increase, see Equation 2.1. W = Fd

(2.1)

where W is the work, F is the force and d is the deformation. To decelerate uniformly from speed v to 0 m/s requires a distance d, Equation 2.2; d=

vt 2

(2.2)

where t is the time. This distance is what the force acts over to dissipate the kinetic energy. The relation also describes that distance can be "bought" with time. The longer time the force acts, the gentler the arresting force required resulting in a lower risk of injury.

Stable and Repeatable Deformation Mode Since the loads acting on the structure are varying and uncertain the deformation mode and energy absorption capacity of the design need to be stable and repeatable. This is to ensure reliability of the structure during its service. Examples of uncertainties for the impact could be magnitude, direction and distribution.

2.5

Numerical simulation of energy absorption

There are three main methods to simulate a drop test in Ansys; response spectrum, implicit and explicit [20]. 9

2. Literature study and relevant research in the field

Response Spectrum Response spectrum assumes the impact to be a half sine loading with a hand calculated time duration expressed as a harmonic frequency. This method requires the model to be completely linear since it is a mode superposition method. The response spectrum solves significantly faster than the transient approaches and uses fewer resources.

Implicit The implicit method obtains a solution using a series of linear approximations and small iterative time steps are required to achieve convergence. The implicit method is good for drop simulation with long time durations (seconds to minutes) and no or moderate non-linearities. The solution is dependent on current and previous time step and resolves nonlinearities with standard Newton-Raphson iteration approach. The method can handle moderate nonlinearities such as most contact, moderate nonlinear materials and moderate distortion and strain. It uses 2nd order solid elements, hence no hourglass energy issues.

Explicit The explicit method uses uncoupled equations that can be solved directly (explicit). This method requires tiny time steps that are solved once and no inversion of the stiffness matrix is required. The explicit method is good for problems with short time transients and extreme nonlinearities. This includes extremely large distortions and deformations, material failure and nonlinear materials. The solution depends only on previous time step and requires small time steps (µs) and is limited to problems with duration in milliseconds or less. It uses 1st order elements and need finer mesh to achieve the same accuracy as the implicit model. Ansys tools for handeling explicit dynamics are Ansys Explicit/STR, Ansys/LS-DYNA and Ansys Autodyn.

2.6

Failure criteria for structure - General buckling

Even though buckling on a beam in a structure sometimes does not damage the structure, it must still be avoided since the buckled beam may cause the structure to lose its capability to fulfill its purpose. The actual buckling load may be the final load bearing capacity since the beam in its buckled shape may not sustain any additional load, causing the structure to failure [21]. Therefore, if buckling occur in a layer, the layer will be considered as expired.

10

3 Theory 3.1

Energy Absorption

In engineering, the evaluation of the energy absorption capacity is defined as the integration of the stress-strain curves, Equation 3.1. Ea =

Z 0

σd

(3.1)

0

Ea is the energy absorption capacity per unit mass, σ is the stress and 0 is the strain. In order to design an energy absorbing structure, it needs to sustain intense impact loads resulting in deformation and failure involving large geometrical changes, strainhardening effects, strain-rate effects and different deformation modes like bending and stretching. Because of this, most energy-absorbers are made of ductile materials like low carbon steel, aluminum alloys, polymer foams and fibre-reinforced plastics.

Figure 3.1: Idealised stress-strain curves: (a) elastic, perfectly plastic, (b) elastic, linear hardening and (c) elastic, power hardening [18]. The stresses corresponding to Figure 3.1 relates to the strain  as: σ=

 E Y

for  ≤ y = Y /E for y ≤  < f

 E

for  ≤ y = Y /E σ= Y + Ep ( − y ) for y ≤  < f  E

for  ≤ y = Y /E σ= Y + K( − y )q for y ≤  < f

(3.2)

(3.3)

(3.4) 11

3. Theory

where y is the yield strain, Ep is the hardening modulus, K and q area material constants determined experimentally [18].

3.2 3.2.1

Finite Element Method The FEM problem

In order to solve the differential equations for the beam elements, a numerical approach will be applied. The following steps will be carried out in order to solve the problem [22]: 1. Establish the strong formulation of the problem. 2. Obtain the weak formulation by reformulating the strong formulation. 3. Choose approximations for the unknown function. 4. Choose the weight functions according to Galerkin method. 5. Derive element stiffness matrix and element force vector. 6. Solve global system of equations, i.e. the displacements. Differential equations for Bernoulli’s beam theory - strong formulation Consider an arbitrary structure constructed by n beam elements in the global coordinate system (X, Y, Z). Each element in the structure is considered as Euler-Bernoulli beam with two nodes. Each beam element has 6 degrees of freedom in each node, 3 deformation components (wx , wy , wz ) in each coordinate axis direction and 3 rotation components (θx , θy , θz ) around each coordinate axis. Now consider an arbitrary beam element with the local coordinate system (x, y, z). The beam is cylindrical with length L and starting as a general case, the beam is subjected to a distributed load q = q(x) and a distributed moment load vector m = m(x). The external loads give rise to an internal force vector F = F (x) and an internal moment vector M = M (x), see Figure 3.2. In order to find the differential equations for the beam element, the procedure outlined in [23] will be adapted. The vectors on component form in the local coordinate system is put as follows: 



N   F = Qy  , Qz 



mx   m = my  , mz





Mx   M = My  Mz 



qx   q =  qy  qz

(3.5)

The force N represents the axial force and the components Qy and Qz is the shear force in y- and z-directions respectively. The components My and Mz denotes the bending moments and the axial component Mx denotes the torsional moment. Force and moment equilibrium of a indefinitely small beam element gives: −F + F + dF + qdx = 0 dF +q =0 =⇒ dx 12

(3.6)

3. Theory

Figure 3.2: An infinitely small beam element.

− M + M + dM + i × (F + dF )dx + mdx = 0

(3.7)

By neglecting second order terms yields: dM +i×F +m=0 dx

(3.8)

Now, by using i × F = i × (Ni + Qy j + Qz k) = N i × i + Qy i × jQz i × k = 0i − Qz + Qy k the following components relations can be expressed from Equation 3.6 and 3.8: dQy dQz dN + qx = 0, + qy = 0, + qz = 0, (3.9) dx dx dx dMx dMy dMz + mx = 0, − Qz + my = 0, + Qy + mz = 0 (3.10) dx dx dx Using kinematic relations for a Bernoulli-Euler beam, which states that rotated cross-section is always orthogonal to the deformed beam axis, the rotation θ and curvature κ can be expressed as: θy = −

dwz , dx

θz =

dwy dx

(3.11)

d2 w z dθz d2 wy dθy = , κ = = (3.12) z dx dx2 dx dx2 The beam axis is considered to be located in the neutral axis, where there are no longitudinal stresses or strains. This results in the axial and bending problem is uncoupled and can be separately examined. Assuming homogeneous material, the moment is: M = −EIκ (3.13) κy = −

This, together by taking the first derivative of the bending equations in 3.10 and use the expressions in Equation 3.9 yields the differential equations for bending: d2 d2 wy EI z dx2 dx2 



− qy +

dmz =0 dx 13

3. Theory d2 d2 wz dmy =0 (3.14) EI − qz + y 2 2 dx dx dx The differential equation for the axial deformation can be expressed by rewriting the axial component with the the normal force N in Equation 3.9. In terms of normal stress N = σA and using Hookes law (σ = E) and the kinematic relation  = dwx /dx, Equation 3.9 leads to the sought differential equation for axial deformation: 



d dwx EA + qx = 0 dx dx Since the beam is three dimensional, the twist of the beam must be taken into x and consideration as well. The torsion is assumed to be homogeneous, i.e. Mx , dθ dx the warping of the cross sections is constant along the beam (also known as St. Venant torsion). The beam material is assumed to be homogeneous and isotropic linear elastic with shear modulus G. In homogeneous torsion, warping does not x induce normal strains i.e. xx = du = 0 which in turn leads to no normal stress as dx well (Hookes law: σxx = Exx ). Thus, only shear stresses are present in the cross section. The following relation can then be expressed by the linearity assumption that the torsional moment depends linearly on the twist gradient and the shear stresses depends linearly on the shear modulus [23]: 



dθx (3.15) dx where G is the shear modulus and K is St. Venant torsion constant. Taking the first derivative of Equation 3.15 and insert it into Equation 3.10 yields the sought differential equation for torsion: Mx = GK

GK

d2 θx + mx = 0 dx2

(3.16)

Summarizing, the following differential equations have been expressed for the beam, i.e. the strong formulation: d dwx EA + qx = 0 dx dx   d2 w z dmy d2 EI − q − =0 y z dx2 dx2 dx 



d2 d2 wy dmz EI − qy + =0 z 2 2 dx dx dx d2 θx GK 2 + mx = 0 dx 

14

(3.17) (3.18)



(3.19) (3.20)

3. Theory

The weak formulation In order to find the weak form of the differential equations, an arbitrary function v(x) is multiplied with each one of the differential equations and integrated over the pertinent region. Starting with Equation 3.17: Z b  a

dwx  d AE + qx dx = 0 v dx dx 

a≤x≤b

(3.21)

By integrating by parts, the weak formulation of axial deformation is obtained: Z b

dv dwx dwx AE dx = vAE dx dx dx 

a

b

+

Z b a

a

(3.22)

vqx dx

The weak form of bending in the xz-plane is obtained in the same manner by first multiplying an arbitrary function v(x) to Equation 3.18 and integrate over the pertinent region: Z b

Z b Z b d2 dmy d2 w z vq dx − v EI dx − dx = 0 z y dx2 dx2 dx a a 

v

a



(3.23)

Integrating 3.23 by parts twice: 

− vVz

ib a



Z b a

Z b Z b dv d d2 w z dmy dx = 0 EIy dx − vqz dx − v 2 dx dx dx dx a a

dv My − vVz + a dx 

ib





b

+



Z b a

a

Z b dmy d2 v d2 w z Z b v vqz dx − EIy − dx = 0 2 2 dx dx dx a a

(3.24) (3.25)

Rearranging the boundary terms and distributed load to RHS: =⇒

Z b a

where

ib h d2 v d2 wz dv − EI dx = vV Mz y z 2 2 a dx dx dx 

d d2 w z EIy , Vz = − dx dx2 



b

+

Z b a

a

vqz dx −

My = −EIy

Z b

v

a

dmy dx dx

(3.26)

d2 w z dx2

Adopting the same procedure for Equation 3.19 gives the weak formulation of bending in xy-plane: =⇒

Z b a

where

h ib d2 v d2 wy dv EI dx = vV − Mz z y 2 2 a dx dx dx 

d d2 w y Vy = − EIz , dx dx2 



b

+

Z b a

a

vqy dx −

Mz = −EIy

Z b a

v

dmy dx dx

(3.27)

d2 w y dx2

Lastly, the weak formulation of torsion is derived from Equation 3.20 by using the same procedure to: GK

Z b a

dv dθx dθx dx = vGK dx dx dx 

b

+ a

Z b a

vmx dx

(3.28) 15

3. Theory

FE-formulation From the weak formulation of the equilibrium equations, the FE-formulation is derived [22]. Since the deflection w is the unknown function, the approximation for the deflection w of one element can be generally written as: w = Na

(3.29)

where a = [u1 u2 . . . un ]T

N = [N1 N2 . . . Nn ],

(3.30)

n is the number of unknown for the entire beam. Starting with the bending equations, 3.26 and 3.27. From Equation 3.29 it follows that: d2 w = Ba, dx2

where B =

d2 N dx2

(3.31)

The arbitrary weight functions v is now chosen according to Galerkin: v = Nc

(3.32)

It is concluded that the parameters given by c are arbitrary since the weight functions are arbitrary. The weight function can be rewritten to: v = cT N T dN T d2 v dv = cT , = cT B T (3.33) dx dx dx2 Inserting variables from Equation 3.33 into the weak formulation of bending in xz−plane, Equation 3.26, yields:

c

T

Z b a

T



B EIy Bdxa = c

T

dN T N Vz − My a dx

h



ib

T

b

+

Z b a

a

T

N qz dx+

Z b a

dmy N dx dx (3.34) T



Since cT is arbitrary chosen it is concluded that: Z b a

dN T B EIy Bdxa = N Vz − My a dx T

h

T

ib



b

+

Z b a

a

N T qz dx +

Z b

NT

a

dmy dx (3.35) dx

which is the sought FE-formulation for bending in xz-plane. Adopting the same procedure to Equation 3.27 yields the FE-formulation for bending in xy-plane to: Z b a

dN T B EIz Bdxa = N Vy − Mz a dx T

h

T

ib



L

+ 0

Z b a

T

N qy dx −

Z b a

NT

dmz dx (3.36) dx

It is desired to write the FE-formulation in compact form Ka = f , which gives in xz-plane: Z b

K=

a

B T EIy Bdx

f = fb + fl 16

3. Theory

where f b = [N

T

Vz ]ab

dN T My − dx 

a

and f l =

b

Z b a

N T qz dx +

Z b

NT

a

dmy dx dx

(3.37)

and in xy-plane: K=

Z b a

B T EIz Bdx

f = fb + fl where f b = [N T Vy ]ab −



dN T dx

a

and f l =

b

Z b a

N T qy dx −

Z b

NT

a

dmz dx dx

(3.38)

K is the stiffness matrix, f l the load vector and f b is the boundary vector. The FE-formulation of axial deformation is obtained in the same manner by defining B and chose weight functions according to Galerkin. The FE-formulation for axial deformation, starting from Equation 3.22, yields: Z b a



T

b

T

B AEBdxa = N Nx

where Nx = AE

dux , dx

+

Z b

N T qx dx

a

a

B=

dN x dx

(3.39)

In compact form: K=

Z b

B T AEBdx,

B=

a



f = N T Nx

b

+

Z b a

a

dN dx

N T qx dx

(3.40)

The FE-formulation of torsion is obtained from Equation 3.28 in the same manner to: Z b dN K= B T GKBdx, B = dx a 

T

b

+

f = N Mx

Z b

a

where Mx = GK

a

N T mx dx

dθx dx

(3.41)

(3.42)

Evaluation of element stiffness matrix Since the 3D-beam element have 6 degrees of freedom in each of its two nodes the total unknowns for the element is ne = 12. ae = [u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 ]T N e = [N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 N11 N12 ]

(3.43) 17

3. Theory

Figure 3.3: A beam element with one node at each end. In total, the beam has 12 degrees of freedom represented by u1−12 . Where u represents each degree of freedom (see Figure 3.3) and N is the chosen shape functions. Starting with bending equation in xz-plane, Equation 3.37, it includes two degrees of freedom, u3 , u5 and u9 , u11 for the first and second node respectively. Considering a beam element with length 0 ≤ x ≤ L, the contribution to the element stiffness matrix K e from bending in xz-plane can be calculated from: Ke =

Z L 0

B eT EIy B e dx,

Be =

d2 N e dx2

(3.44)

The corresponding shape functions are calculated by adopting the C-matrix method [22]. N3 = 1 − 3

x3 x2 + 2 , L2 L3

x2 x N9 = 2 3 − 2 , L L 



N5 = x 1 − 2



x x2 + 2 L L

x2 x −1 = 2 L L





N11



(3.45)

By using the definition of B e from Equation 3.44 and take the second derivative of the chosen shape functions in Equation 3.48, one obtains: 

e B e B e B3e B5e B3e B9e B3e B11 Z L  3e 3e e e e e e e   B5 B3 B5 B5 B5 B9 B5 B11  K e = EIy  e e , e   B9e B5e B9e B9e B9e B11 0  B9 B3 e e e e e B11 B3e B11 B5e B11 B9e B11 B11



18



B eT



0     0   12x 6   −  L3 L2    0     6x 4  2 −   L L    0    =   0     0    6 12x   L2 − L3      0    6x 2  −  L2 L  0

(3.46)

3. Theory

Solving the integral in Equation 3.46 gives the following contributions to the element stiffness matrix: K e (3, 3) = EIy

12 , L3

K e (3, 5) = EIy

6 , L2

K e (3, 9) = −EIy

12 L3

6 6 4 e e , K (5, 3) = EI , K (5, 5) = EI y y L2 L2 L 12 6 2 K e (5, 9) = −EIy 2 , K e (5, 11) = EIy , K e (9, 3) = −EIy 3 , L L L 6 12 6 K e (9, 5) = −EIy 2 , K e (9, 9) = EIy 3 , K e (9, 11) = −EIy 2 L L L K e (3, 11) = EIy

6 2 K e (11, 5) = EIy , K e (11, 9) = −EIy 2 , L L 4 K e (11, 11) = EIy (3.47) L The contribution to K e from bending in xy-plane is obtained in the same manner as with the bending in xz-plane by calculating shape functions using C-matrix method and the FE formulation from Equation 3.37. It is noted that the shape functions for bending in xy-plane (N2 , N6 , N8 , N12 ) are identical to the shape functions in xz-plane, i.e. K e (11, 3) = EIy

6 , L2

x2 x3 N2 = N3 = 1 − 3 2 + 2 3 , L L

x x2 N6 = N5 = x − 1 + 2 − 2 L L 

x x2 N8 = N9 = 2 3 − 2 , L L 



x2 x = 2 1− L L 

N12 = N11





(3.48)

thus: 



e B e B e B2e B6e B2e B8e B2e B12 Z L  2e 2e e e e e e e   B6 B2 B6 B6 B6 B8 B6 B12  K e = EIz  e e , e   B8e B6e B8e B8e B8e B12 0  B8 B2 e e e e e B12 B2e B12 B6e B12 B8e B12 B12





B eT

0   12x  L3 − L62      0     0       0    6x − 4   L2 L   =   0   6 12x    L2 − L3      0     0     0   6x 2 − L2 L

(3.49)

Solving the integral in Equation 3.49 gives the contribution from bending in xyplane: K e (2, 2) = EIz

12 , L3

K e (2, 6) = EIz

6 , L2

K e (2, 8) = −EIz

12 L3 19

3. Theory 6 6 4 e e , K (6, 2) = EI , K (6, 6) = EI z z L2 L2 L 12 6 2 K e (6, 8) = −EIz 2 , K e (6, 12) = EIz , K e (8, 2) = −EIz 3 , L L L 6 12 6 K e (8, 6) = −EIz 2 , K e (8, 8) = EIz 3 , K e (8, 12) = −EIz 2 L L L K e (2, 12) = EIz

6 2 K e (12, 6) = EIz , K e (12, 8) = −EIz 2 , L L 4 (3.50) K e (12, 12) = EIz L The contribution to the stiffness matrix from axial deformation is calculated from Equation 3.40: K e (12, 2) = EIz

6 , L2

dN e K = B AEB dx, B = (3.51) dx 0 The corresponding degrees of freedom for the element are u1 and u7 , see Figure 3.3. Since there are only two degrees of freedom for axial deformation, the shape functions N1 and N7 are easily chosen as: Z L

e

e

eT

e

1 x (L − x), N7 = (3.52) L L Taking the first derivative of N 1 and N 7 and inserting them into Equation 3.51 yields: N1 =

−1  L  0     0       0     0     0    

e

K = EA

Z L" e e B B 0

1 1 B7e B1e

#

B1e B7e , B7e B7e



B eT = 

  1   L   0       0     0      0  

(3.53)

0

Solving the integral in Equation 3.53, the contribution to K e from axial deformation is obtained as: K e (1, 1) =

AE , L

K e (1, 7) = −

AE , L

K e (7, 1) = −

AE , L

K e (7, 7) =

AE (3.54) L

The contribution to the element stiffness matrix from torsion remains to be derived. The shape functions for torsion is identical to the shape functions in axial deformation i.e. 1 x N1 = N4 = (L − x), N7 = N10 = (3.55) L L 20

3. Theory

Inserting the shape functions into Equation 3.41 yields: 

e

K = GK

Z L" e e B B

4 4 e B10 B4e

0

#

e B4e B10 , e e B10 B10



0    0     0     1 − L     0     0     =  0     0       0   

B eT

(3.56)

 1   L     0 

0

K e (4, 4) =

GK , L

K e (4, 10) = −

GK L

GK GK , K e (10, 10) = (3.57) L L Summarizing the contributions from Equation 3.47, 3.50, 3.54 and 3.57 yields the full element stiffness matrix: K e (10, 4) = −



e

K =

AE L

0

0

0

0

0

 12EIz 6EIz  0 0 0 0  L3 L2   12EIy 6EIy 0 0 0  0 L3 L2   GK  0 0 0 0 0 L   4EIy 6EIy  0 0 0 0  L L2   6EIy 4EIz 0 0 0  0 L L2   AE − L 0 0 0 0 0    0 − 12EIz 0 0 0 − 6EI2z  L3 L   12EIy 6EIy 0 − 0 − 2 0  0 L3 L    0 0 0 − GK 0 0 L   6EIy 2EIy  0 0 0 0  L L2  0

6EIz L2

0

0

0

2EIz L

− AE L

0

0

0

0

0



0

z − 12EI 3

0

0

0

6EIz L2

0

0

0

6EIy L3

0

0

0

− GK L

0

0

0

0

0

2EIy L

0

0

− 6EI2z

0

0

0

2EIz L

AE L

0

0

0

0

0

0

12EIz L3

0

0

0

− 6EI2z

0

0

12EIy L3

0

6EI − 2y L

0

0

0

0

GK L

0

0

0

0

0

4EIy L

0

0

− 6EI2z

0

0

4EIz L

                                 

L



12EIy L3

0 −

L

L



6EIy L2

6EIy L2

0

L

K e is defined in the elements local coordinate system (x, y, z) and in order to be able to assemble the full stiffness matrix K, K e needs to be transformed and expressed in the global coordinate system (X, Y, Z). The transformation between coordinate systems is done by using a transformation matrix G according to: e

¯ G K e = GT K

(3.58) 21

3. Theory e

¯ now denotes the element stiffness matrix in local coordinate system and where K e K denotes the element stiffness matrix in global coordinate system [24]. How the element stiffness matrix and transform matrix G is implemented is further discussed in Section 3.2.2. Evaluation of force vector The element force vector f e is defined as the sum of the boundary vector and the load vector according to f e = f eb + f el . Since no distributed load is present in the structure i.e. qx = qy = qz = 0, there is no contribution from the element load vector to the solution. The standard form is thus reduced to: K e ae = f eb

(3.59)

In Figure 3.4, boundaries of an arbitrary structure of beam elements is displayed. The boundary Γsym simulates neighbouring cell connections. Nodes which lays on Γsym are ruled by a Dirichlet boundary condition, preventing any movement in xy−plane and only allow movement in z-direction. The boundary Γg represents the ground, thus nodes present on Γg is prevented from any movement in z-direction. Nodes located at the boundary at the top of the structure Γf is subjected to a prescribed force. The magnitude of the force is dependent on type of structure and is further explained and calculated in Section 4.3.

Figure 3.4: A beam element with one node at each end. In total, the beam has 12 degrees of freedom represented by u1−12 .

3.2.2

CALFEM

In order to apply the derived formulations of the FEM-problem in Section 3.2.1, CALFEM is used. CALFEM is a Matlab toolbox computer program for finite element applications. The program contains a library of finite element methods handling matrix operations, material, element, system, statement and graphical functions. This thesis uses CALFEM’s beam elements to represent each connection link and all beams within the geometry.

22

3. Theory

The beam3e function The beam3e function computes the element stiffness matrix for a three dimensional beam element [24]. This provides the global element stiffness matrix Ke for the beam element, Equation 3.60.

K e = beam3e(ex , ey , ez , eo , ep ),

  ex        ey

= [x1 , x2 ] = [y1 , y2 ] ez = [z1 , z2 ]     eo = [xz¯, yz¯, zz¯]      ep = [E, G, A, Iy¯, Iz¯, Kv ]

(3.60)

The input variables supply the element nodal coordinates (x1 , y1 , ...), the direction of the local beam coordinate system (xz¯, yz¯, zz¯), see Figure 3.5, and material data (ep ). The material data needed is modulus of elasticity E, shear modulus G, cross sectional area A, moment of inertia with respect to the y¯ and z¯ axis, Iy¯ & Iz¯ and St Venant torsinal stiffness Kv .

Figure 3.5: The CALFEM beam element in three dimensions displaying degrees of freedom and the local coordinate system (¯ x, y¯, z¯) [24]. The element stiffness matrix K e is computed according to Equation 3.61. ¯ eG K e = GT K

(3.61)

23

3. Theory

where 

¯e= K

k1

0

0

0

0

0

−k1

0

0

0

0

0

 6EIz 12EI 6EIz ¯ ¯ z ¯  0 12EI 0 0 0 0 − 3 z¯ 0 0 0  L3 L2 L L2   6EI 12EIy 6EI 12EIy ¯ ¯ 0 − 2y¯ 0 0 0 − 0 − 2y¯ 0 0  0 L3 L L3 L   0 0 0 k2 0 0 0 0 0 −k2 0 0    6EIy 6EIy 4EIy 2EIy ¯ ¯ ¯ ¯  0 0 0 0 0 0 0 0 L L  L2 L2   6EI 4EIz 6EI 2EIz ¯ ¯ 0 0 0 0 − 2z¯ 0 0 0  0 − L2y¯ L L L   0 0 0 0 0 k1 0 0 0 0 0  −k1   6EI 12EIz 6EI z ¯ ¯  0 − 12EI 0 0 0 − 2z¯ 0 0 0 0 − 2z¯ L3 L L3 L   12EIy 6EIy 12EIy 6EIy  0 ¯ ¯ ¯ ¯ 0 − 0 0 0 0 0 0  L3 L2 L3 L2   0 0 0 −k2 0 0 0 0 0 k2 0 0    6EI 2EIy 4EIy 6EIy ¯ ¯ ¯  0 0 − 2y¯ 0 0 0 0 0 0 L L L L2  

in which k1 =

0

6EIz ¯ L2

EA L

and k2 =

G=

0

0

2EIz ¯ L

0

GKv , L

0



6EIz ¯ L2

0

0

4EIz ¯ L

                                 

and

n

x¯ x

nyx¯ nzx¯

0

0

0

0

0

0

0

0

0

n  x¯y   nx¯z    0    0    0    0   0    0    0    0 

nyy¯ nzy¯

0

0

0

0

0

0

0

0

0

nyz¯ nzz¯

0

0

0

0

0

0

0

0

0

0





   0    0    0    0    0    0   0    nzx¯    nzy¯  

0

0 nx¯ x ny x ¯ nz x ¯

0

0

0

0

0

0

0

nx¯ y ny y ¯ nz y ¯

0

0

0

0

0

0

0

nx¯ z ny z ¯ nz z ¯

0

0

0

0

0

0

0

0

0

0 nx¯ x ny x ¯ nz x ¯

0

0

0

0

0

0

0

nx¯ y ny y ¯ nz y ¯

0

0

0

0

0

0

0

nx¯ z ny z ¯ nz z ¯

0

0

0

0

0

0

0

0

0

0 nx¯ x ny x ¯

0

0

0

0

0

0

0

0

nx¯ y ny y ¯

0

0

0

0

0

0

0

0

nx¯ z ny z ¯ nz z ¯

in which nx¯x specifies the cosine of the angle between the x axis and x¯ axis and so on. The beam element length L is computed from Equation 3.62. L=

q

(x2 − x1 )2 + (y2 − y1 )2 + (z2 − z1 )2

(3.62)

The beam3s function The beam3s function computes the section forces and displacements, Equation 3.63, in local directions along the three dimensional beam element [24]. Figure 3.6 displays one section element of the beam and the computed forces and displacements. 24

3. Theory

Figure 3.6: The CALFEM beam element in three dimensions displaying degrees of freedom and the local coordinate system (¯ x, y¯, z¯) [24].

es = beam3s(ex , ey , ez , eo , ep , ed ),

  ex        ey

= [x1 , x2 ] = [y1 , y2 ] e = [z1 , z2 ]  z    eo = [xz¯, yz¯, zz¯]      ep = [E, G, A, Iy¯, Iz¯, Kv ]

(3.63)

The element displacements, stored in ed obtained by the extract function. The output variable consists of column matrices that contain the section forces, displacements and the evaluation points on the local x¯-axis as es = [N, Vy¯, Vz¯, T, My¯, Mz¯] or   N1 Vy¯1 Vz¯1 T1 My¯1 Mz¯1    N2 Vy¯2 Vz¯2 T2 My¯2 Mz¯2   es =  .. .. .. .. .. ..    . . . . . .  Nn Vy¯n Vz¯n Tn My¯n Mz¯n The section forces is based on the basic Euler-Bernoulli beam equations, Equation 3.64. d2 u¯ EA 2 + qx¯ = 0 (3.64) d¯ x EIz

d4 v¯ − qy¯ = 0 d¯ x4

EIy

d4 w¯ − qz¯ = 0 d¯ x4

GKv

d4 ϕ¯ + qw¯ = 0 d¯ x4 25

3. Theory

The displacements along the beam element are obtained as the sum of the homogeneous and the particular solutions, Equation 3.65. u¯(¯ x) v x)   ¯(¯   = uh + up u= w(¯ ¯ x) ϕ(¯ ¯ x) 



(3.65)

Where the homogeneous solution is ¯ C −1 Gae uh = N and the particular solution 

u¯p (¯ x) v ¯ (¯ x )   up =  p  = w ¯p (¯ x) ϕ¯p (¯ x) 



qx¯ L¯ x 2EA



1−

      qy¯L2 x¯2  24EI 1 − z      qz¯L2 x¯2   1−  24EIy     qw¯ L¯ x 2GKv

and



1−

x ¯ L

   2   x ¯  L    2   x ¯  L      x ¯ L

1 x ¯ 0 0 0 0 0 0 0 0 0 0

0 0 1 x ¯ x ¯ ¯ = N 



2

 



x ¯3 0 0 0 0 0 0  

  0 0 0 0 0 0 1 x¯ x¯2 x¯3 0 0  0 0 0 0 0 0 0 0 0 0 1 x ¯

C=

1 0 0 0  0 0   0 0  0 0   0 0  1 L   0 0   0 0  0 0   0 0 

0 0 0

0

0 0 0

0

0 0

1 0 0

0

0 0 0

0

0 0

0 0 0

0

1 0 0

0

0

0 0 0

0

0 0 0

0

1

0 0 0

0

0 1 0

0

0

0 1 0

0

0 0 0

0

0

0 0 0

0

0 0 0

0

0

L2

L3

0 0 0

0

0

0 0 0

0

1 L

L2

L3

0

0 0 0

0

0 0 0

0

1

0 0 0

0

0 1 2L 3L2 0

1 L

0 0 0 1 2L 3L2 0 0 0





u1    u2  e  a =  ..    .  u1 2

26

0



  0   0  0   0  0   0   0  L   0 

0 0

3. Theory

Finally the section forces are obtained from Equation 3.66. N = EA

d¯ u d¯ x

(3.66)

d3 v¯ d¯ x3 d3 w¯ Vz¯ = −EIy 3 d¯ x dϕ¯ T = GKv d¯ x d2 w¯ My¯ = −EIy 2 d¯ x d2 v¯ Mz¯ = −EIz 2 d¯ x Vy¯ = −EIz

27

3. Theory

28

4 Methodology 4.1

Geometries and structures

Based on the literature survey, three main structural concepts were selected and evaluated. Instead of analyzing a structure with the dimension of a full test specimen, each structure was designed as a column of unit cells where the unit cell was based on one geometrical concept. A unit cell is the smallest structure which can be placed repetitively in any direction to form the lattice structure or analysis model. Analyzing a column of unit cells compared to a full model is preferable since it significantly reduces computational time. For computationally heavy FEM analyses, it means more tests and more numerical tests can be performed for each structure. A column of unit cells is used to model the entire material by symmetry conditions. However, some general assumptions must be made in order for this setup to be applicable. It is assumed that one column of unit cell is small compared to the number of columns required to build the full model of the considered material volume. A Dirichlet boundary condition is applied to the outermost facing nodes, simulating neighbouring cells which prevents any movement in xy−plane and only allow movement in z-direction.

29

4. Methodology

4.1.1

Cellulose

The cellulose, which is described in subsection 2.3.3, is the backbone of the cell wall and contributes with stability, stiffness and strength to the wood. The polymer is strictly hierarchical, Figure 4.1 shows a micro graph of wood and illustrates each cell walls surrounding each cell and how they overlap each other.

Figure 4.1: Image of plant cells taken with a light microscope where one can clearly see the green chloroplast and the cell wall around each cell [25]. Cellulose in the cell wall of plants inspired the design of the unit cell structure cellulose. The cellulose unit cell consists of two cubes stacked over each other with an offset. The offset is only in one direction to gain some strength, compared to if the cubes were placed with an offset in both horizontal ways. The offset is designed in order to transfer loads between the beams and plastically deform them in a somewhat smooth fashion. Because of the rigid joints between the beams the buckling mode will transfer from one layer to the other. This structure does not have any diagonal beams, hence making the unit cell quite hollow compared to the other structures. However it has vertical beams and the structure will be stiffer than diagonally placed beams up to a critical load. The two cubes are seen as one unit cell since in pair, it can be repeated in any direction. A plot of the cellulose unit cell is displayed in Figure 4.2.

30

4. Methodology

Figure 4.2: Cellulose unit cell.

4.1.2

Tetrahedron

In subsection 2.3.1, the composition of human bone is described. In every day life, our hips, spine, and pelvis are subjected to mechanical stresses due to physical activities. The strength that keeps the bones from breaking is provided by the trabeculae. A geometric figure that approximately resembles the stochastic pattern in trabeculae is the tetrahedron. Tetrahedron is a polyhedron (three-dimensional solid consisting of polygons, often joined at their edges) with four faces. Depending on how its dimensions are varying, the tetrahedron is either a regular tetrahedron or a non-regular tetrahedron. A regular tetrahedron has all faces congruent to an equilateral triangle, i.e. all sides are of the same dimensions whereas a non-regular has not [26]. With the trabeculae in mind and tetrahedron as a base, the tetrahedron unit cell was constructed. It consists of eight tetrahedrons and has 90 degrees rotating base plates in the middle layer in order to make the structure repeatable in all directions, see Figure 4.3. The main characteristics of the Tetrahedron structure is many but short beams. Each connection node has a multitude of beams connecting to it. The structure raises zigzagging in y-z-direction and has no vertical beams

31

4. Methodology

Figure 4.3: Tetrahedron unit cell.

4.1.3

Pyramid

The geometric figure pyramid is a polyhedron, like the tetrahedron it also has some similarity to the stochastic pattern of the trabuculae. Unlike the tetrahedron it is easier to construct a unit cell from the pyramid since it can have a base of four corners. A pyramid has its base as a polygon and the other faces as triangles meeting at a common vertex, known as the apex. The pyramid can be of various shapes since the polygon can be of n-sides, but the regular pyramid has its base as a regular polygon (n ∈ [3, 4, 5]) and is also a right pyramid, which means that the apex lies right above the centroid of the base [27]. A plot of the unit cell is displayed in Figure 4.4.

Figure 4.4: Pyramid unit cell. 32

4. Methodology

4.2

Material

The material selection is limited to commercially available 3D printable polymers to allow future validation of the models against tests on printed objects. The following four polymers were selected for this study: ABS (acrylonitrile butadiene styrene), PLA (polylactide), Nylon and TPU (thermoplastic polyurethane). The material characteristics are presented in Figure 4.5 and relevant properties are displayed in Table 4.1. In order to absorb energy the material should ideally be able to withstand both high stresses and strains, since the area under the stress strain curve is the energy. Both ABS and PLA are too brittle. Brittle materials will not result in a smooth deceleration nor be able to absorb any significant amount of energy. TPU is very soft and can withstand large strains, but with low stresses the deformation length needs to be very large in order to compensate for this. Nylon cannot handle as large stresses as ABS or PLA but behaves similar to an elastic perfectly plastic material, which is good for energy absorption.

Figure 4.5: Material comparison for 3D printable polymers [28]. Therefore, nylon is selected as material for all geometries and its material data is implemented in the code. The behaviour of Nylon is simplified as being an elastic perfectly plastic material. Table 4.1: Material properties for 3D printable polymers [28]. Property Density [kg/m3 ] Young’s modulus [MPa] Shear modulus [MPa] Yield strength [MPa]

ABS PLA Nylon TPU 1060 1210 1160 1120 1031 3310 940 12 318.9 2400 359.7 8.6 42.5 110 31 4

33

4. Methodology

4.3

Applied force

The bicycle helmet drop test needs to be converted into an averaged force in order to simulate the compression test. This is done using the conservation of energy principle for a falling object combined with the work-energy principle. European bicycle helmets need to withstand a drop a weight of 5 kg from 1.5 m [4]. The mass and height is denoted m and t, respectively. The energy absorbent structure, that is to be designed, has a defined thickness t that must absorb the impact. The test setup is illustrated in Figure 4.6.

Figure 4.6: Drop test setup. The kinetic energy, Ek , just before the impact is equal to its gravitational potential energy, Ep , at the drop height Equation 4.1. 1 Ek = mv 2 = Ep = mg(h + t) 2

(4.1)

The impact force is calculated using the work-energy principle, Equation 4.2. The change in the kinetic energy of the object is equal to the work done on the object. Since the impact on the helmet comes to a stand still, the final kinetic energy, Ek,f inal = 0. Wnet = Ek,f inal − Ek,initial = −Ek (4.2) Wnet = F t ⇒ F = −mg(1 + h/t)

(4.3)

In order to calculate the applied load onto one unit cell, the contact area needs to be determined. A bicycle helmet has a mean radius of 160 mm [29], denoted r. The helmet is assumed to be deformed its entire thickness, this gives the contact area A as Equation 4.4. 

A = πr2 cos2 (sin−1 1 − This results in an applied stress, Equation 4.5. 34

t ) r

(4.4)

4. Methodology

σapplied =

−mg(1 + h/t) F = 2 2 A πr cos (sin−1 (1 − t/r))

(4.5)

Finally, the applied force on one unit cell is the applied stress multiplied with the unit cell’s top area. For all three geometries, the top area is the width in square. Figure 4.7 depicts the relation between applied force on one unit cell and the width of the unit cell.

Figure 4.7: Applied force depending on unit cell width.

4.4

Design variables

In order to describe and compare energy absorption for different geometries for each concept, four design variables are introduced: Number of unit cells, width of the unit cell, beam radius and a height factor. Each design variable is defined with an individual range defining its minimum and maximum value and resolution.

Number of unit cells Each geometry is built up by unit cells. Unit cells are the basic building blocks of the structure which defines its core characteristics. the structure that is the core of its characteristics, see Figures 4.2 - 4.4. This thesis evaluates three different unit cells named after their conceptual look; tetrahedron, pyramid and cellular. The geometries varies from one to ten unit cells. More unit cells equals more beams and higher degrees of freedom in the problem resulting in longer computational time. The higher limit of 10 unit cells for a geometry is set due to manufacturing limitations. More unit cells will generate a denser structure, which is difficult to print.

35

4. Methodology

Unit cell width The width of a unit cell defines its footprint on the base plate. By varying the width, the degrees of freedom remain the same and the calculation time likewise. Increased width leads to higher mass and a higher applied force. The width has a range from 5 mm to 30 mm, with a resolution matching that of the 3D printer. The design range is determined from multiple tests from the script, displaying high specific energy absorption within the range.

Beam radius Each beam is circular and the radius is a key design variable. The radius heavily influences the critical load for buckling in the beam and the mass of the structure. The minimum radius is 0.05 mm, since it is the finest the manufacturing can produce. The maximum radius is dynamically calculated with the combination of other design variables to make sure no beam is colliding with another. The resolution is the same as that of the 3D printer’s.

Height factor The height factor is a dimensionless integer defining the height of a unit cell relative to other unit cells. The range is between one and four. The lower limit generates a structure where all unit cells are of the same height. The upper limit generates each unit cell four times higher than the unit cell below it. Tests shows that larger height factor generates a too small first unit cell which is not printable. The resolution is experimentally set to 0.1. Finer resolution would increase computational time but the influence of the solution is minimal below this resolution.

4.5

Identification of design space

There are three main sections in the script used in this thesis; defining the design variable range, perform tests from a rough mesh of combinations to find a suitable start guess and lastly fine-tune the start guess using a optimization algorithm. The design variable range is manually defined for each design variable and geometry. Depending on the geometry, the range varies for what is possible to manufacture. For example, the tetrahedron has multiple diagonal beam elements and is more dense than cellulose. Hence the tetrahedron cannot have as high radius nor height factor as cellulose. The sections of the script are shown in Figure 4.8

36

4. Methodology

Figure 4.8: Overview schematics of the main steps in the code.

4.5.1

Rough combination mesh

The rough combination mesh allows for an overview of the design variables behaviour and how they accommodate with one another. The rough mesh is used to screen the entire design variable space and define what combinations generate high specific energy absorption and what combinations that does not. The rough mesh is illustrated in Figure 4.9 for a system of two design variables D1 and D2 , each with a range of 0 to 1 and a resolution of 0.02. The result is a function f (D1 , D2 ) presented colorized on the z-axis. The combination of D1 and D2 that generates the highest result f is sought. The most straight forward approach would be to test all combinations and evaluate them against each other, as the graph displays. However, this would result a number of 2,500 unique combinations.

Figure 4.9: Two design variables illustrating the result of all combinations. An alternative to calculating all unique combinations, presented in Section 4.5.2, is to compare the results from a rough mesh of the system, see Figure 4.10. If the resolution of the rough mesh is coarse, more tests are needed in order to evaluate all 37

4. Methodology

combinations within that design space. The peak value is marked in red, highlighting the maximum value of f and is the start guess used in the optimization algorithm.

Figure 4.10: Coarse mesh of two design variables resulting in a large design range for the fine tuning. A finer mesh in the initial rough combination test, Figure 4.11, would take longer to perform but needs fewer tests to fill the design space surrounding the peak value. With a finer grid, the probability of missing a local maximum decreases.

Figure 4.11: Fine mesh of two design variables resulting in a smaller design range for the fine tuning. The design variables mesh size is depending on its influence on the evaluation function. For example, the beam radius affects the mass squared and the critical buckling load quadratic. Hence a finer mesh size should be used for the beam radius. The width on the other hand does not influence the specific energy absorption as drastically and a more coarse mesh can be applied. 38

4. Methodology

4.5.2

Optimization algorithm

In this thesis, three geometries are studied to find a combination of four design variables in order to find the combination which has the highest specific energy absorption. The design variables are number of unit cells, unit cell width, beam radius and height factor. The material parameter and combined structure height are predefined. All design variables have a identified design range. By using a traditional method, all combinations within the variables design range need to be tested and compared in order to identify the values that give the highest specific energy absorption. However, this is a very time consuming procedure. If the four design parameters are tested with 100 evenly spaced steps this would result in 100,000,000 different tests. On a 1.4 GHz Intel Core i5 one test takes on average 5 seconds, this would result in 15 years of computational time to find the best combination. A more practical approach for saving computational time is therefore needed. We start by assuming that the sought combinations are not too sensitive to change in any one of the parameters, meaning that a good combination is still quite good even if some parameters are slightly changed. With this in mind, we do not need to test a fine mesh for all design parameters in order to find a pattern and locate some combinations that tend to be more energy absorbent than others. When locating a combination from this rough resolution it is used as a start guess. Each design variable can then be tested separately, see Figure 4.12. If any of the design variables differs from the start guess, the procedure starts over again with the updated start guess. Note that the design variable only needs to be tested within the design range not covered in the initial rough resolution combination test, as illustrated in Section 4.5.1.

Figure 4.12: Schematics of the code structure for the optimization algorithm. As illustrated in Figure 4.12, the same procedure of evaluating the design parameters apply to all. When an active design parameter is tested, it steps in a local range from some minimum value to a maximum value. Whichever yields the highest specific energy absorption is kept as the new value. It is also important to evaluate 39

4. Methodology

the number of buckled levels since this directly correlate to the deceleration of an impact. Hence if two similar values are found, the one with most buckled levels will be selected. In order to evaluate how much more efficient this method is, we assume that we have X number of design variables. Each design variable has an individual number of tests associated with it. The number of tests per design variable is collected in a vector N . N = [N1 , N2 , ..., NX−1 , NX ]

(4.6)

One way to find the best combination is to test all combinations. This would result in a total number of combinations C. C = N1 · N2 · ... · NX−1 · NX

(4.7)

Now, assume that a rough resolution is applied to each design variable. The resolutions are collected in a vector R. R = [R1 , R2 , ..., RX−1 , RX ]

(4.8)

For all individual design variables, the rough resolution is lower than the total number of tests connected to it. Ri < Ni ,

∀ 1≤i≤X

(4.9)

With this, the number of combinations to find the start guess, CR , is: CR = R1 · R2 · ... · RX−1 · RX << C

(4.10)

The rest combinations between the rough mesh is the quote between all combinations and the ones performed, individual for all design variables. This rest resolution is gathered in the vector RR . N1 N2 NX−1 NX N = , , ..., , RR = R R1 R2 RX−1 RX 



(4.11)

Each element in the rest resolution is less than the number of tests for that design variable. RR,i < Ni ∀ 1 ≤ i ≤ X (4.12) In the optimization algorithm, each design variable is evaluated one at a time with the other variables kept constant. If a combination with higher specific energy absorption is found for the evaluated design variable, the start guess is updated with the new value and the script starts over again. This means that with a good start guess each design variable can be evaluated without finding a better combination, hence resulting in few tests being performed. On the other hand, the start guess can be updated multiple times for every design variable and restart the test, resulting in more tests. In the best case scenario, the start guess is the best combination. Tbest =

X X i=1

40

RR,i

(4.13)

4. Methodology

In the worst case scenario, every design variable resets the script with an updated start guess. Tworst =

x X i X

(4.14)

RR,i

i=1 j=1

If all design variables has the same number of tests and the same rough mesh resolution, the worst case scenario would be: Tworst

X X

RR X (X + 1), = RR · i = 2 i=1

 N

1

R1

= N2 = ... = NX−1 = NX = R2 = ... = RX−1 = RX

(4.15)

The number of tests performed, T , will be between the best and worst case scenario. CR + Tbest ≤ T ≤ CR + Tworst

(4.16)

In order to give a direction of efficiency for the optimization algorithm, all design variables are assumed to have the same resolution and number of tests. There are 4 design variables, each with 1,000 tests. This results in 1,000,000,000,000 different combinations. In Table 4.2 the rough resolution, R, is tested from 1 to 10 in order to calculate the number of tests to be perform. Table 4.2: Different rough resolutions and it’s effects on best and worst case scenario for number of tests. R CR RR Tbest 1 1 1000 4001 2 16 500 2016 3 81 334 1417 4 256 250 1256 5 625 200 1425 6 1296 167 1964 7 2401 143 2973 8 4096 125 4596 9 6561 112 7009 10 10000 100 10400

Tworst 10001 5016 3421 2756 2625 2966 3831 5346 7681 11000

Figure 4.13 displays the best and worst case scenario from Equation 4.13 and 4.14. With this particular setup, the program would need to run the fewest tests if a rough resolution of 5 is used.

41

4. Methodology

Figure 4.13: Best and worst case scenario for number of tests performed, assumed the four design variables have the same design range and resolution.

4.6

Compression test simulation

The compression test simulation is a system of scripts which builds the model, applies a force, solves the FEM problem, evaluates buckling and calculates the energy absorption with fixed values for the design variables. Schematics of the system is presented in Figure 4.14. The following subsections will describe in detail each major part of the compression test simulation. See Appendix B for the Matlab code.

Figure 4.14: Schematics of the test simulation script.

42

4. Methodology

4.6.1

Determination of unit cell height

In order to build the structure, the height of each unit cell needs to be determined. The unit cell height is dependent on the total height htot , number of unit cells N and the height factor hf . Since each unit cell’s height is described as the height of the unit cell below multiplied with the height factor, the first unit cell height needs to be determined. With the first unit cell height, h1 , the rest are defined as: h2 = h1 h1f h3 = h1 h2f −2 hN −1 = h1 hN f −1 hN = h1 hN f

⇒ hi = h1 hi−1 f

∀ 1≤i≤N

(4.17)

The sum of all unit cell heights is the total height of the structure. With this, the first unit cell height is solved as: N X

hi =

i=1

N X

h1 hfi−1

= h1

i=1

N X

hi−1 = htot f

(4.18)

i=1

htot h1 = PN i−1 i=1 hf

(4.19)

Finally, each unit cell height is calculated as: htot hi−1 hi = PN f j−1 j=1 hf

∀ 1≤i≤N

(4.20)

In Figure 5.10, the affects of height factor 1, 2 and 3 are illustrated for each geometry with number of unit cells fixed to 3 and the total height is 30 mm.

4.6.2

Build geometry

There is only one function, Build geometry, that calls the individual geometry constructors. This allows for further expansion and addition of other geometries to be implemented into the code without adjusting large proportions of the code base. The build geometry functions constructs a system of nodes depending on the chosen geometry, width and unit cell height. The function draws elements between specific nodes, making the model take its desired shape. An illustration of the build procedure is displayed in Figure 4.16. This procedure returns coordinates for all nodes, the element degrees of freedom matrix, degrees of freedom for each node, force vector and boundary conditions. All output variables are passed into the finite element problem, Section 3.2. 43

4. Methodology

Figure 4.15: Effects of height factor.

Figure 4.16: Schematics over the procedure of building a geometry.

4.6.3

Buckling

All beam deformations and end forces are evaluated and exported from the FEM solution into the buckling analysis. When buckling is studied, each beam is evaluated individually within the structure. The undeformed beam length, l0 , is calculated 44

4. Methodology

with Equation 4.21. l0 =

q

(x1 − x2 )2 + (y1 − y2 )2 + (z1 − z2 )2

(4.21)

Similarly, the deformed beam length, l, is calculated with the beam ends displacements taken into account. From the deformed and undeformed beam length, the stress, σ, is calculated using Hooke’s Law, Equation 4.22. The material is assumed to be elastic perfectly plastic, see Figure 4.5. σ=

 E σy

if E < σy else

(4.22)

The strain,  is calculated as l0 − l (4.23) l The axial force, F , acting on the beam is calculated from the stress and the cross sectional area of the cylindrical beam. =

F = πσr2

(4.24)

Lastly, each beam is evaluated against buckling. In order to determine which buckling case to use, a physical compression test is performed, see Figure 4.17. When zooming into one beam of the lower unit cell, the buckling case is displayed clearly; clamped in both ends, due to the vertical angle of which the beam connects onto the horizontal beams. The critical load, Pk , is calculates from Equation 4.25. Pk =

4π 2 EI l2

(4.25)

Figure 4.17: Physical compression test for evaluating buckling case of a nylon structure. If the axial force in any beam exceeds the critical buckling load, the buckled unit cell is removed since its energy absorption properties has decreased significantly once buckled, see Section 2.6. 45

4. Methodology

4.6.4

Specific energy absorption

The energy is calculated from the integral of the force-displacement curve for a simulated compression test. In Figure 4.18, the force is plotted against the deflection for a 5 unit cell tetrahedron structure. Each peak marks the maximum force that a particular unit cell is able to withstand before buckling. Since the height factor is always greater than 1 for the structures, the topmost unit cell will buckle first, followed by the second topmost etc.

Figure 4.18: Force and displacement for a compression simulation test of a tetrahedral with 5 unit cells. Since the script calculates displacement with a certain force step, the integral needs to be approximately calculated as the sum for all step sizes. Assume n number of points in the graph for the force F and the displacement δ, the energy E is calculated from Equation 4.26 E=

Z δmax

F dδ =

0

n−1 X i=1

Fi + Fi+1 (δi+1 − δi ) 2

(4.26)

In order to evaluate and compare the energy absorbing efficiency, the energy is normalized with the mass of the geometry. The mass, mtot , is calculated as the sum of all beam masses, m, constructing the geometry. Assume Nbeams number of beams in the structure, with radius r and density ρ. mtot =

Nbeams X

(4.27)

mi

i=1

Each beam is circular and has an individual length, li . mi = πr2 li ρ

(4.28)

The length of a beam is calculated from its start and end coordinates. li = 46

q

(1)

(2)

(1)

(2)

(1)

(2)

(xi − xi )2 + (yi − yi )2 + (zi − zi )2

(4.29)

4. Methodology

Lastly the specific energy absorption is calculated with Equation 4.30. n−1 Fj +Fj+1 (δj+1 − δj ) E j=1 2 q =P Es = (1) (2) (1) (2) (1) (2) Nbeams mtot πr2 ρ (x − x )2 + (y − y )2 + (z − z )2

P

i=1

i

i

i

i

i

(4.30)

i

If the active test results in a higher specific energy absorption than previous tests, the combination is stored as the updated start guess.

47

4. Methodology

48

5 Results and discussion 5.1

Design variable range and test setup

Since the number of tests are highly influenced on the design range and resolution for each design variable, it is important to have a good setup. If the design range is too large and a rough mesh is used, the start guess for the optimization algorithm may not be good enough. After multiple initial tests and mapping of design variables behaviour, the setup range and resolution for each parameter is determined and presented in Table 5.1. Table 5.1: Design variable range for test setup. Number of unit cells Minimum Maximum Resolution Start tests Beam radius [mm] Minimum Maximum Resolution Start tests Width [mm] Minimum Maximum Resolution Start tests Height factors Minimum Maximum Resolution Start tests

5.2

Tetrahedron 3 5 1 3 0.5 2.0 0.01 10 10.0 30.0 0.1 3 1.1 3.0 0.01 5

Cellulose Pyramid 3 3 5 5 1 1 3 3 0.5 0.5 3.0 2.0 0.01 0.01 10 10 10.0 10.0 30.0 30.0 1.0 1.0 3 3 1.1 1.1 3.0 3.0 0.05 0.05 5 5

Design variables impact on the mass

The minimum and maximum mass for each design variable is presented in Table 5.2. In order to demonstrate the influence on the mass from each design variable, the starting point is a fixed value for each variable: number of unit cells 3, width 20 mm, beam radius 2 mm and a height factor of 2. These constants are close to the found solutions for all three geometries and will serve as a reference guide where as 49

5. Results and discussion

each design variable is evaluated separately. The design range for each variable has different influence on the total mass, which is a key characteristic for specific energy absorption since it is used to normalize the energy absorption. Table 5.2: Design variables’ influence on total mass. Mass [mg] Number of unit cells Minimum Maximum Beam radius Minimum Maximum Width Minimum Maximum Height factors Minimum Maximum

Tetrahedron 11.3 28.2 0.010 63.7 10.4 20.2 15.6 16.5

Cellulose Pyramid 7.8 10.4 28.9 28.4 0.009 0.010 59.3 61.1 6.7 9.3 20.2 20.1 14.8 14.9 14.8 16.0

The beam radius has greatest impact on the the total mass. Due to it’s influence on the beam’s cross sectional area as a function of square it also effects the mass as a square function. This is clearly visible in Figure 5.1.

Figure 5.1: Mass dependency of beam radius. The height factor impacts the mass the least with approximately 1 milligram, and for the cellulose structure it does not affect the weight at all. In the cellulose geometry the beams are either horizontally or vertically placed. By changing the height factor, the number of beams remains the same. The horizontal beams remains unchanged and with increasing height factor, the length the beams at the bottom becomes shorter, the beams at the top becomes longer. Hence, the mass remains the same for 50

5. Results and discussion

the cellulose structure, see Figure 5.2. For the tetrahedron and pyramid structures, the mass as function of height factor shares similar shape. The amplitude of the tetrahedron is however higher than that of the pyramid. This is due to a greater number of beams in the tetrahedron, hence higher total mass to start with (assuming the same design variables). Both structures have tilted beams, hence changing the mass in an nonlinear manner.

Figure 5.2: Mass dependency of height factor.

Both number of unit cells and width of the unit cells have similar mediocre impact on the mass in a linear manner, except for the cellulose that is linear. Small changes in either of these design variables will not drastically affect mass, see Figure 5.3.

Figure 5.3: Mass dependency of number of unit cells (left image) and width (right image). 51

5. Results and discussion

5.3

Screening results from rough mesh

The number of tests performed in the initialization stage is the factor of all start tests for each design variable, Table 5.1. Each geometry is evaluated separately and the combination with highest specific energy absorption is used in the optimization algorithm as start guess. In Figure 5.4, 5.5 and 5.6, the result from all combinations are presented as mass versus specific energy absorption. If any combination results in a too weak structure, i.e. not able to withstand the applied force, the combination is displayed as an asterisk (*) in the graph. All structures share some characteristics, clearly visible in the figures. With decreasing mass, the proportion of failed structures increases. The mass is highly influenced by the beam radius and number of unit cells. Deviation in radius affects the mass squared. Deviation in the number of unit cells results in the number of beams in the structure. Hence, low radius and few unit cells will result in a low mass. Few unit cells also generates longer beams, since the total height of the structure remains. The buckling evaluation is sensitive to both long and slender beams, resulting in buckling with low critical load and failed structures. Structures with high mass on the other hand, results in too stiff structures that will not absorb the energy but rather translate it to the ground boundary. High-mass structures generally have a large beam radius and a high number of beams, due to many unit cells. The opposite of the buckling case is reached, the beams are short and have a large radius resulting in a high critical load and few, or no, unit cells will buckle. There exist combinations that are too weak and absorbs large amounts of energy but fail to withstand the applied load, and there are combinations that are too strong, handling the applied force but do not manage to absorb significant amount of energy. In this solution domain, there is a possibility of a combination that are able to hold the applied force without buckling all unit cells, but at the same time absorb a large proportion of the energy by buckling the majority of the structures cells. The initialization procedure provides a guideline and start guess for such a combination. In the model, the many combinations for which no unit cell buckle only absorb energy elastically, since plasticity is not evaluated. Elastic energy absorption is very low, compared to plastic, and results in a design range of 0.1 - 2 J/kg, making it seem like zero in the graphs. This thesis is constructed on the theory that buckling is the main contributor to energy absorption and evaluates this through the force versus displacement curve.

52

5. Results and discussion

Figure 5.4: Specific energy absorption of tetrahedron initialization. Failed combinations (*) are included in the left image and excluded in the right image.

Figure 5.5: Specific energy absorption of cellulose initialization. Failed combinations (*) are included in the left image and excluded in the right image.

Figure 5.6: Specific energy absorption of pyramid initialization. Failed combinations (*) are included in the left image and excluded in the right image. 53

5. Results and discussion

5.4

Optimization algorithm

The results from the initialization defines the start guess for the optimization algorithm. All combinations performed from the initialization are presented as specific energy absorption vs beam radius (Figure 5.7), number of unit cells (Figure 5.8), width (Figure 5.9) or height factor (Figure 5.10). In these figures, failed combinations are marked with asterisk (*). The figures are related to the cellulose structure, but similar graphs are generated for the tetrahedron and pyramid as well, see Appendix A. The design variables display areas of higher specific energy absorption. In the case of varying radius, Figure 5.7, the result varies from failed combinations to too stiff combinations as the beams varies from thin to thick. There seems to be a threshold around 1.5 - 1.7 mm in radius, where the structure is stiff enough to hold as well as absorb a significant amount of energy.

Figure 5.7: Specific energy absorption for cellulose from rough mesh vs beam radius. In a rough mesh, the number of unit cells are less thus capturing little detail as shown in Figure 5.8. At a large amount of unit cells, large number of beams result in narrow space. Since the maximum radius is dynamically evaluated, large values will not be tested since they collide with each other making an impossible geometry. Hence only small radius are tested, resulting in failed combinations. At one unit cell, the structure either buckles or is absorbs energy only elastically. It is tempting to evaluate the number of unit cells with a finer resolution to display in greater detail what happens between 2 and 6 unit cells. However, the computational time for the initial rough mesh is very sensitive to the number of start tests and needs to be prioritized. The radius contributes the most to the specific energy absorption, hence has the most start tests. 54

5. Results and discussion

Figure 5.8: Specific energy absorption for cellulose from rough mesh vs number of unit cells. As the unit cell width decreases, the specific energy absorption associated increases. The width is the only design variable affecting the applied load. Greater the area, greater is the applied force in order to remain the applied stresses, see Section 4.3. The force is evenly applied on the top nodes, which remains the same amount regardless of the width. In the case of cellulose, with increased width the vertical beam lengths remains unchanged. This results in an unchanged critical buckling load, but an increase in applied load. For constant remaining design variables, with increasing width there will be three stages itemized below, see Figure 5.9. At a width of 27 mm, all combinations have reached the third stage in varying width. • Small width equals small applied load and no unit cell will buckle. This results in a small amount of energy absorption. • As the width increases, the applied load increases as well. The width increases the area, thus also the force, as a square function. As the applied force increases, unit cells starts to buckle and increases the energy absorption. • With even longer width, the force will eventually overcome all beams critical buckling load and buckle all unit cells.

55

5. Results and discussion

Figure 5.9: Specific energy absorption for cellulose from rough mesh vs unit cell width. As discussed in Section 5.2, the height factor has little influence on the mass of the system. However, the beam length depends on the height factor, as is the critical buckling load. With increased height factor, the height for the lowest unit cell decreases. When the lowest unit cell is too short, only combinations with very narrow beams will be generated. With short lowest unit cell, entails higher unit cells for the other layers, especially with great height factor. This results in long beams for the upper unit cells that have a small radius, providing a small critical buckling load. Hence, a large proportion of the combinations fails with increasing height factor, see Figure 5.10.

56

5. Results and discussion

Figure 5.10: Specific energy absorption for cellulose from rough mesh vs height factor. Each design variable has a value of which the specific energy absorption is the greatest. This is stored as the start guess for the fine tuning optimization algorithm. The start guesses for each geometry is summarized in Table 5.3. The values for cellulose are from Figure 5.7, 5.8, 5.9 and 5.10. Table 5.3: Start guess from the rough combination test. Tetrahedron Number of unit cells 3 Beam radius [mm] 1.65 Width [mm] 30.0 Height factor 2.0 Mass [g] 0.0138 Energy absorption [J] 0.2196 Specific energy absorption [kJ/kg] 15.9

5.4.1

Cellulose Pyramid 4 3 1.65 1.65 16.5 30.0 1.1 2.0 0.0108 0.0137 0.0846 0.1884 7.8 13.8

Refinement of design variables

With the configuration of design variable generating the highest specific energy absorption as a start guess, we adjust one variable at a time. This evaluation clarifies the behaviour of the energy absorption depending on each parameter. Every time a new highest specific energy is identified, the start guess is updated and the script reruns. The characteristics for varying each parameter remains the same and will be evaluated separately, starting with the most influential variable; the radius. With the remaining design variables fixed, the results on specific energy absorption as the radius varies is displayed in Figure 5.11. Four stages are identified. 57

5. Results and discussion

• Small beam radius (r < 1.80 mm) buckles all unit cells, hence not being able to withstand the applied force, see section 4.3. • Beam radius between 1.80 mm and 2.05 mm buckles all but the last unit cell, generating maximum specific energy absorption. • Beam radius at 2.05 mm buckles only the top unit cell. The structure is highly sensitive to the radius around this point. Small deviations in radius results in either 1, 2 or 0 buckled unit cells. • Greater beam radius than 2.05 mm provides a too stiff structure and no layer will buckle.

Figure 5.11: Specific energy absorption (left image) and buckled unit cells (right image) depending on beam radius. Note that the radius is only tested within the span from the rough mesh where the start guess is located and its closest neighbors, see Figure 5.7. Furthermore, the number of unit cells are tested with the updated start guess. With higher beam radius, it is found that 3 unit cells generates the highest specific energy absorption instead of 4 as the initial start guess implies, Figure 5.12.

58

5. Results and discussion

Figure 5.12: Specific energy absorption dependent on number of unit cells for the cellulose geometry. Following the same procedure, testing the width of a unit cell and the height factor individually with the other parameters fixed, the results in Figure 5.13 are found. These results however vary from the number of unit cells and beam radius since no local maximum is found within the design range. This is due to an updated start guess that deviates from the initial one. The number of unit cells are 3 instead of 4, meaning that all rough combinations with 3 unit cells are missed in the rough mesh. This change might have another local maximum for specific energy absorption outside the design range for the refinement. However, the script cannot adjust for these behaviours. A solution would be to run the initial rough mesh with finer resolution on the number of unit cells, on the cost of computational time, see Section 4.5.2.

Figure 5.13: Specific energy absorption and height factor (left image) or unit cell width (right image). 59

5. Results and discussion

All successful tests, both from the rough mesh and the refinement, are gathered in Figure 5.14. The diverging scattered tests are rough mesh and by varying the number of unit cells. The gathered tests, forming lines of dots in the figure are results from the refinement when variations for each design variable is performed.

Figure 5.14: Specific energy absorption for all successful tests for the cellulose structure.

5.5

Final geometries and their ranking

The final solution for the three geometries are presented in Table 5.4. Ranking by specific energy absorption, the cellulose is best followed by the tetrahedron and lastly the pyramid. By looking at energy absorption, both the tetrahedron and cellulose have similar values. However, since the cellulose has fewer beams in its unit cell, the mass of the cellulose is generally lower than the tetrahedron. Even if the radius for the cellulose is larger, the total mass of the structure is lower than for both tetrahedron and pyramid. This results in a higher specific energy absorption than for the other structures. The final geometries are displayed as 3D plots in Figure 5.15, 5.16 and 5.17 both as the output from the script and CAD models. The CAD models are depicted as four by four unit columns to demonstrate the structures repeatability. The CAD model is constructed from the final solution for each geometry, including the beam radius which cannot be displayed in the Matlab plot. These structures represents the unit columns that are build up of finite element beams and are tested in the program. The beam radius is not represented in the graph. Each unit column has the symmetry boundary condition and will be repeated in x- and y-direction if manufactured. The difference in complexity between the structures are clearly displayed in the graphs, as the tetrahedron geometry looks very dense compared to the other. 60

5. Results and discussion Table 5.4: Optimized design parameters and final result. Tetrahedron Number of unit cells 3 Beam radius [mm] 1.74 Width [mm] 24.75 Height factor 1.99 Mass [g] 0.014 Energy absorption [J] 0.286 Specific energy absorption [kJ/kg] 21.088

Cellulose Pyramid 3 3 2.03 2.11 13.25 19.50 1.60 2.11 0.011 0.012 0.291 0.245 25.343 20.936

Both the tetrahedron and pyramid have similar properties, even though the design variables are slightly varying. Both are built on the same principle; a pyramid (with either a square or triangular base) with every other layer up-side-down. The connection points in these structures are only placed at beams ends, with multiple beams connecting with one another. The cellulose however has connections in the middle of the horizontally placed beams, creating bending in these beams. The general structure of cellulose is less stiff due to this setup, hence making the normal forces in the beams smaller and able to take on a higher applied force without buckling. This can in turn generate a lighter structure with the same energy absorbing properties as the others. Although, the simulations are only performed for compression tests, it is necessary to evaluate the shear forces and stiffness in the structures. The sought application is to replace the foam in bicycle helmets and in case of a crash the forces is not always perfectly aligned with the normal of the helmet. The tetrahedron and pyramid should be able to withstand shear forces the best since they have diagonal beams in multiple directions. The density of beams in both tetrahedron and pyramid may be of advantage since they create a somewhat chaotic pattern, similar to foam, enabling force paths along any beam. In case of a shear load for the cellulose however will bend the vertical beams easily since there is no diagonal bracing, see Figure 5.16. Manufacturing of the structures might prove to be difficult, regardless of the selection of geometry. 3D printers struggles with horizontal beams and slender structures, thus needing support structure in order to manufacture the piece. The support structure on the other hand needs to be removed, which will be very difficult with geometries of these scales. The easiest structure to print would be the pyramid since it does not have a large amount of horizontal beams and the existing ones are connected with multiple diagonal beams. The pyramid is not as dense as the other structures, making removal of eventual support material easier. The pyramid also has the largest beam radius, providing a good support for the structure during manufacturing. The cellulose is quite narrow and have multiple horizontal beams making it hard to manufacture, even if the structure is self is spacious. The tetrahedron, as mentioned above, has a greater amount of beams in its structure, making space more narrow. Each unit cell in the tetrahedron has twelve horizontal beams, of which four are combined with the unit cell below and four with the one above. The radius for the tetrahedron is smaller than the other structures, making it more difficult to manufacture and more support material is needed. 61

5. Results and discussion

Figure 5.15: Final geometry of tetrahedron as one unit column (left image) and 4 by 4 unit columns (right image).

Figure 5.16: Final geometry of cellulose as one unit column (left image) and 4 by 4 unit columns (right image).

Figure 5.17: Final geometry of pyramid as one unit column (left image) and 4 by 4 unit columns (right image). 62

5. Results and discussion

5.5.1

Performance of the optimization procedure

The performance of the optimization procedure is evaluated for how many combinations that are tested against all unique combinations. In Figure 5.18 the calculated cases, from Section 4.5.2, are displayed as percentage of all combinations. The dotted lines represent the actual setup, Table 5.1, and the solid lines are references calculated if all design variables had the same resolution, i.e. number of tests from 1 to 10. The best and worst case scenario is the outcome of optimization algorithms. There is potential for a faster calculation time by reducing the resolution for the rough mesh. However, this increases the risk of missing sought configurations and a good start guess, see example in Section 5.4.1.

Figure 5.18: Number of tests performed for the cellulose structure as percentage of all unique combinations. The black lines represents an alternative to the optimization algorithm for the fine tuning, Figure 5.18. This method simply tests all unique combinations in the design space surrounding the initial start guess. This method will take significantly more tests, hence increasing the computational time. However, it guaranties that all combinations within the design range is tested. A summary for all structures performance with their respective setup are presented in Table 5.5. As Figure 5.18 implies, a more coarse rough mesh will generate fewer tests with the compromise of a worse start guess. For example, the cellulose setup will generate 6 million combinations while the tetrahedron setup generates 17 million. However, because the cellulose is more sensitive to variation in the design variables, a finer rough mesh is needed to initialize and find a good start guess. The rough mesh is therefore 1,960 tests for the cellulose but only 450 for the tetrahedron. The final number of tests that were done for the cellulose and tetrahedron is 1,074 and 669, respectively. As seen in the table, both setups for the cellulose and pyramid results in fewer tests being performed than the best case scenario. This is due to the dynamic upper limit for the beam radius. Before every test is performed, the active combination of design variables are evaluated to determine if they will generate a possible structure. If that particular combination has e.g. a large beam radius and a small unit 63

5. Results and discussion

cell height generating colliding beams, that combination is not added to the tests. Hence the actual tests performed may be smaller than the best case scenario. Note that even with this optimization method, a large amount of tests will be performed. This thesis approximates the problem into an elastic model with beam buckling, individually evaluated. With this, the solution time varies up to 1.5 hours when each test takes 5 seconds to perform. If a conventional software were to be used with implicit, explicit or response spectrum the solution time for a single test will take hours to perform. A FEM model with plasticity would also significantly increase the computational time and not making the quantities of combinations possible. Table 5.5: The performance of the script. Total number of combinations Rough mesh combinations Fine combinations Worst case Best case Actual tests performed Percentage of all combinations tested Total computation time [minutes]

64

Tetrahedron 17391123 450 42258 537 670 669 0.004% 56

Cellulose Pyramid 6058800 481572 1960 450 6760 1570 2075 486 2016 525 1074 429 0.018% 0.089% 90 36

6 Conclusion The script successfully generates sought geometries and autonomously updates design variables in order to find values for the variables generating maximum specific energy absorption. The method for finding these values are effective and only tests a small proportion of the total number of unique combination of design variables. The model is easily expandable, should the need arise to extend with another geometry or adjust the material properties. The result is highly dependent on a good start guess and design variable range and resolution. Multiple analysis are recommended with adjusted start setup to ensure that the highest specific energy absorption is found. Through the results, the design variable with most influence on specific energy absorption is concluded: the beam radius. Of the three geometries cellulose, tetrahedron and pyramid studied, cellulose generates the highest specific energy absorption of 25 kJ/kg. The design values providing maximum specific energy absorption for cellulose are: number of unit cells 3, beam radius 2.03 mm, width 13.25 mm and a height factor of 1.60. The maximum value are within the range of manufacturing capabilities, hence physical tests can be performed for validation. The conceptual difference between cellulose and tetrahedron or pyramid is how the force paths are constructed. In tetrahedron and pyramid structure, all beams are connected through nodes at the beams endpoints resulting in only tension or compression in the beams. The beams in the cellulose structure however will create bending in the horizontal beams, resulting in a less stiff structure. Based on this study, beams in bending absorbs higher energy than beams in compression or tension. Although cellulose has the highest energy absorption, the specific energy absorption increases further since the mass is lower for cellulose than the other structures. Based on the results and the discussion on manufacturing, see Section 5.5, cellulose is the best structure among the three studied in this thesis. Cellulose has both high energy absorption and specific energy absorption and is manufacturable. Its characteristic design should generate a smooth deceleration and provide a good substitute to foams in helmets.

65

6. Conclusion

6.1

Future work and recommendations

This thesis is meant to explore the field of custom made structures for energy absorption. Future work can focus either in making the model more accurate, more efficient, more flexible or exploring more types of structures or materials. The accuracy of the model can be improved by performing physical compression tests with the final geometries provided by the script. From this evaluation, the model can be adjusted to better reflect the reality. A plastic model should improve the result accuracy, on the cost of performance. It is recommended to further investigate and implement a plastic FEM model into the script. The efficiency could be improved by e.g. implementing a Newton forward method to the fine-tuning algorithm instead of increment the design variables with a predefined step size. The flexibility of the model can be extended by adding additional design variables, e.g. a radius factor. A varying radius, similar to the height factor, could be implemented to resemble the varying radius found in nature. This would result in a decreasing or increasing radius for each unit cell in the structure. The model is constructed to easily add additional geometries. Example of geometries could be unit cells similar to a hexagonal, cube or asymmetric pyramids or other polyhedrons. Furthermore, the Matlab script could be combined with CATIA to autonomously generate the structures if an explicit simulation ought to be performed in ANSYS. If a crash test is to be simulated, it is recommended to perform explicit analysis in ANSYS. This procedure would generate accurate crash test results but is very time consuming. For this to be possible, it is recommended to do a more sophisticated optimization algorithm to reduce the number of tests and run the whole analysis on a computer cluster.

66

Bibliography [1] National Academy of Sciences. Review of Department of Defense Test Protocols for Combat Helmets. 2014 March 31. [2] trafikverket.se. Bicycle helmet. Updated 2015 March 10. Available from trafikverket.se [3] DC Thompson, F Rivara, R Thompson. Helmets for Preventing Head and Facial Injuries in Bicyclists. 1999 October 25. DOI 10.1002/14651858.CD001855. [4] helmets.org. Bicycle Helmets Liners: Foam and Other Materials. Updated 2016 December 30. Available from helmets.org [5] Cited 17 May 2017. Available from https://www.bikerumor.com/2010/06/12/ bikerumor-exclusive-review-kali-avita-carbon-xc-am-helme/ [6] Luca DL, Giuseppe S, Daniela O. Deformation Mechanisms and Energy Absorption of Polystyrene Foams for Protective Helmets. Elsevier. 2001 Apr 25; Polymer Testing 21 (2002) 217-228 [7] study.com. Compact Bone: Definition, Structure & Function. Updated 2017. Available from study.com/academy/lesson/compact-bone-definition-structurefunction [8] innerbody.com. Cortical (Compact) Bone. Updated 2017. Available from innerbody.com/image_skel09/skel61 [9] Cited 17 May 2017. Available from http://teachmeanatomy.info/wpcontent/uploads/Structure-of-Mature-Bone.jpg [10] study.com. Cancellous Bone: Definition, Structure & Function. Updated 2017. Available from: study.com/academy/lesson/cancellous-bone-definitionstructure-function [11] Cited 17 May 2017. Available from http://study.com/academy/lesson/trabeculaeof-bone-definition-function.html [12] study.com. Trabeculae of Bone: Definition, Structure & Function. Updated 2017. Available from study.com/academy/lesson/trabeculae-of-bone-definitionfunction [13] P Zaslansky, A.A Friesem, S Weiner. Structure and Mechanical Properties of the Soft Zone Separating Bulk Dentin and Enamel in Crowns of Human Teeth: Insight Into Tooth Function. 2005 October 12. Journal of Structural Biology. 153(2):188-99. [14] Cited 17 May 2017. Available from https://en.wikipedia.org/wiki/Crown_(tooth) #/media/File:Blausen_0863_ToothAnatomy_02.png [15] I Bjurhager. Effects of Cell Wall Structure on Tensile Properties of Hardwood. 2011 Apr. Available from: KTH School of Chemistry 67

Bibliography

[16] D.J Cosgrove. Growth of the plant cell wall. Volume 6 2005 Nov. Available from: www.nature.com [17] E Badel, F.W Ewers, H Cochard, F.W. Telewski. Acclimation of mechanical and hydraulic functions in trees: impact of the thigmomorphogenetic process. 2015 Apr. Available from: National Center for Biotechnology Information [18] G Lu, T.X Yu. Energy Absorption of Structures and Materials. Woodhead Publishing Limited: Cambridge England; 2003. [19] European Committee for Standardization. Helmets for Pedal Cyclists and for Users of Skateboards and Roller Skates. 1997 February. Ref. No. EN 1078: 1997 E. ICS 13.340.20. [20] j Higgins. Drop Test Simulation Made Easy With Ansys Simulation. Ansys Inc. 2008. [21] Dan Zenkert. An introduction to Sandwich Structures - student edition. 2:nd Edition 2005 Stockholm. [22] N Ottosen, H Petersson. Introduction to the FINITE ELEMENT METHOD. 1992. [23] L Andersen, S.R.K. Nielsen. Elastic Beams in Three Dimensions. DCE Lecture Notes No.23. Aalborg University, Department of Civil Engineering - Structural Mechanics. August 2008 [24] P-E Austell, O Dahlblom, J Lindemann, A Olsson, K-G Olsson, K Persson, H Petersson, M Ristinmaa, G Sandberg, P-A Wernberg. CALFEM, a Finite Element Toolbox. Version 3.4. Lund Universiity; 2004. [25] Cited 17 May 2017. Available from http://www.ck12.org/life-science/PlantCell-Structures-in-Life-Science/lesson/Plant-Cell-Structures-MS-LS/ [26] mathworld.wolfram.com. E.W Weisstein. "Tetrahedron." Cited 19 April 2017. Available from: http://mathworld.wolfram.com/Tetrahedron.html [27] mathworld.wolfram.com. E.W Weisstein. "Pyramid.". Cited 19 April 2017. Available from: http://mathworld.wolfram.com/Pyramid.html [28] E. Svensson. Material Characterization of 3D-Printed Energy-Absorbent Polymers Inspired by Nature. 2017. Materials and Manufacturing Technology, Chalmers. [29] N. J. Mills. Protective Capability of Bicycle Helmets. Butterworth & Co Ltd. 1990. 0306-3674/90/010055-06. [30] silver.neep.wisc.edu. Materials with Strucural Hierarchy. Updated 1993. Available from silver.neep.wisc.edu [31] R Hill, 1963. Elastic properties of reinforced solids: some theoretical principles. J. Mech. Phys. Solids 11 (5), 357–372.

68

A Appendix 1 - Result A.1

Tetrahedron result

Figure A.1: Specific energy absorption for tetrahedron from rough mesh vs beam radius.

I

A. Appendix 1 - Result

Figure A.2: Specific energy absorption for tetrahedron from rough mesh vs unit cell width.

Figure A.3: Specific energy absorption for tetrahedron from rough mesh vs height factor. II

A. Appendix 1 - Result

Figure A.4: Specific energy absorption for tetrahedron from rough mesh vs number of unit cells.

Figure A.5: Specific energy absorption for tetrahedron with varying beam radius. III

A. Appendix 1 - Result

Figure A.6: Specific energy absorption for tetrahedron with varying height factor.

A.2

Pyramid result

Figure A.7: Specific energy absorption for pyramid from rough mesh vs beam radius. IV

A. Appendix 1 - Result

Figure A.8: Specific energy absorption for pyramid from rough mesh vs unit cell width.

Figure A.9: Specific energy absorption for pyramid from rough mesh vs height factor. V

A. Appendix 1 - Result

Figure A.10: Specific energy absorption for pyramid from rough mesh vs number of unit cells.

Figure A.11: Specific energy absorption for pyramid with varying beam radius. VI

A. Appendix 1 - Result

Figure A.12: Specific energy absorption for pyramid with varying width.

Figure A.13: Specific energy absorption for pyramid with varying height factor.

VII

A. Appendix 1 - Result

VIII

B Appendix 2 - Matlab code B.1

1 2 3 4 5 6 7

Main

%---------------------------------------------------------------------% PURPOSE % Optimize a selected geometry within the prescribed design range. % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

8 9 10 11

clc close all clear variables

12 13 14 15

% Global variables global mainData E G rho sigma_y height plotMode testStructure force ... startGuess

16 17 18 19 20 21 22

% Test variables testStructure = 3; % 1 = Tetrahedron % 2 = Cellulose % 3 = Pyramid % 4 = Cube

23 24 25 26 27 28 29 30

% Design variables % Number of unit cells nrOfLevels.min = 3; nrOfLevels.max = 5; nrOfLevels.resolution = 1; nrOfLevels.startTests = 3; nrOfLevels.meshSize = 3;

31 32 33 34 35 36 37 38 39

% Height factor heightFactor.min = 1.1; heightFactor.max = 3; heightFactor.resolution = 0.05; heightFactor.startTests = 5; heightFactor.meshSize = ((heightFactor.max - heightFactor.min + ... heightFactor.resolution) / heightFactor.resolution) ... / (heightFactor.startTests - 1);

IX

B. Appendix 2 - Matlab code

40

% Beam radius beamRadius.min = 0.5e-3; beamRadius.max = 2.0e-3; beamRadius.resolution = 0.01e-3; beamRadius.startTests = 10; beamRadius.meshSize = ((beamRadius.max - beamRadius.min + ... beamRadius.resolution) / beamRadius.resolution)... / (beamRadius.startTests - 1);

41 42 43 44 45 46 47 48 49

% Side width sideWidth.min = 10e-3; sideWidth.max = 30e-3; sideWidth.resolution = 0.5e-3; sideWidth.startTests = 3; sideWidth.meshSize = ((sideWidth.max - sideWidth.min + ... sideWidth.resolution) / sideWidth.resolution) ... / (sideWidth.startTests - 1);

50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65

% Constraints and defined data height = 80e-3; % Total height [m] E = 0.94e9; % Young's modulus [Pa] G = 0.3597e9; % Shear modulus [Pa] rho = 1160; % Density [kg/m^3] sigma_y = 31e6; % Yield strength [Pa] tolerance = 6.25e-6; % The 3D printers printing accuracy [m]

66 67 68 69 70

71 72 73

% Test setup parameters impactForce = 2500; helmetRadius = 160e-3; impactArea = pi * (helmetRadius * cos(asin(1 - height / helmetRadius))) ^2; force.structureStress = impactForce / impactArea; force.min = 0; force.steps = 200;

74 75 76 77 78 79 80 81

% Plots plotMode.grid = 0; plotMode.results = 0; plotMode.progress = 0; plotMode.acceptFailure = 1; plotMode.figureNr = 10; plotMode.autoPlot = 0;

82 83 84

85 86 87 88 89

% Initialize nrOfTests = length(sideWidth) * length(nrOfLevels) * length(beamRadius) * ... length(heightFactor) * length(testStructure); mainData.tetrahedral = zeros(nrOfTests / length(testStructure), 11); mainData.cellulose = zeros(nrOfTests / length(testStructure), 11); mainData.pyramid = zeros(nrOfTests / length(testStructure), 11); mainData.cube = zeros(nrOfTests / length(testStructure), 11);

90 91 92 93

% Start guess startGuess.N = 0; startGuess.hf = 0;

X

B. Appendix 2 - Matlab code

94 95 96 97 98 99 100 101

startGuess.r = 0; startGuess.w = 0; startGuess.mass = 0; startGuess.force = []; startGuess.displacement = []; startGuess.buckledLevels = 0; startGuess.energyAbsorption = 0; startGuess.specificEnergyAbsorption = 0;

102 103 104

105

% Display setup and calculation time fig = NumberOfTestsPlot(nrOfLevels, heightFactor, beamRadius, sideWidth , 5); print(fig, 'AutoPlots/NumberOfTests', '-dpng');

106 107 108 109

% Run initial test testNr = RoughCombinationTest(nrOfLevels, heightFactor, beamRadius, ... sideWidth);

110 111 112

113

% Define mesh size testNr = optimisationAlgorithm(nrOfLevels, heightFactor, beamRadius, ... sideWidth, testNr);

114 115 116

% Write documentation WriteDocumentation(mainData);

117 118 119

120 121

% Print result fprintf('\nOptimization procedure complete. \nNumber of tests: %.0f\n', ... testNr); disp(startGuess);

122 123 124 125 126 127 128

129 130 131 132 133

134 135 136 137 138 139 140 141 142 143 144

% Write solution to text file solutionDoc = fopen('AutoPlots/solution.txt', 'w'); fprintf(solutionDoc, strcat('Number of tests: %.0f \n N: %.0f \n ', ... ' hf: %.2f \n r: %f [mm] \n w: %f [mm] \n Mass: %f [g] \n ', ... ' buckled unit cells: %.0f \n Energy absorption: %f [J]\n ', ... ' Specific energy absorption: %f [kJ/kg] \n'), testNr, startGuess.N , ... startGuess.hf, startGuess.r*1000, startGuess.w*1000, ... startGuess.mass * 1000, ... startGuess.buckledLevels, startGuess.energyAbsorption, ... startGuess.specificEnergyAbsorption/1000); fprintf(solutionDoc, strcat('\n\n Number of unit cells \n Min: %.0f', ... '\n Max: %.0f \n Resolution: %.0f \n Start tests: %.0f \n\n', ... ' Height factor \n Min: %.2f', ... '\n Max: %.2f \n Resolution: %.2f \n Start tests: %.0f \n\n', ... ' Beam radius \n Min: %f', ... '\n Max: %f \n Resolution: %f \n Start tests: %.0f \n\n', ... ' Unit cell width \n Min: %f', ... '\n Max: %f \n Resolution: %f \n Start tests: %.0f \n\n'), ... nrOfLevels.min, nrOfLevels.max, nrOfLevels.resolution, ... nrOfLevels.startTests, ... heightFactor.min, heightFactor.max, heightFactor.resolution, ... heightFactor.startTests, ...

XI

B. Appendix 2 - Matlab code

145 146 147 148 149

beamRadius.min, beamRadius.max, beamRadius.resolution, ... beamRadius.startTests, ... sideWidth.min, sideWidth.max, sideWidth.resolution, ... sideWidth.startTests); fclose(solutionDoc);

150 151 152 153 154

% Plot all tests plotMode.acceptFailure = 1; fig = PlotFactory(1, 11, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndEnergyAbsorption', '-dpng');

155 156 157

fig = PlotFactory(1, 10, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndSpecificEnergyAbsorption', '-dpng ');

158 159 160

fig = PlotFactory(3, 10, 0, 0); print(fig, 'AutoPlots/AllTests/WidthAndSpecificEnergyAbsorption', 'dpng');

161 162 163

164

fig = PlotFactory(4, 10, 0, 0); print(fig, 'AutoPlots/AllTests/NrOfUnitCellsAndSpecificEnergyAbsorption ', ... '-dpng');

165 166 167

fig = PlotFactory(5, 10, 0, 0); print(fig, 'AutoPlots/AllTests/HfAndSpecificEnergyAbsorption', '-dpng') ;

168 169 170

fig = PlotFactory(1, 8, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndBuckling', '-dpng');

171 172 173

174

fig = PlotFactory(8, 10, 0, 0); print(fig, 'AutoPlots/AllTests/BucklingAndSpecificEnergyAbsorption', ... '-dpng');

175 176 177 178

fig = PlotFactory(9, 10, 0, 0); print(fig, 'AutoPlots/AllTests/RadiusAndSpecificEnergyAbsorption', ... '-dpng');

179 180 181 182 183 184

% Plots excluding failing structures plotMode.acceptFailure = 0; fig = PlotFactory(1, 11, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndEnergyAbsorptionNoFailure', ... '-dpng');

185 186 187

188

fig = PlotFactory(1, 10, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndSpecificEnergyAbsorptionNoFailure ', ... '-dpng');

189 190 191

192

fig = PlotFactory(3, 10, 0, 0); print(fig, 'AutoPlots/AllTests/ WidthAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

193

XII

B. Appendix 2 - Matlab code

194 195 196

197

fig = PlotFactory(4, 10, 0, 0); print(fig, ... 'AutoPlots/AllTests/ NrOfUnitCellsAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

198 199 200

201

fig = PlotFactory(5, 10, 0, 0); print(fig, 'AutoPlots/AllTests/HfAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

202 203 204

fig = PlotFactory(1, 8, 0, 0); print(fig, 'AutoPlots/AllTests/MassAndBucklingNoFailure', '-dpng');

205 206 207 208

209

fig = PlotFactory(8, 10, 0, 0); print(fig, ... 'AutoPlots/AllTests/BucklingAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

210 211 212 213

214

fig = PlotFactory(9, 10, 0, 0); print(fig, ... 'AutoPlots/AllTests/RadiusAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

215 216 217

218

% Plot the structure fig = PlotGeometry(testStructure, startGuess.w, startGuess.N, startGuess.hf); print(fig, 'AutoPlots/OptimizedStructure', '-dpng');

219 220 221 222 223 224 225 226

% Plot force vs displacement curve fig = figure(plotMode.figureNr + 1); plot(startGuess.displacement, startGuess.force); xlabel('Displacement [m]'); ylabel('Force [N]'); set(gca, 'fontsize', 18); print(fig, 'AutoPlots/ForceDisplacement', '-dpng');

227 228

close all;

B.2

1 2 3 4 5 6 7 8 9 10

Rough combination

function testNr = RoughCombinationTest(nrOfLevels, ... heightFactor, beamRadius, sideWidth) %---------------------------------------------------------------------% PURPOSE % Initializing optimization algorithm by a rough mesh displaying % combinations with high specific energy absorption. % % INPUT % nrOfLevels = value Number of unit cells % heightFactor = value Height factor

XIII

B. Appendix 2 - Matlab code

11 12 13 14 15 16 17 18 19

% beamRadius = value Bean radius [m] % sideWidth = value Unit cell width [m] % % OUTPUT % testNr = value Test identifier number % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

20 21

global height testStructure force startGuess plotMode

22 23 24 25

26 27

% Design variables N = linspace(nrOfLevels.min, nrOfLevels.max, nrOfLevels.startTests); hf = linspace(heightFactor.min, heightFactor.max, heightFactor. startTests); r = linspace(beamRadius.min, beamRadius.max, beamRadius.startTests); w = linspace(sideWidth.min, sideWidth.max, sideWidth.startTests);

28 29 30 31 32 33

% Initialize nrOfTests = length(w) * length(N) * length(r) * length(hf); EnergyAbsorption = zeros(1, nrOfTests); EnergyAbsorption_F = zeros(1, nrOfTests); Mass = zeros(1, nrOfTests);

34 35 36 37

% Main iteration loop testCounter = 1; testNr = 1;

38 39 40 41 42

for i_w = 1 : sideWidth.startTests % Applied force nrOfTopNodes = 4; force.max = force.structureStress * w(i_w)^2 / nrOfTopNodes;

43 44 45 46 47 48

49 50 51

for i_hf = 1 : heightFactor.startTests for i_N = 1 : nrOfLevels.startTests for i_r = 1 : beamRadius.startTests % Print progress fprintf('Test %.0f. r: %.1f [mm], w: %.1f [mm], N: %.0f, hf: %1.1f \n', ... testCounter, r(i_r)*1000, w(i_w)*1000, N(i_N), ... hf(i_hf)); testCounter = testCounter + 1;

52

% Set each level height levelHeights = DescribeLevelHeight(hf(i_hf), N(i_N), height);

53 54 55

% Check if smallest unit cell is large enough if min(levelHeights) < 6 * r(i_r) fprintf(' Impossible geometry. \n'); break; end

56 57 58 59 60 61

% Do the simulation [Mass(testNr), EnergyAbsorption(testNr), EnergyAbsorption_F(testNr) , ...

62 63

XIV

B. Appendix 2 - Matlab code

forceLog, displacementLog, sigma, epsilon, buckledLevels] = ... SimulateTest(testStructure, levelHeights, ... w(i_w), r(i_r));

64 65 66 67

% Evaluate if the tested structure is better then the saved one specificEnergyAbsorption = EnergyAbsorption_F(testNr) / Mass(testNr ); if (specificEnergyAbsorption > startGuess.specificEnergyAbsorption)

68 69

70 71

% Check if structure withstood the force if (forceLog(end) ~= 0) fprintf(' Start guess updated!\n');

72 73 74 75

% Update the start guess startGuess.N = N(i_N); startGuess.hf = hf(i_hf); startGuess.r = r(i_r); startGuess.w = w(i_w); startGuess.sigma = sigma; startGuess.epsilon = epsilon; startGuess.force = forceLog; startGuess.displacement = displacementLog; startGuess.buckledLevels = buckledLevels; startGuess.mass = Mass(testNr); startGuess.energyAbsorption = EnergyAbsorption_F(testNr); startGuess.specificEnergyAbsorption = specificEnergyAbsorption;

76 77 78 79 80 81 82 83 84 85 86 87 88

89

% Write the updated guess disp(startGuess);

90 91

end

92

end

93 94

% Store data and results StoreData(Mass(testNr), EnergyAbsorption(testNr), w(i_w), N(i_N), ... hf(i_hf), forceLog(end), buckledLevels, r(i_r), ... EnergyAbsorption_F(testNr), testNr, testStructure);

95 96

97 98 99

% Print result for active test fprintf(' Energy absorption: %.2f mJ\n', ... EnergyAbsorption_F(testNr) * 1e3); fprintf(' Specific energy absorption: %.2f kJ/kg\n', ... EnergyAbsorption_F(testNr)/Mass(testNr) * 1e-3);

100 101 102 103 104 105

% Increase test counter testNr = testNr + 1;

106 107 108 109 110 111

end end end end

112 113 114

% Print progress for each geometry case fprintf(' Geometry %1.0f finished calculations. \n', testStructure);

115 116

% Create plots and save them

XV

B. Appendix 2 - Matlab code

117 118 119 120

% Plots including failing structures plotMode.acceptFailure = 1; fig = PlotFactory(1, 11, 0, 0); print(fig, 'AutoPlots/Initialization/MassAndEnergyAbsorption', '-dpng') ;

121 122 123

124

fig = PlotFactory(1, 10, 0, 0); print(fig, 'AutoPlots/Initialization/MassAndSpecificEnergyAbsorption', ... '-dpng');

125 126 127

128

fig = PlotFactory(3, 10, 0, 0); print(fig, 'AutoPlots/Initialization/WidthAndSpecificEnergyAbsorption', ... '-dpng');

129 130 131 132

133

fig = PlotFactory(4, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/NrOfUnitCellsAndSpecificEnergyAbsorption' , ... '-dpng');

134 135 136

137

fig = PlotFactory(5, 10, 0, 0); print(fig, 'AutoPlots/Initialization/HfAndSpecificEnergyAbsorption', ... '-dpng');

138 139 140 141

fig = PlotFactory(1, 8, 0, 0); print(fig, 'AutoPlots/Initialization/MassAndBuckling', ... '-dpng');

142 143 144

145

fig = PlotFactory(8, 10, 0, 0); print(fig, 'AutoPlots/Initialization/ BucklingAndSpecificEnergyAbsorption', ... '-dpng');

146 147 148

149

fig = PlotFactory(9, 10, 0, 0); print(fig, 'AutoPlots/Initialization/RadiusAndSpecificEnergyAbsorption' , ... '-dpng');

150 151 152 153 154

155

% Plots excluding failing structures plotMode.acceptFailure = 0; fig = PlotFactory(1, 11, 0, 0); print(fig, 'AutoPlots/Initialization/MassAndEnergyAbsorptionNoFailure', ... '-dpng');

156 157 158 159

160

fig = PlotFactory(1, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/MassAndSpecificEnergyAbsorptionNoFailure' , ... '-dpng');

161 162 163

fig = PlotFactory(3, 10, 0, 0); print(fig, ...

XVI

B. Appendix 2 - Matlab code

164

165

'AutoPlots/Initialization/WidthAndSpecificEnergyAbsorptionNoFailure ', ... '-dpng');

166 167 168 169

170

fig = PlotFactory(4, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/ NrOfUnitCellsAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

171 172 173 174

175

fig = PlotFactory(5, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/HfAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

176 177 178

fig = PlotFactory(1, 8, 0, 0); print(fig, 'AutoPlots/Initialization/MassAndBucklingNoFailure', '-dpng' );

179 180 181 182

183

fig = PlotFactory(8, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/ BucklingAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

184 185 186 187

188

fig = PlotFactory(9, 10, 0, 0); print(fig, ... 'AutoPlots/Initialization/ RadiusAndSpecificEnergyAbsorptionNoFailure', ... '-dpng');

189 190 191 192

% Close all plots close all; end

B.3

1

2 3 4 5 6 7 8 9 10 11 12 13 14

Optimization algorithm

function testNr = optimisationAlgorithm(nrOfLevels, heightFactor, beamRadius, ... sideWidth, testNr) %---------------------------------------------------------------------% PURPOSE % Optimize input design variables for maximized energy absorption. % % INPUT % nrOfLevels = value Number of unit cells % heightFactor = value Height factor % beamRadius = value Beam radius [m] % sideWidth = value Unit cell width [m] % testNr = value Test identification number % % OUTPUT

XVII

B. Appendix 2 - Matlab code

15 16 17 18 19

% testNr = value Test identification number % %---------------------------------------------------------------------% Created by Mattias Naarttijarvi %----------------------------------------------------------------------

20 21

global height testStructure startGuess plotMode

22 23

24

N_tests = (startGuess.N - nrOfLevels.meshSize : nrOfLevels.resolution ... : startGuess.N + nrOfLevels.meshSize);

25 26

27 28

hf_tests = (startGuess.hf - heightFactor.meshSize * heightFactor. resolution ... : heightFactor.resolution ... : startGuess.hf + heightFactor.meshSize * heightFactor.resolution);

29 30

31 32

r_tests = (startGuess.r - beamRadius.meshSize * beamRadius.resolution ... : beamRadius.resolution ... : startGuess.r + beamRadius.meshSize * beamRadius.resolution);

33 34 35 36

w_tests = (startGuess.w - sideWidth.meshSize * sideWidth.resolution ... : sideWidth.resolution ... : startGuess.w + sideWidth.meshSize * sideWidth.resolution);

37 38 39 40 41 42 43

% Keep running until the guess goes through without changing guessUpdated = 1; while guessUpdated == 1 % Start by setting changes to none guessUpdated = 0; fprintf('\n\nInitializing optimization algorithm\n\n');

44 45 46

%% Number of unit cells fprintf('Varying N \n')

47 48 49

% Save start test number startTestNr = testNr;

50 51 52 53 54 55 56 57 58 59

for i = 1 : length(N_tests) N = N_tests(i); if N > nrOfLevels.max % Break if exceeding the maximum continue; elseif N < nrOfLevels.min % Break if below minimum continue; end

60

% Print progress fprintf('N = %.0f \n', N);

61 62 63

% Set each level height levelHeights = DescribeLevelHeight(startGuess.hf, N, height);

64 65 66

% Check if smallest unit cell is large enough

67

XVIII

B. Appendix 2 - Matlab code

if min(levelHeights) < 6 * startGuess.r fprintf(' Impossible geometry. \n'); break; end

68 69 70 71 72

% Do the simulation [Mass, EnergyAbsorption, EnergyAbsorption_F, forceLog, ... displacementLog, sigma, epsilon, buckledLevels] = ... SimulateTest(testStructure, levelHeights, ... startGuess.w, startGuess.r);

73 74 75 76 77 78

% Evaluate if the tested structure is better then the saved one specificEnergyAbsorption = EnergyAbsorption_F / Mass; if (specificEnergyAbsorption > startGuess. specificEnergyAbsorption) % Check if structure withstood the force if (forceLog(end) ~= 0) fprintf(' Start guess updated by N!\n');

79 80 81

82 83 84 85

% Update the start guess startGuess.N = N; startGuess.mass = Mass; startGuess.sigma = sigma; startGuess.epsilon = epsilon; startGuess.force = forceLog; startGuess.displacement = displacementLog; startGuess.buckledLevels = buckledLevels; startGuess.energyAbsorption = EnergyAbsorption_F; startGuess.specificEnergyAbsorption = ... specificEnergyAbsorption;

86 87 88 89 90 91 92 93 94 95 96 97

disp(startGuess);

98

end

99

end

100 101

% Store data and result StoreData(Mass, 0, startGuess.w, N, ... startGuess.hf, forceLog(end), buckledLevels, startGuess.r, ... EnergyAbsorption_F, testNr, testStructure); testNr = testNr + 1;

102 103 104

105 106 107

end

108 109 110 111 112 113 114

% Plot and save plotMode.acceptFailure = 1; fig = PlotFactory(4, 10, startTestNr, 0); figName = sprintf('r%.0f w%0.0f hf%1.0f', startGuess.r * 10000, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingN/', figName), '-dpng');

115 116 117 118 119

fig = PlotFactory(4, 8, startTestNr, 0); figName = sprintf('r%.0f w%0.0f hf%1.0f', startGuess.r * 10000, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingN/', figName, 'Buckling'), 'dpng');

120

XIX

B. Appendix 2 - Matlab code

plotMode.acceptFailure = 0; fig = PlotFactory(4, 8, startTestNr, 0); figName = sprintf('r%.0f w%0.0f hf%1.0f', startGuess.r * 10000, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingN/', figName, ' BucklingNoFailure'), '-dpng');

121 122 123 124 125

126

fig = PlotFactory(4, 10, startTestNr, 0); figName = sprintf('r%.0f w%0.0f hf%1.0f', startGuess.r * 10000, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingN/', figName, 'NoFailure'), 'dpng'); close all;

127 128 129 130

131 132

%% Beam radius fprintf('Varying r \n')

133 134 135

% Save start test number startTestNr = testNr;

136 137 138

% Set each level height levelHeights = DescribeLevelHeight(startGuess.hf, startGuess.N, height);

139 140

141

for i = 1 : length(r_tests) r = r_tests(i); if r > beamRadius.max % Break if exceeding the maximum continue; elseif r < beamRadius.min % Break if below minimum continue; end

142 143 144 145 146 147 148 149 150 151

% Print progress fprintf('r = %.2f mm\n', r*1000);

152 153 154

% Check if smallest unit cell is large enough if min(levelHeights) < 6 * r fprintf(' Impossible geometry. \n'); break; end

155 156 157 158 159 160

% Do the simulation [Mass, EnergyAbsorption, EnergyAbsorption_F, forceLog, ... displacementLog, sigma, epsilon, buckledLevels] = ... SimulateTest(testStructure, levelHeights, ... startGuess.w, r);

161 162 163 164 165 166

% Evaluate if the tested structure is better then the saved one specificEnergyAbsorption = EnergyAbsorption_F / Mass; if (specificEnergyAbsorption > startGuess. specificEnergyAbsorption) % Check if structure withstood the force if (forceLog(end) ~= 0) fprintf(' Start guess updated by r!\n');

167 168 169

170 171 172

XX

B. Appendix 2 - Matlab code

173

% Update the start guess startGuess.r = r; startGuess.mass = Mass; startGuess.sigma = sigma; startGuess.epsilon = epsilon; startGuess.force = forceLog; startGuess.buckledLevels = buckledLevels; startGuess.displacement = displacementLog; startGuess.energyAbsorption = EnergyAbsorption_F; startGuess.specificEnergyAbsorption = ... specificEnergyAbsorption;

174 175 176 177 178 179 180 181 182 183 184 185

guessUpdated = 1;

186 187

disp(startGuess);

188

end

189

end

190 191

% Store data and result StoreData(Mass, 0, startGuess.w, startGuess.N, ... startGuess.hf, forceLog(end), buckledLevels, r, ... EnergyAbsorption_F, testNr, testStructure); testNr = testNr + 1;

192 193 194 195 196 197

end

198 199 200 201 202 203 204

% Plot and save plotMode.acceptFailure = 1; fig = PlotFactory(9, 10, startTestNr, 0); figName = sprintf('N%.0f w%0.0f hf%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingR/', figName), '-dpng');

205 206 207 208 209

fig = PlotFactory(9, 8, startTestNr, 0); figName = sprintf('N%.0f w%0.0f hf%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingR/', figName, 'Buckling'), 'dpng');

210 211 212 213 214 215

plotMode.acceptFailure = 0; fig = PlotFactory(9, 8, startTestNr, 0); figName = sprintf('N%.0f w%0.0f hf%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingR/', figName, ' BucklingNoFailure'), '-dpng');

216 217 218 219 220

221

fig = PlotFactory(9, 10, startTestNr, 0); figName = sprintf('N%.0f w%0.0f hf%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingR/', figName, 'NoFailure'), 'dpng'); close all;

222 223 224 225

% Restart the loop if guessUpdated == 1 continue;

XXI

B. Appendix 2 - Matlab code

226

end

227 228 229

%% Height factor fprintf('Varying hf \n')

230 231 232

% Save start test number startTestNr = testNr;

233 234 235 236 237 238 239 240 241 242

for i = 1 : length(hf_tests) hf = hf_tests(i); if hf > heightFactor.max % Break if exceeding the maximum continue; elseif hf < heightFactor.min % Break if below minimum continue; end

243

% Print progress fprintf('hf = %.1f \n', hf);

244 245 246

% Set each level height levelHeights = DescribeLevelHeight(hf, startGuess.N, height);

247 248 249

% Check if smallest unit cell is large enough if min(levelHeights) < 6 * startGuess.r fprintf(' Impossible geometry. \n'); break; end

250 251 252 253 254 255

% Do the simulation [Mass, EnergyAbsorption, EnergyAbsorption_F, forceLog, ... displacementLog, sigma, epsilon, buckledLevels] = ... SimulateTest(testStructure, levelHeights, ... startGuess.w, startGuess.r);

256 257 258 259 260 261

% Evaluate if the tested structure is better then the saved one specificEnergyAbsorption = EnergyAbsorption_F / Mass; if (specificEnergyAbsorption > startGuess. specificEnergyAbsorption) % Check if structure withstood the force if (forceLog(end) ~= 0) fprintf(' Start guess updated by hf!\n');

262 263 264

265 266 267 268

% Update the start guess startGuess.hf = hf; startGuess.mass = Mass; startGuess.sigma = sigma; startGuess.epsilon = epsilon; startGuess.force = forceLog; startGuess.displacement = displacementLog; startGuess.buckledLevels = buckledLevels; startGuess.energyAbsorption = EnergyAbsorption_F; startGuess.specificEnergyAbsorption = EnergyAbsorption_F / ... Mass;

269 270 271 272 273 274 275 276 277 278

279

XXII

B. Appendix 2 - Matlab code

280

guessUpdated = 1;

281 282

disp(startGuess);

283

end

284

end

285 286

% Store data and result StoreData(Mass, 0, startGuess.w, startGuess.N, ... hf, forceLog(end), buckledLevels, startGuess.r, ... EnergyAbsorption_F, testNr, testStructure); testNr = testNr + 1;

287 288 289 290 291 292

end

293 294 295 296 297 298 299

% Plot and save plotMode.acceptFailure = 1; fig = PlotFactory(5, 10, startTestNr, 0); figName = sprintf('N%.0f w%0.0f r%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.r*1000); print(fig, strcat('AutoPlots/VaryingHF/', figName), '-dpng');

300 301 302 303 304

fig = PlotFactory(5, 8, startTestNr, 0); figName = sprintf('N%.0f w%0.0f r%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.r*1000); print(fig, strcat('AutoPlots/VaryingHF/', figName, 'Buckling'), 'dpng');

305 306 307 308 309 310

plotMode.acceptFailure = 0; fig = PlotFactory(5, 10, startTestNr, 0); figName = sprintf('N%.0f w%0.0f r%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.r*1000); print(fig, strcat('AutoPlots/VaryingHF/', figName, 'NoFailure'), 'dpng')

311 312 313 314 315

316

fig = PlotFactory(5, 8, startTestNr, 0); figName = sprintf('N%.0f w%0.0f r%1.0f', startGuess.N, ... startGuess.w * 10000, startGuess.r*1000); print(fig, strcat('AutoPlots/VaryingHF/', figName, ' BucklingNoFailure'), '-dpng'); close all;

317 318 319 320 321

% Restart the loop if guessUpdated == 1 continue; end

322 323 324

%% Side width fprintf('Varying w \n')

325 326 327

% Save start test number startTestNr = testNr;

328 329 330

% Set each level height levelHeights = DescribeLevelHeight(startGuess.hf, startGuess.N, height);

331

XXIII

B. Appendix 2 - Matlab code

332 333 334 335 336

% Check if smallest unit cell is large enough if min(levelHeights) < 6 * startGuess.r fprintf(' ERROR! \n'); pause(10) end

337 338 339 340 341 342 343 344 345 346

for i = 1 : length(w_tests) w = w_tests(i); if w > sideWidth.max % Break if exceeding the maximum continue; elseif w < sideWidth.min % Break if below minimum continue; end

347

% Print progress fprintf('w = %.1f mm\n', w*1000);

348 349 350

% Do the simulation [Mass, EnergyAbsorption, EnergyAbsorption_F, forceLog, ... displacementLog, sigma, epsilon, buckledLevels] = ... SimulateTest(testStructure, levelHeights, ... w, startGuess.r);

351 352 353 354 355 356

% Evaluate if the tested structure is better then the saved one specificEnergyAbsorption = EnergyAbsorption_F / Mass; if (specificEnergyAbsorption > startGuess. specificEnergyAbsorption) % Check if structure withstood the force if (forceLog(end) ~= 0) fprintf(' Start guess updated by w!\n');

357 358 359

360 361 362 363

% Update the start guess startGuess.w = w; startGuess.mass = Mass; startGuess.sigma = sigma; startGuess.epsilon = epsilon; startGuess.force = forceLog; startGuess.displacement = displacementLog; startGuess.buckledLevels = buckledLevels; startGuess.energyAbsorption = EnergyAbsorption_F; startGuess.specificEnergyAbsorption = EnergyAbsorption_F / ... Mass;

364 365 366 367 368 369 370 371 372 373

374 375

guessUpdated = 1;

376 377

disp(startGuess);

378

end

379

end

380 381

% Store data and result StoreData(Mass, 0, w, startGuess.N, ... startGuess.hf, forceLog(end), buckledLevels, startGuess.r, ...

382 383 384

XXIV

B. Appendix 2 - Matlab code

EnergyAbsorption_F, testNr, testStructure); testNr = testNr + 1;

385 386

end

387 388

% Plot and save plotMode.acceptFailure = 1; fig = PlotFactory(3, 10, startTestNr, 0); figName = sprintf('N%.0f r%0.0f hf%1.0f', startGuess.N, ... startGuess.r * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingW/', figName), '-dpng');

389 390 391 392 393 394 395

fig = PlotFactory(3, 8, startTestNr, 0); figName = sprintf('N%.0f r%0.0f hf%1.0f', startGuess.N, ... startGuess.r * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingW/', figName, 'Buckling'), 'dpng');

396 397 398 399

400

plotMode.acceptFailure = 0; fig = PlotFactory(3, 10, startTestNr, 0); figName = sprintf('N%.0f r%0.0f hf%1.0f', startGuess.N, ... startGuess.r * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingW/', figName, 'NoFailure'), 'dpng');

401 402 403 404 405

406

fig = PlotFactory(3, 8, startTestNr, 0); figName = sprintf('N%.0f r%0.0f hf%1.0f', startGuess.N, ... startGuess.r * 10000, startGuess.hf*10); print(fig, strcat('AutoPlots/VaryingW/', figName, ' BucklingNoFailure'), '-dpng'); close all;

407 408 409 410

411 412

% Restart the loop if guessUpdated == 1 continue; end

413 414 415 416 417 418

end end

B.4

1 2 3 4 5 6 7 8 9 10 11 12 13

Simulate compression test

function [M, EnergyAbsorption, EnergyAbsorption_F, F_list, ... displacement_list, sigma, ... epsilon, buckledLevels] = SimulateTest(chosenStructure, ... levelHeights, sideWidth, R) %---------------------------------------------------------------------% PURPOSE % Simulate a compression test. % % INPUT % levelHeights = [h1, h2, ..., hN] Unit cell height [m] % sideWidth = value Unit cell width [m] % R = value Beam radius [m] %

XXV

B. Appendix 2 - Matlab code

14 15 16 17 18 19 20 21 22 23 24 25 26

% OUTPUT % M = value Mass [kg] % EnergyAbsorption = value Energy absorption (s - e) [J] % EnergyAbsorption_F = value Energy absorption (F - delta) [J] % F_list = array Applied force vector % displacement_list = array Displacement vector % sigma = array Stress vector % epsilon = array Strain vector % buckledLevels = value Number of buckled unit cells % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

27 28

global E G rho sigma_y height plotMode force

29 30 31 32 33

% Structure % 1 = tetrahedral % 2 = cellulose % 3 = pyramid

34 35 36 37

% levelHeights = [l1, l2, ..., ln] in m % sideWidth = x in m % R = x in m, Radius of the beam

38 39 40

% Forces [N] F = linspace(force.min, force.max, force.steps);

41 42 43 44

% Force displacement plot F_list = 0; displacement_list = 0;

45 46 47 48

% Anonymous functions % The cross section area A = @(r) pi * r^2;

49 50 51

% Mass of a beam m = @(area, h, rho) area * h * rho;

52 53 54

% Area moment of inertia I = @(r, m) (m * r^4)/4;

55 56 57

% The moment of inertia, local y-axis Iy = @(r, h, m) m * (3 * r^3 + h^2) / 12;

58 59 60

% The moment of inertia, local z-axis Iz = @(r, h, m) m * (3 * r^3 + h^2) / 12;

61 62 63

% Saint-Venant's torsion constant Kv = @(r) (pi * r^4) / 2;

64 65 66

% Material data ep = [E G A(R) Iy(R, 0, 0) Iz(R, 0, 0) Kv(R)];

67 68 69

% Sought data epsilon = 0;

XXVI

B. Appendix 2 - Matlab code

70 71

sigma = 0; buckledLevels = 0;

72 73 74 75 76 77 78 79

% Mass of the system [Coord, Edof, Dof, ~, ~, ~] = buildGeometry(... levelHeights, ... sideWidth, ... chosenStructure); [Ex, Ey, Ez] = coordxtr(Edof, Coord, Dof, 2); M = CalcMass(Ex, Ey, Ez, A(R));

80 81 82 83 84 85 86 87

% Step forces f_active = F(1); i = 0; while f_active < force.max % Increase the step i = i + 1; f_active = F(i);

88 89 90 91

92 93 94 95 96

% Create the geometry if i == 1 %fprintf('Building geometry of height %f m \n', sum( levelHeights)) [Coord, Edof, Dof, unitForce, bc, ~] = buildGeometry(... levelHeights, ... sideWidth, ... chosenStructure); end

97 98 99

% Active force f = unitForce .* f_active;

100 101 102 103

% Solve the stucture [a, ~, Ex, Ey, Ez] = ... SolveStructure(Coord, Edof, Dof, f, bc, ep, R);

104 105 106 107 108

% Store result for force - displacement plot F_list = [F_list, f_active]; displacement = height - sum(levelHeights) - a(end - 3); displacement_list = [displacement_list, displacement];

109 110 111 112 113 114 115

% Get section forces and displacements Ed = extract(Edof, a); eo = [0, 0, 1]; % Orientation of local z axis eq = [0, 0, 0, 0]; % No distributed load epsilon_test = zeros(length(Ex), 1); sigma_test = zeros(length(Ex), 1);

116 117 118

% Check if level has buckled buckled = 0;

119 120 121 122

for elementNr = 1 : length(Ex) % Beam data ed = Ed(elementNr, :);

123 124

% Position

XXVII

B. Appendix 2 - Matlab code

ex = ex_0 ey = ey_0 ez = ez_0

125 126 127 128 129 130

Ex(elementNr, :); = Ex(elementNr, :) + [ed(1), ed(7)]; Ey(elementNr, :); = Ey(elementNr, :) + [ed(2), ed(8)]; Ez(elementNr, :); = Ez(elementNr, :) + [ed(3), ed(9)];

131

% Undeformed beamLength_0 (ey_0(2) (ez_0(2)

132 133 134 135

beam length = sqrt((ex_0(2) - ex_0(1))^2 + ... - ey_0(1))^2 + ... - ez_0(1))^2);

136

% Deformed beamLength (ey(2) (ez(2)

137 138 139 140

beam length = sqrt((ex(2) - ex(1))^2 + ... - ey(1))^2 + ... - ez(1))^2);

141

% Mass beamMass = m(A(R), beamLength_0, rho);

142 143 144

% Section forces along beam local x-axis % es = [N1 Vy1 Vz1 T1 My1 Mz1; % N2 Vy2 Vz2 T2 My2 Mz2]

145 146 147 148

% Displacements % edi = [u1 v1 w1 fi1; % u2 v2 w2 fi2]

149 150 151 152

% Local x-coordinates for evaluation points % eci = [x1, x2]' ep = [E G A(R) Iy(R, beamLength, beamMass) Iz(R, beamLength, ... beamMass) Kv(R)]; [es, ~, ~] = beam3s(ex, ey, ez, eo, ep, ed, eq, 2);

153 154 155

156 157 158

% Difference in deformed and undeformed beam length beamLength_delta = beamLength - beamLength_0; beamStrain = beamLength_delta / beamLength_0; % beamStress = E * beamStrain; beamNormalForce = -es(1, 1); beamStress = beamNormalForce / (pi * R^2);

159 160 161 162 163 164 165

% Strain epsilon_test(elementNr) = beamStrain; if beamStress > sigma_y % Elastic perfectly plastic sigma_test(elementNr) = sigma_y; else % Elastic sigma_test(elementNr) = beamStress; end

166 167 168 169 170 171 172 173 174 175

% Buckling case 4, fixed in both ends Pk = 4 * pi^2 * E * I(R, beamMass) / (beamLength^2); if beamNormalForce > Pk % Critical load exceeded

176 177 178 179

XXVIII

B. Appendix 2 - Matlab code

180

% Remove top layer nrOfLevels = length(levelHeights); levelHeights(nrOfLevels) = [];

181 182 183 184

% Print progress if plotMode.progress == 1 fprintf(' Level nr %1.0f has buckled at F = %1.2f N \ n', ... nrOfLevels, F(i)); end

185 186 187

188 189 190

% Break loop and begin force at force.min again i = 0; buckled = 1; buckledLevels = buckledLevels + 1; break;

191 192 193 194 195

end

196 197

% Break if all levels have buckeled if isempty(levelHeights) break; elseif buckled == 1 break; end

198 199 200 201 202 203

end

204 205

% Break if all levels have buckeled if isempty(levelHeights) break; end

206 207 208 209 210

% Store results if sum(epsilon_test) > 0 epsilon = [epsilon, sum(epsilon_test)]; sigma = [sigma, sum(sigma_test)]; end

211 212 213 214 215 216

end

217 218 219 220 221 222 223

% All layers have buckled if i == 0 fprintf(' All unit cells have buckeled!\n'); i = 1; F_list(end) = 0; end

224 225 226 227 228

% Calculate energy absorption [EnergyAbsorption, ~] = CalcEnergyAbsorption(sigma, epsilon); [EnergyAbsorption_F, E_list_F] = ... CalcEnergyAbsorption(F_list, displacement_list);

229 230 231 232 233 234

% Plots if plotMode.results == 1 % Sigma epsilon curve figure(4) plot(epsilon, sigma, '-'), hold on;

XXIX

B. Appendix 2 - Matlab code

xlabel('\epsilon') ylabel('\sigma') set(gca, 'fontsize', 18)

235 236 237 238

% Energy curve figure(5) subplot(1, 2, 1); plot(E_list_F, displacement_list, '-'), hold on; subplot(1, 2, 2); plot(E_list_F, F_list, '--'), hold on; ylabel('Energy [J]') set(gca, 'fontsize', 18)

239 240 241 242 243 244 245 246 247

% Force vs displacement curve figure(6) plot(displacement_list, F_list), hold on; xlabel('Displacement [m]'); ylabel('Force [N]'); set(gca, 'fontsize', 18)

248 249 250 251 252 253 254 255

end end

B.5

1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Solve FEM problem

function [a, r, Ex, Ey, Ez] = SolveStructure(Coord, Edof, Dof, f, bc, ep, R) %---------------------------------------------------------------------% PURPOSE % Solve the FEM problem. % % INPUT % Coord = Coordinate matrix % Edof = Element degree of freedom % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % ep = Material data % R = Beam radius [m] % % OUTPUT % a = Displacement vector % r = Reaction forces % Ex = x coordinates % Ey = y coordinates % Ez = z coordinates % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

25 26 27

global rho % ep = [E G A Iy Iz Kv]

28

XXX

B. Appendix 2 - Matlab code

29 30 31 32 33

34

% Size of the system nnodes = length(Coord); s = size(Edof); nel = s(1); ndeg = 6; node ndof = nnodes * ndeg;

% Number of elements

% Number of degrees of freedom per % Number of degrees of freedom

35 36 37

% System matrices K = zeros(ndof, ndof);

38 39 40 41

% Beam parameters A = @(r) pi * r^2; m = @(area, h, rho) area * h * rho;

% The cross section area % Mass of a beam

42 43 44 45 46

% The moment Iy = @(r, h, (3 * r^3 Iz = @(r, h,

of inertia m) m * ... + h^2) / 12; m) m * (3 * r^3 + h^2) / 12;

47 48 49 50

% Element properties, topology and coordinates eo = [0, 0, 1]; % Orientation of z axis [xz yz zz] eq = [0, 0, 0, 0]; % Distributed load [qx qy qz qw]

51 52 53

% Extract coordinates [Ex, Ey, Ez] = coordxtr(Edof, Coord, Dof, 2);

54 55 56 57 58 59 60 61 62 63

% Assemple element matrices for i = 1 : nel % Length of each beam beamLength = sqrt((Ex(i, 2) - Ex(i, 1))^2 + ... (Ey(i, 2) - Ey(i, 1))^2 + ... (Ez(i, 2) - Ez(i, 1))^2); beamMass = m(A(R), beamLength, rho); ep(4) = Iy(R, beamLength, beamMass); ep(5) = Iz(R, beamLength, beamMass);

64

% Assemble [Ke, fe] = beam3e(Ex(i, :), Ey(i, :), Ez(i, :), eo, ep, eq); [K, f] = assem(Edof(i, :), K, Ke, f, fe);

65 66 67 68

end

69 70 71 72

% Solve [a, r] = solveq(K, f, bc); end

B.6 B.6.1

1 2 3

Minor functions Mass of the structure

function m = CalcMass(Ex, Ey, Ez, A) %---------------------------------------------------------------------% PURPOSE

XXXI

B. Appendix 2 - Matlab code

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

% Calculate the mass of the entire structure. % % INPUT % Ex = x coodinates % Ey = y coodinates % Ez = z coodinates % A = Cross sectional area [m^2] % % % OUTPUT % m = Mass [kg] % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

19 20 21 22 23 24 25 26

m = 0; s = size(Ex); for i = 1 : s(1) % Length of one beam lb = sqrt((Ex(i, 2) - Ex(i, 1))^2 + ... (Ey(i, 2) - Ey(i, 1))^2 + ... (Ez(i, 2) - Ez(i, 1))^2);

27

% Mass of a beam mb = lb * A;

28 29 30

% Total mass of all beams m = m + mb;

31 32 33 34

end end

B.6.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Energy absorption

function [E, E_list] = CalcEnergyAbsorption(yValues, xValues) %---------------------------------------------------------------------% PURPOSE % Calculate energy absorption by integrating the input values. % % INPUT % yValue = Array % xValue = Array % % OUTPUT % E = Energy absorption % E_list = Energy absorption array in each step % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

17 18 19 20

% Integrate the stress strain curve E = 0; E_list = zeros(1, length(yValues));

XXXII

B. Appendix 2 - Matlab code

21 22 23 24 25

for i = 2 : length(yValues) y1 = yValues(i - 1); y2 = yValues(i); x1 = xValues(i - 1); x2 = xValues(i);

26

if x2 > x1 % No buckling deltaY = (y2 + y1) / 2; deltaX = x2 - x1;

27 28 29 30 31

E = E + deltaY * deltaX;

32

else

33

% Buckling occured here, take next value deltaX = 0; deltaY = 0;

34 35 36

end

37 38

% Store energy for every case E_list(i) = deltaY * deltaX;

39 40 41 42

end end

B.6.3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Unit cell height

function levelHeights = DescribeLevelHeight(hf, N, htot) %---------------------------------------------------------------------% PURPOSE % Build the pyramid geometry. % % INPUT % hf = Value Height factor % N = Value Number of unit cells % htot = Value Total height [m] % % OUTPUT % levelHeights = [h1, h2, ..., hN] % %---------------------------------------------------------------------% Created by Mattias Naarttijarvi %----------------------------------------------------------------------

17 18 19 20 21

hf_sum = 0; for i = 0 : N - 1 hf_sum = hf_sum + hf^i; end

22 23 24

% First level height h1 = htot / hf_sum;

25 26 27 28 29

% Calculate the height variations levelHeights = zeros(N, 1); for i = 1 : N levelHeights(i) = h1 * hf^(i - 1);

XXXIII

B. Appendix 2 - Matlab code

30 31

end end

B.7 B.7.1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Build geometries Geometry factory

function [Coord, Edof, Dof, f, bc, nodes] = buildGeometry(H, W, G) %---------------------------------------------------------------------% PURPOSE % Build the tetrahedron geometry. % % INPUT % H = [h1, h2, ..., hn] Unit cell heights [m] % W = value Width [m] % G = Geometry % 1 = Tetrahedral % 2 = Cellulose % 3 = Pyramid % 4 = Cube % % OUTPUT % Coord = [x1, y1; x2, y2; ...; xn, yn] % Edof = Element degree of freedom matrix % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % nodes = Structure for the geometry % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

% Create the geometry if G == 1 % Tetrahedral [Coord, Edof, Dof, f, bc, nodes] DoTetrahedralGeometry(H, W); elseif G == 2 % Cellulose [Coord, Edof, Dof, f, bc, nodes] DoCellularGeometry(H, W); elseif G == 3 % Pyramid [Coord, Edof, Dof, f, bc, nodes] DoPyramidGeometry(H, W); elseif G == 4 % Cube [Coord, Edof, Dof, f, bc, nodes] DoCubeGeometry(H, W); end end

XXXIV

= ...

= ...

= ...

= ...

B. Appendix 2 - Matlab code

B.7.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Tetrahedron

function [Coord, Edof, Dof, f, bc, nodes] = DoTetrahedralGeometry(... levelHeights, sideElementWidth) %---------------------------------------------------------------------% PURPOSE % Build the tetrahedron geometry. % % INPUT % levelHeights = [h1, h2, ..., hn] [m] % sideElementWidth = value [m] % % OUTPUT % Coord = [x1, y1; x2, y2; ...; xn, yn] % Edof = Element degree of freedom matrix % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % nodes = Structure for the geometry % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

22 23 24 25 26 27 28 29 30 31

% Initialize nrOfLevels = length(levelHeights); accumulatedHeight = 0; nodeNr = 1; dofNr = 1; bcNr = 1; nedof = 6; nnodes = (8 * nrOfLevels + 4); ndof = nnodes * nedof;

32 33 34 35 36

% Pre dimensionlize f = zeros(ndof, 1); Coord = zeros(nnodes, 3); Dof = zeros(nnodes, nedof);

37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

% Create each layer for i = 0 : nrOfLevels - 1 for iz = 1 : 2 for iy = 1 : 4 for ix = 1 : 4 connections = []; noNode = 0; if iz == 1 % First level, base of tetrahedrals if ix == 1 && iy == 1 % 1 connections = [... nodeNr + 1, ... nodeNr + 2, ... nodeNr + 4

XXXV

B. Appendix 2 - Matlab code

]; elseif ix == 3 && iy == % 2 connections = [... nodeNr + 1, ... nodeNr + 2, ... nodeNr + 3, ... nodeNr + 4 ]; elseif ix == 2 && iy == % 3 connections = [... nodeNr + 1, ... nodeNr + 2, ... nodeNr + 3, ... nodeNr + 4, ... nodeNr + 5 ]; elseif ix == 4 && iy == % 4 connections = [... nodeNr + 2, ... nodeNr + 4 ]; else noNode = 1; end elseif iz == 2 % Middle level if ix == 2 && iy == 2 % 5 connections = [... nodeNr + 1, ... nodeNr + 2, ... nodeNr + 3, ... nodeNr + 4, ... nodeNr + 5 ]; elseif ix == 4 && iy == % 6 connections = [... nodeNr + 2, ... nodeNr + 4 ]; elseif ix == 1 && iy == % 7 connections = [... nodeNr + 1, ... nodeNr + 2, ... nodeNr + 3, ... nodeNr + 4 ]; elseif ix == 3 && iy == % 8 connections = [... nodeNr + 2, ...

53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108

XXXVI

1

3

3

2

4

4

B. Appendix 2 - Matlab code

nodeNr + 3, ... nodeNr + 4

109 110

];

111

else

112

noNode = 1; end else % Failsafe noNode = 1; end

113 114 115 116 117 118 119

if noNode == 0 % Boundary conditions if i == 0 && iz == 1 % Floor bc(bcNr, :) = [dofNr + 2, 0]; bcNr = bcNr + 1; end

120 121 122 123 124 125 126 127

% Set up node with connections, coordinates and dof node.x = (ix - 1) / 4 * sideElementWidth; node.y = (iy - 1) / 4 * sideElementWidth; node.z = accumulatedHeight + ... (iz - 1) / 2 * levelHeights(i + 1); node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); node.color = 'o blue';

128 129 130 131 132 133 134 135 136

Coord(nodeNr, :) = [node.x, node.y, node.z]; nodes(nodeNr) = node; Dof(nodeNr, :) = dofNr : dofNr + nedof - 1;

137 138 139 140

% Increase indication nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

141 142 143

end

144

end

145

end

146

end

147 148

accumulatedHeight = accumulatedHeight + ... levelHeights(i + 1);

149 150 151

end

152 153 154 155 156 157 158 159 160 161 162 163 164

% Set top level, where the load is applied for iy = 1 : 2 for ix = 1 : 4 connections = []; noNode = 0; if ix == 1 && iy == 1 % 9 connections = [... nodeNr + 1, ... nodeNr + 2 ]; elseif ix == 3 && iy == 1

XXXVII

B. Appendix 2 - Matlab code

% 10 connections = [... nodeNr + 1, ... nodeNr + 2 ]; elseif ix == 2 && iy == 2 % 11 connections = [nodeNr + 1]; elseif ix == 4 && iy == 2 % 12 connections = []; else noNode = 1; end

165 166 167 168 169 170 171 172 173 174 175 176 177 178 179

if noNode == 0 % Set applied load f(dofNr + 2) = 1;

180 181 182 183

% Set up node with connections, coordinates and dof node.x = (ix - 1) / 4 * sideElementWidth; node.y = (iy - 1) / 2 * sideElementWidth; node.z = sum(levelHeights); node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); node.color = 'o blue';

184 185 186 187 188 189 190 191

Coord(nodeNr, :) = [node.x, node.y, node.z]; nodes(nodeNr) = node; Dof(nodeNr, :) = dofNr : dofNr + nedof - 1;

192 193 194 195

% Increase indication nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

196 197 198

end

199

end

200 201

end

202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219

% Elements EdofNr = 1; elNr = 1; for i = 1:length(nodes) node = nodes(i); for j = 1:length(node.connections) connectNode = nodes(node.connections(j)); if i < node.connections(j) Edof(EdofNr,:) = [EdofNr node.dof connectNode.dof]; EdofNr = EdofNr + 1; element.connections = [i, node.connections(j)]; element.dof = [Dof(i,:),Dof(node.connections(j),:)]; Elements(elNr) = element; elNr = elNr + 1; end end end

220

XXXVIII

B. Appendix 2 - Matlab code

221 222

nrOfAppliedLoadNodes = sum(f); f = -f / nrOfAppliedLoadNodes;

223 224 225 226 227 228 229 230

% Dirchlet boundary conditions on all nodes nDof = length(Coord)*6; Dirchlet.x = 1 : 6 : nDof; Dirchlet.y = 2 : 6 : nDof; Dirchlet.rx = 4 : 6 : nDof; Dirchlet.ry = 5 : 6 : nDof; Dirchlet.rz = 6 : 6 : nDof;

231 232 233 234 235 236 237 238 239 240

% Append bc for i_bc = 1 : length(Dirchlet.x) bc_length = length(bc); bc(bc_length + 1, :) = [Dirchlet.x(i_bc), 0]; bc(bc_length + 2, :) = [Dirchlet.y(i_bc), 0]; bc(bc_length + 3, :) = [Dirchlet.rx(i_bc), 0]; bc(bc_length + 4, :) = [Dirchlet.ry(i_bc), 0]; bc(bc_length + 5, :) = [Dirchlet.rz(i_bc), 0]; end

241 242

end

B.7.3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Cellulose

function [Coord, Edof, Dof, f, bc, nodes] = ... DoCellularGeometry(levels, sideElementWidth) %---------------------------------------------------------------------% PURPOSE % Build the cellulose geometry. % % INPUT % levelHeights = [h1, h2, ..., hn] [m] % sideElementWidth = value [m] % % OUTPUT % Coord = [x1, y1; x2, y2; ...; xn, yn] % Edof = Element degree of freedom matrix % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % nodes = Structure for the geometry % %---------------------------------------------------------------------% Created by Alexander Olsson %----------------------------------------------------------------------

22 23 24 25 26 27 28 29

% Initialize columns = 2; rows = 2; level = 2*length(levels); nodeNr = 1; dofNr = 1; bcNr = 1;

XXXIX

B. Appendix 2 - Matlab code

30 31

nedof = 6; ndof = (rows - 1)*(columns - 1)*level * 8 * 6;

32 33 34

f = zeros(ndof,1); accumulatedHeight = 0;

35 36 37 38 39 40 41 42

% Construct nodes for i = 0 : level if mod(i, 2) == startX = 0; for l = 0 : for j = for

43 44 45 46 47 48 49 50 51

52 53 54

55 56 57 58 59 60

61 62 63

64 65 66 67 68 69 70 71

72 73 74

75 76 77 78 79

XL

1 0 1 0 : columns - 1 k = 0 : rows - 1 connections = []; % Boundaries if j == 0 % Left if k == 0 % Bottom, j == 0 if l == 0 if i == 0 connections = [nodeNr + 1, nodeNr + ... rows, nodeNr + columns * rows]; else connections = [nodeNr + 1, nodeNr + ... rows * columns]; end else % l == 1; if i < level - 1 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else connections = [nodeNr + 1, nodeNr + ... rows]; end end elseif k == rows - 1 % Top, j == 0 if l == 0 if i == 0 connections = [nodeNr + rows, nodeNr ... + columns * rows]; else connections = nodeNr + columns * rows; end else % l == 1; if i < level - 1 connections = nodeNr + columns *

B. Appendix 2 - Matlab code

rows; else

80

connections = nodeNr + rows;

81

end

82 83

end

84 85 86 87 88 89 90

91

92 93

94 95 96 97 98 99

100 101 102

103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118

119 120 121 122 123 124

else % Middle, j == 0 connections = nodeNr + 1; if l == 0 if i == 0 connections = [connections, nodeNr ... + rows, nodeNr + columns * rows ]; else connections = [connections, nodeNr + ... columns * rows]; end else % l == 1, j == 0 if i < level-1 connections = [connections, nodeNr + ... columns * rows]; else connections = [connections, nodeNr + ... rows]; end end end elseif j == columns - 1 % j == columns - 1 % Right side if k ~= rows-1 % Top, j == columns - 1 if l == 0 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else % l == 1; if i < level - 1 connections = [nodeNr + 1,nodeNr + ... rows * columns - rows, ... nodeNr + columns * rows]; else connections = nodeNr + 1; end end

125 126 127 128

else if l == 0 connections = nodeNr + rows * columns;

XLI

B. Appendix 2 - Matlab code

else

129

if i < level - 1 connections = [nodeNr + columns * ... rows - rows, nodeNr + rows * ... columns]; else % No more connections end

130 131

132

133 134 135 136

end

137

end

138

else

139

% Middle columns if k ~= rows - 1 % top, j == columns - 1 if l == 0 if i == 0 connections = [nodeNr + 1, nodeNr + ... rows, nodeNr + columns * rows]; else connections = [nodeNr + 1, nodeNr + ... columns * rows]; end

140 141 142 143 144

145 146 147

148 149 150

else

151

% l == 1; if i < level - 1 connections = [nodeNr + 1, nodeNr + ... rows * columns - rows, nodeNr + ... columns * rows]; else connections = [nodeNr + 1, nodeNr + ... rows]; end

152 153 154

155

156 157 158

159 160

end

161 162

else % Top row in middle columns if l == 0 if i == 0 connections = [nodeNr + rows * ... columns, nodeNr + rows]; else connections = nodeNr + rows * columns; end else if i < level - 1 connections = [nodeNr + columns * ... rows - rows, nodeNr + rows *

163 164 165 166 167 168 169 170

171 172 173 174

175

XLII

B. Appendix 2 - Matlab code

... columns];

176

else

177

connections = nodeNr + rows;

178

end

179

end

180

end

181

end

182 183

% Boundary conditions if i == 0 bc(bcNr, :) = [dofNr + 2, 0]; bcNr = bcNr + 1; end

184 185 186 187 188 189

% Applied load if i == level - 1 f(dofNr + 2) = 1; end

190 191 192 193

% Fz

194

levelHeight = levels(ceil((i + 1) / 2)) / 2;

195 196

%Set up the node with coordinates and dof node.y = sideElementWidth * k; node.x = j * sideElementWidth + startX; node.z = accumulatedHeight + l * levelHeight; node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); Dof(nodeNr,:) = dofNr : dofNr + nedof - 1; node.color = 'o blue'; Coord(nodeNr,:) = [node.x, node.y, node.z]; nodes(nodeNr) = node; nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

197 198 199 200 201 202 203 204 205 206 207 208 209

end

210 211 212 213 214

215 216 217 218 219 220 221 222 223 224 225 226 227 228 229

end end else %------------------------ Next plane -----------------------------% startX = sideElementWidth / 2; for l = 0 : 1 for j = 0 : columns - 1 for k = 0 : rows - 1 connections = []; % Boundaries if j == 0 % Left if k == 0 % Bottom, j == 0 if l == 0 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else if i < level - 1

XLIII

B. Appendix 2 - Matlab code

connections = [nodeNr + 1, nodeNr + ... rows * columns, nodeNr + rows + ... rows * columns];

230

231

232

else

233

connections = [nodeNr + 1, nodeNr + ... rows];

234

235

end end elseif k == rows - 1 % Top, j == 0 if l == 0 connections = nodeNr + columns * rows; else if i < level - 1 connections = [nodeNr + rows * ... columns, nodeNr + rows + rows * ... columns]; else connections = nodeNr + rows; end end

236 237 238 239 240 241 242 243 244 245

246 247 248 249 250 251

else % Middle, j == 0 if l == 0 connections =[nodeNr + 1, nodeNr + ... columns * rows]; else % l == 1, j == 0 if i < level - 1 connections = [nodeNr + 1, nodeNr + ... columns * rows, nodeNr + ... columns * rows + rows]; else connections = [nodeNr + 1, ... nodeNr + rows]; end end end elseif j == columns - 1 % Right side if k == 0 % Bottom if l == 0 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else if i < level - 1 connections = [nodeNr + 1, nodeNr + ... columns * rows];

252 253 254 255 256 257 258 259 260

261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278

279

XLIV

B. Appendix 2 - Matlab code

else

280

connections = nodeNr + 1;

281

end

282

end elseif k == rows - 1 % Top, j == columns-1 if l == 0 connections = nodeNr + columns * rows; else if i < level - 1 connections = nodeNr + rows * columns; else % We are at the top and have no further % connections end end else % Middle rows in j == columns-1 if l == 0 connections = [nodeNr + 1, nodeNr + rows ... * columns]; else if i < level - 1 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else connections = nodeNr + 1; end end end

283 284 285 286 287 288 289 290

291 292

293 294 295 296 297 298 299

300 301 302 303

304 305 306 307 308 309 310 311 312 313 314 315 316 317 318

319

320 321 322

323 324 325 326 327 328

else % Middle columns if k ~= rows - 1 if l == 0 connections = [nodeNr + 1, nodeNr + ... rows * columns]; else if i < level - 1 connections = [nodeNr + 1, nodeNr + ... rows * columns, nodeNr + rows * ... columns + rows]; else connections = [nodeNr + 1, nodeNr + ... rows]; end end else % We are in top row in middle columns if l == 0

XLV

B. Appendix 2 - Matlab code

connections = nodeNr + rows * columns; else % l== 1 in middle columns top row if i < level - 1 connections = [nodeNr + columns * ... rows, nodeNr + columns * rows ... + rows]; else connections = nodeNr + rows; end end

329 330 331 332 333

334

335 336 337 338 339

end

340

end

341 342

% Applied load if i == level - 1 f(dofNr + 2) = 1; % Fz end levelHeight = levels(ceil((i + 1) / 2)) / 2;

343 344 345 346 347 348

% Set up the node with coordinates and dof node.y = sideElementWidth * k; node.x = j * sideElementWidth + startX; node.z = accumulatedHeight + l * levelHeight; node.dof = dofNr : dofNr + 5; Dof(nodeNr,:) = dofNr : dofNr + 5; node.color = 'o red'; Coord(nodeNr,:) = [node.x ,node.y, node.z]; node.connections = sort(connections); nodes(nodeNr) = node; nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

349 350 351 352 353 354 355 356 357 358 359 360

end

361

end

362 363 364 365

366 367 368 369 370 371 372 373 374 375 376 377 378 379

end end accumulatedHeight = accumulatedHeight + levels(ceil((i + 1) / 2)) /2; end EdofNr = 1; for i = 1 : length(nodes) node = nodes(i); for j = 1 : length(node.connections) connectNode = nodes(node.connections(j)); if i < node.connections(j) Edof(EdofNr, :) = [EdofNr node.dof connectNode.dof]; EdofNr = EdofNr + 1; element.connections = [i, node.connections(j)]; element.dof = [Dof(i, :), Dof(node.connections(j), :)]; end end end

380 381

% Force

XLVI

B. Appendix 2 - Matlab code

382 383

nrOfAppliedLoadNodes = sum(f); f = -f / nrOfAppliedLoadNodes;

384 385 386 387 388 389 390 391

% Dirchlet bouncary condition nDof = length(Coord)*6; Dirchlet.x = 1 : 6 : nDof; Dirchlet.y = 2 : 6 : nDof; Dirchlet.rx = 4 : 6 : nDof; Dirchlet.ry = 5 : 6 : nDof; Dirchlet.rz = 6 : 6 : nDof;

392 393 394 395 396 397 398 399 400 401

% Append bc for i_bc = 1 : length(Dirchlet.x) bc_length = length(bc); bc(bc_length + 1, :) = [Dirchlet.x(i_bc), 0]; bc(bc_length + 2, :) = [Dirchlet.y(i_bc), 0]; bc(bc_length + 3, :) = [Dirchlet.rx(i_bc), 0]; bc(bc_length + 4, :) = [Dirchlet.ry(i_bc), 0]; bc(bc_length + 5, :) = [Dirchlet.rz(i_bc), 0]; end

B.7.4

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Pyramid

function [Coord, Edof, Dof, f, bc, nodes] = DoPyramidGeometry(... levelHeights, sideElementWidth) %---------------------------------------------------------------------% PURPOSE % Build the pyramid geometry. % % INPUT % levelHeights = [h1, h2, ..., hn] [m] % sideElementWidth = value [m] % % OUTPUT % Coord = [x1, y1; x2, y2; ...; xn, yn] % Edof = Element degree of freedom matrix % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % nodes = Structure for the geometry % %---------------------------------------------------------------------% Created by Mattias Naarttijarvi %----------------------------------------------------------------------

22 23 24 25 26 27 28 29 30 31

% Initialize nrOfLevels = length(levelHeights); accumulatedHeight = 0; nodeNr = 1; dofNr = 1; bcNr = 1; nedof = 6; nnodes = (9 * nrOfLevels + 4);

XLVII

B. Appendix 2 - Matlab code

32

ndof = nnodes * nedof;

33 34 35 36 37

% Pre dimensionlize f = zeros(ndof, 1); Coord = zeros(nnodes, 3); Dof = zeros(nnodes, nedof);

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87

% Create each layer for i = 0 : nrOfLevels - 1 for iz = 1 : 2 for iy = 1 : 3 for ix = 1 : 3 connections = []; noNode = 0; if iz == 1 % Square level, base of pyramid if iy == 1 && ix == 1 % First corner connections = [ ... nodeNr + 1, ... % Next corner nodeNr + 2, ... % Previous corner nodeNr + 6, ... % Center of next level nodeNr + 4]; % Diagonal beam elseif iy == 1 && ix == 3 % Second corner connections = [ ... nodeNr + 2, ... % Next corner nodeNr + 5, ... % Center of next level nodeNr + 6]; % Diagonal beam elseif iy == 3 && ix == 1 % Third corner connections = [ ... nodeNr + 1, ... % Next corner nodeNr + 4, ... % Center of next level nodeNr + 3]; % Diagonal beam elseif iy == 3 && ix == 3 % Forth corner connections = [ ... nodeNr + 3, ... % Center of next level nodeNr + 5]; % Diagonal beam else noNode = 1; end elseif iz == 2 % Middle level, top of pyramid if iy == 1 && ix == 2 connections = [nodeNr + 6]; elseif iy == 2 && ix == 1 connections = [nodeNr + 4]; elseif iy == 2 && ix == 2 % Center node connections = [... nodeNr + 3, ... nodeNr + 4, ... nodeNr + 5, ... nodeNr + 6];

XLVIII

B. Appendix 2 - Matlab code

elseif iy == 2 && connections = elseif iy == 3 && connections = else noNode = 1; end else noNode = 1; end

88 89 90 91 92 93 94 95 96 97

ix == 3 [nodeNr + 5]; ix == 2 [nodeNr + 3];

98

if noNode == 0 % Boundary conditions if i == 0 && iz == 1 % Floor bc(bcNr, :) = [dofNr + 2, 0]; bcNr = bcNr + 1; end if ix ~= 2 && iy ~= 2 % Dirchlet boundary conditions at edge nodes bc(bcNr, :) = [dofNr, 0]; bc(bcNr + 1, :) = [dofNr + 1, 0]; bc(bcNr + 2, :) = [dofNr + 3, 0]; bc(bcNr + 3, :) = [dofNr + 4, 0]; bc(bcNr + 4, :) = [dofNr + 5, 0]; bcNr = bcNr + 5; end

99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115

% Set up node with connections, coordinates and dof node.x = (ix - 1) / 2 * sideElementWidth; node.y = (iy - 1) / 2 * sideElementWidth; node.z = accumulatedHeight + ... (iz - 1) / 2 * levelHeights(i + 1); node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); node.color = 'o blue';

116 117 118 119 120 121 122 123 124

Coord(nodeNr, :) = [node.x, node.y, node.z]; nodes(nodeNr) = node; Dof(nodeNr, :) = dofNr : dofNr + nedof - 1;

125 126 127 128

% Increase indication nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

129 130 131

end

132

end

133

end

134

end

135 136

accumulatedHeight = accumulatedHeight + ... levelHeights(i + 1);

137 138 139

end

140 141 142 143

% Set top level, where the load is applied for iy = 1 : 2 for ix = 1 : 2

XLIX

B. Appendix 2 - Matlab code

connections = []; if ix == 1 && iy == 1 % First corner connections = [... nodeNr + 1, ... nodeNr + 2]; elseif ix == 1 && iy == 2 connections = [nodeNr + 1]; elseif ix == 2 && iy == 1 connections = [nodeNr + 2]; end

144 145 146 147 148 149 150 151 152 153 154 155

% Dirchlet boundary conditions at edge nodes bc(bcNr, :) = [dofNr, 0]; bc(bcNr + 1, :) = [dofNr + 1, 0]; bc(bcNr + 2, :) = [dofNr + 3, 0]; bc(bcNr + 3, :) = [dofNr + 4, 0]; bc(bcNr + 4, :) = [dofNr + 5, 0]; bcNr = bcNr + 5;

156 157 158 159 160 161 162 163 164

% Set applied load f(dofNr + 2) = 1;

165 166 167

% Set up node with connections, coordinates and dof node.x = (ix - 1) * sideElementWidth; node.y = (iy - 1) * sideElementWidth; node.z = sum(levelHeights); node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); node.color = 'o blue';

168 169 170 171 172 173 174 175

Coord(nodeNr, :) = [node.x, node.y, node.z]; nodes(nodeNr) = node; Dof(nodeNr, :) = dofNr : dofNr + nedof - 1;

176 177 178 179

% Increase indication nodeNr = nodeNr + 1; dofNr = dofNr + nedof;

180 181 182

end

183 184

end

185 186 187 188 189 190 191 192 193 194 195 196 197 198 199

% Elements EdofNr = 1; elNr = 1; for i = 1:length(nodes) node = nodes(i); for j = 1:length(node.connections) connectNode = nodes(node.connections(j)); if i < node.connections(j) Edof(EdofNr,:) = [EdofNr node.dof connectNode.dof]; Edof2(EdofNr,:) = [i,node.connections(j)]; EdofNr = EdofNr + 1; element.connections = [i, node.connections(j)]; element.dof = [Dof(i,:),Dof(node.connections(j),:)];

L

B. Appendix 2 - Matlab code

Elements(elNr) = element; elNr = elNr + 1;

200 201

end

202

end

203 204

end

205 206 207 208

% Force nrOfAppliedLoadNodes = sum(f); f = -f / nrOfAppliedLoadNodes;

209 210

end

B.7.5

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Cube

function [Coord, Edof, Dof, f, bc, nodes] = ... DoCubeGeometry(levelHeights, sideElementWidth) %---------------------------------------------------------------------% PURPOSE % Build the cube geometry. % % INPUT % levelHeights = [h1, h2, ..., hn] [m] % sideElementWidth = value [m] % % OUTPUT % Coord = [x1, y1; x2, y2; ...; xn, yn] % Edof = Element degree of freedom matrix % Dof = Degree of freedom % f = Force vector % bc = Boundary condition vector % nodes = Structure for the geometry % %---------------------------------------------------------------------% Created by Alexander Olsson %----------------------------------------------------------------------

22 23 24 25 26 27 28 29 30 31 32 33 34

% Initialize columns = 2; rows = 2; level = length(levelHeights); levelH = [0 levelHeights']; nodeNr = 1; dofNr = 1; bcNr = 1; nedof = 6; nnodes = rows * columns * (level + 1); ndof = nnodes * 6; accumulatedHeight = 0;

35 36 37 38 39

% Pre dimensionlize f = zeros(ndof, 1); Coord = zeros(nnodes, 3); Dof = zeros(nnodes, nedof);

40

LI

B. Appendix 2 - Matlab code

41 42 43 44 45 46 47 48 49 50

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

for i = 1 : level + 1 for j = 0 : columns - 1 for k = 0 : rows - 1 connections = []; % Left if j == 0 % Bottom if k == 0 if i ~= level + 1 connections = [nodeNr + 1, nodeNr + rows, ... nodeNr + columns * rows]; else connections = [nodeNr + 1, nodeNr + rows]; end % Top elseif k == rows - 1 if i ~= level + 1 connections = [nodeNr + rows, nodeNr + ... columns * rows]; else connections = nodeNr + rows; end end % Right elseif j == columns - 1 % Bottom if k == 0 if i ~= level + 1 connections = [nodeNr + 1, nodeNr + ... columns * rows]; else connections = nodeNr + 1; end % Top elseif k == rows - 1 if i ~= level + 1 connections = nodeNr + columns * rows; end end end

81

% Applied force if i == level + 1 f(dofNr + 2, :) = 1; end

82 83 84 85 86

% Set up the node with coordinates and dof node.y = sideElementWidth * k; node.x = j * sideElementWidth; node.z = accumulatedHeight + levelH(i); node.dof = dofNr : dofNr + nedof - 1; node.connections = sort(connections); Dof(nodeNr, :) = dofNr : dofNr + nedof - 1; Coord(nodeNr, :) = [node.x, node.y, node.z]; nodes(nodeNr) = node;

87 88 89 90 91 92 93 94 95

LII

B. Appendix 2 - Matlab code

nodeNr = nodeNr + 1;

96 97

% Boundary conditions if i == 1 bc(bcNr, :) = [dofNr 0]; bc(bcNr + 1, :) = [dofNr + 1 0]; bc(bcNr + 2, :) = [dofNr + 2 0]; bcNr = bcNr + 3; else bc(bcNr, :) = [dofNr 0]; bc(bcNr + 1, :) = [dofNr + 1 0]; bcNr = bcNr + 2; end dofNr = dofNr + nedof;

98 99 100 101 102 103 104 105 106 107 108 109

end end accumulatedHeight = accumulatedHeight + levelH(i);

110 111 112 113

end

114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

% Elements EdofNr = 1; for i = 1:length(nodes) node = nodes(i); for j = 1:length(node.connections) connectNode = nodes(node.connections(j)); if i < node.connections(j) Edof(EdofNr,:) = [EdofNr node.dof connectNode.dof]; EdofNr = EdofNr + 1; element.connections = [i, node.connections(j)]; element.dof = [Dof(i,:),Dof(node.connections(j),:)]; end end end

129 130 131 132 133

% Force nrOfAppliedLoadNodes = sum(f); f = -f / nrOfAppliedLoadNodes; end

B.8 B.8.1

1 2 3 4 5 6 7 8 9 10

Plot and store data Generate plot

function fig = PlotFactory(x, y, startIndex, endIndex) %---------------------------------------------------------------------% PURPOSE % Plots a 2D graph of desired test data for global test structure. % % Value on axis % 1 = Mass, 2 = Energy_s, 3 = Width, 4 = Number of unit cells, % 5 = Height factor, 6 = Max load % 7 = Geometry, 8 = Buckled unit cells, 9 = Radius, % 10 = Specific energy absorption, 11 = Energy absorption

LIII

B. Appendix 2 - Matlab code

11 12 13 14 15 16 17 18 19 20 21 22 23

% % INPUT % x = value on x axis % y = value on y axis % startIndex = Test number to start with, 0 if first % endIndex = Test number to start with, 0 is last % % OUTPUT % fig = The figure % %---------------------------------------------------------------------% Created by Mattias Naarttijarvi %----------------------------------------------------------------------

24 25 26 27

global mainData testStructure plotMode; acceptFailure = plotMode.acceptFailure; figureNr = plotMode.figureNr;

28 29 30 31

if (startIndex == 0) startIndex = 1; end

32 33 34 35 36 37 38 39 40

fig = figure(figureNr); for i_test = 1:length(testStructure) % Tetrahedral if (testStructure(i_test) == 1) tetrahedronPassed.x = []; tetrahedronPassed.y = []; tetrahedronFailed.x = []; tetrahedronFailed.y = [];

41

if (endIndex == 0) endIndex = length(mainData.tetrahedral(:, x)); end

42 43 44 45

for i = startIndex : endIndex if (mainData.tetrahedral(i, 6) == 0) % Failed tests if (acceptFailure == 1) tetrahedronFailed.x = [tetrahedronFailed.x, ... mainData.tetrahedral(i, x)]; tetrahedronFailed.y = [tetrahedronFailed.y, ... mainData.tetrahedral(i, y)]; end else % Passed tests tetrahedronPassed.x = [tetrahedronPassed.x, ... mainData.tetrahedral(i, x)]; tetrahedronPassed.y = [tetrahedronPassed.y, ... mainData.tetrahedral(i, y)]; end end

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

% Create the plots if ~isempty(tetrahedronPassed.x) plot(tetrahedronPassed.x, tetrahedronPassed.y, 'bo');

64 65 66

LIV

B. Appendix 2 - Matlab code

hold on; end if ~isempty(tetrahedronFailed.x) plot(tetrahedronFailed.x, tetrahedronFailed.y, 'b*'); hold on; end

67 68 69 70 71 72 73

end

74 75 76 77 78 79 80

% Cellulose if (testStructure(i_test) == 2) cellulosePassed.x = []; cellulosePassed.y = []; celluloseFailed.x = []; celluloseFailed.y = [];

81

if (endIndex == 0) endIndex = length(mainData.cellulose(:, x)); end

82 83 84 85

for i = startIndex : endIndex if (mainData.cellulose(i, 6) == 0) % Failed tests if (acceptFailure == 1) celluloseFailed.x = [celluloseFailed.x, ... mainData.cellulose(i, x)]; celluloseFailed.y = [celluloseFailed.y, ... mainData.cellulose(i, y)]; end else % Passed tests cellulosePassed.x = [cellulosePassed.x, ... mainData.cellulose(i, x)]; cellulosePassed.y = [cellulosePassed.y, ... mainData.cellulose(i, y)]; end end

86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103

% Create the plots if ~isempty(cellulosePassed.x) plot(cellulosePassed.x, cellulosePassed.y, 'bo'); hold on; end if ~isempty(celluloseFailed.x) plot(celluloseFailed.x, celluloseFailed.y, 'b*'); hold on; end

104 105 106 107 108 109 110 111 112 113

end

114 115 116 117 118 119 120

% Pyramid if (testStructure(i_test) == 3) pyramidPassed.x = []; pyramidPassed.y = []; pyramidFailed.x = []; pyramidFailed.y = [];

121 122

if (endIndex == 0)

LV

B. Appendix 2 - Matlab code

endIndex = length(mainData.pyramid(:, x));

123

end

124 125

for i = startIndex : endIndex if (mainData.pyramid(i, 6) == 0) % Failed tests if (acceptFailure == 1) pyramidFailed.x = [pyramidFailed.x, ... mainData.pyramid(i, x)]; pyramidFailed.y = [pyramidFailed.y, ... mainData.pyramid(i, y)]; end else % Passed tests pyramidPassed.x = [pyramidPassed.x, ... mainData.pyramid(i, x)]; pyramidPassed.y = [pyramidPassed.y, ... mainData.pyramid(i, y)]; end end

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143

% Create the plots if ~isempty(pyramidPassed.x) plot(pyramidPassed.x, pyramidPassed.y, 'bo'); hold on; end if ~isempty(pyramidFailed.x) plot(pyramidFailed.x, pyramidFailed.y, 'b*'); hold on; end

144 145 146 147 148 149 150 151 152

end

153 154

% Cube if (testStructure(i_test) == 4) cubePassed.x = []; cubePassed.y = []; cubeFailed.x = []; cubeFailed.y = [];

155 156 157 158 159 160 161

if (endIndex == 0) endIndex = length(mainData.cube(:, x)); end

162 163 164 165

for i = startIndex : endIndex if (mainData.cube(i, 6) == 0) % Failed tests if (acceptFailure == 1) cubeFailed.x = [cubeFailed.x, ... mainData.cube(i, x)]; cubeFailed.y = [cubeFailed.y, ... mainData.cube(i, y)]; end else % Passed tests cubePassed.x = [cubePassed.x, ... mainData.cube(i, x)];

166 167 168 169 170 171 172 173 174 175 176 177 178

LVI

B. Appendix 2 - Matlab code

cubePassed.y = [cubePassed.y, ... mainData.cube(i, y)];

179 180

end

181

end

182 183

% Create the plots if ~isempty(cubePassed.x) plot(cubePassed.x, cubePassed.y, 'bo'); hold on; end if ~isempty(cubeFailed.x) plot(cubeFailed.x, cubeFailed.y, 'b*'); hold on; end

184 185 186 187 188 189 190 191 192

end

193 194

end

195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234

% Set axis labels switch x case 1 xlabel('Mass [kg]'); case 2 xlabel('Energy absorption from sigma - epsilon [J/kg]'); case 3 xlabel('Width [m]'); case 4 xlabel('Number of unit cells'); case 5 xlabel('Height factor'); case 6 xlabel('Max load [F]'); case 7 xlabel('Geometry'); case 8 xlabel('Buckled unit cells'); case 9 xlabel('Beam radius [m]') case 10 xlabel('Specific energy absorption [J/kg]') case 11 xlabel('Energy absorption [J]') end switch y case 1 ylabel('Mass [kg]'); case 2 ylabel('Energy absorption from sigma - epsilon [J/kg]'); case 3 ylabel('Width [m]'); case 4 ylabel('Number of unit cells'); case 5 ylabel('Height factor'); case 6 ylabel('Max load [F]'); case 7

LVII

B. Appendix 2 - Matlab code

ylabel('Geometry'); case 8 ylabel('Buckled unit cells'); case 9 ylabel('Beam radius [m]') case 10 ylabel('Specific energy absorption [J/kg]') case 11 ylabel('Energy absorption [J]')

235 236 237 238 239 240 241 242 243 244

end

245 246 247 248 249 250 251 252 253

254 255 256 257 258 259 260

% Legend figure(figureNr) grid on; if (max(testStructure == 1) == 1 && length(testStructure) == 1) % Tetrahedron if ~isempty(tetrahedronPassed.x) && ~isempty(tetrahedronFailed.x) % Both passed and failed legend('Tetrahedron', 'Tetrahedron failed', 'location', ' northoutside') elseif ~isempty(tetrahedronPassed.x) % Only passed legend('Tetrahedron', 'location', 'northoutside') elseif ~isempty(tetrahedronFailed.x) % Only failed legend('Tetrahedron failed', 'location', 'northoutside') end

261 262 263 264 265 266

267 268 269 270 271 272 273

elseif (max(testStructure == 2) == 1 && length(testStructure) == 1) % Cellulose if ~isempty(cellulosePassed.x) && ~isempty(celluloseFailed.x) % Both passed and failed legend('Cellulose', 'Cellulose failed', 'location', ' northoutside') elseif ~isempty(cellulosePassed.x) % Only passed legend('Cellulose', 'location', 'northoutside') elseif ~isempty(celluloseFailed.x) % Only failed legend('Cellulose failed', 'location', 'northoutside') end

274 275 276 277 278 279 280 281 282 283 284 285 286

elseif (max(testStructure == 3) == 1 && length(testStructure) == 1) % Pyramid if ~isempty(pyramidPassed.x) && ~isempty(pyramidFailed.x) % Both passed and failed legend('Pyramid', 'Pyramid failed', 'location', 'northoutside') elseif ~isempty(pyramidPassed.x) % Only passed legend('Pyramid', 'location', 'northoutside') elseif ~isempty(pyramidFailed.x) % Only failed legend('Pyramid failed', 'location', 'northoutside') end

287 288

elseif (max(testStructure == 4) == 1 && length(testStructure) == 1)

LVIII

B. Appendix 2 - Matlab code

289 290 291 292 293 294 295 296 297 298 299 300 301

% Cube if ~isempty(cubePassed.x) && ~isempty(cubeFailed.x) % Both passed and failed legend('Cube', 'Cube failed', 'location', 'northoutside') elseif ~isempty(cubePassed.x) % Only passed legend('Cube', 'location', 'northoutside') elseif ~isempty(celluloseFailed.x) % Only failed legend('Cube failed', 'location', 'northoutside') end end set(gca, 'fontsize', 18)

302 303 304

plotMode.figureNr = figureNr + 1; end

B.8.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Plot geometry

function fig = PlotGeometry(chosenStructure, w, N, hf) %---------------------------------------------------------------------% PURPOSE % Plot a 3D figure of the structure % % INPUT % chosenStructure = Value 1 to 4 % w = value Unit cell width [m] % N = value Number of unit cells % hf = value Height factor % % % OUTPUT % fig = The figure % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

19 20

global plotMode height

21 22 23

% Set each level height levelHeights = DescribeLevelHeight(hf, N, height);

24 25 26 27 28 29 30

% Mass of the system [Coord, Edof, Dof, ~, ~, ~] = buildGeometry(... levelHeights, ... w, ... chosenStructure); [Ex, Ey, Ez] = coordxtr(Edof, Coord, Dof, 2);

31 32 33 34 35

% Structure and deformed mesh of best solution plotMode.figureNr = plotMode.figureNr + 1; fig = figure(plotMode.figureNr); eldraw3(Ex, Ey, Ez, [1 1 0]), hold on;

LIX

B. Appendix 2 - Matlab code

36 37 38

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

grid on; set(gca, 'fontsize', 18) end

function PlotStructure(Ex, Ey, Ez, Edof, a) %---------------------------------------------------------------------% PURPOSE % Plot a 3D figure of the structure with displacement % % INPUT % Ex = x coordinates % Ey = y coordinates % Ez = z coordinates % Edof = Element degree of freedom % a = Displacement vector % %---------------------------------------------------------------------% Created by Alexander Olsson & Mattias Naarttijarvi %----------------------------------------------------------------------

16 17 18

% Draw the structure eldraw3(Ex, Ey, Ez);

19 20 21 22 23

% Extract element displacement and display deformed mesh Ed = extract(Edof, a); eldisp3(Ex, Ey, Ez, Ed, [2 4 1]); end

B.8.3

1 2 3 4 5 6 7 8

9 10 11 12 13 14 15 16 17 18 19 20 21 22

Store data

function StoreData(m, e, w, N, hf, f, b, r, e_F, testNr, testStructure) %---------------------------------------------------------------------% PURPOSE % Store data into global mainData structure. % % INPUT % m = value Mass [kg] % e = value Energy absorption sigma - eps. [J ] % w = value Unit cell width [m] % N = value Number of unit cells % hf = value Height factor % f = value Max load [N] % b = value Number of buckled unit cells % r = value Beam radius [m] % e_F = value Energy absorption F - delta [J] % testNr = value Test identification number % testStructure = value 1 - 4 % %---------------------------------------------------------------------% Created by Alexander Olsson %---------------------------------------------------------------------global mainData

LX

B. Appendix 2 - Matlab code

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

% Store data and results if testStructure == 1 % 1 = tetrahedral mainData.tetrahedral(testNr,1) = m; mainData.tetrahedral(testNr,2) = e; mainData.tetrahedral(testNr,3) = w; mainData.tetrahedral(testNr,4) = N; mainData.tetrahedral(testNr,5) = hf; mainData.tetrahedral(testNr,6) = f; mainData.tetrahedral(testNr,7) = 1; mainData.tetrahedral(testNr,8) = b; mainData.tetrahedral(testNr,9) = r; mainData.tetrahedral(testNr,10) = e_F / m; mainData.tetrahedral(testNr,11) = e_F;

38 39 40 41 42 43 44 45 46 47 48 49 50 51

elseif testStructure == 2 % 2 = cellulose mainData.cellulose(testNr,1) = m; mainData.cellulose(testNr,2) = e; mainData.cellulose(testNr,3) = w; mainData.cellulose(testNr,4) = N; mainData.cellulose(testNr,5) = hf; mainData.cellulose(testNr,6) = f; mainData.cellulose(testNr,7) = 2; mainData.cellulose(testNr,8) = b; mainData.cellulose(testNr,9) = r; mainData.cellulose(testNr,10) = e_F / m; mainData.cellulose(testNr,11) = e_F;

52 53 54 55 56 57 58 59 60 61 62 63 64 65

elseif testStructure == 3 % 3 = pyramid mainData.pyramid(testNr,1) = m; mainData.pyramid(testNr,2) = e; mainData.pyramid(testNr,3) = w; mainData.pyramid(testNr,4) = N; mainData.pyramid(testNr,5) = hf; mainData.pyramid(testNr,6) = f; mainData.pyramid(testNr,7) = 3; mainData.pyramid(testNr,8) = b; mainData.pyramid(testNr,9) = r; mainData.pyramid(testNr,10) = e_F / m; mainData.pyramid(testNr,11) = e_F;

66 67 68 69 70 71 72 73 74 75 76 77 78

elseif testStructure == 4 % 4 = cube mainData.cube(testNr,1) = m; mainData.cube(testNr,2) = e; mainData.cube(testNr,3) = w; mainData.cube(testNr,4) = N; mainData.cube(testNr,5) = hf; mainData.cube(testNr,6) = f; mainData.cube(testNr,7) = 3; mainData.cube(testNr,8) = b; mainData.cube(testNr,9) = r; mainData.cube(testNr,10) = e_F / m;

LXI

B. Appendix 2 - Matlab code

mainData.cube(testNr,11) = e_F;

79 80 81

end end

LXII