public static double Sigma_og_BAKER_SWERDLOFF_1956(Context ctx) { var T = ctx[Prm.T]; var _api = ctx.APIcalc(); // calcSigmaODG_293 var s293 = 1.0e-3 * (39.0 - 0.2571 * _api); // calcSigmaODG_311 var s311 = 1.0e-3 * (37.5 - 0.2571 * _api); double sigma_odg; if (U.isLE(T, 293.2)) { sigma_odg = s293; } else if (U.isGE(T, 310.9)) { sigma_odg = s311; } else { sigma_odg = s293 - (T - 293.2) * (s293 - s311) / 17.8; } var sigma_og = sigma_odg * Math.Exp(-8.6306 * 1.0e-4 * 145.0377 * ctx[Prm.P]); return(sigma_og); }
public static double Rs_DE_GHETTO_1994_HEAVY_OIL(Context ctx) { var gamma_o = ctx[Arg.GAMMA_O]; if (!(U.isGE(gamma_o, 0.920) && gamma_o < 1.0)) { //printf("Rs_DE_GHETTO_1994_HEAVY_OIL: gamma_o not in [0.920, 1.0): %.12g\n", // gamma_o); } var P = ctx[Prm.P]; var Pb = ctx[Prm.Pb]; double Pb_ = P < Pb ? P : Pb; double X = 10.9267 * ctx.APIcalc() / (1.8 * ctx[Prm.T]); double Y = Math.Pow(10, X); double b = U.Pow(145.0377 * Pb_, 1.2057); var a = ctx[Arg.GAMMA_G_CORR] / 313.348;// FIXME: what this?? * 0.887051; double rs = a * b * Y; return(rs); }
public static double Mu_od_AGIP(Context ctx) { var a = 0.025548 * ctx.APIcalc(); var b = 0.56238 * U.log10(U.Kelv2Fahr(ctx[Prm.T])); var l = 1.8513 - a - b; var mu_od = Math.Pow(10, Math.Pow(10, l)) - 1.0; return(mu_od); }
public static double Mu_od_BEAL_1946(Context ctx) { var _api = ctx.APIcalc(); var k = 0.43 + 8.33 / _api; var X = Math.Pow(10, k); var a = (0.32 + 1.8 * 1.0e7 / U.Pow(_api, 4.53)); var b = 360.0 / (1.8 * ctx[Prm.T] - 260); var mu_od = a * U.Pow(b, X); return(mu_od); }
public static double co_AGIP(Context ctx) { double a = 23.0094 * ctx[Prm.Rs]; double b = 22.12 * U.Kelv2Fahr(ctx[Prm.T]); double c = 1323.8 * ctx[Arg.GAMMA_G_CORR]; double d = 10.5 * ctx.APIcalc(); double X = -1682.8 + a + b - c + d; double co = X / (1.0e5 * ctx[Prm.P]); return(co); }
public static double co_VASQUEZ_BEGGS_1980(Context ctx) { var a = 27.759655 * ctx[Prm.Rs]; var b = 17.2 * U.Kelv2Fahr(ctx[Prm.T]); var c = 1180.0 * ctx[Arg.GAMMA_G_CORR]; var d = 12.61 * ctx.APIcalc(); var X = -1433.0 + a + b - c + d; var P = U.Max(ctx[Prm.P], 0.1); var co = X / (1.0e5 * P); return(co); }
public static double Pb_GLASO_1980(Context ctx) { // FIXME: not black-oil case double a = 4.087 * U.Pow(ctx[Prm.Rs] / ctx[Arg.GAMMA_G], 0.816); double pb_ = a * U.Pow(U.Kelv2Fahr(ctx[Prm.T]), 0.172) / U.Pow(ctx.APIcalc(), 0.989); double logPb_ = U.log10(pb_); double b = 1.7447 * logPb_; double c = 0.30218 * logPb_ * logPb_; double e = -0.3946 + b - c; double pb = U.Pow(10, e); return(pb); }
public static double Rs_LASATER_1958(Context ctx) { var P = ctx[Prm.P]; var Pb = ctx[Prm.Pb]; var gamma_g = ctx[Arg.GAMMA_G]; var T = ctx[Prm.T]; var Pb_ = P < Pb ? P : Pb; var Kpb = Pb_ * gamma_g / T; var yg = U.isGE(Kpb, 0.0125) ? U.Pow(31.8 * Kpb - 0.236, 0.281) : 0.359 * Math.Log(387.0 * Kpb + 0.476); if (yg > 1.0) { yg = 1.0; } if (yg < 0.0) { yg = 0.0; } double _rs; { var gamma_o = ctx[Arg.GAMMA_O]; double Mo; if (gamma_o < 0.825) { Mo = 73.11 * U.Pow(ctx.APIcalc(), -1.562); } else { Mo = 1945.0 - 1415.0 / gamma_o; } _rs = 23633.0 * gamma_o / Mo; } var rs = _rs * (yg / (1 - yg)); return(rs); }
public static double Bob_VASQUEZ_BEGGS_1980(Context ctx) { double C1, C2, C3; if (U.isGE(ctx[Arg.GAMMA_O], 0.876)) { C1 = 2.597 * 1.0e-3; C2 = 1.751 * 1.0e-5; C3 = -1.005 * 1.0e-7; } else { C1 = 2.593 * 1.0e-3; C2 = 1.100 * 1.0e-5; C3 = 7.423 * 1.0e-9; } var x = ctx.APIcalc() / ctx[Arg.GAMMA_G_CORR]; var X = x * (1.8 * ctx[Prm.T] - 520); var rs = ctx[Prm.Rs]; var Bob = 1 + C1 * rs + X * (C2 + C3 * rs); return(Bob); }
public static double Rs_VELARDE_1996(Context ctx) { var P = ctx[Prm.P]; var Pb = ctx[Prm.Pb]; var Rsb = ctx[Arg.Rsb]; if (U.isGE(P, Pb)) { return(Rsb); } double pr = (P - 0.101) / Pb; if (U.isLE(pr, 0.0)) { return(0.0); } else if (U.isGE(pr, 1.0)) { return(Rsb); } double ax, bx, cx; { const double A0 = 9.73 * 1.0e-7; const double A1 = 1.672608; const double A2 = 0.929870; const double B0 = 0.022339; const double B1 = -1.00475; const double B2 = 0.337711; const double C0 = 0.725167; const double C1 = -1.485480; const double C2 = -0.164741; var gamma_g = ctx[Arg.GAMMA_G]; var _api = ctx.APIcalc(); ax = A0 * U.Pow(gamma_g, A1) * U.Pow(_api, A2); bx = B0 * U.Pow(gamma_g, B1) * U.Pow(_api, B2); cx = C0 * U.Pow(gamma_g, C1) * U.Pow(_api, C2); } const double A3 = 0.247235; const double A4 = 1.056052; const double B3 = 0.132795; const double B4 = 0.302065; const double C3 = -0.091330; const double C4 = 0.047094; var T = ctx[Prm.T]; double A = calcX(Pb, T, ax, A3, A4); double B = calcX(Pb, T, bx, B3, B4); double C = calcX(Pb, T, cx, C3, C4); double Rsr = A * U.Pow(pr, B) + (1 - A) * U.Pow(pr, C); double rs = Rsb * Rsr; if (rs < 0 && rs >= -0.01) // иногда небольшой минус при стандартных условиях, можно принять за 0. { return(0); } return(rs); }