Wednesday, December 31, 2008

Merry Christmas to Myself from Grandparents

Like every year, my mother's parents gave me (along with the other 8 grandchildren) gift cards to wherever we asked for. I asked for Office Depot this year so I could finally satisfy myself with all the office supplies I've been drooling over for years. I went shopping today with Jessica and made a killing:
What I got:
  • 3 college ruled 6x9.5" notebooks - They were the last three notebooks that weren't wide ruled or "pre-worn"
  • 24 binder clips - They're like chip clips, cept 1/12th the price. I also use them a lot to organize the ballooning number of 1kbwc decks I've collected.
  • Super nice exacto knife - Alison lost my last one (long story, partly my fault), so I know she's going to find it now that I replaced it, but having something this nice to cut stuff with is refreshing.
  • Rolodex business card book - I'm actually doing all that networking stuff you're supposed to do in college, so instead of a huge stack of cards in the back of my box of cards, I can have them all nice and organized now.
  • 4 G2 0.5mm - These are pretty run of the mill. These are the only pen I depend on when I'm not using my fountain pens.
  • 4 Staedtler sketch pens - Jessica was the one who turned me on to these. The four of them are 0.7 0.5 0.3 and 0.1mm big, which I'm interested to see how they perform. I've heard a few horror stories about super sharp pens, but these might surprise me.
So exciting, and I never would have bought these by myself. This is the textbook case of how gift cards are meant to work. Thanks Grandma and Papa!

Friday, December 26, 2008

Install Game Directly from ISO

I downloaded an expansion pack today, and wanted to install it on my laptop. Unfortunately, the ISO was 1.3GB, which meant I'd have to burn it onto a DVD, which cost $1.50 for a blank when we bought them. I know there is programs to mount ISOs as virtual CD drives in Windows, but I didn't want to install another program, and Kristina wanted it too, so installing another program was really out of the question. I instead opted to use Linux to make my life easier:

I first SFTPed the ISO from my Windows laptop onto one of my Linux machines (In this case, happened to be my Powerbook G3) and mounted it through the loop device there:
mkdir cd
sudo mount -o loop game.iso cd

I then shared it over samba. I tried to use the nice right click GUI share in Ubuntu, but there was some problem with permission escalation. Samba installed fine, but the actual sharing had to be done by hand. (I need to look into if this is a me problem, PowerPC problem, or a real Ubuntu problem):
net usershare add cd /home/kenneth/cd

