src/EditProductTab11.cpp

changeset 442
d8c110d91b1f
parent 439
31419b7cee69
child 443
3c195eb4e7a1
--- a/src/EditProductTab11.cpp	Thu Nov 17 17:26:08 2022 +0100
+++ b/src/EditProductTab11.cpp	Fri Nov 18 12:17:32 2022 +0100
@@ -48,27 +48,6 @@
 }
 
 
-/*
- * Calculate pressure in the bottles after refermentation.
- * @param gl	Sugar in gram/liter
- * @param T	Temperature in celsius
- * @return	Pressure in Bar.
- */
-double EditProduct::GetPressureBar(double gl, double T)
-{
-    if (gl <= 0)
-	return 0;
-
-    double P = ((gl / 10.0) / exp(-10.73797 + (2617.25 / (T + 273.15)))) - 1.013;
-    if (P < 0)
-	P = 0;
-
-    P = round(P * 100.0) / 100.0;
-    qDebug() << "  GetPressureBar(" << gl << "," << T << ") P:" << P;
-    return P;
-}
-
-
 double EditProduct::CarbCO2ToPressure(double CO2, double T)
 {
     return (CO2 - (-0.000005594056 * pow(T, 4) + 0.000144357886 * pow(T, 3) +
@@ -178,7 +157,7 @@
 		talc = product->bottle_amount - pvol;
   		tvol = pvol + product->bottle_priming_water;
 		product->bottle_abv = talc / (tvol + talc) * 100;
-		product->bottle_bar = GetPressureBar(product->bottle_priming_amount, product->bottle_carbonation_temp);
+		product->bottle_bar = Utils::GetPressureBar(product->bottle_priming_amount, product->bottle_carbonation_temp);
 		ui->bottle_abvShow->setValue(product->bottle_abv);
 		ui->bottle_barShow->setValue(product->bottle_bar);
 	    }

mercurial