Ejemplo n.º 1
0
        public void CalculateOilTest_March5_2012()
        {
            FluidProperties initialFluid = new FluidProperties()
            {
                FluidDensityAPI  = 25.72,
                GasOilRatioRs    = 1,
                FluidGravity     = 0.6,
                FluidTemperature = 60,
                FluidPressure    = 1
            };

            const double tolerance = 0.025; //TODO - this was 0.009 but then tests fail.  TODO: review against spec, when we get one.

            FluidProperties flagresultOil = FlagLogic.CalculateOilProperties(initialFluid.FluidTemperature.Value, initialFluid.FluidPressure.Value,
                                                                             initialFluid.FluidGravity, initialFluid.GasOilRatioRs.Value,
                                                                             initialFluid.FluidDensityAPI);
            FluidProperties flagresultGas   = FlagLogic.CalculateGasProperties(initialFluid.FluidTemperature.Value, initialFluid.FluidPressure.Value, initialFluid.FluidGravity, 0.008314);
            FluidProperties flagresultBrine = FlagLogic.CalculateBrineProperties(initialFluid.FluidTemperature.Value, initialFluid.FluidPressure.Value, 25000, 100, 0, 0);

            checkValue(1.4954, Math.Round(flagresultOil.FlagResultK.Value, 3), tolerance, "Expected and actual density k_oil do not match");

            checkValue(1.4954, Math.Round(flagresultOil.FlagResultK.Value, 3), tolerance, "Expected and actual density k_oil do not match");
            checkValue(866.918, Math.Round(flagresultOil.FlagResultRho.Value, 3), tolerance, "Expected and actual density rho_oil do not match");
            checkValue(0.0010247, Math.Round(flagresultGas.FlagResultK.Value, 3), tolerance, "Expected and actual density k_oil do not match");
            checkValue(6.295, Math.Round(flagresultGas.FlagResultRho.Value, 3), tolerance, "Expected and actual density rho_oil do not match");
            checkValue(2.48417, Math.Round(flagresultBrine.FlagResultK.Value, 3), tolerance, "Expected and actual density k_oil do not match");
            checkValue(1000.687247, Math.Round(flagresultBrine.FlagResultRho.Value, 3), tolerance, "Expected and actual density rho_oil do not match");
        }
Ejemplo n.º 2
0
 public void CalculateOilTest_March9_2012()
 {
     double[] rho0 = { 0.9, 0.88, 0.86, 0.84, 0.82, 0.8, 0.78, 0.76, 0.74, 0.72, 0.7, 0.68, 0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.85, 0.85 };
     double[] Rs   = { 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
                       100.0,     0.0,  50.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0 };
     double[] P = { 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 60.0,
                    60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0 };
     //KResults are not provided in the python code oil_flag11.py
     //double[] KResults = { };
     double[] vel = { 1.419354650612, 1.396523495791, 1.373050880475, 1.348924794867,
                      1.324120478412, 1.298601745168, 1.272321240147, 1.244891756594,
                      1.215280756274, 1.186798363425, 1.159565129588, 1.133769876582,
                      1.608671089213, 1.525174734841, 1.453008659029, 1.389434532465,
                      1.330858948878, 1.282621392775, 1.248366303083, 1.225560066150,
                      1.212799904902, 1.209404245261 };
     double[] rhoResultsBy1000 = { 0.818905771890, 0.800517657722, 0.781992687855, 0.763371813360,
                                   0.744688932377, 0.725973968289, 0.707255049719, 0.688560236329,
                                   0.669919069078, 0.651364150267, 0.632932936876, 0.614669943566,
                                   0.871637832672, 0.824115924495, 0.786357762648, 0.751427228598,
                                   0.718554606033, 0.689831078427, 0.664977637551, 0.643571679934,
                                   0.625165000236, 0.609334962576 };
     for (int i = 0; i < 22; i++)
     {
         double          API           = (141.5 / rho0[i]) - 131.5;
         double          G             = 0.65;
         double          T             = 30.0;
         FluidProperties flagresultOil = FlagLogic.CalculateOilProperties(T, P[i], G, Rs[i], API);
         //Assert.AreEqual(KResults[i], Math.Round(flagresultOil.FlagResultK.Value, 3), 0.009, "Expected and actual density k_oil do not match");
         Assert.AreEqual(rhoResultsBy1000[i] * 1000, Math.Round(flagresultOil.FlagResultRho.Value, 9), 1e-9, "Expected and actual density rho_oil do not match");
         Assert.AreEqual(vel[i], Math.Round(flagresultOil.FlagResultVelocity.Value, 12), 1e-12, "Expected and actual velocity vel_oil do not match");
     }
 }
