Entanglement dynamics of a hard-core quantum gas during a Joule expansion. (16th September 2022)