• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WFloInterface类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Main

        static void Main(string[] args)
        {
            try
            {
                if (args.Length == 0)
                {
                    Console.WriteLine("Uage :  CheckObjectType.exe <full file path > <val1> <val2> ");
                    return;
                }
                WFloInterface WfInt = new WFloInterface();
                WfInt.OpenFile(args[0]);
                var OpPtCalc = WfInt.GetOpPtCalculator();
                OpPtCalc.UsePCPPumpPerformanceRange = true;
                OpPtCalc.AutoSearchOpPtforPCP = false;
                var res = OpPtCalc.CalculateOperatingSpeedforPCP(Convert.ToDouble(args[1]), Convert.ToDouble(args[2]));
                Console.WriteLine(" Min Value " + OpPtCalc.MinimumRangeValue);
                Console.WriteLine(" Min Value " + OpPtCalc.MaximumRangeValue);
           
            }
            catch (Exception ex)
            {
                Console.WriteLine("Got Exception : "+ex.Message);
            }

        }
开发者ID:prasannarhegde2015,项目名称:C-Advanced-Learning,代码行数:25,代码来源:Program.cs


示例2: LayerCollection_A3_Item

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

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

                WFInt.OpenFile(sfile);

                double Actual = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DietzFactor, 1);

                //double Expected = 31.6;

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


示例3: LayerCollection_A2_CountAll

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layers active.wflx");

                WFInt.OpenFile(sfile);

                short Actual = WFInt.WellModel.AddRef().Layers.AddRef().CountAll;

                //short Expected = 2;

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


示例4: 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


示例5: Layer_A1_SetViscosityModelingData

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\PCP-ViscosityModeling.wflx");
                string OutPutfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\Saved layer.wflx");

                WFInt.OpenFile(sfile);

                Array psaTemperatureOld = Array.CreateInstance(typeof(double), 20);
                Array psaViscosityOld = Array.CreateInstance(typeof(double), 20);
                short ActualNo = 0;

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetViscosityModelingData(ref ActualNo, ref psaTemperatureOld, ref psaViscosityOld);

                psaTemperatureOld.SetValue(90, 2);
                psaViscosityOld.SetValue(13, 2);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().SetViscosityModelingData(3, psaTemperatureOld, psaViscosityOld);
                WFInt.SaveFile(OutPutfile);

                Array psaTemperatureNew = Array.CreateInstance(typeof(double), 20);
                Array psaViscosityNew = Array.CreateInstance(typeof(double), 20);

                WFloInterface WFIntSaved = new WFloInterface();
                WFIntSaved.AddRef();

                WFIntSaved.OpenFile(OutPutfile);

                WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetViscosityModelingData(ref ActualNo, ref psaTemperatureNew, ref psaViscosityNew);

                double TempratureAt0 = (double)psaTemperatureNew.GetValue(0);
                double TempratureAt1 = (double)psaTemperatureNew.GetValue(1);
                double TempratureAt2 = (double)psaTemperatureNew.GetValue(2);

                double ViscosityAt0 = (double)psaViscosityNew.GetValue(0);
                double ViscosityAt1 = (double)psaViscosityNew.GetValue(1);
                double ViscosityAt2 = (double)psaViscosityNew.GetValue(2);

                Assert.AreEqual(80, TempratureAt0, DeltaFraction.Default(80));
                Assert.AreEqual(85, TempratureAt1, DeltaFraction.Default(85));
                Assert.AreEqual(90, TempratureAt2, DeltaFraction.Default(90));
                Assert.AreEqual(17, ViscosityAt0, DeltaFraction.Default(17));
                Assert.AreEqual(15, ViscosityAt1, DeltaFraction.Default(15));
                Assert.AreEqual(13, ViscosityAt2, DeltaFraction.Default(13));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:50,代码来源:WPS_Layer.cs