Now moving over to Windows, map the network share as a drive:
Start - All Programs - Accesories - Windows Explorer - Tools - Map Network Drive...
(Note: Vista doesn't show the file menus (ie tools) by default, so those will need to be turned on beforehand)
And Browse for the shared folder. Uncheck Reconnect at logon, unless you want to keep using this trick later, and press Finish. In addition to ISOs through Linux, this can also be used to piggyback on another Window's CD drive (think eee or tablet computer); just share the root of the CD drive.

If you're lucky, this network drive will look just like the CD to the game, and it'll work fine. If you're really lucky, the autostart will even come up right away.

I really like it because not only do I not have to burn a DVD that I'll use once, I can install it on multiple computers at once (think LAN party), and it's faster than a 4x DVD, even after you finish burning it (hard drive + 100Mb LAN = win).

Fixing More Laptops

The last week of hiatus for a otherwise stellar month of blogging was thanks to Michael having more laptops for me. Since this project started, I've worked on 8 laptops for him, and have as of yet managed to bring 7 of them back to life. Of those, 4 had no operating system, and 2 were completely DOA.

Installing Linux isn't a problem, I can do that. It's the black magic of bring the laptops back to life that has been just killing me.
First one: powered up, no screen, seems like just a dead LCD. Insert Ubuntu CD and plug in external monitor, BIOS flashes on the laptops own screen. Try booting off hard drive for the fun of it; Welcome to freakin Windows XP Pro. Why that did anything, got me...
Second one: I am dead serious; Turn over, hit a couple times, turn on power. I don't literally pound on computers in frustration, so it's not that I don't know why this works, I HAVE NO IDEA HOW I FIGURED IT OUT!

This winter break is almost over already. Almost time to head back to the good ol' Davis.

Monday, December 22, 2008

Vista Reinstall Checklist

Being Winter break, I finally have the free time to wipe my laptop clean (finally!) and start fresh. This time I'm trying to be a little more organized and have a checklist for everything I need to reinstall.
  • putty
  • md5sum
  • sha1sum
  • sdelete
  • wget
  • filezilla
  • audacity
  • μtorrent
  • 7-zip
  • Pidgin
  • Bonjour
  • CutePDF
  • Dia
  • DivX
  • FreeMind
  • GPG
  • Google Earth
  • Office 2003
  • FireFox
  • Skype
  • vim
  • Whatever games I feel like playing

Friday, December 19, 2008

Retrocomputing, its What I Do

I really hate link-dumping, but this article is just too perfect. He explains almost exactly what I enjoy about playing with Linux. The powerbook project is a perfect example of this. I got what used to been a very expensive piece of hardware, for free, and installed an enterprise power OS on it, then try and do the most outlandish things with it. In this case, I browse the web and solve Project Euler with a nine year old computer.

Linux Success at Band's Silent Auction

I admit that calling it a success isn't really being honest with myself until they get it home and actually get online with it, but the laptops at least sold. There was 7 laptops for sale, other 4 had XP on them and all of the laptops sold in the $100-$200 range, which considering their age and the guarantees (none), was a pretty fair price. The three Linux ones went for $120, $155, and $160, specifically. Considering I had a hand in that feels pretty good.

There was also an amazing number of desktops and monitors and printers, scanners, the list goes on. Turns out these were the old demo units, so when the new lines come in, our contact gets all the old ones dumped on him, and by then end, he was literally giving flat bed scanners away. If you want a cheap computer, come back next year.

I also enjoyed talking to several of the parents who seemed impressed by my work. It's always helpful to get positive feedback for the things I do; its easy to loose sight when the average person I interact with hasn't heard of Linux.

Word has it that there was even more computer that he didn't even have a chance to look at. I will possibly get to work with those in the coming week. He has also made sure to call me well in advanced next year so I can preorder official Ubuntu CDs to sell with the computers, and to make sure I can hit the ground running when I get home from Davis. Most of the Desktops hadn't been turned on, no specs, and were selling for $30 because of it.

Thursday, December 18, 2008

Abstract Algebra Bucket Problem

You are pouring water from a Faucet of Arbitrarily Large Output into an empty Tank of Arbitrarily Large Output into an empty Tank of Arbitrarily Large Capacity, and you have two containers with which to transfer this water, one holding 16 liters and the other holding 26 liters. You are allowed to fill either container from the Faucet and dump all of it into the Tank, and once there is enough water in the Tank, you are allowed to completely fill either container from the Tank and dump it into the Great Drain. Describe all possible numbers of liters of water you can put into the Tank, and prove your answer.
Question provided by Tim Hsu

Like in any other true engineering household, last night my dad referred me to this question, and the two of us spent maybe half an hour trying to find a good solution to it. Realize that he's taking this class as one of the last prereqs for getting into graduate school as a math major, and I just finished multidimensional calculus, so I won't be able to formally prove it to the rigor technically required.

We started shooting at the easiest targets. Every multiple of 16 and 26 are possible. These numbers can be expressed simply as 16⋅x and 26⋅y, with x and y being positive integers. You can also add some of one and some of the other, so really the numbers possible were more along the lines of 16⋅x + 26⋅y ≥ 0. Then considering that bucketfuls can also be removed from the Tank, you end up with 16⋅x + 26⋅y − (16⋅z + 26⋅w) ≥ 0, with z and w also positive integers.

The final solid progress we made was realizing that adding in a bucket, then removing it was pointless, so the formula can be simplified farther to be 16⋅x + 26⋅y ≥ 0, x and y only contrained to be integers. We also ended up making conjectures that we cannot make any odd number of liters in the tank, and my dad theorized that you'll reach some point when every even number is possible, taking the last conjecture into consideration (ie {every even number} ≥ n).

That's all well and good, but we haven't really said anything that can be proven mathematically. It wasn't until I was laying in my bed later that I really broke the question:

If at some point ≥ n all even numbers are possible, what's keeping us from just taking some number of bucketfuls out of the tank to get the smaller numbers? If all large even numbers are possible, then shifting the number line down 26 at a time, any even number at all should be possible. Said differently, imagine the entire number line folded upon itself, forming a loop 26 units long. Any point on the circle corresponds to that number + 26⋅x. Since 26 and 16 share a factor of 2, all the numbers have to be even, but without that factor, 8 and 13, they're coprime, which means you only need to show that 8⋅x modulo 13 gives you every number 0-12. Multiply those by 2 and unroll the number line back out into a line, and you've shown that any even number of liters is possible.

This is where my ability runs out. How to prove that the modulo function acts like a loop, and that two coprime numbers a,b give every number less than b by k⋅a mod b is beyond me, but a good start.

Wednesday, December 17, 2008

Blast from the Past

I was digging through my records looking for an old picture, and I found these, posted for your entertainment:

Me with amazingly emo hair in 2006

A Duct Tape house plant

M&M Chewy bar fail

Real physical proof why you should never Never NEVER NEVER buy an Emachine. NEVER If you can't tell, this sticker was on top of the BIOS chip, which is what loads when you first turn on your computer, so needless to say, that computer didn't work anymore.

Tuesday, December 16, 2008

Linux for My Old Band

I'm not entirely sure how it works, but one of the parents in my high school's marching band has a good deal on reject computers.  These are ones that failed QA because the left speaker didn't work or one of the CD drives doesn't work, etc.  Every year he brings them to the Winter silent auction to help raise money for the band while lucky bidders get almost perfect computers for nickels on the dollar.  (FYI: At one point I managed to sell a piece of my work for $80, my mind was blown)

So I get this message this week that he's got three laptops for the silent auction, but they don't have an operating system.  What should he do?

I figured this was a fair ue of Linux, since if the buyer wants windows on it, he'd have to go buy it anyways, and now he has something useable until then.  For the sake of ease I just used Hardy, but for these actually bothered trying out the OEM install.  It was rather interesting.
  • F4 on the boot screen and select "OEM install"
  • Most of the install ran normally, except it didn't ask for a username, but did for a password.
  • Once finished, it rebooted and logged in a temp admin user (with the password you entered during setup) so you can configure the system however you want
  • When the system is configured to your liking, double click the shell script on the Desktop that arms it, and shut down.  Next time it turns on, it prompts the user for their username and password; very much like Windows when you first bring it home from the store as well.
So on these systems destined for possibly clueless users, whom I won't have the oportunity to give any instruction to, what do I install?
  • sun-java6-plugin
  • adobeflash-plugin (sp?)
  • ubuntu-restricted-extras: mp3s, dvds, Microsoft fonts, all the nonfree stuff you could ever want.
Most of the rest of the stuff I have on my systems is programming related, so I think those, plus downloading the 250MiBs of security updates starts them in a fair place.  The emphasis here is on the point that without this, the laptops would be sold with nothing more than PXE.

Am I missing something obvious that normal people use?

Monday, December 15, 2008

Results of 10 Meter Contest

My original plan was to try and get out for at least an hour a day this weekend to work the contest, figuring that what I can hear will turn over and keep it interesting.  Unfortunately, the weather didn't really care what I wanted to do.  I got out for the first hour of the contest Friday afternoon (4pm-5pm), and it was cold.  Metal patio chairs are brutal when it's 50 out.  I tried getting out again Saturday, but as soon as I got set up, it started raining and a quick scan across the band didn't show any activity I could hear.  I did fortunately manage to make four contacts Friday afternoon (Note: distances are assuming they're operating from their home addresses):
  • 0:10 UTC 13 Dec: KF6UTE Casey in Saratoga - 4.5 miles
  • 0:26 UTC 13 Dec: N6NF Thomas in Woodside - 15 miles
  • 0:40 UTC 13 Dec: N6WG Robert in Newark - 14 miles
  • 0:48 UTC 13 Dec: W6YX The Stanford Amateur Radio Club - 11 miles
