I got the finite element method report back today and I got full score! You can read about the first half of the project on my blog here, where I also explain the geometry a bit more. It’s a simulation of a plastic mold injection tool where there is hot plastic under pressure inside the tool and a force pushing down on the tool from the top. The abstract for the report is:

Abstract

In this report we use Matlab and CALFEM to study the temperature distribution over time on a plastic mold injection tool. We also calculate the plane stress caused by external forces as well as thermal stress for the tool.

The second half of the project was about simulating the stress exerted on the metal that the tool is made up of. The stress caused by the mechanical stresses (the pressure from the plastic and from the force above) look like this:

Mechanical stress

When metal heats up it expands, and since the tool is constrained at certain boundaries and because the heat change is different inside the metal, this will cause further stress in the material, causing thermal stress. And the stress caused by the increased heat will look something like this.

Thermal stress

If you can read Swedish and is further interested in an account of how to solve this problem using the finite element method, you should read the entire report. You can view it online here. I have removed the code from the report out of respect for the lecturer. I will however share one piece of code, that I know he wouldn’t mind, that I am particularly proud of.

[gist id="417285"]

This is the code that generates the mesh you can see a hint of in the pictures (and is shown more clearly on the first page of the report). It automatically generates this mesh given a size of the element side. Almost every other group did this by hand, by entering like 300 values into a big matrix… by hand…

here is what the school had to say about the report.

Individual comments

The problem is well described and clear to the reader. The report is well structured, nice and easy to follow. It would be easy to reproduce your code without reading the attached Matlab code. Sizes of your matrices and vectors are presented which makes it easy to follow the solution process. The geometry is presented and looks correct. The derivations from the strong formulation to the FE-formulation presented correctly. The contribution to the stiffness are correctly defined and presented with illustrations that makes it easy for the reader to follow and you describe how to calculate the boundary vectors. The inital temperature is included. The transiet scheme is implemented correctly and a discussion on the size of the time step is present. It is clear that you have understood the relationship between stresses and elastic/thermal strains, but you have used the wrong formula for calculating the effective stress. The results are discussed and seem correct. The Matlab code is well commented but a bit complicated. In general very good report! Well done!

I have fixed those small errors (and regenerated the images) in the report that is linked in this post. I’m not sure exactly how my code is complicated. I would argue that it is powerful, contrary to some other people who as I said put the shit in by hand; that’s complicated!

I could without any further changes to the code replace my mesh with a non-uniform one and I could easily change just a few parameters to solve any general problem.

Half related comment about school

I just wanted to say that I put a lot of work into this project, quite surely more than I had to. I am however very happy that I have done it. School is mostly sort of.. drudgery..
It is very, very easy to just go through the motions and do the minimum required to pass the course. I strongly believe anyone could get a masters in Engineering Physics. But I think one should put in this kind of extra effort now and again to produce something that’s actually of high quality.

Whenever I come across a course or subject I really like, I put in some extra effort to produce something above the expected. It’s a good way to learn that subject extra well, but It’s also a good confidence booster. I’ve just shown myself that if I really put in just a tiny ounce more work I will get the maximum score and I will get pretty awesome feedback from the people responsible for the course. It feels good.

It does by far not feel good enough to do it in all courses, but I think everyone should just.. take some time now and then to mark their existence by putting in a bit more effort than required. There’s a full long blog post in here somewhere on these thoughts, but I’ll leave that for another time when I can think it through more thoroughly.


tetris


I just wanted to put this here. I’m doing a project in the FEM course and I’m done with part one now.

It’s supposed to be a plastic mold injection tool. That means it’s supposed to simulate a situation where there is hot melted plastic on the “inside” of the tool, the right side and the upper part is kept at a constant temperature of 25 degrees Celsius somehow and the other sides of the tool are exposed to the air so their cooled through convection. The bottom of the tool has no heat-flow at all because it’s supposed to simulate a symmetry, so imagine there is an identical but vertically flipped part on the bottom.

Anyway, here is the simulation of the heat dispersion for the first 5 minutes after the plastic is injected into the tool.


tetris


One of the specializations I’m considering the most for my masters is “Scientific calculations and simulations”. It’s a mix between programming and physics which I like. It’s about creating a model of the physical problem then letting a computer solve it. Anyway, one of the courses I’m taking right now is a sort of primer for that specialization, and so far I like it, even though I haven’t done much yet. The course is on the finite element method, which is a specific method of letting computers solve problems.

I did the first exercise yesterday and the result looked kind of neat so I want to show you. The exercise was about calculating the temperature distribution in a rectangular disc with a hole in it. Inside the hole the temperature is 1000 degrees and outside the disc the temperature is 100 degrees, so the question is what does the temperature look like inside the disc? Another thing that you “automatically” calculate is the flow of heat from the inside to the outside of the disc.

This is what the disc looks like divided up into 336 element on which we’ll calculate the temperature.

Disc with 336 elements

And when I let the computer solve it, it’ll look like the following, which shows the temperature distribution.

Disc with 336 elements solved for temperature distribution

This is all pretty well and good. To give you an idea of what use this is, this thing could be a model of what the temperature would look like inside a large square metal bar with a pipe inside it, inside could flow something very warm while the entire thing would be dipped in a coolant. This solution lets us know what the temperature will look like inside the metal bar, as well as how much heat will flow to the outside. With this information we could learn how to optimize the cooling process. A very simplified model of course, but it’s just an introductory course. Now, being the engineer that I am, of course I could be happy with just 336 elements, I naturally have to over-do this thing. For no reason what so ever.

Disc with around 1500 elements

Disc with around 1500 elements solved

This last one took around 3-4 hours to solve with my computer :P I’m happy I don’t have to pay for computer time!

What I’m worried about in this field however is that as things get more complicated we need to use more sophisticated software, and I think there will be less and less focus on doing algorithms and more and more focus on just using commercial software. I don’t want to be a user, I want to be a creator.


tetris