示例6: LayerCollection_LayerStatus

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layers active.wflx");
                string sfileOutPut = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\Saved layers active.wflx");

                WFInt.OpenFile(sfile);

                LayerCollection pLayerCollection = new LayerCollection();
                pLayerCollection.AddRef();

                WFInt.WellModel.AddRef().GetLayerCollectionData(pLayerCollection);

                pLayerCollection.SetLayerStatus(2, true);
                pLayerCollection.SetLayerStatus(1, true);

                WFInt.WellModel.AddRef().SetLayerCollectionData(pLayerCollection);

                WFInt.SaveFile(sfileOutPut);

                WFloInterface WFInt1 = new WFloInterface();
                WFInt1.AddRef();
                WFInt1.OpenFile(sfileOutPut);

                LayerCollection pLayerCollection1 = new LayerCollection();
                pLayerCollection1.AddRef();

                WFInt1.WellModel.AddRef().GetLayerCollectionData(pLayerCollection1);

                bool ActualStatus1 = pLayerCollection1.GetLayerStatus(1);
                string ActualName1 = pLayerCollection1.GetLayerName(1);
                bool ActualStatus2 = pLayerCollection1.GetLayerStatus(2);
                string ActualName2 = pLayerCollection1.GetLayerName(2);

                Assert.AreEqual(true, ActualStatus1);
                Assert.AreEqual("Layer 1", ActualName1);
                Assert.AreEqual(true, ActualStatus2);
                Assert.AreEqual("New Layer *1", ActualName2);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:44,代码来源:WPS_Layer.cs


示例7: Layer_A1_CalculateProductivityIndex

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\PCP-ViscosityModeling.wflx");

                WFInt.OpenFile(sfile);
                double dIndex = 0;

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CalculateProductivityIndex(400, 400, ref dIndex);

                double ActualIndex = Math.Round(dIndex, 4);
                Assert.AreEqual(0.3075, ActualIndex, DeltaFraction.Default(0.3077));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:18,代码来源:WPS_Layer.cs


示例8: MultiStageData_RemoveOneStage

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/layers active.wflx");
                string sSavedfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/Saved layers active.wflx");

                WFInt.OpenFile(sfile);

                int initialCount = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;

                Assert.AreEqual(initialCount, 0);

                MultiFractureData firstStage = new MultiFractureData();

                firstStage.StageLength = 300;
                firstStage.TopMD = 10000;

                FractureData firstFracture = new FractureData();
                firstFracture.AddRef();

                firstFracture.bUseFracFaceSkin = true;
                firstFracture.bUseCalcdFracDmgSkin = true;
                firstFracture.bUseFracChokedSkin = true;
                firstFracture.bUseCalcdFracChokedSkin = true;
                firstFracture.bUseCalcdSkin = true;
                firstFracture.FracSkin = 0.5;
                firstFracture.FracHalfSpacing = 200;
                firstFracture.FracWidth = 5;
                firstFracture.FracHalfLength = 250;
                firstFracture.FracHeight = 2;
                firstFracture.FracPermNearWB = 0.2;
                firstFracture.FracWidthNearWB = 0.25;
                firstFracture.FracPerm = 0.5;
                firstFracture.FracDmgPerm = 0.74;
                firstFracture.FracDmgThick = 52;
                firstFracture.FracDmgSkinCalcd = 0.6;
                firstFracture.FracDmgSkinMeas = 75;
                firstFracture.FracChokedHalfLength = 300;
                firstFracture.FracChokedSkinCalcd = 0.65;
                firstFracture.FracChokedSkinMeas = 95;
                firstFracture.DarcySkinCalcd = 0.7;
                firstFracture.DarcySkinManual = 0.15;

                firstStage.AddRef().AddFractureData(firstFracture);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().AddMultiFractureData(firstStage);

                int afterAddingCount = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;

                //  int afterAddingCount = WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().;

                Assert.AreEqual(afterAddingCount, 1);

                #region read the number of fractures from the WellTech
                MultiFractureData savedMultiFracture = new MultiFractureData();
                savedMultiFracture.AddRef();

                FractureData savedFirstFracture = new FractureData();
                savedFirstFracture.AddRef();

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().GetMultiFractureData(0, savedMultiFracture, 0, savedFirstFracture);

                double Stagelength_1 = savedMultiFracture.StageLength;
                double TopMD_1 = savedMultiFracture.TopMD;

                int CountFractures = savedMultiFracture.NumberOfFractures;

                Assert.AreEqual(CountFractures, 1);

                Assert.AreEqual(300, savedMultiFracture.StageLength, DeltaFraction.Default(300));
                Assert.AreEqual(10000, savedMultiFracture.TopMD, DeltaFraction.Default(10000));

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().RemoveAllOneStageData();

                int afterRemoveAll = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;

                Assert.AreEqual(afterRemoveAll, 0);

                #endregion
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:85,代码来源:WPS_Layer.cs