My setup was an Icom 706 with 50' of wire about 15' high.  It was far from ideal, but it's what I had.  Even working these four stations was something of a challenge.  Part way through, the furnace inside happened to turn on and it took out the whole band, so my family was kind enough to go without heat while I was playing outside in the cold.

I'm really glad I borrowed YARS' radio before getting my own.  Owning an HF radio just isn't for me at this point in my life.  I have nowhere good to put an antenna, the noise in Davis is crippling, Sunnyvale's noise is just tough.  Frankly, for the amount of operating I would end up doing, it just wouldn't be worth it.
What I am going to do is make sure the contesters in my clubs know that I would like to work contests now and then, so I would be happy to come over and work the swing shift on a multi-op contest with them. 
I'm really looking forward to Field Day next year.  The guys who did the digital contacts last year made a point when I started coming to meetings to see if I was interested in coming back.

Sunday, December 14, 2008

Another Commercial Rant

I know these are getting old hat on here, but this one is getting on my nerves.  I'm on vacation, and Hulu has all too few sponsors to have bearable variety as I catch up on 60 episodes in my queue.

Walmart.  Their commercial with the chasiers who turn on and off their lane lights to the tune of Carol of the Bells.  At one point there is a close-up of one of the hands flipping the switch on the low triplet of the tune.  Except he does up down up, which would in fact generate a hollow triplet, because the wide shots show the tones on the lights turning on.  FREAKIN ANNOYING!

IPv6 is Actually Real

I happened to scroll through my peer list in μtorrent, and two of them jumped out at me:
First two there on the list; those are true honest-to-goodness IPv6 IP addresses. This is really cool because IPv6 has been knocking around the technical internet since the mid-90s as the be all end all solution to the IP address depletion problem. This is really cool that I'm actually trading traffic with other hosts with one of my globally addressable IPv6 addresses, even if I am still on an IPv4 network (IP addresses that everyone is used to, ie

The first address is a Teredo address. You can tell this because it's a 2001:0::/32 address (starts with 2001:0000:, which is 32 bits). It's like how you can identify and addresses as coming from within your private network, all part of the standard. Teredo is a system that uses UDT to tunnel out through your router and make your computer available through third party Teredo routers.

The second address is a 6to4 address, identified by its 2002::/16 prefix. 6to4 is a tunneling protocol allowing two 6to4 networks to communicate through IPv4 space. This address is even more exciting to me than the Teredo address because it means I'm managing to get out of the Teredo relay and talk to the rest of the IPv6 network (or at least a different transition system, who knows what's broken out there).

My descriptions really don't do either system justice, so I encourage anyone interested to click through to the Wikipedia articles (And reading RFCs just isn't any fun, trust me...). I hope someone appreciated my correct usage of the network.

Saturday, December 13, 2008

Balloon Assisted Loop Article

This is pretty cool:
The January issue of QST has an article about the 40 meter balloon assisted loop Jeff (KG6SGX) and I spent some time on during Field Day up on Mora Hill.  I'm sure glad we had a good antenna for running low power. 

This afternoon I made a good effort using low power, but finally settled on 50W, since my setup here in Sunnyvale leaves so much to be desired.  The observant will notice that this means I actually managed to make some contacts.  I'll write that up at the end of the contest.  At this point, more contacts are dependent on it not raining at some point in the next two days.

Friday, December 12, 2008

Math Symbols in html

I bet you were all wondering how I got all those pretty ∂s and Δs in all my posts last week on my physics problems (Part of me wants to delete them, part of me wants to clean them up, most of me wants to deny their existense). I want to emphasize this to make my life easier when giving help in the smartsite chat rooms. It allows html, use it!

