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


C# WFloInterface.SaveFile方法代码示例

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


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

示例1: MultiStageData_CalculatedDietZFactor

        public void MultiStageData_CalculatedDietZFactor()
        {
            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);

                bool bMatrix = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseCalcDietz;
                Assert.AreEqual(bMatrix, true);

                // Use the Reservoir Matrix Correction
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseCalcDietz = false;
                //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().UseCalcDietz;
                Assert.AreEqual(savedbMatrix, false);

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

示例2: MultiStageData_AddOneStage

        public void MultiStageData_AddOneStage()
        {
            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 = 5;
                secondFracture.FracHalfLength = 250;
                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 savedFracture = new FractureData();
                savedFracture.AddRef();

//.........这里部分代码省略.........
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:101,代码来源:WPS_Layer.cs

示例3: Layer_Put_PartingPressure

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\injection well.wflx");
                string OutPutfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\Saved injection well.wflx");

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().PartingPressure = 7100;

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                double ActualOilGravity = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().PartingPressure;

                double ExpectedPartingPressure = 7100;

                Assert.AreEqual(ExpectedPartingPressure, ActualOilGravity, DeltaFraction.Default(ExpectedPartingPressure));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:28,代码来源:WPS_Layer.cs

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

示例5: Layer_Put_Darcy_NonDarcy_Skin

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DarcySkin = 0.9;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().NonDarcySkin = 0.1;

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                double ActualDarcySkin = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DarcySkin;
                double ActualNonDarcySkin = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().NonDarcySkin;

                //double ExpectedDarcySkin = 0.9;
                //double ExpectedNonDarcySkin = 0.1;

                AreEqual("DarcySkin", ActualDarcySkin);
                AreEqual("NonDarcySkin", ActualNonDarcySkin);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:32,代码来源:WPS_Layer.cs

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

示例7: MultiStageData_SetOneStage

        public void MultiStageData_SetOneStage()
        {
            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);

                firstStage.StageLength = 400;
                firstStage.TopMD = 12345;

                firstFracture.FracSkin = 1.8;
                firstFracture.FracHalfSpacing = 100;

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GetMultiStageData().AddRef().SetMultiFractureData(0, firstStage, 0, firstFracture);

                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);

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

                int CountFractures = savedMultiFracture.NumberOfFractures;

                Assert.AreEqual(CountFractures, 1);

                Assert.AreEqual(400, savedMultiFracture.StageLength, DeltaFraction.Default(400));
                Assert.AreEqual(12345, savedMultiFracture.TopMD, DeltaFraction.Default(12345));
                #endregion

                # region get firstfracture properties

                Assert.AreEqual(1.8, savedFirstFracture.FracSkin, DeltaFraction.Default(1.8));       // Value has been changed.
                Assert.AreEqual(100, savedFirstFracture.FracHalfSpacing, DeltaFraction.Default(100)); // Value has been changed.
                Assert.AreEqual(5, savedFirstFracture.FracWidth, DeltaFraction.Default(5));
                Assert.AreEqual(250, savedFirstFracture.FracHalfLength, DeltaFraction.Default(250));
                Assert.AreEqual(2, savedFirstFracture.FracHeight, DeltaFraction.Default(2));
                Assert.AreEqual(0.2, savedFirstFracture.FracPermNearWB, DeltaFraction.Default(0.2));
//.........这里部分代码省略.........
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:101,代码来源:WPS_Layer.cs

示例8: Layer_B2_SetTestPoint1Data_TestPoint1Rate

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

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

                string sfileOutput2 = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\SetTestPoint1Data_AfterSetting_2.wflx");

                WFInt.OpenFile(sfile);

                double dBHP = 4500;
                double dQLiq = 1050;

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().SetTestPoint1Data(dBHP, dQLiq);

                WFInt.SaveFile(sfileOutput2);

                double Actual = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().TestPoint1Rate;

                double Expected = 1050;

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