示例9: MultiStageData_MultiFractureProductivities

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/Multiple Fractures.wflx");
                string sSavedfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/Saved Multiple Fractures.wflx");

                //open wellflo
                WFInt.OpenFile(sfile);

                int initialCount = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;
                bool bMatrix = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseReservoirMatrixCorrection;

                double ReservoirPI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ReservoirProductivityIndex;
                double FracturePI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().FractureProductivityIndex;
                double WellborePI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellboreProductivityIndex;
                double MatrixPI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().MatrixProductivityIndex;

                double PI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ProductivityIndex;

                ReservoirPI = Math.Round(ReservoirPI, 4);
                FracturePI = Math.Round(FracturePI, 4);
                WellborePI = Math.Round(WellborePI, 4);
                MatrixPI = Math.Round(MatrixPI, 1);
                PI = Math.Round(PI, 4);

                Assert.AreEqual(ReservoirPI, 1.0072, DeltaFraction.Default(ReservoirPI));
                Assert.AreEqual(FracturePI, 0.4215, DeltaFraction.Default(FracturePI));
                Assert.AreEqual(WellborePI, 0.0354, DeltaFraction.Default(WellborePI));
                Assert.AreEqual(MatrixPI, 0.0, DeltaFraction.Default(MatrixPI));
                Assert.AreEqual(PI, 0.0317, DeltaFraction.Default(PI));

                // Get the first stage first fracture pro
                MultiFractureData savedMultiFracture = new MultiFractureData();
                savedMultiFracture.AddRef();
                FractureData savedFirstFracture = new FractureData();
                savedFirstFracture.AddRef();
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().GetMultiFractureData(0, savedMultiFracture, 0, savedFirstFracture);

                double Stagelength_1 = savedMultiFracture.StageLength;
                double TopMD_1 = savedMultiFracture.TopMD;
                int CountFractures = savedMultiFracture.NumberOfFractures;

                Assert.AreEqual(CountFractures, 1);
                Assert.AreEqual(313, Stagelength_1, DeltaFraction.Default(313));
                Assert.AreEqual(5000, TopMD_1, DeltaFraction.Default(5000));

                // Use the Reservoir Matrix Correction
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseReservoirMatrixCorrection = true; //true
                bool bMatrix_1 = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseReservoirMatrixCorrection;
                //save wellflo
                WFInt.SaveFile(sSavedfile);

                WFloInterface WFIntSaved = new WFloInterface();
                WFIntSaved.AddRef();
                //open the saved wellflo
                WFIntSaved.OpenFile(sSavedfile);

                bool savedbMatrix = WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseReservoirMatrixCorrection;
                Assert.AreEqual(savedbMatrix, true);

                double NewReservoirPI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ReservoirProductivityIndex;
                double NewFracturePI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().FractureProductivityIndex;
                double NewWellborePI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellboreProductivityIndex;
                double NewMatrixPI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().MatrixProductivityIndex;

                double NewPI = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ProductivityIndex;

                NewReservoirPI = Math.Round(NewReservoirPI, 4);
                NewFracturePI = Math.Round(NewFracturePI, 4);
                NewWellborePI = Math.Round(NewWellborePI, 4);
                NewMatrixPI = Math.Round(NewMatrixPI, 4);
                NewPI = Math.Round(NewPI, 4);

                Assert.AreEqual(NewReservoirPI, 1.0072, DeltaFraction.Default(NewReservoirPI));
                Assert.AreEqual(NewFracturePI, 0.4215, DeltaFraction.Default(NewFracturePI));
                Assert.AreEqual(NewWellborePI, 0.0354, DeltaFraction.Default(NewWellborePI));
                Assert.AreEqual(NewMatrixPI, 0.0122, DeltaFraction.Default(NewMatrixPI));
                Assert.AreEqual(NewPI, 0.0439, DeltaFraction.Default(NewPI));

            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:85,代码来源:WPS_Layer.cs


示例10: 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


示例11: 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


示例12: 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