And the answer: This wonderful table of html codes. I'm almost to the point where I'm going to print it out and frame it on my wall or something. A part of me died every time I tried to understand people's N_A/K_A+Y. I'm still torn on the fraction slash. It doesn't seem to be rendering consistently well.

Thursday, December 11, 2008

HF Contest tomorrow night

Looks like my timing for getting back into Sunnyvale was perfect.  This weekend is a 10 meter (28 MHz) contest from Friday evening to Sunday afternoon.  The ARRL have posted a very good article about it.  From what I've heard, this is meant as a contest to enlist technicians, since techs have voice privileges 28.300-28.500MHz SSB 200W.  Granted, I already have my general, but I think they won't send me away for it.

For those who are interested, I'm planning on using a 50' random wire from my patio through two trees, with a 30' ground in the other direction.  It's far from ideal, but its what I can use.  We'll see if I can get anything out of it.

Hard Drive Failure

So KWF5 (Powerbook G3) has a 6 GB hard drive in it.  Needless to say, that is a little tight.  (Not really; most of what I do on it is programming that takes all of a few KiB)  What this really limits me to is only torrenting one ISO at a time, and needing to keep track of what I have on here.

Lucky for me, I just happen to have two 30GB laptop ATA drives knocking around in my junk box, along with the 256MB + 128MB of PC100 RAM I've already put to use in this thing.  Not so luckily, neither of them seem to work...  One sits there and reports read errors on every sector.  Do you know how many sectors there are in 30GB?  A freakin lot.  The other seems to have some potential, but the installer borks out when it first looks at it. 

More pain from the ugly stepchild of Ubuntu.

Wednesday, December 10, 2008

Christmas Present for My Honey

I had some ideas for what I wanted to get her, but once I saw this on Martha Stewart, I just couldn't pass it up.  A picture puzzle; 12 blocks of wood, pick out 6 pictures with love and care, and make her something that she can love and cherish (not to mention I get to watch her trying to decide which of 6 sides goes with each picture).  I even cheated and used 7 pictures, just to throw her.  I love her so much.
Cut the blocks at home over Thanksgiving.  They're a little over one inch, because that's what I happened to find in the shop.
This is one of the small pictures.  Start by rubber banding them together.
Wood glue on top.  May not be the best glue, but of what else I had (rubber cement, gorilla, paper stick), it seemed like the best.
Yeah!  Presents aren't worth it if you can't get your hands dirty.
It's us!  In the snow!
I trimmed the edges by turning it upside down on my sheet glass (from a picture frame) and cut it with a razor.
Run the razor down each joint, and separate the pieces.  Make sure to separate them, since otherwise the wood glue would make it a pretty lame puzzle.  Less puzzle, more blocks of wood glued back together with a picture stuck to them.
  It's the last picture!  Unfortunately, some of the paper got a little soggy with the glue, so make sure to use heavier paper or as little glue as possible.
I'm such a good boyfriend.

Tuesday, December 9, 2008

My Apology

I'd like to take a moment to apologize to my regular readers. I can understand why the last two days might have been a little annoying, with me just dumping problem solutions on you. The first one I think was justified, but in the 23rd hour, there was no interesting commentary with it. To show you my justification for it, I show you some of the comments from the physics chat room (Note that the first comment is from the professor himself):

Joseph Kiskis (Dec 8, 2008 11:36 PM PST) Kenneth, Nice work! One small point: You might want to rethink what you divided by in 2c. [ed: I've fixed this]
Eric ___ (Dec 9, 2008 12:44 AM PST) also kenneth if you read this at some point, everyone in this class owes you for the help on this practice final. i also flipped through a few of your blogs on your page on a break. interesting stuff.
Christina ___ (Dec 9, 2008 2:38 AM PST) [snip] (and Kenneth, thank you SO much for posting that link. It's helped A TON!)

So I hope you can understand my motivation to get them all posted in such quick succession. It helps hearing people point out that this thing really is interesting. I try…

Monday, December 8, 2008

Physics 9B Practice Final Problem #5 Again

Two volumes A and B of ideal gas with NA and NB molecules respectively are separated by a piston that is free to move while the total volume V = VA + VB is constant. Both gases are in contact with a heat reservoir at a fixed temperature T.
For each volumes of gas A and B, the multiplicity depends on the volume according to
ωA = aVANA
ωB = bVBNB
with a and b independent of VA and VB . After the piston comes to equilibrium, what is the pressure in the gas? Express it in terms of k, V, NA, NB, T, a, and b. Do the problem using the given information and the ideas of statistical mechanics. There are at least a couple ways to do the problem. If you want to use the equation of state, you must derive it from the information given above and general results on the properties of entropy.
Question so kindly provided by Joe Kiskis

This is a stat mech problem, so to find the equilibrium, we need to maximize entropy.

Again, maximize entropy.

Third time, for the readers at home: Maximize entropy. S = k ln(ω), so S is maximum when ∂S = 0.
  • SA = k ln (aVANA)
  • SA = k NA ln(VA) + k ln(a)
    • Repeat this for SB, but they both need to be in terms of one variable V, using the relation:
    • V = VA + VB
  • Stotal = S(VA) + S(V−VA)
  • ∂S⁄∂VA = ∂S(VA)⁄∂VA + ∂S(V−VA)⁄∂VA
    • Realize that since V is constant, it's derivative is 0 and the second part can be rewritten.
  • ∂S⁄∂VA = ∂S(VA)⁄∂VA − ∂S(VB)⁄∂VA
  • ∂S⁄∂VA = k NA⁄VA − k NB⁄VB = 0
    • And to maximize entropy, this is all equal to 0.
  • k NA⁄VA = k NB⁄VB
    • At the same time, note that ∂S(VA)⁄∂VA = ∂S(VB)⁄∂VA
      • This is important because ∂S⁄∂V|U = P⁄T
      • PA⁄T = PB⁄T
    • Replug in V = VA + VB and solve for VA
  • VA = V⋅NA⁄[NA + NB]
    • Now we have two equations for ∂S⁄∂V, set them equal:
  • PA⁄T = k NA⁄VA
    • Plug in the solution for VA and solve for P
  • P = k NA T⁄[V⋅NA⁄(NA+NB)]
  • P = k T (NA + NB)⁄V
    • Holy crap! That's the answer!!!
Now we were able to come up with that answer from the very beginning, because it's essentially PV=nRT, replacing nR with Nk, which is fortunate since it gives you a goal. Unfortunately, like so many things in life, its not the destination, but the journey that matters.

Physics 9B Practice Final Problem #4

A heat engine using 1 mole of a monatomic ideal gas uses the cycle:
  1. AB - isothermal
  2. BC - isobaric
  3. CA - isochoric
The volume at A is 50 liters. The volume at B is 100 liters. Step 1 is in equilibrium with a reservoir at 600 K. Step 2 is in contact with a reservoir at TC . Step 3 is in contact with the reservoir at 600 K.
a) What is the temperature TC at C?
b) How much work is done by the engine in one cycle?
c) What is the efficiency of the engine? (Be careful with the heat flows.)
d) What is ΔS of the universe for one cycle of this engine?
e) What is the efficiency of a Carnot engine operating between reservoirs at 600K and TC? Explain why your answer is either the same or different from your answer to part c.
Question so kindly provided by Joe Kiskis

