Part 2: Materials & Cross-sections
In Part 1 we outlined the problem posed by the codefest and in Part 2 we’ll begin to simplify the problem and examine how to make intelligent decisions in order to do so, starting with selecting the optimal material(s) to use! We have 16 materials to choose from, but is there any single one that is better than all the others? To suit our needs the material needs to have:- high yield strength
- low density
- low price per kg
a = (density * price)/yield
The lower the value of a the better. We’ll also convert the yield strength to MPa to make the numbers a bit nicer. Once evaluated our metric should have the units of “millions of dollars per newton-metre”. For example, Steel has density 7850 kg/m^3, yield strength 330 MPa and price per kg of 1.2. So Steel’s suitability metric will be…
7850 * 1.2 / 330 = 28.55
which is pretty good. But is it the best? (No.)
If we look at all the materials we have, there is a clear winner, which isn’t actually all that surprising if you think about it.

The winner is… Pine!Pine is the “best” material available! With a suitability metric of 12.5 it’s strong, it’s cheap, it’s flexible. Interestingly, however, Steel and Oak, aren’t that far behind. Of course, there should be the caveat here that it is the “best” material if you’re only going to use one material. The problem will, however, let you use different materials for individual beams and each beam will be in a different scenario meaning there may well be optimal materials for each beam. For our purposes, however, we don’t want to have to put in too much effort; this is the quick and dirty solution after all! So, we can happily use Pine for everything. But the best material is only one piece of the puzzle. Next is the beam cross-section.
Cross-section
There are four available cross-sections, but which is best? Let’s run the default simulation but keep the material constant (Steel) and adjust the cross-section such that the mass remains the same. The base design uses steel rods that are 15 cm in radius.- Volume of 1 rod, of length 1m
= 1 * pi * 0.15 * 0.15 = 0.07 m^3 - For cylinders let’s set the inner radius to be 0.15 m
- For Rectangle tubes let’s set the cross-section to be square and the thicknesses of all four sides to be the same.
- I.e.
W1 = W2 = Wandt1 = t2 = t3 = t4 = t
- I.e.
- And let’s set the area of the outer square to be
2 * A, whereAis the starting area.- I.e.
W^2 = 2A
- I.e.
Plotting the results of the suggested design with each of these sets of dimensions we can get an idea of the best cross-section (whichever produces the lowest stresses).
Cylinder

Circle

Rectangle

Rectangle tube

Result so far…
OK let’s build a simple design with the decisions we’ve made so far.- best material -> Pine
- best cross-section -> Cylinder
- best dimensions(?) -> 0.15, 0.21
- Cost = $5854
