Dealing with temperamental scientific models

Finite element models can be temperamental. I have a model at this moment that is producing incredibly accurate results. So good in fact that if they were someone else’s results I might be tempted to wonder if they were “post-processed”.

About an hour ago, the solution (quasi-Newton) was diverging half way through—now it soldiers right through the last solution step. The worst part is I have no idea what changed. I prefer a slightly more deterministic process.

In the words of one of the leaders in my specific niche of nonlinear finite element analysis to me at a recent conference:

NLFEA is an art, not a science.

This means building, calibrating, and validating models requires a lot of TLC. You’ll feel like it should just work, that you shouldn’t have to go through all this tedium. But today—in 2012—this is reality.

How to digitize a graph on Windows

I have written before about how to digitize a graph on a Mac. Numerical analysts regularly need to plot the response of numerical models against experimental results only accessible via plots embedded in pdf files. This applies not only to older raster documents, but also to vector-based pdf files. Until researchers begin making more data publicly available, this is a problem we have to contend with.

Since I spend a lot of time on a Windows box, it’s cumbersome to switch to the Mac just to digitize a plot. I searched for an effective tool, tried a few, and finally landed on DigitizeIt. While it weighs in at a hefty $49, after trying a few free options that munged the data pretty badly, I happily settled my misgivings about the price and got back to work. This tool just works. The screenshot above shows DigitizeIt working with some data from the Vecchio shear panel tests at the University of Toronto.

Like every other graph digitizer I’ve tried, this one offers an auto-detection algorithm that fails miserably when you have multiple overlapping curves. Resign yourself to the fact that this will be a manual process—head down and power through. I can digitize a graph like the one above in about 15 minutes.

Data is exported in a no-frills csv file, simple enough to process with Python or Excel. Here’s the above data plotted in Matplotlib:

Again, it’s a somewhat expensive tool to scratch this itch, but I needed something that was intuitive and just worked. Oh, it’s also cross-platform (Win/Linux/OSX), although I can only vouch for the Windows version.

Right message, right level

The other day I was at a restaurant with my daughter on our weekly date when—as is often the case—we were approached by an elderly couple sitting near us. Smiling ear to ear, the lady put her hand on my daughter’s arm and said,

“How wonderful, when so many children don’t even have fathers.”

This was to my three year old.

Nice reminder to deliver the right message on the right plane. An important or beautiful message delivered at the wrong resolution can undermine or hurt both the message and the hearer.

Applies to meetings, technical presentations, blog posts, conversations over coffee, innocent children in public, etc.

Reading research papers on the iPad

ipad-pdf

One of the driving factors behind my decision to buy the new iPad was the experience of reading academic papers using the new retina display. It has not disappointed. As previously stated, beyond a few inches from my face, it basically looks laser print quality to me. Both single- and double-column journal articles are perfectly legible. To get a feel for the resolution of a typical pdf (single/double columns), check out the full size images below:

Screenshots:

The de facto standard app for reading pdf documents is GoodReader1. While not the sexiest app, it handles my pdf workflows very well. I have it set to watch a few folders on Dropbox. Anytime I add a pdf to these folders, my iPad pdf library is updated with those papers the next time I launch GoodReader. Paging through pdf files is dead fast. You can intuitively navigate through the table of contents, annotate pdf’s, crop out the white margins, you name it. It especially plays nicely with LaTeX-generated pdfs which use the hyperref package.

I have sync folders set up for:

  • Research articles I constantly reference
  • Programming manuals (basically all my O’Reilly pdf’s)
  • The full manual set for my nonlinear finite element software
  • My thesis and other working papers

The mental shift of now having my full pdf library inches away and not fighting for screen real estate with other apps is a game changer. In this sense, the iPad is becoming a fine-tuned, personal reference machine which acts more as a peripheral to my desktop computer when actually doing research. It has also allowed me to essentially quit carrying a big bag around, since all my reading material is digital. Often when I get stuck and need to spend some time in deep concentration reading an article or technical manual, I will just grab the iPad and walk to a nearby coffee shop.

In summary, I couldn’t be happier with the pdf workflows I’ve set up on the new iPad. While the price to play is high, it’s been totally worth it.

  1. There are many apps that cover similar bases, such as iAnnotate PDF, Papers, Mendeley, etc. I’m sure these are all great, but GoodReader covers everything I need in a streamlined way. 

Two weeks with the new iPad

A few weeks ago I pulled the trigger on the new iPad (the 3rd generation). I have a lot to say that will surely span several posts. In this first one, I want to talk about why I went this route and my initial impressions.