Ejemplo n.º 3
0
 public void CalculateGasPropertiesTest()
 {
     double[] gravity    = { 0.56, 0.76, 0.96, 1.06, 1.26, 1.46, 1.66, 1.86, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72 };
     double[] T          = { 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 20.0, 40.0, 60.0, 80.0, 100.0, 120.0, 140.0 };
     double[] P          = { 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0 };
     double[] KResults   = { 0.140, 0.2125, 0.311, 0.364, 0.470, 0.570, 0.664, 0.750, 0.062, 0.127, 0.195, 0.265, 0.339, 0.416, 0.497, 0.580, 0.668, 0.217, 0.176, 0.145, 0.123, 0.107, 0.095, 0.086 };
     double[] rhoResults = { 242.019, 341.347, 419.377, 451.215, 504.173, 546.494, 581.189, 610.2276, 228.164, 289.144, 323.090, 346.086, 363.295, 376.940,
                             388.177, 397.678, 405.871, 334.595, 311.756, 289.906, 269.544,  250.991, 234.356, 219.575 };
     for (int i = 0; i < 24; i++)
     {
         FluidProperties flagresultGas = FlagLogic.CalculateGasProperties(T[i], P[i], gravity[i], 0.008314);
         Assert.AreEqual(KResults[i], Math.Round(flagresultGas.FlagResultK.Value, 3), 0.009, "Expected and actual density k_gas do not match");
         Assert.AreEqual(rhoResults[i], Math.Round(flagresultGas.FlagResultRho.Value, 3), 0.009, "Expected and actual density rho_gas do not match");
     }
 }
Ejemplo n.º 4
0
 public void CalculateBrineTestPython()
 {
     double[] Sal = { 0.0,       30000.0,  60000.0,  90000.0, 120000.0, 150000.0, 180000.0, 210000.0, 240000.0, 270000.0, 300000.0, 150000.0, 150000.0, 150000.0,
                      150000.0, 150000.0, 150000.0, 150000.0, 150000.0, 150000.0, 150000.0 };
     double[] Na       = { 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0 };
     double[] KC       = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0 };
     double[] Ca       = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0 };
     double[] T        = { 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 25.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0 };
     double[] P        = { 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 0.1, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0 };
     double[] KResults = { 2.347, 2.503, 2.674, 2.854, 3.040, 3.230, 3.424, 3.620, 3.816, 4.011, 4.204, 2.865, 3.022, 3.161, 3.281, 3.386, 3.476,
                           3.552, 3.618, 3.672, 3.718 };
     double[] rhoResults = { 1005.667,   1026.222,  1047.369,  1069.105,  1091.432,  1114.349,  1137.856, 1161.954, 1186.642, 1211.920, 1237.788,
                             1105.5378, 1109.5396, 1112.1331, 1113.5245, 1113.9376, 1113.5669, 1112.5800,  1111.12,  1109.31, 1107.259 };
     for (int i = 0; i < 21; i++)
     {
         FluidProperties flagresultBrine = FlagLogic.CalculateBrineProperties(T[i], P[i], Sal[i], Na[i], KC[i], Ca[i]);
         Assert.AreEqual(KResults[i], Math.Round(flagresultBrine.FlagResultK.Value, 3), 0.009, "Expected and actual density k_brine do not match");
         Assert.AreEqual(rhoResults[i], Math.Round(flagresultBrine.FlagResultRho.Value, 3), 0.009, "Expected and actual density rho_brine do not match");
     }
 }
