We put the stainless section on the end and tied it into the tubesheet. Normally the SS is on the hottest end of the HX.
I don't recall the Hx length where this becomes effective. As I recall the Hx's where it is used are fairly long though not as long as the reactors. The tubular reactors I mentioned are 24' to 26' long and have a 5' or 6' section of SS in the shell. They operate at 250°C to 280°C.
The SS shell sections are just long enough to get the tubes just out of the buckling range due to thermal expansion while operating. The caveat is that this approach doesn't normally allow for steaming if the steaming is above operating temperature.
I have never personally carried out the calculations but they are apparently not very complex as this scheme was used BC (before computers), then as a Fortran program, then Lotus, and the last I saw was with Mathcad and/or Excel.
We have numerous single pass floating head Hx’s all with SS tubes with some SS and CS shells.
We have single pass Ti tube floating head Hx’s with both SS and CS shells.
If space is a problem there is a flued expansion joint design where the ring, for lack of a better word, is concave. This is used to take the height out of the flanges by allowing inward expansion of the ring instead of bending the flanges.