Part A
Since step 2 is isochoric, for the beginning and the end of it, we know that:
V2⁄V1 = T2⁄T1
Solve for T2, and we get
TC = 300K

Part B
To find the total work requires summing the work for the three seperate steps using:
  1. W1 = Q = nRT ln(V2⁄V1) because it's isothermal
  2. W2 = PΔV because it's isobaric
    • Note that this is going to be a negative number!
  3. W3 = 0, because it's isochoric
You end up with:
Wtotal = 963 J

Part C
Now that we know the total work produced by the engine, we need to find a Q to compare it to to find the efficiency of the engine.
  • QH total = QH1 + QH3
    • We calculated Q1 in part B, because for an isothermal W=Q
    • Q2 is in contact with TC, so isn't of use here
  •  QH total = 3456J + nCVΔT
  • QH total = 3456J + 1mole ⋅ 3⁄2 ⋅ 8.31J⁄molK ⋅ 300K
  • QH total = 7196J
    • Now we just plug that into the definition of e
  • e = W⁄QH
  •  e = 0.134
Part D
The important thing to remember here is that the entropy of a cyclic process like an engine doesn't change.  But THAT IS NOT WHAT THIS IS ASKING!  It wants to know ΔS for the universe.  This is rather easy, because the two temperatures of the universe don't change, so we cant just use ∑Q⁄T.
  • ΔStotal = ΔSC + ΔSH
  • ΔStotal = [QH−W]⁄TC − 7196J⁄600K
    • Note the minus sign, because Q into the engine is Q out of the universe.  To be honest, I just knew that the two values had opposite signs, and just picked the one that gave me a positive answer.  Understand the concept over memorizing the formulas.
  • ΔStotal = 6233J⁄300K − 7196J⁄600K
  • ΔStotal = 8.78 J⁄K
Part E
  • eCarnot = 1 − TC⁄TH 
  • eCarnot = 1 − 300K−600K
  • eCarnot = 0.50
As for why these two numbers are different, remember that the Carnot cycle is two pairs of isotherms and adiabats.  This cycle only uses one isotherm, and an isobaric and isochoric step, so it is going to behave less than the theoretical maximum efficency possible.

Physics 9B Practice Final Problem #3

The insulation of your freezer is not perfect. When the room temperature is 300K and the temperature in the freezer is 260K, the heat flow through the insulation and into the freezer is 25 J in 1 second. a) Assuming the freezer is maximally efficient, what energy per second does the freezer compressor draw from the wall socket to maintain the temperature difference 300K and 260K? b) Your “clever” roommate says that he will run a heat engine between the inside and outside of the freezer to produce electricity to help run the freezer compressor. Suppose his engine is as efficient as possible and produces 2 watts to help run the freezer compressor. Now how much energy is needed from the wall socket each second? Explain.
Question so kindly provided by Joe Kiskis

Part A
We need to find the work needed to match the 25J/s flowing into the freezer to keep it at a constant temperature. We're going to need two equations to find this:
KCarnot = TC⁄[TH−TC]
K = QC⁄W
Solve these two equations for W and you get:
  • W = QC ⋅ [TH−TC]⁄TC
  • W = 25J ⋅ [300K - 260K]⁄260K
  • W = 3.85 J/s = 3.85 Watts
Part B
While this heat engine is producing 2 watts, it is also dumping energy into the freezer. We need to find QC for this engine.
  • eCarnot = [TH−TC]⁄TH
  • eCarnot = 40K⁄300K
  • eCarnot = 0.133