示例13: Layer_Put_LayerParameters_Vogel

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterCut = 0.3;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VogelPCoefficient = 0.25;

                WFInt.SaveFile(OutPutfile);

                WFloInterface WFInt1 = new WFloInterface();
                WFInt1.AddRef();

                WFInt1.OpenFile(OutPutfile);

                double ActualWaterCut = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterCut;
                double ActualVogelPCoefficient = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VogelPCoefficient;
                double ActualProductivityIndex = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ProductivityIndex;
                double ActualAOF = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().AOF;

                double ExpectedWaterCut = 0.3;
                double ExpectedVogelPCoefficient = 0.25;
                double ExpectedProductivityIndex = 7.8599;
                double ExpectedAOF = 37637.9218;

                Assert.AreEqual(ExpectedWaterCut, ActualWaterCut, DeltaFraction.Default(ExpectedWaterCut));
                Assert.AreEqual(ExpectedVogelPCoefficient, ActualVogelPCoefficient, DeltaFraction.Default(ExpectedVogelPCoefficient));
                Assert.AreEqual(ExpectedProductivityIndex, ActualProductivityIndex, DeltaFraction.Default(ExpectedProductivityIndex));
                Assert.AreEqual(ExpectedAOF, ActualAOF, DeltaFraction.Default(ExpectedAOF));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:38,代码来源:WPS_Layer.cs


示例14: 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


示例15: 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


示例16: MultiStageData_ChokedModel

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/layers active.wflx");
                string sSavedfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/Saved layers active.wflx");

                WFInt.OpenFile(sfile);

                MultiFractureData firstStage = new MultiFractureData();

                firstStage.StageLength = 300;
                firstStage.TopMD = 10000;
                firstStage.ChokedModel = 1;

                FractureData firstFracture = new FractureData();
                firstFracture.AddRef();

                firstFracture.bUseFracFaceSkin = true;
                firstFracture.bUseCalcdFracDmgSkin = true;
                firstFracture.bUseFracChokedSkin = true;
                firstFracture.bUseCalcdFracChokedSkin = true;
                firstFracture.bUseCalcdSkin = true;
                firstFracture.FracSkin = 0.5;
                firstFracture.FracHalfSpacing = 200;
                firstFracture.FracWidth = 5;
                firstFracture.FracHalfLength = 250;
                firstFracture.FracHeight = 2;
                firstFracture.FracPermNearWB = 0.2;
                firstFracture.FracWidthNearWB = 0.25;
                firstFracture.FracPerm = 0.5;
                firstFracture.FracDmgPerm = 0.74;
                firstFracture.FracDmgThick = 52;
                firstFracture.FracDmgSkinCalcd = 0.6;
                firstFracture.FracDmgSkinMeas = 75;
                firstFracture.FracChokedHalfLength = 300;
                firstFracture.FracChokedSkinCalcd = 0.65;
                firstFracture.FracChokedSkinMeas = 95;
                firstFracture.DarcySkinCalcd = 0.7;
                firstFracture.DarcySkinManual = 0.15;

                firstStage.AddRef().AddFractureData(firstFracture);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().AddMultiFractureData(firstStage);

                WFInt.SaveFile(sSavedfile);

                WFloInterface WFIntSaved = new WFloInterface();
                WFIntSaved.AddRef();

                WFIntSaved.OpenFile(sSavedfile);

                MultiFractureData savedMultiFracture = new MultiFractureData();
                savedMultiFracture.AddRef();

                FractureData savedFracture = new FractureData();
                savedFracture.AddRef();

                WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().GetMultiFractureData(0, savedMultiFracture, 0, savedFracture);

                short ChokedModel = savedMultiFracture.ChokedModel;

                Assert.AreEqual(1, ChokedModel);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:68,代码来源:WPS_Layer.cs


