Tuesday, April 3, 2012

Highly Replicable Research

There is a really good post by Titus Brown (by way of PlanetScipy) on replicate-able research.
So what did we do to make this paper extra super replicable?
If you go to the paper Web site, you'll find:
  • a link to the paper itself, in preprint form, stored at the arXiv site;
  • a tutorial for running the software on a Linux machine hosted in the Amazon cloud;
  • a git repository for the software itself (hosted on github);
  • a git repository for the LaTeX paper and analysis scripts (also hosted on github), including an ipython notebook for generating the figures (more about that in my next blog post);
  • instructions on how to start up an EC2 cloud instance, install the software and paper pipeline, and build most of the analyses and all of the figures from scratch;
  • the data necessary to run the pipeline;
  • some of the output data discussed in the paper.
(Whew, it makes me a little tired just to type all that...)
What this means is that you can regenerate substantial amounts (but not all) of the data and analyses underlying the paper from scratch, all on your own, on a machine that you can rent for something like 50 cents an hour. (It'll cost you about $4 -- 8 hours of CPU -- to re-run everything, plus some incidental costs for things like downloads.)

I really think it is a neat use of the Amazon elastic compute cloud.

Saturday, March 31, 2012

Mathematical Foundations of V&V Pre-pub NAS Report

A while back I mentioned an interesting looking study on the Mathematical Foundations of Validation, Verification and Uncertainty Quantification. I was just alerted to the pre-publication version available on the National Academies Press site.

Section 2.10 presents a case study for applying VV&UQ methods to climate models. The introductory paragraph of that section reads,

The previous discussion noted that uncertainty is pervasive in models of real-world phenomena, and climate models are no exception. In this case study, the committee is not judging the validity or results of any of the existing climate models, nor is it minimining the successes of climate modeling. The intent is only to discuss how VVUQ methods in these models can be used to improve the reliability of the predictions that they yield and provide a much more complete picture of this crucial scientific arena.

As noted in the front-matter, since this is a pre-print it is still subject to editorial revision.

Friday, March 30, 2012

Empirical Imperatives

From Climate Resistance:
There is a belief that you can simply read imperatives from ‘the evidence’, and to organise society accordingly, as if instructed by mother nature herself. And worse still, there is reluctance on behalf of many engaged in the debate to recognise that this very technocratic, naturalistic and bureaucratic way of looking at the world reflects very much a broader tendency in contemporary politics. To point any of these problems out is to ‘deny the science’. ‘Science’, then, is a gun to the head.
Shrinking the Sceptics

Sunday, February 26, 2012

SpaceX Dragon Panorama

SpaceX has a neat internal panorama up of their Dragon space capsule.
SpaceX Dragon capsule, internal iso/orthogrid panels and grid stiffened structure, forward/port view

Sunday, February 12, 2012

Sears--Haack Body for Mini-Estes

We have a little company here in Dayton that does print on demand (Fabbr) with Makerbots. They specialize in printing RepRap kits, but I think I'm going to see if they can print me a little rocket to use with Estes mini-motors.
The 1/4 and 1/2 A motors are 13 mm in diameter and 44 mm long.

The first thing you need to print a part with these hobby printers is an stl file. I followed a some-what torturous route to generating one.
First I made a little python script to find the minimum volume Sears-Haack body that would fit a 13x44 mm cylinder. The bold black curve is the minimum volume body; it happens to have a length of twice the motor length.
As you can see in the script, I also dumped an svg file of that curve. This is easily imported into Blender. Then the svg curve must be converted into a Mesh, and the Spin method applied to generate the body of revolution.
I played with the number of steps to get a mesh that looked like it had surface faces with near unit aspect ratio (not that it really matters, but old habits die hard).

Now I should be able to add some fins and export an stl from Blender for my rapid prototyping friends to play with. The design goal for this rocket will be to have positive static margin with the motor in the rocket, but neutral or negative static margin once the ejection charge pops it out the back (that way it does a tumble recovery).

Saturday, February 11, 2012

OpenFoam Now with Fedora RPMs

Well, I was pretty excited that OpenFoam was acquired by SGI, and they created a foundation to hold the copyrights for the project. That is good news for building a healthy open source community around the software. Looks like I jumped the gun with the install from source option I detailed back in November. If only I were a little more patient, I could have installed from rpms. The new release has lots of interesting additions. We live in exciting times for open source CFD.

Thursday, January 19, 2012

McCain's Hangar Queen on Trend

Looks like McCain's Hangar Queen is on Norm's trend.
Entire Defense budget to buy one airplane
See the video; linked from Make. Related post on Roger Pielke's site.



Tuesday, January 3, 2012

Nuclear Politics Prior

One of the recurring themes of Climate Resistance (which I've mentioned approvingly before) is that the politics around the solutions proposed for climate change are prior to any consideration of the science of the environment (or the more interesting question Lorenz asked about the existence and uniqueness of long-time averages of the earth's weather).

This state of politics prior is unavoidable, and therefore not unique to the field of climate policy. I think this talk by Kirk Sorensen on the history of US breeder reactor development provides another good example.

The policy maker (Nixon in this case) picked the solution based on desired political outcomes (jobs and lucre for politically useful districts). "The Science" was merely a part of the marketing and public relations campaign for that choice. Dissenting scientific positions (the molten salt folks in this case) were suppressed with "Rickoverian dedication".

See this extensive remix for lots of info on LFTR.
"There's been a very bipartisan approach to scaring the public." Kirk Sorensen (~1:20 or so)
"The whole aim of practical politics is to keep the populace alarmed (and hence clamorous to be led to safety) by menacing it with an endless series of hobgoblins, all of them imaginary." H.L. Mencken

Monday, January 2, 2012

Setting up a project on Github

I've been an SVN user for a while, but it seems like more and more projects are going distributed version control systems like Git so I wanted to learn how to use Git. I found this crash course on Git for SVN users which provides a useful Rosetta stone, and this warning:

SVN is based on an older version control system called CVS, and its designers followed a simple rule: when in doubt, do like CVS. Git also takes a form of inspiration from CVS, and its designer also followed a simple rule: when in doubt, do exactly the opposite of CVS. This approach lead to many technical innovations, but also lead to a lot of extra headscratching among migrators. You have been warned.
This sounds a lot link Linus Torvalds' talk, WWCVSND: What Would CVS Not Do?

Github has a set of steps for setting up on linux. Git comes in the Fedora repos (and probably every other repo), so install is easy. A nice bit of documentation that comes with the install is Everyday GIT With 20 Commands Or So.

Since I already use password-less ssh to hop between the boxes in my little network, I didn't move my old public key as in the instructions. I created a config file in the .ssh directory containing these lines:
Host github.com
User git
Port 22
Hostname github.com
IdentityFile ~/.ssh/id_rsa_git
TCPKeepAlive yes
IdentitiesOnly yes
Where id_rsa_git.pub is the key I uploaded to github. Authenticating to github is then just:
ssh -T git@github.com
Then you accept their RSA key like you would for doing any other ssh login.

The next thing is to create a repo. Clicking through the instructions brings you to a page with several "next steps". Which for my example are:
mkdir FalknerSkan
cd FalknerSkan
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:jstults/FalknerSkan.git
git push -u origin master
Which gives some output ending in something like: Branch master set up to track remote branch master from origin.

If you'd like, you can read up on the Falkner-Skan ODE at the viscous aero course on MIT's OCW: