当前位置: 首页>>代码示例>>C#>>正文


C# WFloInterface.GetLayerRateCalculator方法代码示例

本文整理汇总了C#中WFloInterface.GetLayerRateCalculator方法的典型用法代码示例。如果您正苦于以下问题:C# WFloInterface.GetLayerRateCalculator方法的具体用法?C# WFloInterface.GetLayerRateCalculator怎么用?C# WFloInterface.GetLayerRateCalculator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WFloInterface的用法示例。


在下文中一共展示了WFloInterface.GetLayerRateCalculator方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LayerRate_Set4_A3_Count

        public void LayerRate_Set4_A3_Count()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layer rate - set 4.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 92987.929;

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

                int Actual = WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Count;

                int Expected = 1;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:23,代码来源:WPS_Layer.cs

示例2: LayerRate_Set4_A1_GetAt_OilRate

        public void LayerRate_Set4_A1_GetAt_OilRate()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layer rate - set 4.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 21780.34;

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

                int i = 0;

                double Actual = Math.Round(WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().GetAt(i).AddRef().OilRate, 2);

                double Expected = 16335.25;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual, DeltaFraction.Default(Expected));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例3: LayerRate_Set4_A2_Item_WaterRate

        public void LayerRate_Set4_A2_Item_WaterRate()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layer rate - set 4.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 21780.34;

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

                string sName = "Layer 1";

                double Actual = Math.Round(WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Item(sName).AddRef().WaterRate, 2);

                double Expected = 5445.08;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual, DeltaFraction.Default(Expected));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例4: LayerRate_Set3_A2_Item_WaterRate

        public void LayerRate_Set3_A2_Item_WaterRate()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\one layer active and one is inactive.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 92987.929;

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

                string sName = "Layer 2";

                double Actual = Math.Round(WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Item(sName).AddRef().WaterRate, 2);

                double Expected = 23246.98;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual, DeltaFraction.Default(Expected));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例5: LayerRate_Set4_A1_GetAt_Name

        public void LayerRate_Set4_A1_GetAt_Name()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layer rate - set 4.wflx");

                WFInt.OpenFile(sfile);

                double dRate = 21780.34;

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

                int i = 0;

                string Actual = WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().GetAt(i).AddRef().Name;

                string Expected = "Layer 1";

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例6: LayerRate_Set2_A3_Item_OilRate

        public void LayerRate_Set2_A3_Item_OilRate()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

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

                WFInt.OpenFile(sfile);

                double dRate = 37100;

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

                string sName = "Layer 1";

                double Actual = Math.Round(WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Item(sName).AddRef().OilRate, 0);

                double Expected = 27825.0;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual, DeltaFraction.Default(Expected));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例7: LayerRate_Set2_A5_RemoveAll

        public void LayerRate_Set2_A5_RemoveAll()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

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

                string sfile2 = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\get-one layer_RemoveAll.wflx");

                WFInt.OpenFile(sfile1);

                WFInt.SaveFile(sfile2);

                double dRate = 37100;

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

                WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().RemoveAll();

                WFInt.SaveFile(sfile2);

                WFInt.OpenFile(sfile2);

                int Actual = WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Count;

                int Expected = 0;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:33,代码来源:WPS_Layer.cs

示例8: LayerRate_Set2_A2_GetAt_GasRate

        public void LayerRate_Set2_A2_GetAt_GasRate()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

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

                WFInt.OpenFile(sfile);

                double dRate = 37100;

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

                int i = 0;

                double Actual = Math.Round(WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().GetAt(i).AddRef().GasRate, 2);

                double Expected = 13.91;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual, DeltaFraction.Default(Expected));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:25,代码来源:WPS_Layer.cs

示例9: LayerRate_Set2_A1_Add

        public void LayerRate_Set2_A1_Add()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                string sfile1 = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\get-one layer.wflx");
                //string sfile2 = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\get-one layer_Save1.wflx");(model doesnot exist!!)

                WFInt.OpenFile(sfile1);

                double dRate = 37100;

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

                int Count = WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Count;

                string sName = "Layer 2";

                WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Add(sName);

                int Actual = WFInt.GetLayerRateCalculator().AddRef().LayerRates.AddRef().Count;

                int Expected = 2;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:30,代码来源:WPS_Layer.cs

示例10: LayerRateCalculator_GetMultipleLayerRatesData

        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));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:27,代码来源:WPS_Layer.cs

示例11: LayerRateCalculator_GetLayerRatesData

        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));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:27,代码来源:WPS_Layer.cs

示例12: LayerRateCalculator_GetFlowRateDataByName

        public void LayerRateCalculator_GetFlowRateDataByName()
        {
            using (new LifeTimeScope())
            {
                WFloInterface WFInt = new WFloInterface();
                WFInt.AddRef();

                FlowRate pVal = new FlowRate();
                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().LayerRates.AddRef().GetFlowRateDataByName("Layer 1", pVal);

                double WaterRate = pVal.WaterRate;
                double OilRate = pVal.OilRate;

                Assert.AreEqual(9294.6, WaterRate, DeltaFraction.Default(9294.6));
                Assert.AreEqual(27883.8, OilRate, DeltaFraction.Default(27883.8));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:27,代码来源:WPS_Layer.cs


注:本文中的WFloInterface.GetLayerRateCalculator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。