示例9: Layer_LayerConfig_Multiple_Fracture

        public void Layer_LayerConfig_Multiple_Fracture()
        {
            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);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().LayerConfig = 3; //LAYER_MULTIPLE_FRACTURES
                WFInt.SaveFile(sfileOutPut);

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

                short afterChange = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().LayerConfig;

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

示例10: Layer_Put_General_Data

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Name = "First Layer";
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Pressure = 7000;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Temperature = 200;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().MeasuredDepth = 14500;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().HorizontalPermeability = 210;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Thickness = 110;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellBoreRadius = 0.45;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WGR = 160;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CGR = 170;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseCalculatedSkin = true;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VerticalPermeability = 220;

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                string ActualName = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Name;
                double ActualPressure = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Pressure;
                double ActualTemperature = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Temperature;
                double ActualMeasuredDepth = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().MeasuredDepth;
                double ActualHorizontalPermeability = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().HorizontalPermeability;
                double ActualThickness = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Thickness;
                double ActualWellBoreRadius = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellBoreRadius, 2);
                double ActualWGR = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WGR;
                double ActualCGR = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CGR;
                bool ActualUseCalculatedSkin = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().UseCalculatedSkin;
                //double ActualDarcyFlowCoeff = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DarcyFlowCoeff;
                //double ActualNonDarcyFlowCoeff = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().NonDarcyFlowCoeff;
                double ActualAOF = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().AOF, 4);
                double ActualVerticalPermeability = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VerticalPermeability;

                string ExpectedName = "First Layer";
                double ExpectedPressure = 7000;
                double ExpectedTemperature = 200;
                double ExpectedMeasuredDepth = 14500;
                double ExpectedHorizontalPermeability = 210;
                double ExpectedThickness = 110;
                double ExpectedWellBoreRadius = 0.45;
                double ExpectedWGR = 160;
                double ExpectedCGR = 170;
                bool ExpectedUseCalculatedSkin = true;
                double ExpectedAOF = 812.6196;
                double ExpectedVerticalPermeability = 220;

                Assert.AreEqual(ExpectedName, ActualName);
                Assert.AreEqual(ExpectedPressure, ActualPressure, DeltaFraction.Default(ExpectedPressure));
                Assert.AreEqual(ExpectedTemperature, ActualTemperature, DeltaFraction.Default(ExpectedTemperature));
                Assert.AreEqual(ExpectedMeasuredDepth, ActualMeasuredDepth, DeltaFraction.Default(ExpectedMeasuredDepth));
                Assert.AreEqual(ExpectedHorizontalPermeability, ActualHorizontalPermeability, DeltaFraction.Default(ExpectedHorizontalPermeability));
                Assert.AreEqual(ExpectedThickness, ActualThickness, DeltaFraction.Default(ExpectedThickness));
                Assert.AreEqual(ExpectedWellBoreRadius, ActualWellBoreRadius, DeltaFraction.Default(ExpectedWellBoreRadius));
                Assert.AreEqual(ExpectedWGR, ActualWGR, DeltaFraction.Default(ExpectedWGR));
                Assert.AreEqual(ExpectedCGR, ActualCGR, DeltaFraction.Default(ExpectedCGR));
                Assert.AreEqual(ActualUseCalculatedSkin, ExpectedUseCalculatedSkin);
                Assert.AreEqual(ExpectedAOF, ActualAOF, DeltaFraction.Default(ExpectedAOF));
                Assert.AreEqual(ExpectedVerticalPermeability, ActualVerticalPermeability, DeltaFraction.Default(ExpectedVerticalPermeability));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:73,代码来源:WPS_Layer.cs

示例11: Layer_B1_SetTabulatedIPRData


