Programming project

The programming project is a mandatory exercise which you will have to do in order to take the exam. It will count 35% towards your final grade. The project is split into two parts: The first part consists of 4 tasks, and you are required to do all of them. The second part is released later and will be required to do only one of these.

You are to hand in a written report (8 pages) as well as hold a short (~10min) presentation.

The teaching assistant will be available on all Thursdays in Nullrommet from 14:15 to 16:00.

Presentation

The schedule for the presentations is as follows (Note that the Thursday session is in B22 in Berg (Map)).

We will provide a laptop for use during the presentations. However, if you plan to show videos, we strongly recommend that you bring a computer which you know they will play on.

Wednesday 19.11 10:15-12:00 Place: S2

  1. Monica Plassen / Vanje Kjær
  2. Knut Kleppestø / Mats Rognved
  3. Abdullah Abdulhaque / Sondre Galtung
  4. Jon Halvorsen / Elisabeth Hasund
  5. Luis Peréz
  6. Anders Kjelsbøl / Stine Vennemo
  7. Maxime Conard / Daniel Osen

Thursday 20.11 14:15-16:00 Place: B22

  1. Trygve Aune / Sindre Eskeland
  2. Fredrik Johannesen
  3. David Kleiven / Anette Morken
  4. Morten Lysgaard
  5. Pål Engen / Olav Haugå / Alexander Sigurdsson

Project Description

Errata

* 24.10: There was an error in the note on elasticity. The corrected verion is here. The changes are marked in red.

* 13.11: There was a bug in the eigenmode part of writeVTF2.m. The new version is found below. If you're unsure if you have the new version, check the "last edit" date at the end of the comments.

Access to Nullrommet

Nullrommet (room 380A) is located on floor 3, Nordre Lavblokk. Map.

Access to Nullrommet is restricted. If you do not currently have access, please send an email to geir.bogfjellmo(at)math.ntnu.no with your name, NTNU-username and student card number to gain access.

News

NB! The deadline for the project is Monday November 17, kl. 16:00. The material should be sent by email to Geir [dot] Bogfjellmo [at] math [dot] ntnu [dot] no. The submission should consist of:

  • The report as one pdf-file, max 8 pages total.
  • One zip-file file with all the matlab code. You can also include other material, videos etc. if you like, but this is not required.

The schedule for the presentations will be posted here Monday evening.

Linear Elasticity

You can find more reading material on continuum mechanics in these chapters taken from the book "Continum Mechanics" by George E. Mase

  • Strain - Chapter 3, introduction to strain
  • Stress - Chapter 2, introduction to stresses
  • Linear Elasticity - Chapter 6, introduction to linear elasticity

Resources

  • Grids.zip - mesh generation proceedures
  • removeUnused.m cleanup script to remove points not being used (which GMSH put in there)
  • removeUnused2D.m same cleanup script only for 2D geometries
  • msh2m.cpp GMSH native file format (.msh) converter to matlab files (.m)

Unsupported resources

These resources may be useful, but we (Geir and Anne) have little experience in using them, so we can not offer much help if you have problems with them.

Compiling and running C++

In Linux, you may compile the GMSH to Matlab converter by the terminal command

g++ msh2m.cpp -o msh2m

and use this by typing

msh2m myGeometry.msh myMatlab

which will read the file myGeometry.msh and write the following files

  • myMatlab_pts.m
  • myMatlab_lines.m
  • myMatlab_tri.m
  • myMatlab_tetr.m
  • myMatlab_nodes.m

containing respectively all points specified, lines, triangles, tetrahedrons and nodal coordinates.

For 2D examples, your elements would be in myMatlab_tri.m, the boundary elements in myMatlab_lines.m and the nodal coordinates in myMatlab_nodes.m

It is also possible to compile msh2m.cpp on other operating systems, as long as you have a C++ compiler installed.

GLview

GLview is a post-processing program designed for visualization of finite element results. It is a commercial project, but as a NTNU student you have access to it through progdist. It comes in a lightweight version, GLview Express, and a full version GLview Inova. To view the demo above you will have to install the latter. To get the results shown in the introduction do the following

  • double click "mode shape" on the upper left menu
  • move the "Time" slider on the upper left menu to 8
  • set current displacement to "relative scaling" in the lower left menu
  • in the "animation" tab, click "mode shape animation setup" and just press OK when the pop-up menu comes

Note that the "time" slider in step 2 is a misleading name as it really is the eigenvalues and not related to time whatsoever. The first time is just bogus output followed by 6 zero eigenvalues (10^-7 is assumed to be numerical zero). All eigenvalues above 8 are nonzero ones and display true eigenmodes of the geometry/material choice. Play around with the different ones to get a feeling on how they look like.

Geometries

Here is a handful of sample geometries which you may download and play around with for your project. You may choose to use any of these in your final submission, or create your own.

King & Queen

King and Queen chess pieces.

Star

Christmas is soon coming. You might want to put this at the top of your tree.

Chess Board

chess2_small.jpg

WineGlass

winemesh_small.jpg wineglass_small.jpg

Is it possible to break a wine class by singing a high C? Possible geometry for task 5.4.

Heart

Need something to warm your heart? Why not try the finite element method?

The earth

This is a triangulation of the earth with added adaptivity around the shorelines to describe these as accurate as possible. It is given as a 2D flat geometry as well as a 2D sphere geometry. Global warming simulation anyone?

Beef

Geometry for task 5.5: Cooking a piece of steak.

Cheese

A piece of swiss cheese. More food geometry for those doing heat equations or do you envision doing something else with it?

Solid ball

This is simply the unit ball as in problem set part 1. The difference is that this is created in GMSH, and may be easier to alter for your own creations. Note that the actual triangulation returned will be different from the getSphere.m matlab script.

Bank of Westnoth

This is a geometry of the Bank of Westnoth and the neighbouring hotel.

Princess Cake

This is the geometry of the skirt for the princess cake. The volumetric tetrahedrals are seperated into two parts: those of the cake dough and those for the metal tube in the middle.

Chess Pawn

This geometry has been extensively used in isogeometric analysis. For some of the eigenmodes corresponding to task 3.2 (eigenvalue analysis), check out

DesertHouse

This is the home of the mad desert wizard.

2014-11-18, Geir Bogfjellmo