Now use this e to find QC, using |QC| = |QH| − W:
  • e = W⁄QH
  • QH = W⁄e
  • QH = 2watts⁄0.133 = 15 W
  • QC = 15W − 2W
  • QC = 13 J⁄s
Using this new QC, we can recalculated the total work needed by the Carnot refrigerator in Step A:
  • Wtotal = 38 J⁄s ⋅ 40K⁄300K = 5.85 J⁄s
    • Now remember that this is the total work, which is the sum of the works from the engine and the wall.
    • The 38J is the 25J leaking through the insulation + 13J being expelled by the heat engine.
  • Wnew = Wtotal − Wengine
  • Wnew = 5.85W − 2W
  • Wnew = 3.85W
So now realize that in the best case, adding the engine does no good. And thus, I have disproven any idea of a perpetual motion machine.

Physics 9B Practice Final Problem #2

Consider a cubic meter of air in the room. T=300K. P=105N/m3. To make it a little easier, assume the air is 100% (rather than the actual 80%) nitrogen molecules each with a mass of 47 x 10-27 kg and an effective γ of 7/5.
NA = 6.02 x 1023/mol.
R = 8.31 J/(mol K)
a) How many molecules are there?
b) What is the internal energy for the cubic meter of gas?
c) What is the average translational kinetic energy per molecule?
d) To what speed does that correspond?
Question so kindly provided by Joe Kiskis

Part A
This is a simple application of PV=nRT, just solving in molecules instead of moles.
n = PV⁄RT
n = 40.1 moles
40.1 moles ⋅ 6.02 x 1023 = 2.41 x 1025 molecules

Part B
  • U = 1⁄(γ−1) nRT
    • We know that γNitrogen = 7/5
  • U = 5/2 ⋅ 40.1 moles ⋅ 8.3 J/molK ⋅ 300K
  • U = 2.50 x 105J
Part C
Notice that the internal energy for this problem is different than the translational energy, which is calculated like so:
  • KTR = 3/2 nRT
  • KTR = 3/2 ⋅ 40.1 mole ⋅ 8.31 J/molK ⋅ 300K
    • Note that we want translational energy per molecule, not total, so divide by our answer from part A.
  • KTR⁄molecule = 6.21 x 10-21 J/molecule
Part D
Simply apply the energy from the last step to kinetic motion for 1 molecule:
  • 6.21 x 10-21 J = 1/2 mv2
  • v = 514 m/s

Didn't Get the Job

"I am sorry to inform you that you were not selected at this time for a position in the Engineering Fabrication Laboratory.  While you had a strong application and interview, we only had funding for a limited number of positions."

Ouch.  So much for that.  I don't really have time to sit here and hem and hah over why I didn't get it, but my first reflex would be that someone else was willing to commit more hours to it.  I was fairly conservative with how much I could work, so that might have hurt me.

On the up side, I'm getting refered to the Union Pacific internship, so I stand a chance of getting a job this summer.

Sunday, December 7, 2008

Physics 9B Practice Final Problem #5

Two volumes A and B of ideal gas with NA and NB molecules respectively are separated by a piston that is free to move while the total volume V = VA + VB is constant. Both gases are in contact with a heat reservoir at a fixed temperature T.
For each volumes of gas A and B, the multiplicity depends on the volume according to
ωA = aVANA
ωB = bVBNB
with a and b independent of VA and VB . After the piston comes to equilibrium, what is the pressure in the gas? Express it in terms of k, V, NA, NB, T, a, and b. Do the problem using the given information and the ideas of statistical mechanics. There are at least a couple ways to do the problem. If you want to use the equation of state, you must derive it from the information given above and general results on the properties of entropy.
Question so kindly provided by Joe Kiskis

Edit: Simply put, this is all wrong. It doesn't even help you, so ignore it.
Like all of the statistical mechanics problems for this class, the proofs just feel like I'm making stuff up until the needed variable happens to be by itself on one side.

For this one, we're going to use:
  • S=k ln(ω)
  • ∂S⁄∂V|U = P⁄T
Beginning with S=k ln(ω):
  1. S = k ln[abVANAVBNB]
    • Substitute in the equations for ω
  2. S = k ln[ab(V−VB)NA(V−VA)NB]
    • Put in terms of V
  3. ∂S⁄∂V = abk [NA(V−VB)NA−1(V−VA)NB + NB(V−VA)NB−1(V−VB)NA] ⁄ [ab(V-VB)NA (V−VA)NB]
    • Take partial with respect to V
  4. ∂S⁄∂V = k[NA(V−VA)+NB(V−VB)]⁄[(V−VB)(V−VA)]
    • Just simplified
  5. P⁄T = k[NA(V−VA)+NB(V−VB)]⁄[(V−VB)(V−VA)]
    • Substitute in ∂S⁄∂V|U = P⁄T, assuming that we're at equilibrium so U really is constant.
  6. P = kT[NA(V−VA)+NB(V−VB)]⁄[(V−VB)(V−VA)]
    • Solve for P
Do I think its correct? God no… I do think it's a pretty fair argument, which very well might get me some of the points…

Note: The correct answer is P = kT(NA+NB)⁄V, which you can totally see in my answer, but I don't know how to get there from here.