示例17: MultiStageData_GetOneStage

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/layers active.wflx");
                string sSavedfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer/Saved layers active.wflx");

                WFInt.OpenFile(sfile);

                int initialCount = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;

                Assert.AreEqual(initialCount, 0);

                MultiFractureData firstStage = new MultiFractureData();

                firstStage.StageLength = 300;
                firstStage.TopMD = 10000;

                FractureData firstFracture = new FractureData();
                firstFracture.AddRef();

                firstFracture.bUseFracFaceSkin = true;
                firstFracture.bUseCalcdFracDmgSkin = true;
                firstFracture.bUseFracChokedSkin = true;
                firstFracture.bUseCalcdFracChokedSkin = true;
                firstFracture.bUseCalcdSkin = true;
                firstFracture.FracSkin = 0.5;
                firstFracture.FracHalfSpacing = 200;
                firstFracture.FracWidth = 5;
                firstFracture.FracHalfLength = 250;
                firstFracture.FracHeight = 2;
                firstFracture.FracPermNearWB = 0.2;
                firstFracture.FracWidthNearWB = 0.25;
                firstFracture.FracPerm = 0.5;
                firstFracture.FracDmgPerm = 0.74;
                firstFracture.FracDmgThick = 52;
                firstFracture.FracDmgSkinCalcd = 0.6;
                firstFracture.FracDmgSkinMeas = 75;
                firstFracture.FracChokedHalfLength = 300;
                firstFracture.FracChokedSkinCalcd = 0.65;
                firstFracture.FracChokedSkinMeas = 95;
                firstFracture.DarcySkinCalcd = 0.7;
                firstFracture.DarcySkinManual = 0.15;

                firstStage.AddRef().AddFractureData(firstFracture);

                FractureData secondFracture = new FractureData();
                secondFracture.AddRef();

                secondFracture.bUseFracFaceSkin = true;
                secondFracture.bUseCalcdFracDmgSkin = true;
                secondFracture.bUseFracChokedSkin = true;
                secondFracture.bUseCalcdFracChokedSkin = true;
                secondFracture.bUseCalcdSkin = true;
                secondFracture.FracSkin = 0.345;
                secondFracture.FracHalfSpacing = 234;
                secondFracture.FracWidth = 0.5;
                secondFracture.FracHalfLength = 350;
                secondFracture.FracHeight = 2;
                secondFracture.FracPermNearWB = 0.2;
                secondFracture.FracWidthNearWB = 0.25;
                secondFracture.FracPerm = 0.5;
                secondFracture.FracDmgPerm = 0.74;
                secondFracture.FracDmgThick = 52;
                secondFracture.FracDmgSkinCalcd = 0.6;
                secondFracture.FracDmgSkinMeas = 75;
                secondFracture.FracChokedHalfLength = 300;
                secondFracture.FracChokedSkinCalcd = 0.65;
                secondFracture.FracChokedSkinMeas = 95;
                secondFracture.DarcySkinCalcd = 0.7;
                secondFracture.DarcySkinManual = 0.15;

                firstStage.AddRef().AddFractureData(secondFracture);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().AddMultiFractureData(firstStage);

                WFInt.SaveFile(sSavedfile);

                WFloInterface WFIntSaved = new WFloInterface();
                WFIntSaved.AddRef();

                WFIntSaved.OpenFile(sSavedfile);

                int afterAddingCount = WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().NumberOfFractureStages;

                //  int afterAddingCount = WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().;

                Assert.AreEqual(afterAddingCount, 1);

                #region read the number of fractures from the WellTech
                MultiFractureData savedMultiFracture = new MultiFractureData();
                savedMultiFracture.AddRef();

                FractureData savedFirstFracture = new FractureData();
                savedFirstFracture.AddRef();

                WFIntSaved.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().GetMultiFractureData(0, savedMultiFracture, 0, savedFirstFracture);
//.........这里部分代码省略.........
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:101,代码来源:WPS_Layer.cs


示例18: 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


示例19: Layer_Put_TestData_Vogel

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

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

                WFInt.OpenFile(sfile);
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().IPREntryModel = 1; //1 - Test Entry Model
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterCut = 0.3;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VogelPCoefficient = 0.25;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().SetTestPoint1Data(5000, 1250);

                WFInt.SaveFile(OutPutfile);

                WFloInterface WFInt1 = new WFloInterface();
                WFInt1.AddRef();

                WFInt1.OpenFile(OutPutfile);

                double ActualWaterCut = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterCut;
                double ActualVogelPCoefficient = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VogelPCoefficient;
                double ActualProductivityIndex = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().ProductivityIndex;
                double ActualAOF = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().AOF;

                double ExpectedWaterCut = 0.3;
                double ExpectedVogelPCoefficient = 0.25;
                double ExpectedProductivityIndex = 1.2500;
                double ExpectedAOF = 5985.7;

                Assert.AreEqual(ExpectedWaterCut, ActualWaterCut, DeltaFraction.Default(ExpectedWaterCut));
                Assert.AreEqual(ExpectedVogelPCoefficient, ActualVogelPCoefficient, DeltaFraction.Default(ExpectedVogelPCoefficient));
                Assert.AreEqual(ExpectedProductivityIndex, ActualProductivityIndex, DeltaFraction.Default(ExpectedProductivityIndex));
                Assert.AreEqual(ExpectedAOF, ActualAOF, DeltaFraction.Default(ExpectedAOF));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:39,代码来源:WPS_Layer.cs


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WIGStartInfo类代码示例发布时间:2022-05-24
下一篇:
C# WDist类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap