I have included analytical derivatives of density wrt enthalpy and pressure. Still missing density derivative wrt mass fraction...

I have reduced the number of variables in ders[].

I also uploaded a Modelica Model that compares the analytical derivative and numerical ones...