Elementary

So my colleague K stops by my office today and asks if I’m busy.

“No.  What’s up?”

“I’ve got a thermodynamics problem and I’m looking for a way to solve it,” says K, who is a chemical engineer by trade.  He proceeds to set the stage, explaining that this is a problem about pressure and temperature changes in a fire extinguisher when in use.  Starting with the ideal gas law, the conservation of energy, an assumption on the nozzle, and the multivariate chain rule, K lays out a sequence of equations.  Six blackboards later, he ends with a pair of differential equations:

$\displaystyle \frac{dP}{dt} = \frac{C_p}{ R} \frac{P}{T} \frac{dT}{dt}, \qquad \frac{FR T}{V^+} \bigg( \frac{P_A}{P} - 1 \bigg) = \frac{C_V}{R} \, \frac{dT}{dt}.$

“The problem,” concludes K, “is to solve these equations for P and T, where the other variables — the Vs and Rs and Cs — are constants.”

“Well… we can use the first equation to express P in terms of T, and see what the solutions look like in phase space,” I suggest.

So we separate ignore the independent variable $t$ and separate the remaining variables and go to town:

$\displaystyle \int \frac{1}{P} \, dP = \int \frac{C_p}{R} \, \frac{1}{T} \, dT$

$\displaystyle \ln \bigg| \frac{P}{P_0} \bigg| = \frac{C_p}{R} \ln \bigg| \frac{T}{T_0} \bigg|$

which yields P in terms of T as

$\displaystyle P = P_0 \bigg( \frac{T}{T_0} \bigg)^{C_p/R}$.

“Okay…” I say.  “Well, since the second equation only involves P but not its derivative, we could substitute the formula for P in it, and reduce the second equation to a single differential equation involving T.”

$\displaystyle \frac{FR T}{V^+} \bigg[ \frac{P_A}{P_0} \bigg( \frac{T_0}{T} \bigg)^{C_p/R} - 1 \bigg] = \frac{C_V}{R} \, \frac{dT}{dt}$

$\displaystyle T \bigg[ \frac{P_A T_0^{C_p/R} - P_0 T^{C_p/R}}{P_0 T^{C_p/R}} \bigg] = \frac{C_V V^+}{F R^2} \, \frac{dT}{dt}$

“Oh!” I say, more excited. “This is now a first-order autonomous ODE, so it’s separable too!”

$\displaystyle \int \frac{P_0 T^{C_p/R - 1}}{P_0 T^{C_p/R} - P_A T_0^{C_p/R}} \, dT = \int - \frac{F R^2}{C_V V^+} \, dt$.

Incredibly, the integral on the left-hand-side can be evaluated with a simple substitution (a fact at which I, admittedly, giggled with glee), so we get

$\displaystyle \frac{R}{C_p} \ln \bigg| \frac{P_0 T^{C_p/R} - P_A T_0^{C_p/R}}{P_0 T_0^{C_p/R} - P_A T_0^{C_p/R}} \bigg| = - \frac{F R^2}{C_V V^+} \, t$.

“So we’ve got (big) T solved implicitly in terms of (little) t,” I say, “so let’s unshackle it explicitly.”

$\displaystyle P_0 T^{C_p/R} - P_A T_0^{C_p/R} = T_0^{C_p/R}(P_0 - P_A) \exp \bigg( -\frac{C_p F R}{C_V V^+} t \bigg)$

$\displaystyle T^{C_p/R} = \frac{T_0^{C_p/R}}{P_0} \bigg[ P_A + (P_0 - P_A) \exp \bigg( - \frac{ C_p F R}{C_V V^+} t \bigg) \bigg]$

$\displaystyle T = T_0 \bigg[ \frac{P_A}{P_0} + \bigg(1 - \frac{P_A}{P_0} \bigg) \exp \bigg( - \frac{C_p F R}{C_V V^+} t \bigg) \bigg]^{R/C_p}$

“And you have a T!” I exclaim, surprised that any of that worked. “Now we can substitute into our implicit formula for P to get it to.”

$\displaystyle P = P_A + (P_0 - P_A) \exp \bigg( - \frac{C_p R F}{C_V V^+} t \bigg)$

“By way of checking,” I add, anxious to make sure I didn’t make some bone-headed algebra mistake along the way, “we can check the initial conditions on T…”

$\displaystyle T\bigg|_{t = 0} = T_0 \bigg[ \frac{P_A}{P_0} + 1 - \frac{P_A}{P_0} \bigg]^{R/C_p} = T_0$

“and P…”

$\displaystyle P\bigg|_{t = 0} = P_A + P_0 - P_A = P_0$

“and the first differential equation…” (after furiously scribbling for a while) “…checks out, since both sides simplify to

$\displaystyle \frac{dP}{dt} = \frac{C_p}{ R} \frac{P}{T} \frac{dT}{dt} = \frac{(P_A - P_0) C_p F R}{C_V V^+} \exp \bigg( - \frac{C_p R F}{C_V V^+} t \bigg)$

