Pages

Showing posts with label Dogs. Show all posts
Showing posts with label Dogs. Show all posts

Sunday, August 4, 2024

Scents and Scents-Ability

[Yes, it's a homophonous headline!]

We adopted Eros from the Humane Society, which had picked him up as a stray, so we know nothing about his breed and history. He reminds Marika of the beagle she grew up with though, and he has many hound-like traits, including an intense interest in smells. Often during walks he'll plant his feet for several minutes, and swing his head back and forth sniffing.

I was curious what kind of directionality he could get just by moving his head – I imagined that after a good distance, the scents would be too blended to pick out individual sources.

Smells are created by bits of a substance that are picked up by the air. Those bits then spread out according to Fick's Laws of Diffusion. The form of this equation, where the change in time depends on the Laplacian of the current state, is exactly the same as that of the heat equation, which I've discussed before. What's interesting about this case though is that heat has only one type spreading out, while we can have different smells that diffuse and mix.

I decided to adapt my cake-heating simulation to look at how much directional information Eros can get from his head movements. The setup is two sources of scents that emit particles according to Fick's laws. Eros then senses the concentration of each in a cone in front of his nose. I struggled to find a good way to display the concentrations, which drop off rapidly from the sources, but I suppose that's just a testament to the sensitivity of dogs' noses. The first case has the two sources equidistant:

Like I said, you can't see much past the central dots, but if we add up everything in the white cone,

Now we do get directionality. I was curious to see what happens when we put one source closer:

For this case the concentrations are

Because the blue scent is closer, it has a higher concentration in all directions, but comparing the left and right ends of each curve, we see we can still find a direction that gives more scent.

Sunday, June 2, 2024

Kibble Quibble

We recently got a new bag of food for our dog Eros, and we try to taper him off the old food, since he has a sensitive stomach. As I was serving it up this morning, I got to thinking about how the mixture of foods changes depending on how long we spread the transition. If every day we feed him a total amount d, and we spread T days of old food across b days, we can write

where r is the rate we swap the foods. This is the series for the triangle numbers, so we can replace the sum and solve for the rate:

Using this, we can look at how the rate changes depending on the total amount, and the number of days we spread across:

Note that we require b > T, since otherwise we'd be giving more than a day's food in a day. Since b and T are both measured in days, I wondered if the ratio, representing how much we spread out the old food, had a clear relation to the rate of change in the mixture.

I expected that the points would all fall on a single curve, but there seems to be some variation depending on the specific values for b and T. 

Whenever I hear Eros's stomach making terrible noises, I'm reminded of a bit from Terry Pratchett's Guards! Guards! – "No wonder dragons were always ill. They relied on permanent stomach trouble for supplies of fuel. Most of their brain power was taken up with controlling the complexities of their digestion, which could distill flame-producing fuels from the most unlikely ingredients. They could even rearrange their internal plumbing overnight to deal with difficult processes. They lived on a chemical knife-edge the whole time. One misplaced hiccup and they were geography."

Sunday, February 17, 2019

Doge Phusics

(Title come from a typo on my University of Michigan student page)

Whenever I walk our dog, Lorna, and she takes enough of a break from sniffing things to get up to a trot, I'm fascinated by the way her ears bounce:

I thought I'd see if I can model the motion using a similar technique to the one in this post. In this case though, we have a sequence of these angular springs, each exerting a force proportional to its angle from the previous one. I put together a Python script to run the simulation. There are various parameters I tweaked, like the stiffness of the springs, and the distribution of the mass, but none of my models were quite as cute as the real thing! Some samples:

Uniform mass, weak spring
This was my first attempt, but it came out a bit frantic:


Linear mass, weak spring
In the video, it's just the tips of Lorna's ears the bounce, so I wondered about decreasing the mass at the tips. This seemed a bit better, but a little saggy:


Linear mass, strong spring:
To give the ears a little more lift, I increased the stiffness, which looks pretty good, but still lacks the essential "d'aww" factor: