Designers of marble fountains who don't use computing to design the paths run into reliability issues: sometimes balls derailing out of their track. They have to observe the contraption, identify problems (balls getting jammed up or jumping out) and then guess at the root causes and make manual adjustments.
That's the thing here: he has it running for hours presumably without any ball jumping out.
Most of the tracks consist of two rails, so the ball has two contact points. I'm no physicist but it seems like the goal would be to have ideally nearly equal forces at the two contact points at all times during the ball's descent. In other words, the track has to be perfectly banked so that the gravity and centripetal acceleration vector are balanced by a normal vector perpendicular to the rails. During a derailment, the ball has to lift away from one of the two contact points, so the normal force must have dropped to zero.
It's actually much weirder than that: banking changes the axis of rotation and thus kills the rotational inertia. The tracks bank super aggressively in order to prevent the ball from accelerating too much and hopping the track. This is part of why the descent is so smooth and all the balls move at more or less the same speed.
Also to be fair the final system does lose a ball every 30ish minutes. The tuning was largely me staring at the run or taking a video trying to catch where they get lost. Instead of hand tuning I would just update the generator and print another one. I'm considering closing the loop with a camera but that would be a whole new project.
First, I thought about Ansys or CATIA software but I couldn’t find any module specialized for simulation of balls.
But I think that people from those companies could help as well and participate in simulation as an interesting usecase. (These software are expensive for personal projects.)
My point was that these software could help to find weak parts in trajectory - so instead of trying to figure it out by looking where balls are too quick to fall from the ride - you can simulate it. I saw real tramway simulation done in Ansys.
I think the physics are different, a ball is basically a car without a differential, so it's going to behave differently on the tracks. I'd imagine the ball is harder to simulate because of that.
One of the results for hilbert curve marble tracks, mentioned elsewhere in the thread, was a video showing how to make one in blender, which has a physics engine so it can simulate it pretty well.
But for hobby purposes I would suggest to contact some university, they have such software, and they could find simulation of balls motion at marble fountain interesting for research (and educational) purposes.
I haven't actually measured it but that's a good thought, I may borrow a thermal camera and do some testing! It's not noticeably warm to the touch but this functionally a system that converts potential energy into heat and sound so there's probably a measurable change.
The state of each ball can be described by 9 parameters: the current location of the center of mass (x,y,z), the current linear velocity (vx, vy, xz) and the angular velocity on 3 axes.
I don't think the forces acting on the rails need to be similar -- they just need to be such that the acceleration of the ball is always parallel to the track. Unfortunately the equation of motion will look pretty ugly and optimizing the system will be quite a challenge.
And finally, the system has to be stable, ie. small perturbations should be cancelled rather than grow - if a ball gets a little too fast there should be something like a bend that slows it down, but that bend should at the same time not slow down a ball that is already too slow...
Another parameter - as a track designer you can manipulate the width of the track to change the ball speed. It raises and lowers the ball on the track, changing both the rolling diameter and the center of gravity. This can be used to make subtle changes to the ball speed before a turn.
That's the thing here: he has it running for hours presumably without any ball jumping out.
Most of the tracks consist of two rails, so the ball has two contact points. I'm no physicist but it seems like the goal would be to have ideally nearly equal forces at the two contact points at all times during the ball's descent. In other words, the track has to be perfectly banked so that the gravity and centripetal acceleration vector are balanced by a normal vector perpendicular to the rails. During a derailment, the ball has to lift away from one of the two contact points, so the normal force must have dropped to zero.