Replace bisection with scipy brentq in setConstQuantityAndBetaEqState