Physics 9B Practice Final Problem #1

Water (density 103 kg/m3) is being siphoned out of a very large tank. The pipe extends a distance 3 m into the water and rises to a height 4 m above the water before dropping a distance 8 m. On the surface of the water, the pressure is 105 N/m2.
a) What is the flow speed in the pipe?
b) Is there a limit on how high the siphon top can rise above the surface of the water and still work? Explain. If so, what is the limit?
Question so kindly provided by Joe Kiskis

Part A
To solve this, simply apply Bernoulli's principle:
  • P + ρgy + 1/2 ρv2 = C
    • P - pressure
    • ρ - Density
    • g - acceleration due to gravity
    • y - height from arbitrary reference point
    • v - velocity of the fluid
    • C - arbitrary constant
We're trying to find the velocity of the fluid in the tube, so we can choose any point in the tube. We also need another point to calculate C; the surface of the water should do, since we know everything about it.
  • 105N/m2 + 103 kg/m3*9.8m/s2*0m + 1/2*103 kg/m3*(0m/s)2 = 105N/m2
    • We can arbitrarily set the origin for y as the surface of the water, but really any other point would do, just not as easily.
    • We can assume the surface of the water isn't moving, since this is a lousy lower division physics class.
  • C = 105N/m2
Now that we know C, we can plug it into the equation anywhere else. The easiest place would be at the mouth of the tube, since at that point it equalizes pressure with air, who's pressure was given.
  • 105N/m2 + 103 kg/m3*9.8m/s2*(-4m) + 1/2*103 kg/m3*v2 = 105N/m2
    • y = -4m since the tube goes up 4m, then down 8m.
    • Now just solve for v
  • v = 8.85 m/s
Part B
There is an upper limit to how high the siphon can operate, since it's the surface air pressure that is pushing the water up the tube. Once the weight of the water exceeds the air pressure, the water can't raise any farther. Above this upper limit, the inside of the tube is a vacuum, so to find this limit, set P=0. At the same time, energy has to be conserved, and we know the water is moving through the tube at 8.85 m/s, so we need to factor the kinetic energy into the use of Bernoulli's principle When the siphon fails, the water stops moving, which means that it's only the height of the tube that matters:
  • 0 + ρgy + 0 = C
    • Solve for y
  • y = C / ρg
  • y = 9.75 m 10.2 m
Note: The use of KE in this equation originally seemed iffy to me. Consider this: the water in the tank is compressed to 105 N/m2 by the air. The water then needs to be accelerated into the tube, which will translate some of this pressure into KE, and will lower the maximum height from the stationary column of water height of 10.2m.
Note: I was all kinds of confused on this problem. Thankfully, the professor was kind enough to drop into the classes chat room and point out all my failures in logic.

Now the real question is what happens between 9.75m and 10.2m? On the one hand, the siphon still works as long as the water is moving, but we've already calculated how fast the water has to exit the tube to conserve the lost potential energy of dropping 4m. How can the water slow down at the top of the tube?

Friday, December 5, 2008

Google Ad Fail

No, as a matter of fact, I do not need any hot water heater problems. Thanks anyways?

Job Interview Yesterday

Beginning of this week, I got an email from Jeff Feerer, who is the facilities director for the College of Engineering at Davis, saying that he heard that I might be interested in a job working for the College of Engineering.  This came from a clipboard passed around on the first day of shop asking people if they'd be interested in this type of thing.  I didn't think anything of it at the time, so imagine my surprise when I actually got an email asking me if I'd like to come in for an interview.

The interview was for two spots available in the Engineering Fabrication Labratory.  This would mean I would be in charge of the student shop during evenings and weekends, as well as work on projects for the good of the college (supply racks, parade floats, etc).  It also includes other odd jobs such as keeping the shop clean, servicing equipment in the shops, and even working the shipping/receiving dock when the guy in charge of that is on vacation/sick/etc.  Overall, it sounds like a very interesting job, which would let me keep working in the shop, but on other people's projects (I don't have to fund them, and I get paid for it).  I wasn't stupid enough to actually tell him I'd work for free!

So the interview went quite well.  Half of it was him describing the job, setting expectations for what and when I'll be doing stuff.  The university is going to supply a shop apron, steel toed boots, and have me fitted for a resperator for welding(expensive!).  After that he started asking me the typical interview questions, and I only managed to make a fool of myself once.

For some unknown reason, his first question hit me completely unprepared: "What do you do during your free time?"  How could I screw up that question?!?  I program, I work on trains, I build electronics, tinker with Linux, repair computers, study extracarricular text books, build antennas, the list goes on!  And all I could come up with was "Not much, I really don't have a life."  GAAAHHHHH!!!! STUPID STUPID STUPID!!!

Luckily, I think I made up for that.  It was just a profound experience having him make these statments about what he's hoping for in a candidate, and I was able to exceed his expectations on almost every one.  "You're going to need to learn to drive a fork lift" That's not that bad, considering I've already had a few dozen hours loading and unloading palates out of box cars with a fork lift.  "We want someone who can easily communicate with the adult staff" Well I do have an amateur radio license, so I spend two nights a month hanging out with guys 30 years old than me.  I had never really realized (or even thought about) how good my hobbied look on a resume until I sat there with him shaking his head as he read mine.