Ejemplo n.º 5
0
        public void CalculateQCPropertiesTest()
        {
            FluidSaturations saturations = new FluidSaturations()
            {
                SaturationWater = 1.0,
                SaturationOil   = 0.0,
                SaturationGas   = 0.0
            };
            FluidProperties initialFluid = new FluidProperties()
            {
                FluidPressure      = 22.2,
                FluidTemperature   = 60,
                FluidConcentration = 0,
                FluidDensityAPI    = 10, //cannot be 0
                GasOilRatioRs      = 0,
                FluidGravity       = 0.6,
                Mixing             = MixingType.Homogeneous,
                Scenario           = ProjectScenario.WaterReplacingOil
            };
            //Initial Reservoir Conditions
            RockProperties initialReservoir = new RockProperties()
            {
                DepthBelowMudline = 1524,
                //TrendType = TrendTypes.BongaTrend,
                ReservoirType          = ReservoirTypes.Laminated,
                VpSand                 = 2415,
                VsSand                 = 1040,
                VpSandClean            = 2415,
                VsSandClean            = 1040,
                PorositySand           = 0.3,
                VpShale                = 2370,
                VsShale                = 994,
                RhoShale               = 2258,
                FractionShale          = 0.4,
                KGrain                 = 37,
                MuGrain                = 44,
                RhoGrain               = 2650,
                FluidSaturationsInRock = saturations
            };
            PreferredUnitSystem unitsystem = new MetricMPa();
            QCProperties        expected   = new QCProperties()
            {
                Porosity    = 0.3, //0.34068825,
                KDryByKMin  = 0.107294,
                DenBrineSat = 2121.933,
                VpBrineSat  = 2415.363,
                VsBrineSat  = 1040.438
            };
            QCProperties actual;

            actual = ScenarioResults.GetQCResults(initialFluid, initialReservoir, new MetricMPa());
            //To test in Field units actual = QCLogic.CalculateQCProperties(rock, fluid, flagResults, new Field()) and convert values for assertion.
            Assert.AreEqual(expected.Porosity, actual.Porosity, "Porosity do not match");
            //Assert.AreEqual(expected.KDryByKMin, actual.KDryByKMin, 1e-3, "KDryByKmin do not match");
            //Assert.AreEqual(expected.DenBrineSat.Value, actual.DenBrineSat.Value, 1e-3, "DenBrineSat do not match");
            //Assert.AreEqual(expected.VpBrineSat.Value, actual.VpBrineSat.Value, 1e-3, "VpBrineSat do not match");
            //Assert.AreEqual(expected.VsBrineSat.Value, actual.VsBrineSat.Value, 1e-3, "VpBrineSat do not match");
            PorosityKDryByKMinProperties kdryValueForPointZero2 = new PorosityKDryByKMinProperties()
            {
                porosity        = 0.02,
                KDryByKMPoint1  = 0.833333333,
                KDryByKMPoint15 = 0.882352941,
                KDryByKMPoint2  = 0.909090909,
                KDryByKMPoint25 = 0.925925926,
                KDryByKMPoint3  = 0.9375,
                KDryByKMPoint35 = 0.945945946,
                KDryByKMPoint4  = 0.952380952,
                KDryByKMPoint45 = 0.957446809,
                KDryByKMPoint5  = 0.961538462
            };
            PorosityKDryByKMinProperties kdryValueForPoint98 = new PorosityKDryByKMinProperties()
            {
                KDryByKMPoint1  = 0.0925925925925926,
                KDryByKMPoint15 = 0.13274336283185842,
                KDryByKMPoint2  = 0.16949152542372883,
                KDryByKMPoint25 = 0.2032520325203252,
                KDryByKMPoint3  = 0.234375,
                KDryByKMPoint35 = 0.26315789473684209,
                KDryByKMPoint4  = 0.28985507246376813,
                KDryByKMPoint45 = 0.31468531468531469,
                KDryByKMPoint5  = 0.33783783783783783,
                porosity        = 0.98
            };
            VpVsProperties vp1700 = new VpVsProperties()
            {
                CastagniaDolomite  = 913.74,
                CastagniaLimestone = 538.8788,
                CastagniaMudrock   = 293.17,
                CastagniaSandstone = 511.24,
                Han = 562.32,
                Vp  = 1700
            };
            DenVpProperties denVp1700 = new DenVpProperties()
            {
                GardnerAnhydrite = 2384.05319906545,
                GardnerDolomite  = 1988.94318029729,
                GardnerSandstone = 1906.5809814135,
                GardnerShale     = 2014.22050513369,
                MavkoLimestone   = 1381.579861,
                Vp = 1700
            };
            //Assert.AreEqual(kdryValueForPoint98, actual.PorosityKDryPlotList[1], "Kdry table does not match when porosity is 0.98", null);
            //Assert.AreEqual(vp1700, actual.VpVsPlotList[1], "VpVs table does not match when Vp is 1700", null);
            //Assert.AreEqual(denVp1700, actual.DenVpPlotList[1], "DenVp table does not match when Vp is 1700", null);
        }