//.........这里部分代码省略.........
                psaPress1.SetValue(416.418, 1);
                psaPress1.SetValue(818.185, 2);
                psaPress1.SetValue(1219.953, 3);
                psaPress1.SetValue(1621.720, 4);
                psaPress1.SetValue(2023.488, 5);
                psaPress1.SetValue(2425.255, 6);
                psaPress1.SetValue(2827.022, 7);
                psaPress1.SetValue(3228.790, 8);
                psaPress1.SetValue(3630.558, 9);
                psaPress1.SetValue(4032.325, 10);
                psaPress1.SetValue(4434.093, 11);
                psaPress1.SetValue(4835.860, 12);
                psaPress1.SetValue(5237.637, 13);
                psaPress1.SetValue(5639.395, 14);
                psaPress1.SetValue(6041.163, 15);
                psaPress1.SetValue(6442.930, 16);
                psaPress1.SetValue(6844.698, 17);
                psaPress1.SetValue(7246.465, 18);
                psaPress1.SetValue(7648.233, 19);
                psaPress1.SetValue(8050.000, 20);

                psaFlowRate1.SetValue(0.1239, 0);
                psaFlowRate1.SetValue(0.1177, 1);
                psaFlowRate1.SetValue(0.1115, 2);
                psaFlowRate1.SetValue(0.1053, 3);
                psaFlowRate1.SetValue(0.0991, 4);
                psaFlowRate1.SetValue(0.0929, 5);
                psaFlowRate1.SetValue(0.0867, 6);
                psaFlowRate1.SetValue(0.0805, 7);
                psaFlowRate1.SetValue(0.0743, 8);
                psaFlowRate1.SetValue(0.0681, 9);
                psaFlowRate1.SetValue(0.0620, 10);
                psaFlowRate1.SetValue(0.0558, 11);
                psaFlowRate1.SetValue(0.0496, 12);
                psaFlowRate1.SetValue(0.0434, 13);
                psaFlowRate1.SetValue(0.0372, 14);
                psaFlowRate1.SetValue(0.0310, 15);
                psaFlowRate1.SetValue(0.0248, 16);
                psaFlowRate1.SetValue(0.0186, 17);
                psaFlowRate1.SetValue(0.0124, 18);
                psaFlowRate1.SetValue(0.0062, 19);
                psaFlowRate1.SetValue(0, 20);

                psaPhaseRate1.SetValue(6666.6665, 0);
                psaPhaseRate1.SetValue(6666.6665, 1);
                psaPhaseRate1.SetValue(6666.6665, 2);
                psaPhaseRate1.SetValue(6666.6665, 3);
                psaPhaseRate1.SetValue(6666.6665, 4);
                psaPhaseRate1.SetValue(6666.6665, 5);
                psaPhaseRate1.SetValue(6666.6665, 6);
                psaPhaseRate1.SetValue(6666.6665, 7);
                psaPhaseRate1.SetValue(6666.6665, 8);
                psaPhaseRate1.SetValue(6666.6665, 9);
                psaPhaseRate1.SetValue(6666.6665, 10);
                psaPhaseRate1.SetValue(6666.6665, 11);
                psaPhaseRate1.SetValue(6666.6665, 12);
                psaPhaseRate1.SetValue(6666.6665, 13);
                psaPhaseRate1.SetValue(6666.6665, 14);
                psaPhaseRate1.SetValue(6666.6665, 15);
                psaPhaseRate1.SetValue(6666.6665, 16);
                psaPhaseRate1.SetValue(6666.6665, 17);
                psaPhaseRate1.SetValue(6666.6665, 18);
                psaPhaseRate1.SetValue(6666.6665, 19);
                psaPhaseRate1.SetValue(6666.6665, 20);

                psaWaterRate1.SetValue(0.5000, 0);
                psaWaterRate1.SetValue(0.5000, 1);
                psaWaterRate1.SetValue(0.5000, 2);
                psaWaterRate1.SetValue(0.5000, 3);
                psaWaterRate1.SetValue(0.5000, 4);
                psaWaterRate1.SetValue(0.5000, 5);
                psaWaterRate1.SetValue(0.5000, 6);
                psaWaterRate1.SetValue(0.5000, 7);
                psaWaterRate1.SetValue(0.5000, 8);
                psaWaterRate1.SetValue(0.5000, 9);
                psaWaterRate1.SetValue(0.5000, 10);
                psaWaterRate1.SetValue(0.5000, 11);
                psaWaterRate1.SetValue(0.5000, 12);
                psaWaterRate1.SetValue(0.5000, 13);
                psaWaterRate1.SetValue(0.5000, 14);
                psaWaterRate1.SetValue(0.5000, 15);
                psaWaterRate1.SetValue(0.5000, 16);
                psaWaterRate1.SetValue(0.5000, 17);
                psaWaterRate1.SetValue(0.5000, 18);
                psaWaterRate1.SetValue(0.5000, 19);
                psaWaterRate1.SetValue(0.5000, 20);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().SetTabulatedIPRData(indexArray, ref psaPress1, ref psaFlowRate1, ref psaPhaseRate1, ref psaWaterRate1);

                WFInt.SaveFile(sfileOutputSetTabulatedIPRData);

                short Actual = WFInt.ErrorStatus;

                short Expected = 0;

                WFInt.EndWellFlo();
                Assert.AreEqual(Expected, Actual);

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

