I have modeled in Solidedge and Solidworks deformable springs. The trick is define the coil with a constant number of turns, and relate the total height to the available space in the assembly, so when this space change, the height f the spring is updated but keeping the same number of turns...