Tuesday, July 16, 2013

Turning Up the Heat

Heating a steam engine
There were very few bugs out today, since they had mostly been vaporized by the day's heat. TO continue with the theme of the blazing outdoors, class began with a lecture on thermodynamics. I had heard most of it before, but the demonstrations were interesting. Bill brought out a steam engine, which was interesting enough. He also demonstrated a piston by pouring liquid nitrogen in a corked pipe, then letting it expand, blowing off the cork. One bit of the lecture which I had not heard before was a derivation of the ideal gas law (PV = nRT). 
Pouring liquid Nitrogen










We next got into our groups for our exponential explorations. If you recall, my group is investigating Benford's Law, which relates to first-digit distribution (like if 1 has a 28% chance of being the first digit in a number). There are going to be three main stages to our project: collect data, analyze data, and finally present data. We will need a massive amount of data from a variety of places to compare for good results. Luckily, I know regular expressions. (Ways of looking through lots of text. See here and here for examples). This means that I was able to write a bit of code to collect this data from a file. We discussed possible sources of data - the stock market, pseudo-random number generator, radioactive materials, blacklisted IP addresses, et cetera. It was quite fun, but we didn't have that much time. We quickly met with our Hersheypark groups for a bit of discussion, and then it was time for lunch.

After lunch, we had Bob Hollebeek, a physicist at Penn, talk about using proton beams to treat cancer. The specific project he worked on was detecting precisely where the proton beam is to aim it even better. I really liked that he talked about the specifics of what he was doing. That is the biggest strength of a guest speaker: they are able to go really deep into one subject. If I want to learn some general information, I don't need a guest speaker. Bob Hollebeek really went into the details of how they detect where precisely the particles are, and why proton therapy is useful. I really liked him. He made an interesting remark towards the end. He said that everybody should learn how to program, but not in Java or HTML, but in C. I agree with the thought that more people should gain at least a basic understanding of programming, but I do not agree with the second part. For the things that he deals with, a lower-level language like C is almost certainly more useful. However, if you aren't analyzing a bunch of particle physics data, a higher level language like Java can, in my opinion, be a good idea. HTML is for web-design, a completely different purpose. I would say that more people should learn a programming language, but what that language is really depends on what you want to do with it. If one language was better than all the others, there would be no reason to have multiple languages.
Dry ice to cool the plate

After the guest speaker, we worked in our interest groups. If you remember (or know how to look at yesterday's blog right now at least), I am working with charged particles with a cloud chamber. Today, we got the cloud chamber working. I even saw what was probably a muon! A chamber is super-saturated with methanol (we did most of that yesterday), then more methanol is circulated through some dry ice and then underneath the chamber to cool it. This causes a cascade of rapidly evaporating and condensing droplets of methanol. Particles disturb the methanol, so you can see the trail.

Swirling droplets of methanol

After this, I went back to my room to code. While I do this most days, today's coding was working on the exponential project. I had written some bare-bones code in class, but in a short bit of time I threw together some more features. First of all, it has an interface. You can browse through files on your computer without having to type the path in. You can also select multiple files to analyze in one go. It creates a graph and some pastable data for you. You can also select which files are being looked at, so that you can just analyze several files with stock data, without looking at already-imported IP address data. I then had it create a graph where y is the percent of of numbers below x that start with a digit n. As predicted, is was logarithmic, perhaps explaining Benford's Law. I got to have it draw the graph with a log scale. I then threw an interface over that. Another student stood in the room with me, giving  suggestions of what features to add. It was loads of fun.

No comments:

Post a Comment