This is a customizable version of Make Anything's Satisfying Twist Container in OpenSCAD. The shape, height, radius, smoothness and twist can be customized. Demo video.
The generated models are solid (filled in) and need to be printed in Vase Mode. In Cura this is called 'Spiralize Outer Contour' (but currently has some bugs).
You need customize the line width (nozzle size), deviation (gap between parts) and bottom layer height to fit your printer and print settings. The default deviation (gap between parts) is set to 0.3 mm but can be changed. 0.3 mm gives fairly tight fit on larger prints on my printer (Ultimaker 2 clone). Notice that the tightness also depends on the part size. Larger parts have more surface area.
The model includes a base and chamfers on the inner part. The chamfer angles are quite high (63°) and should print nicely. The chamfer depth and height can also be customized if you need to.
Open in customizer to customize dimensions and generate STL files.
Idea totally stolen from Make Anything.
Print in vase mode (Spiralize Outer Contour in Cura). Set bottom thickness to adjust the length of the inner part so they close up nicely.
Cura 2.5 has the 'Spiralize Outer Contour' which works great. Cura 2.4 and earlier versions have a bug that generate artifacts and non-smooth spiral.