code: public int bubbleTemperatureEstimate() {
  	copyZfractionsToliquid();
  	double temp =  300;
  	double error = 100;
  	double deltaT =1;      
  	double tol = 1e-4;
  
  	int iterations =0;
  	while (error >tol  && iterations < 1000){
  	    iterations++;
  	      double T_  = temp + deltaT;
  	      double vaporPressure = calculateVaporPressure(temp);
  	      double vaporPressure_ = calculateVaporPressure(T_);
  	     error = Math.log(vaporPressure / pressure);
  	     double error_ = Math.log(vaporPressure_ / pressure);
  	     temp = (temp * T_ *(error_ - error)) / (T_ * error_ - temp * error);
  	} 
  	setTemperature(temp);
  	for(Substance component: getVapor().getPureSubstances()){
  	    double vp = component.calculatetAcentricFactorBasedVaporPressure();
  	    double yi = vp * getLiquid().getFraction(component) / pressure;
  	    getVapor().setFraction(component.getComponent(), yi);
  	}
  	return iterations;
      }
docs: ----