Notice that last part?  I brought a resume.  I was talking to another person who is interviewing for the job, and they thought I was a dork for bring in a resume for the job.  I'm sorry, this is a real job, with very real minimum wage, working for the College of Engineering.  If I wanted something from UC Davis to put on my future resume, this is it folks!  As my dad always said, to get the job, you just need to get yourself from the big stack into the little stack.  I should find out mid next week if I've gotten the job or not.

Dr. Feerer also said I sounded like a good candidate for a Union Pacific internship that they have had little success filling.  I, of course, would be VERY interested in this (seeing as how my dream for next summer was an internship with CalTrain), so we'll see if I can get a summer job out of it too (though aparently the Eng Fab Lab operates through the summer as well, so I could very well just stay in Davis for the summer).

Gyroscope from Manufaturing Class

Last week of class, so in EME 50 (manufacturing for mechanical engineers) shop this week we had a spin off to see who's gyro built for the class stood up the longest. My bearings were far from perfect, so I didn't stand a chance of winning, but my 5m03s was respectable (Winner was 6m and change, that last minute is hard to get). I finished all my projects for the class fairly quickly, so I had plenty of time to polish it. Luckily, my dad has an old metal lathe he wants me to look at to decide if I want it or not, so I could most likely refresh my bearings on it.

Final picture is next to a deck of 3x5 cards to give you an idea of scale. I've been running it quite a bit now that I've taken it home, but am still getting a decent 4 minutes out of it (2 minutes is required to pass the class). The bearings do have a finite life span, and they are definitely already showing heavy wear.

Wednesday, December 3, 2008

Tip of the Day - Check Them Expiration Dates

Yeah, I went down the street, bought antihistamines, then got all the way home before realizing they expired 6 months ago. Driving to three stores later... I can breathe!

But seriously, check the dates. If it's a convenience store and not a drug store, check it three times.

Monday, December 1, 2008

The Atheist's Definition of Morality

I know I've been writing on religion quite a bit lately, but I really want to examine one more thing before attempting to get back on subject (whatever that means).

Of everything Richard Spencer said, the one thing that still bugs the shit out of me, a week later, was his point on morality. I just couldn't believe he said that Atheists have no moral values, simply because we don't have the Bible to spell it out for us. That is the dumbest oversimplification I've heard for quite a while, with second and third easily coming from that same lecture.

Atheists are moral. Hell, even chimps are moral. What's less bluntly obvious to religious folk is our definition of morality, so I give upon you my definition of morality:

Σ[(Mcommunity-Msubject)/σ] < Threshold Function

The magnitude of the quantity [perceived average of one's community's moral values minus morality of subject divided by the standard deviation] is less that a threshold function.
  • Sigma: It goes almost without saying that morality is a multidimensional issue. To say that it can be reduced to a single number would be a gross over-simplification. One's view on murder could have very little to do with their view on abortion, or animal rights, or their views on energy consumption. This allows someone who is generally inline with the community seem to be a generally a good person, except when carbon footprints come up in conversation and he looks like a jerk. The mathematics for this is left as an exercise for the reader/philosopher. Many things will be on a [0, 1] analogue scale (Vegetarianism), while other metrics might very well be on a single (How many people can you murder before it's uncalled for?) or multidimensional plane (resource usage - gas, electric, space, etc). Hell, you could start coming up with metrics that require complex geometry, depending on how hard you work at it.
  • Mcommunity: The perceived average moral values of the community. Contrary to what has been said about Atheists, I can say that what Hitler did was wrong. I will go even farther, and point out that there was a large number of people who didn't think what he did was wrong. My definition still holds. His community's collective moral value happened to be skewed towards it's-ok-to-kill-Jews-because-it's-all-their-fault (ΔM is small, so they think its ok). My community's Mcommunity happens to lie closer to not thinking it's ok to kill people (ΔM is large, so we think Hitler is evil), but who can say what's right?
  • Msubject: The perceived moral value of the person being examined. Most axes of this point should understandably undefined. When you first meet someone, the first thing you start to do is (hopefully) rarely start grilling them on abstract moral dilemma. Only for close family members, significant others, and maybe your best friend would you have a good general idea where they really lie in this multidimensional morality space. For most everyone else, almost arbitrary values are used, based on Mcommunity, Mpersonal, and even apparent correlations between separate axes (ie gay marriage vs interracial marriage, animal rights vs vegetarianism, etc)
  • The standard deviation: The deviation of a community is going to give a good indication as to how open minded the group is. A community of only evangelicals is going to be less accepting of a homosexual than a vast array of people with one or two evangelicals mixed in, who might still condemn them, or might not, since they don't feel that have as much to stand on for support in the community on the issue.
  • The threshold function: I would imagine the threshold would be something quite like the sigmoid function. The exact coefficients would of course be personally defined, and could easily be influenced by the community as much as the perceived σ. This allows for smaller deviations in less important matters to not classify someone as a character-lacking jerk than deviations among seemingly more important matters, which can easily classify someone as such.  And notice that the sigmoid isn't a step function, so the result of the entire equation is going to be more statistical than binary, which means that you can think Hitler is truly evil down to his core, but that guy who talks shit about Sally behind her back is just a jerk.
So there is my engineer-based view on a philosophical matter which has become much too much based on religion for my taste. It still needs a bit of work to deal with the edge cases, but they're less obvious than miscongruencies like homosexuality or shellfish, or entire communities being completely inexplicable.