Chaos is beautiful

During my time at the University of Toronto, I dipped my toes into the fascinating field of chaos theory. I always found it to be particularly impressive how small changes in the initial conditions of a dynamical system can lead to what scientists call “deterministic chaos”.

Recently I stumbled across an animation of a triple pendulum and then across this great blogpost by Jake VanderPlas. Jake managed to recreate the animation in python and sympy. Since the equations for the triple pendulum tend to get messy Kane’s Method is the way to go.

I dont even want to take away too much. Just go to his website, download the ipython notebook Jake prepared and play around with the parameters. As they say: The flap of a butterfly’s wing really seems capable of causing a tornado.

Swift for Tensorflow

Swift for TensorFlow is a next-generation platform for machine learning, incorporating the latest research across: machine learning, compilers, differentiable programming, systems design, and beyond. This project is at version 0.2; it is neither feature-complete nor production-ready. But it is ready for pioneers to try it for your own projects, give us feedback, and help shape the future!

This is truly exciting, and sooner or later I have to brush up on my swift skills. Take a look at the video above and see what the future of ML research holds. Automatic differentiation looks amazing.
The Bernoulli equation of fluid dynamics

I has been a while since I did some work in fluid dynamics but I stumbled across this b/c of a job interview so I thought that I maybe share it here.

The Bernoulli equation of fluid-dynamics is basically a law of conservation. In physics there are certain conserved quantities that stay the same during a physical transformation. An example would be energy, or momentum. The Equation derived below is basically a statement of energy conservation, however it requires a so-called ideal fluid.

An ideal fluid has the following properties:

  • it is stationary and laminar (so there is no turbulence, and velocity at one point does not change) \frac{\partial v}{\partial t} = 0
  • it has no viscosity (so there is no internal friction) \eta = 0
  • it has no friction (with outside walls or anything else)
  • it is incompressible, so the density is the same everywhere \rho = \text{const.}

Imagine a tube that is filled with this ideal fluid and its radius is shrinking in the middle in a conical fashion. Because we already know the equation of state (\rho = 0), we can make an assumption about the mass-flow within the tube.

Considering the difference in mass \Delta m_1, that is the mass that enters the pipe in the beginning in a certain amount of time we can easily see that this must be the \Delta m_2, which is the mass that leaves the pipe at the end in the same amount of time. This balance, also called continuity-equation, we can write as

(1)    \begin{equation*}    \Delta m \equiv \rho_1 A_1 v_1 \Delta t= \rho_2 A_2 v_2 \Delta t \end{equation*}

When we consider the total work done to the fluid we have to be careful about the sign and can write it as

(2)    \begin{equation*}    \Delta W = p_1 A_1 v_1 \Delta t  - p_2 A_2 v_2 \Delta t \end{equation*}

This total work must be equal to all other energy representations in the fluid, which we write in a way that is normalized by the mass difference

(3)    \begin{equation*}     \Delta W &=& \Delta m (E_2-E_1) \     \end{equation*}

(4)    \begin{equation*}     \frac{p_1 A_1 v_1 \Delta t}{\Delta m}  - \frac{p_2 A_2 v_2 \Delta t}{\Delta m} &=& \frac{1}{2}v_2^2 + \phi_2 + U_2 - \left( \frac{1}{2}v_1^2 + \phi_1 + U_1 \right), \end{equation*}

where \frac{1}{2}v_2^2 represents the kinetic energy \phi_2 some form of potential (in our case gz) and U_2 is a representation of internal energy. We disregard internal energy and fill in equation ref{eq:massflow} for \Delta m we get this nice little expression:

(5)    \begin{equation*}     \frac{1}{2}v_1^2 + \phi_1 + \frac{p_1}{\rho_1} + U_1 = \frac{1}{2}v_2^2 + \phi_2 + \frac{p_2}{\rho_2} + U_2 \end{equation*}

which basically states

(6)    \begin{equation*}     \left[ \frac{1}{2}v^2 + \phi + \frac{p}{\rho} \right]_{\text{streamline}} = \text{const.} \end{equation*}

This is Bernoulli’s equation of fluid dynamics, it states that within a flow of constant energy the velocity of a fluid rises in fields of low pressure and lowers in fields of low pressure.

Even though we simplified the underlying physics massively there’s still a lot of phenomena to be explained using this simple equation. For example aeroplanes flying can be partially explained with this equation.

Robots in Space

The term “Artificial Intelligence (AI)” comprises all techniques that enable computers to mimic intelligence, for example, computers that analyse data or the systems embedded in an autonomous vehicle. Usually, artificially intelligent systems are taught by humans — a process that involves writing an awful lot of complex computer code.

Nice little overview of the current initiatives and projects regarding Artificial Intelligence in Space at ESA. Lot’s of interesting stuff going on there. I am personally super excited about autonomous robots and using deep learning for navigation and docking of spacecraft.