and each side of the second differential equation…” (more furious scribbling) “… simplifies to”

$\displaystyle - \frac{(P_0 - P_A) F R T_0}{P_0^{R/C_p} V^+} \exp \bigg( - \frac{C_p R F}{C_V V^+} t \bigg) \bigg[ P_A + (P_0 - P_A) \exp \bigg( - \frac{C_p R F}{C_V V^+} t \bigg) \bigg]^{-R/C_p - 1}$

…so, yeah, we have a solution!” I conclude triumphantly.

K stares at the work, inspecting the derivation and double-checking some thermodynamical facts in his head. Finally, he pauses, scribbles some notes down in his binder, and turns to me.

“Thanks,” K says, adding, “I knew it was something simple.”

More wisdom from the Bugs

After a chicken dinner, the Queen B cleaned off the bird’s wishbone and invited the girls to play. This was new to the Butterfly, who asked how to play.

“Each person makes a wish,” said the Queen B, “takes a hold of one of the ends of the wishbone.  Then you pull it apart, and whoever gets the bigger piece gets their wish.”

So the Ladybug and the Butterfly each grabbed an end of the bone.

“Make a wish,” reminded the Queen B, “and…. go!”

The girls pulled and pulled until the bone snapped in two, with the little Butterfly holding the biggest piece.

“Hurray,” said the Queen B, “you won!  What did you wish for?”

“That I’d win!  It worked!

The Ladybug and I are driving around town, when suddenly she asks “Dad?  Why do all the trucks say 16 on them?”

“16,” she repeats. “All the trucks say 16 on them.”

“…” I continue, lost.

“All the trucks have the same math problem on them,” she adds helpfully.  “See, if I count by 4′s I get 4, 8, 12, 16.  So 4 times 4 is 16.”

At that point, I figured out she was reading the “4 x 4″ on the sides of trucks as the multiplication problem  “4 times 4” instead of four-wheel-drive indicator “4 by 4.”

“Maybe that’s because all the boys who drive them want to be 16 again,” she added.

I thought for a moment about how to best explain the concept of a drivetrain that allows all four wheels to receive torque from a central engine when the image of the standard South Dakota truck flashed in my mind…

“You’re absolutely correct,” I agreed.

Y U NO TWC?

Every morning I get up, eat breakfast, and watch the Weather Channel to see what manifestation of meteorological madness will menace Rapid City for the day.  My reactions to “Morning Rush” — the early morning show that’s on at 6 AM — varies the range of non-copyright-infringing memes.

For example, when informed that the single greatest temperature inversion in American history occurred here in the Black Hills of South Dakota, and more specifically in Spearfish on January 22, 1943, where the temperature changed from -4oF to +45oF in less than two minutes

On the other hand, when informed that most avalanches in the United States occur between the months of November and March…

Occasionally, there’s the unlikely and entirely misleading graphic like

to which the appropriate response can only be…

However, during this past winter, the graphic is more commonly

to which the only response can be….

On a related note, a conversation with the Butterfly as she and I were headed home during the onset of one of 2014′s frequent winter snow storms.

Me: Wow, look at all the blowing snow.

She: Will we run out of electricity like last time?

Me: No, it’s not going to be a blizzard this time.

Me: A blizzard is a storm in which blowing snow reduces visibility to less than a quarter mile for at least 3 hours, coupled with sustained wind speeds of at least 35 miles per hour.

She: Holy cow, you watch a lot of Weather Channel.

Dino-bug wisdom

The Ladybug and I recently went to the library, where she spied a dinosaur encyclopedia.

“Dad, what’s an en… see… clo… ped… ee.. uh?”

Encyclopedia,” I offered.  “It’s a kind of book that had information on a variety of topics.  If you wanted to know something about a specific topic, you look it up here in the index,  and then find the page in the encyclopedia that has the information you want on it.

“Oh,” she said. “It’s kind of like Google, but without the internet part.”

The Ladybug is big on science (she was excited about a dinosaur encyclopedia, after all), but is dismayed to find out that none of the other girls in her class are similarly interested.  Instead of paleontology or geology (the Ladybug’s current favorite -ologies), most of the girls want to be models or designers or chefs or extras on Shake It Up, which she finds highly disappointing.

“All the other girls in my class don’t like science,” she said one day whilst working on extracting the skeleton of a triceratops from a block of sandstone.* “They think it’s too dorky or not cool or something.  That’s just dumb.”

“Yep,” I agreed. “It’s okay to be a science nerd.  The world needs more people who understand and appreciate science.  Especially girls who understand and appreciate science.”

“Because girls are under-represented in science and engineering,” I said.  Seeing the look of confusion on her face, I added: “That means that there are hardly any girls at all who are scientists.”

“Why not?”

“One of the reasons is that a long time ago, girls weren’t allowed to be scientists; before that, they weren’t even allowed to go to college.”

“Why not?”

“Those were the rules.  Only boys could go to college or be scientists or whatever.  Girls had to stay at home, and take care of the family.”