コード例 #1
0
        public void LayerRateCalculator_GetMultipleLayerRatesData()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                LayerRates pVal = new LayerRates();
                pVal.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/PCP-Multiphase.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 150.0;

                WFInt.GetLayerRateCalculator().AddRef().Calculate(dRate);

                WFInt.GetLayerRateCalculator().AddRef().GetLayerRatesData(pVal);

                double WaterRate = Math.Round(pVal.GetAt(0).AddRef().WaterRate, 1);
                double OilRate = Math.Round(pVal.GetAt(0).AddRef().OilRate, 1);

                Assert.AreEqual(30, WaterRate, DeltaFraction.Default(30));
                Assert.AreEqual(119.9999, OilRate, DeltaFraction.Default(119.9999));
            }
        }
コード例 #2
0
        public void LayerRateCalculator_GetLayerRatesData()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                LayerRates pVal = new LayerRates();
                pVal.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\get-one layer.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 37178.3;

                WFInt.GetLayerRateCalculator().AddRef().Calculate(dRate);

                WFInt.GetLayerRateCalculator().AddRef().GetLayerRatesData(pVal);

                double WaterRate = Math.Round(pVal.GetAt(0).AddRef().WaterRate, 1);
                double OilRate = Math.Round(pVal.GetAt(0).AddRef().OilRate, 1);

                Assert.AreEqual(9294.6, WaterRate, DeltaFraction.Default(9294.6));
                Assert.AreEqual(27883.8, OilRate, DeltaFraction.Default(27883.8));
            }
        }