示例12: Layer_Put_FluidParameter_Specific

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().OilGravity = 0.85;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterGravity = 1.1;

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                double ActualOilGravity = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().OilGravity;
                double ActualWaterGravity = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterGravity;

                double ExpectedOilGravity = 0.85;
                double ExpectedWaterGravity = 1.1;

                Assert.AreEqual(ExpectedOilGravity, ActualOilGravity, DeltaFraction.Default(ExpectedOilGravity));
                Assert.AreEqual(ExpectedWaterGravity, ActualWaterGravity, DeltaFraction.Default(ExpectedWaterGravity));

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

示例13: Layer_Put_FluidParameter_API

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().OilAPIGravity = 50;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GasGravity = 0.8;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Salinity = 31000;
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CO2MolePct = 0.1;//Per Cent in Wellflo
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().N2MolePct = 0.2;//Per Cent in Wellflo
                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().H2SMolePct = 0.3;//Per Cent in Wellflo

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                double ActualOilAPIGravity = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().OilAPIGravity, 4);
                double ActualGasGravity = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GasGravity, 4);
                double ActualSalinity = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Salinity, 4);
                double ActualCO2MolePct = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CO2MolePct, 4);
                double ActualN2MolePct = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().N2MolePct, 4);
                double ActualH2SMolePct = Math.Round(WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().H2SMolePct, 4);

                double ExpectedOilAPIGravity = 50;
                double ExpectedGasGravity = 0.8;
                double ExpectedSalinity = 31000;
                double ExpectedCO2MolePct = 0.1;
                double ExpectedN2MolePct = 0.2;
                double ExpectedH2SMolePct = 0.3;

                Assert.AreEqual(ExpectedOilAPIGravity, ActualOilAPIGravity, DeltaFraction.Default(ExpectedOilAPIGravity));
                Assert.AreEqual(ExpectedGasGravity, ActualGasGravity, DeltaFraction.Default(ExpectedGasGravity));
                Assert.AreEqual(ExpectedSalinity, ActualSalinity, DeltaFraction.Default(ExpectedSalinity));
                Assert.AreEqual(ExpectedCO2MolePct, ActualCO2MolePct, DeltaFraction.Default(ExpectedCO2MolePct));
                Assert.AreEqual(ExpectedN2MolePct, ActualN2MolePct, DeltaFraction.Default(ExpectedN2MolePct));
                Assert.AreEqual(ExpectedH2SMolePct, ActualH2SMolePct, DeltaFraction.Default(ExpectedH2SMolePct));
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:48,代码来源:WPS_Layer.cs

示例14: Layer_Put_DrainageShape

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

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

                WFInt.OpenFile(sfile);

                WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DrainageShape = 1;

                WFInt.SaveFile(OutPutfile);

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

                WFInt1.OpenFile(OutPutfile);

                short ActualDrainageShape = WFInt1.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DrainageShape;

                short ExpectedDrainageShape = 1;

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

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


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