Why get the iPad 3?

  • I was already planning to buy one when I graduate this summer/fall, and the iPad 3 will be the state of the art version in six months.
  • I have multiple national/international trips over the next several months, including conferences and job interviews.
  • I hate traveling with a laptop. (I have carried a 12-lb Dell laptop everywhere from Seoul to Dubai—laptops suck when traveling.)
  • The retina display will be great for reading research articles and as a handy peripheral to my simulation work on my work Windows 7 box.
  • I can actually present at conferences using it (two of my upcoming conferences require you present off your own “laptop”).
  • It will be a helpful interview tool (notetaking, researching companies, profiling various people I am meeting with, etc.)
  • I bought it primarily as a work tool and have taken active steps to keep it professionally focused.
  • Why not buy the ideal machine for Facebook and Twitter right after shutting both down? (The hiatus is going wonderfully, btw.)
  • I have waited patiently for a long time.

There are other reasons, but I think you get the idea.

The experience of buying it

I pre-ordered the white, 16gb version with 4G wireless during launch week. The estimated delivery date was a month later, which seemed like forever, but whatever.

Then, on the morning of the launch day, I saw a post by Matt Mullenweg (founder of WordPress) who said he basically showed up at an Apple store that morning to find there was no line and plenty in stock. I immediately picked up the phone, called the Apple store at Lenox mall and got the same story: zero wait and every model in stock. This was around 11am.

Long story short, the round trip time from my desk at Georgia Tech to Lenox and back was 45 minutes. I walked right up to an associate, told them what I wanted, and in less than ten minutes was in the car driving back to my office. I cancelled the online order in a few clicks and was up and running immediately. I even got real work done that afternoon with it.

Initial impressions after two weeks

  • We live in the future. Way, way in the future.
  • The physical design is awesome. It’s sleek and lightweight. It feels great. I understand it is heavier than the iPad 2, but I constantly can’t believe what I am holding in my hand when using it.
  • The retina display is truly impressive. It’s exactly the same experience as upgrading an iPhone 3 to an iPhone 4—you can’t quite get over how sharp the presentation is.
  • Beyond a few inches from my face, pdf’s look like laser print quality. Reading research papers and searching technical manuals is fast and easy on this device.
  • At my normal rate of use during a day, I can go three days without charging.
  • It has been a boost to my productivity due to several distinct advantages over my Mac as a peripheral for my Windows-only research workflows. I have a lot more to say on this point in particular, but that will have to be another post.
  • I spend much less time processing email. In fact, I don’t think I logged into the Gmail web interface the first 7 days I was using the iPad, and I consistently kept my inbox below five messages by the end of each day. I have never been this effective with email.
  • I immediately tested the presentation capabilities using a pdf viewer and a previous LaTeX/Beamer conference talk using the VGA adapter. I will probably post a video demo of this at some point, because it immediately opened up several new ideas regarding presentation format, use of media, and interactivity. I had a stupid grin on my face by the end of this experiment.
  • Warning: your laptop/desktop monitor will start to look cheap, dated, and pixelated in comparison.
  • The Kindle is still a remarkably better experience for long-form reading, mainly because the iPad is so much heavier. The retina display does improve the reading experience remarkably over older iOS devices. [Sidenote: my wife likes her new Kindle 2!]
  • The app ecosystem is quite mature for a lot of my work use cases. Much more to write about on this topic in the future.
  • Facetime calls with my wife and daughter during the day are amazing. My daughter’s face is almost full size. Again, this simple use case feels like something out of the way distant future.
  • Like everyone and their brother has said, the OmniFocus iPad app is incredible. This is a Getting Things Done -ish task management app.
  • All of my online reading is now streamlined through Flipboard and Instapaper, specifically my Google Reader feed and a small handful of Twitter feeds I couldn’t bring myself to part with after shutting down my social media channels. I have never processed RSS so efficiently or made better decisions about what (or what not) to read.
  • There are more Dropbox-syncing, Markdown-enabled text editors than you can shake a stick at. I am using several of these simultaneously pointed at different folders of files, which has resulted in a surprisingly cool workflow. More on that later.
  • I have quit carrying my laptop to work with me. My bag is lightweight and mobile. I can set up and work in seconds.
  • I bought the version with the 4G radio, but have not activated this service yet as everywhere I frequent has capable wifi. I wanted this option in case I work somewhere in the future where I am denied wifi access or if I would rather not have that type of surveillance from my employer.
  • The experience continues to improve daily as more and more apps take advantage of the HD graphics.
  • The white color provides a nice visual complement if you are primarily reading white pdf documents, which I am.
  • It is not going to fully replace a desktop/laptop machine for most people. Certainly not for me.

Going forward

So those are some initial impressions. Specifically I hope to cover my experience as I investigate its use as a scientific peripheral: writing tool, research reading device, note-taking device, technical presentation console, and also for teaching.