31 July 2008
26 July 2008
Impinging shock results for a 5 degree wedge at Mach 8.2
After a dead-end-full month of futzing with Gridgen, DPLR, and Tecplot 360, today I finally got a result worth showing:
This is a simulation of a hypersonic experiment performed by Kussoy and Horstman in 1991. A flat plate and an angled wedge are placed in a Mach 8.2 flowfield. Starting from the upstream tip of the flat plate (not shown), a turbulent boundary layer develops along the plate's length. An attached shock occurs at the wedge tip, and the shock interacts with the plate's turbulent boundary layer. Kussoy and Horstman looked at how surface pressure and heat flux at the plate varied with the wedge angle. Here I'm comparing their surface pressure data with my simulated numbers for the 5 degree wedge case. Agreement isn't that bad (eyeball norm), especially given the paper's experimental error bounds and how new I am to this whole process.
I was surprised to see the simulated pressure gradient is sharper than the experimentally obtained gradient. I suspect that
- I goofed when specifying the turbulence transition point along the flat plate, or
- perfect air assumptions weren't appropriate, or
- Baldwin-Lomax wasn't the right turbulence model to use, or
- I've not done any averaging and the flowfield has turbulence, or
- any one of a number of other things.
22 July 2008
Using GNU screen with gnome-terminal's custom shell command
GNU screen is a nice tool. It becomes more valuable when it's omnipresent, but until today I've been too lazy to get configured the way I want it:
- I want screen started within every new gnome-terminal.
- When a new terminal starts, I want a fresh screen window with a fresh shell.
- When I close a terminal window, my screen session should persist.
The first ups screen's usefulness since its capabilities are now always a keystroke away. The second mimics my new-terminal-window-is-a-new-task mentality. The third keeps me from accidentally losing work when I close a terminal window.
First, I needed to add several options to my ~/.screenrc:
autodetach on
multiuser on
startup_message off
# Startup commands for a new session
chdir
screen -t local
select local
Next, because gnome-terminal's custom command facility doesn't allow anything too fancy (e.g. multiple commands, variable expansion), I had to create a small bash script called gnome-terminal-command.sh:
# First, construct a new window identifier
WIN_ID=`date +%R:%S`
# Second, start a new window in the screen session using that identifier
screen -xRR -X screen -t "${WIN_ID}"
# Third, prevent existing terminals from switching to the new session
# Thanks to nassrat for this tip
screen -xRR -X other
# Now, use screen to connect to the new window within this process
exec screen -xRR -p "${WIN_ID}"
Lastly, I told gnome-terminal to use gnome-terminal-command.sh under Edit -> Current Profile -> Title and Command . Check "Run a custom command instead of my shell" and give gnome-terminal-command.sh in the Custom command input box. Older versions of gnome-terminal (e.g. version 2.18.1) allow the script to be somewhere in your path. Newer versions (e.g. 2.22.1) seem to require a full path to the script. This is puzzling.
Testing it out...
- Start gnome-terminal and you get a screen session with one window called 'local'.
- Open a second gnome-terminal and you get a new screen window whose title is the current time.
- Close the second window and you see two screen windows persisting in the first gnome-terminal.
- Open a third gnome-terminal and you get yet another new screen window.
- Hit Control-D three times in the third window to end each of the screen windows. All of your gnome-terminals will simultaneously close.
During testing, it'll help if you have an informative screen status line. Should you run into serious troubles, you can undo the changes by using gconf-editor to tweak use_custom_command and custom_command under apps/gnome-terminal/profiles/Default.
16 July 2008
I've been here for too long
Ignoring the complete grossness of consuming pickles alongside cheap instant coffee, I immediately wondered how long they'd been there and if they'd be safe to eat. I snapped to the conclusion that, well, they are pickles and are therefore pickled after all.
I caught myself just as my hand lifted towards the container, shivered, collected my instant coffee, and moved on.