Welcome to Sebastian Blatt's weblog: a more or less regularly updated personal website about things I consider interesting.
This is also a Wiki:WikiWikiWeb, meaning that YOU can edit almost any page by clicking on the appropriate link on the bottom. See Oddmuse:Text Formatting Rules for tips on editing and adding pages. Read the introduction here to get an idea about what else is available here. Use muq.havens.de to directly link to the weblog.
Only interested in a certain topic? See the categorized weblog entries in Categories. Not enough entries on this page: go MoreMuQ. In need of serious background info on this weblog? Have a look at the MuqRationale.
By Al Brog
In two seminal papers [1,2] the long-standing question of aerodynamic behavior of Balrog/Wizard pairs in deep mine shafts has been investigated quantitatively for the first time. However, the initial research lacks a thorough description of the physical processes involved, leading many researchers to question the results. In particular, the most recent explanations in terms of terminal velocity caused calls for further in-depth analysis in the community. In addition, the focus of the leading research team seems to have shifted to empirical determination of Balrog masses [2]. In this work, we will make only crude assumptions about the masses, cross sections and drag coefficients. Instead, we will ask whether the problem is well-posed and also find a more accurate description for the depth of impact.
The term terminal velocity will be used throughout the paper. To develop a deeper understanding of the concept, let us take a look at the forces acting on a body of mass m falling under the influence of earth's gravity in a gas. Gravity will accelerate the body towards the earth core. But since more and more air has to be displaced the faster the body falls, it cannot reach arbitrary speeds. The drag force acting on a body with velocity v moving through air of mass density n is given by
1 2 F = --- n s c v , drag 2 d
where s is the body's surface displacing the air (the cross section perpendicular to the direction of movement) and c_d is the dimensionless drag coefficient depending on the roughness of the surface displacing the air. A human body falling through air has a drag coefficient of 1.0 – 1.3, the Eiffel tower has 1.8 – 2.0 [3]. Since both wizards and Balrogs are humanoid, we will approximate c_d ~= 1 and ignore it in the following.
During a fall in air, the body will accelerate until magnitudes of the opposing forces of drag and gravity (F_g = m g, g ~= 9.81 m/s^2) reach an equilibrium, given by a terminal velocity v_t:
2 F = m g = F = 1/2 n s v g drag t
+------ +---
| 2 g | m
=> v = |------ |---
t | n \| s
\| airHere, the term sqrt(m/s) depends on the properties of the body.
Thus, we expect wizards and Balrogs to fall at different velocity. However, we are informed that both wizard W and Balrog B stay with each other during the whole fall and hit the bottom together. Surely, B has at least a ten times larger mass than W, assuming similar carbon-based biology and lack of full-body metal armor for both. However, the cross section s roughly scales as m^(2/3), so that B needs a relatively larger cross section than W to fall at the same velocity. Luckily, B is winged and able to vary s by at least an order of magnitude by extending the wings or folding them in. From these rough estimates we conclude that the scenario of B and W falling while fighting each other is probable. We also advise wizards in said scenario to remove the Balrog's wings to increase separation and decrease whip scar density.
We conclude that we can limit our analysis to the scenario of a wizard falling since his mass and cross section determine how fast the Balrog will fall to keep fighting him.
The next question to ask is whether W (and B) will actually reach terminal velocity. Is the question in [1] well-posed at all or will they hit the ground while still accelerating? To answer this burning question, consider the equation of motion determining the interplay between gravitational and drag forces:
1 2
m v' = - --- n s v + m g,
2where v indicates the current velocity of W. This differential equation has the solution [4]
. g .
v(t) = v tanh|--- t|,
t | v |
` t 'which converges exponentially to v_t as g t / v_t >> 1. We can deduce a typical timescale when the wizard has reached his very own v_t from
t = v / g term t
Assuming that the wizard has m = 100 kg, s = 2 m^2, and that the surface air density is n_air = 1.225 kg/m^3 [5], we find
v = 28.3 m/s t = 2.9 s t term
From reference [1], the duration of the fall is 104 s, so that the assumption of traveling under terminal velocity during the whole fall is very good.
Another critical component of the drag force is the mass density of the air around the falling object, because it determines how easily the air is willing to be displaced. Non-exhaustive googling reveals that in a gold mine at depths of two miles, the air pressure is twice as high as on the surface and the rocks have a temperature of 140 F [6]. Using the ideal gas equation p V = N k_B T we find that the ratio of air mass densities follows
n p T
2 mile 2 mile surf
--------- = ------------------,
n p T
surf surf 2 mileso that (assuming a surface standard temperature of 288.15 K [5]) we find a mass density gradient dn/dz = 2.8e-4 kg/m^4 and a temperature gradient of dT/dz ~ 14 K/km. Using the density gradient we model the air density profile as a function of depth z as
dn n = n + ---- z. air surf dz
Inserting this density profile into the equation of motion results in a second-order non-linear differential equation
s dn 2
z''(t) = - ----- (n + ---- z) (z'(t)) + g,
2 m surf dzwhich we integrate numerically for initial conditions z(0)=0, z'(0)=0. The resulting trajectory is shown in the plots below:
As expected, there is an initial short phase where the wizard catches up with the surface terminal velocity. Once he has reached that equilibrium, his velocity tracks the slow changes in local air density faithfully. His velocity slowly decreases as the air gets thicker and thicker until Balrog and wizard hit water (of temperature 50-60 C) with more than 20 m/s at 2.5 km under ground.
In conclusion, we found that a Balrog/Wizard pair tumbling for 104 s into a Morian mine shaft hits rock bottom at roughly 2.5 km depth. This result depends mostly on the wizard's weight and body shape. Influence of gravitational changes is negligible at these depths (earth radius ~ 6300 km). In addition, we give the practical advice of reducing Balrog cross section by wing removal to wizards finding themselves in such situations.
Calculations powered by Frink. ASCII math powered by BrightMare.
It has been a while since I wrote a post here. Here is a list of great fiction podcasts I listen to while cleaning my apartment… :-)
Here are some more completed books by Scott Sigler (the author of Earthcore above) which I have not listened to yet, but that seem to be highly recommended.
As an update on the previous post (2007-02-04 Web), variantfrequencies.com has a great ongoing story called the Failed Cities Monologues, already in their 24th episode. If you are into William Gibson and Neal Stephenson, this is something you will enjoy a lot.
I have been listening to a lot of great Science Fiction and Fantasy lately. How so? By subscribing to the truly stellar SF&F podcast of the folks at escapepod.org. They publish short stories from magazines as well as original stuff by well-known authors every week. Go and listen, they also have great music for the intros and outros!
Here's a cool hack. I used several pieces of interesting software to achieve a nontrivial task with negligible hand-editing of input data.
Nothing very interesting yet, but the list of contact data that I had was a JPEG. Being lazy, I thought to try GNU/ocrad to get the textual information out of there. Here's how you convert a JPEG to an OCRed text file (djpeg comes with libjpeg which you most likely already have installed):
djpeg -greyscale -pnm filename.jpg | ocrad > scan.txt
Here's the only not-so-fun part: I had to edit the text file for the obvious recognition errors, mostly because some parts of the source file used an italic font with serifs.
I've wanted to test Common Lisp for a non-trivial task for a long time, so I decided to try doing this in SBCL+Emacs+Slime (see 2006-08-14 Software).
Regular expressions in Lisp can be used very comfortably with cl-ppcre's REGISTER-GROUPS-BIND macro. cl-ppcre is a library modeled on libppcre, it supplies you with the usual Perl-compatible regular expressions. This function lies at the heart of what I did:
(defun parse-line (line category)
(cl-ppcre:register-groups-bind (nil (#'parse-integer n) l f ti em ph pw)
("^(([1-9])[nrs][dt] )?(\\w+), (\\w+|-) (Mr|Ms|Dr)
(-|[-_0-9a-zA-Z@.]+) (-|[0-9]{3}-[0-9]{3}-[0-9]{4}[-0-9a-zA-Z/]*)
(-|[0-9]{3}-[0-9]{3}-[0-9]{4}[-0-9a-zA-Z/]*)" line)
(let ((c (make-instance 'contact :category category)))
(unless (string-equal l "-") (setf (last-name c) l))
(unless (string-equal f "-") (setf (first-name c) f))
(if (string-equal ti "Dr")
(setf (title c) ti)
(setf (gender c) (if (string-equal ti "Mr") 'male 'female)))
(unless (string-equal em "-")
(setf (email-address c) (map 'string #'char-downcase em)))
(unless (string-equal ph "-") (setf (home-phone c) ph))
(unless (string-equal pw "-") (setf (work-phone c) pw))
c)))Note how you can specify a transformation like PARSE-INTEGER for each variable. In this instance I used it to parse numbers specified as 3rd, 1st, etc. at the beginning of each line. The function returns a CONTACT object that is added to a global list.
Once we have that global list of contacts, generating the email text is straightforward; write a defun using FORMAT with a big control string and a lot of conditionals (take a look at the "~[~]" and "~:[~]" directives here).
Using FORMAT, it was very easy to produce a personalized letter using the correct gender, title and all contact information. Textual content varied a bit for all categories and the whole defun including all text took only 47 LOC.
Here's another cool library: cl-smtp, a Common Lisp smtp client. The only function call offered by the library is
(cl-smtp:send-email host from to subject message
&key (port 25) cc bcc reply-to extra-headers authentication
attachments (buffer-size 256))Combining this with the format function and mapping it over the list of contacts produced the desired result.
Note how we only left Lisp for scanning the picture and editing the text file. Also note how we did not leave Emacs to do that. I was very impressed with how the instant feedback from the REPL improved the overall speed of developing a new function. Being able to test new ideas on the fly without actually leaving the source file speeds things up a lot and is very convenient.
Lately I've been wondering whether there is an easy way to bind all my loose leaf printouts into something resembling a paperback. I know that binderies use a clamp and a hot glue strip to do that; but that seems a bit overkill. It turns out that several people already had similar ideas and have written nice tutorials on how to make your own bindings. The secret seems to be Gorilla Glue…
Here are a few ideas:
As a followup on the last entry: apparently one can now get reprints of Morse & Feshbach's Methods of Theoretical Physics I & II! These are two great books on theoretical physics but have been out of print since the sixties, I believe. Herman Feshbach's son has a website offering high quality hardcover reprints off the original microfilm. The downside is: the reprints cost even more than the originals…
Christmas is coming around and I need to make sure that my wishlist of books is up to date. Just in case anybody ever reads it and decides to give one of those to me. I can hope, at least… :-)
Last Weekend, Sunday afternoon. Went to the Boulder Bookstore on Pearl Street. Since it's Sunday and it is a pleasant day, Pearl Mall is full of people; a band is playing in front of the store and a girl is singing very beautifully. All in all: a perfect early autumn Sunday.
I buy Haruki Murakami's novel The Wind-up Bird Chronicle and the guy on the cashier tells me "This is the best book I've read in a few years, you know, magical reality like Márquez." The week goes by and by the next weekend I have read the book. A historical novel by a Japanese author about the end of World War II, especially the loss of the Nipponese-occupied territory in northern China: Manchuria or Manchukuo.
Murakami is a gripping story-teller and I certainly could not put down the book. The pretext for telling interesting stories about Manchuria is a Tokyo-suburb-inhabiting newly out-of-a-job guy. He discovers psychic abilities in connection with spending time in dry wells. The pretext for that is his wife running away.
The story wraps up… sort of. The cover claims that this is a detective story: it isn't. Most of the weirdness never gets explained in any way and many (in themselves interesting) characters turn out to be just in there to glue different historical stories together. Also: the story only plays in 1984 to allow WWII characters to take part.
All in all: a very compelling read, but with a sort of disappointing end. I don't get the hype. If you want a WWII-inspired historical magic-reality novel with the main character discovering all the connections between today and 60 years ago, read the Cryptonomicon by Neal Stephenson. It makes a lot more sense.