Compressibility factor (Z) of the Redlich-Kwong Equation
I've been having a problem trying to calculate the compressibility factor of the Redlich-Kwong equation:
\begin{equation} P = \frac{RT}{v-b}-\frac{a}{\sqrt{T} \cdot (v^2+vb)} \end{equation}
The compressibility factor is calculated as:
\begin{equation} z = \frac{P \cdot v}{RT} \end{equation}
This factor is calculated if we substitute the molar volume ($v$), but I can't express the Redlich-Kwong equation in terms of $P$ and $T$, that's why I would like to know if some of you guys could help me to isolate the $v$ of this Redlich-Kwong equation. Thanks! :)
\begin{align*} P &= \frac{RT}{v-b} - \frac{a}{\sqrt{T}(v^2+vb)}\\ &=\frac{RT\sqrt{T}(v^2+vb)-a(v-b)}{\sqrt{T}(v^2+vb)(v-b)}\\ \implies P\sqrt{T}(v^3 - b^2 v) &-(RT\sqrt{T}(v^2+bv)-av+ab)=0\\ \implies P \sqrt{T} v^3 - b^2 P \sqrt{T} v &-a b + a v - b R \sqrt{T^3} v - R \sqrt{T^3} v^2=0 \\ \implies P \sqrt{T} v^3- R \sqrt{T^3} v^2 &- \big(b^2 P \sqrt{T}+b R \sqrt{T^3} -a\big)v - a b =0 \\ \end{align*} We now have a cubic of the form $\quad ax^3+x^2+cx+d=0\quad$ where $$a=P \sqrt{T}\quad b=- R \sqrt{T^3}\quad c=- \big(b^2 P \sqrt{T}+b R \sqrt{T^3} -a\big)\quad d=-a$$ and these may be plugged into the The Cubic Formula to obtain one real root. The cubic will be a product of this "factor" and a quadratic equation. It's not pretty. The cubic formula looks like this.
\begin{align*} n&=\sqrt[\huge{3}]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)+\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}\\ &+\sqrt[\huge{3}]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)-\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}\\ &-\frac{b}{3a} \end{align*}