Showing posts with label analogies. Show all posts
Showing posts with label analogies. Show all posts

Thursday, 18 March 2010

the mass balance of cookies

Part of my time/energy the past few days has been focused upon getting things set up correctly to make Mathmatica work for mass balance calculations. Mathmatica is a powerful tool that can do amazing calculations *if* the user first sets up the data files exactly correctly, and then creates (or, more commonly, edits previously existing) files which tells it what to calculate and where to find the data files upon which to perform the calculations. Now that I’ve got it working, I thought I’d take a moment and share with you a bit about what mass balance calculations are.

Anyone who has ever decided to do lots of baking for a party understands how to look at the various recipes, make note of how much of each ingredient is needed, and then add up the totals for any ingredient which appears in more than one recipe.

Imagine that I decided to make three batches of blond brownies, 2 of oatmeal current cookies, 2 batches of vanilla cookies, and 4 batches of peanut butter cookies. Using the recipes below that would mean that all of the combined cookies would contain a total of 6 cups of oats, 14 cups of flour, 5.5 teaspoons of baking powder, 4.5 teaspoons of salt 1 cup of honey, 4 cups of brown sugar, 2.5 cups of white sugar, 6 cups of butter, 11 eggs, 6 teaspoons of vanilla, 2 cups of peanut butter, 1.5 cups of nuts, 1.5 cups of chocolate chips, 1⅓ cups of currants and 1 teaspoon of cinnamon.

Now, what if I gave you that pile of ingredients, and the recipes, but didn’t tell you how many batches of each one to make, but I did require you to follow the recipes exactly and to use up all of every single ingredient, without wasting anything.

That is what mathmatica is doing for the mass balance calculations. We tell it the starting bulk composition (the list of ingredients), and the recipes (the composition of each mineral that is present, and the list of all the minerals that are present) and ask it how much (how many batches) of each mineral can be made from those ingredients.

I don’t truly understand how it is doing it, but it uses a “monte carlo sampling” to do this. We tell it how many tries to make (100 tries takes only a few seconds) and it tries various combinations of how much of each mineral (how many batches of cookies). I think that it may be comparing the ingredients needed for each of its guesses with the list of ingredients actually present. The larger the number of tries we tell it to make (my boss suggests that it should be at least 1000), the more accurate the results will be.


*******************************
Blond Brownies

1 c. sifted flour

½ t b. powder
½ t b. soda
½ t salt
⅓ c. butter
1 c. brown sugar
1 egg
1 t vanilla
½ c. chopped nuts
½ c. chocolate chips

Sift flour, baking powder, baking soda & salt together. Add nuts and mix well.


Melt butter & add sugar and mix well. Cool. Add eggs & vanilla to butter/sugar and mix well.

Add flour mixture, a small amount at a time, mixing well after each addition. Add chocolate chips and turn into greased pan 9 x 9 x 2 (inches)

Bake at 375 for 20-25 min.
***************************

Oatmeal Current Cookies

Put 2/3 cup of currents into a cup, and cover (just till the liquid shows at the top layer of currents) with a blend of 1/2 apple juice, 1/2 lemongrass tea, put into the microwave on full power for thirty seconds, then let stand till cool.

In one bowl mix:

3 c oats

1 c flour
1 t salt
½ t backing soda
A dash of cinnamon

In another bowl mix till light and fluffy:

1 c soft butter
½ cup light brown sugar
3/4 c raw sugar
1 egg

Add the cooled juice/currents to the butter mixture, and fold in the oat mixture. If too sticky, add a small amount more flour. Roll into 2 – 3 cm balls, place on greased paper, bake at about 180 C for 7 to 10 minutes till they are only barely golden brown. Cool on a wire rack.

Note: I used the juice/tea blend because that is what I put on my muesli in the mornings for breakfast, so I had it on hand. You could use all juice, for a sweeter result, or all tea, for a less sweet result, if you wanted.
**********************************

Vanilla cookies

½ cup butter

½ cup sugar
¼ tsp vanilla
1 egg
2 cups plain flour
1 tsp baking powder
egg or milk for glazing
pinch salt

Preheat oven to 160ºC.

Cream butter sugar and vanilla. Beat egg and add. Add sifted flour and baking powder. knead lightly. Roll out part of the mixture at a time, keeping remainder cool. Cut shapes. Put onto greased pan Glaze with a little egg or milk, dust with cinnamon or Place a piece of cherry or almond on each. Bake 10 minutes to pale gold
********************************

Peanut butter cookies

½ cup butter
½ cup peanut butter (natural style--chunky)
1¼ cups all purpose flour
1/2 cup sugar
¼ cup honey
1 egg
½ tsp baking soda
½ tsp baking powder
½ tsp vanilla

Mix butter and peanut butter well. Add sugar. Add ½ cup of flour, honey, egg,

baking soda, baking powder and vanilla. Beat till thoroughly combined.

Beat in remaining flour.

Shape dough into 1 inch balls. Place 2 inches apart on an ungreased cookie sheet. Flatten with a fork.

Bake in oven at 375 for 7 to 9 minutes or till bottoms are lightly brown.

Cool cookies on a wire rack.
************************************

Thursday, 28 January 2010

with understanding one becomes free to explore

I received a comment on one of my AGU highlight posts today which mentioned that “…there are as many as 6, perhaps 10 person in the world who do really understand a-X models”. Given how slowly my own understanding has been building on this topic since I was first exposed to the concept early on in my PhD project, I suspect that he’s probably fairly accurate in his count, despite having offered the number in jest.

Doing the sort of modelling metamorphic petrologists do can be compared to various skill levels in cooking. Some people “cook” by opening a box or a can and following the instructions printed on the label to heat the contents. Others “cook” by looking at a recipe and faithfully performing every step of the instructions in the sequence suggested, with no real understanding why the author of the cookbook wanted them to do step A before step B; but by correctly following the instructions they obtain a result which they are happy to eat. Still others of us decide what we are hungry for, rummage around in the pantry and throw together delicious food that brings us joy to eat, instinctively doing some tasks before others because we understand the manner in which the tasks coordinate to create a perfect dish. We do things differently every time, never fearing to improvise because we understand *why* things work in the kitchen and what things may be changed and what rules are iron-clad.

As a petrologist I’m slowly working my way from the one end of that spectrum towards the other. The first time I attempted to use Perple_X to calculate what phases should be present in my rocks I had no idea what I was doing, or why. My advisor had pointed out a recently published paper which used that tool for calculations on a similar rock type to my own, so I downloaded the supplemental data set, used the “in” file provided, and ran the program using the settings their paper reported them to have used. Low and behold, the program generated a diagram which looked just like the one they had published (open box, remove plastic from tray, put trya in oven at 350 F for 35 minutes).

Thus encouraged, I edited their in file to show the composition of my sample instead of theirs, and ran it again, getting a very different diagram. This marked my first baby step in moving away from heating packaged food to something about on the level of complexity of using a packaged cake mix (just add water, eggs, and oil). Some months passed while I used this technique for a variety of different samples. Then, one day I realized that I needed to generate a different type of diagram, so I began to learn what changes are necessary to do so. This required much reading of the tutorials accompany the program. Not unlike learning to follow a recipe (cream butter and sugar together, beat in eggs and vanilla, add flour mixture alternatively with milk…).

I find that the more papers I read on this topic, the more I understand about the many, many options for calculations available in programs such as this one (there are others out there I should like to try as well, if I can only make the time to do so). It is my hope that, eventually, I will join the ranks of those who understand a-X models and will be able to reach the same stage of confidence in using these as I enjoy each time I enter the kitchen to cook or bake myself something yummy.