I have designed a 3D helix which has a variable pitch $P(z)$ which is defined over the axial axis $z$ and has the form $P(z)=a*z+b$, $a$ and $b$ are constants. The larger the pitch, the sparser the helix should be at that part. It's like a wave which has variable wavelength. The radius of the helix is $r$. The total helix height (in $z$ direction) is $L$.
Since the helix has a linearly varying pitch, this spring-like helix will become more and more "dense" when $z$ increases if pitch decreases with $z$.
The question is how to express the helix length using all the aforementioned parameters?
I have a preliminary form, but this does not meet the result that I measured in the 3D CAD software.

Parametrize the helix as
\begin{eqnarray} x(t) &=& r \cos (2\pi t) \\ y(t) &=& r \sin (2\pi t) \\ z(t) &=& at + b \end{eqnarray}
The length of the helix is
$$ L = \int_{t_1}^{t_2}\left[ \left(\frac{{\rm d}x}{{\rm d}t} \right)^2 + \left(\frac{{\rm d}y}{{\rm d}t} \right)^2 + \left(\frac{{\rm d}z}{{\rm d}t} \right)^2\right]^{1/2}{\rm d}t = \int_{t_1}^{t_2}[b^2 + 4\pi^2 r^2]^{1/2}{\rm d}t = \sqrt{b^2 + 4\pi^2 r^2}(t_2 - t_1) $$