Ejemplo n.º 6
0
        public void CalculateQCPropertiesOnlyTest()
        {
            RockProperties rock = new RockProperties()
            {
                RockPorosity = 0.34068825,
                KGrain       = 37,
                MuGrain      = 44,
                RhoGrain     = 2650,
                RhoBulk      = 2121.933213,
                KBulk        = 9.316624568,
                MuBulk       = 2.297016025
            };
            FluidProperties fluid = new FluidProperties()
            {
                GassmanResultKInitial   = 2.54,
                GassmanResultRhoInitial = 1100
            };

            FluidProperties[] flagResults = new FluidProperties[]
            {
                new FluidProperties()
                {
                    FluidType = FluidType.Brine, FlagResultK = 2.54, FlagResultRho = 1100
                }
            };
            QCProperties expected = new QCProperties()
            {
                Porosity    = 0.34068825,
                KDryByKMin  = 0.107294,
                DenBrineSat = 2121.933,
                VpBrineSat  = 2415.363,
                VsBrineSat  = 1040.438
            };
            QCProperties actual;

            actual = QCLogic.CalculateQCProperties(rock, fluid, flagResults, new MetricMPa());
            //To test in Field units actual = QCLogic.CalculateQCProperties(rock, fluid, flagResults, new Field()) and convert values for assertion.
            Assert.AreEqual(expected.Porosity, actual.Porosity, "Porosity do not match");
            Assert.AreEqual(expected.KDryByKMin, actual.KDryByKMin, 1e-3, "KDryByKmin do not match");
            Assert.AreEqual(expected.DenBrineSat.Value, actual.DenBrineSat.Value, 1e-3, "DenBrineSat do not match");
            Assert.AreEqual(expected.VpBrineSat.Value, actual.VpBrineSat.Value, 1e-3, "VpBrineSat do not match");
            Assert.AreEqual(expected.VsBrineSat.Value, actual.VsBrineSat.Value, 1e-3, "VpBrineSat do not match");
            PorosityKDryByKMinProperties kdryValueForPointZero2 = new PorosityKDryByKMinProperties()
            {
                porosity        = 0.02,
                KDryByKMPoint1  = 0.833333333,
                KDryByKMPoint15 = 0.882352941,
                KDryByKMPoint2  = 0.909090909,
                KDryByKMPoint25 = 0.925925926,
                KDryByKMPoint3  = 0.9375,
                KDryByKMPoint35 = 0.945945946,
                KDryByKMPoint4  = 0.952380952,
                KDryByKMPoint45 = 0.957446809,
                KDryByKMPoint5  = 0.961538462
            };
            PorosityKDryByKMinProperties kdryValueForPoint98 = new PorosityKDryByKMinProperties()
            {
                KDryByKMPoint1  = 0.0925925925925926,
                KDryByKMPoint15 = 0.13274336283185842,
                KDryByKMPoint2  = 0.16949152542372883,
                KDryByKMPoint25 = 0.2032520325203252,
                KDryByKMPoint3  = 0.234375,
                KDryByKMPoint35 = 0.26315789473684209,
                KDryByKMPoint4  = 0.28985507246376813,
                KDryByKMPoint45 = 0.31468531468531469,
                KDryByKMPoint5  = 0.33783783783783783,
                porosity        = 0.98
            };
            VpVsProperties vp1700 = new VpVsProperties()
            {
                CastagniaDolomite  = 913.74,
                CastagniaLimestone = 538.8788,
                CastagniaMudrock   = 293.17,
                CastagniaSandstone = 511.24,
                Han = 562.32,
                Vp  = 1700
            };
            DenVpProperties denVp1700 = new DenVpProperties()
            {
                GardnerAnhydrite = 2384.05319906545,
                GardnerDolomite  = 1988.94318029729,
                GardnerSandstone = 1906.5809814135,
                GardnerShale     = 2014.22050513369,
                MavkoLimestone   = 1381.579861,
                Vp = 1700
            };
            //Assert.AreEqual(kdryValueForPoint98, actual.PorosityKDryPlotList[1], "Kdry table does not match when porosity is 0.98", null);
            //Assert.AreEqual(vp1700, actual.VpVsPlotList[1], "VpVs table does not match when Vp is 1700", null);
            //Assert.AreEqual(denVp1700, actual.DenVpPlotList[1], "DenVp table does not match when Vp is 1700", null);
        }