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


C# WFloInterface.GetOpPtCalculator方法代码示例

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


在下文中一共展示了WFloInterface.GetOpPtCalculator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Layer_A1_MultiLayer_Both_Active

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

                string sfile = WellFloFileLocation.BaselineWPSModel("WPS_ReoForecast\\before active layer.wflx");

                WFInt.OpenFile(sfile);

                bool firstLayer = WFInt.WellModel.AddRef().Layers.AddRef().GetLayerStatus(1);

                bool secondLayer = WFInt.WellModel.AddRef().Layers.AddRef().GetLayerStatus(2);

                Assert.AreEqual(false, firstLayer);
                Assert.AreEqual(true, secondLayer);

                //make both layer active
                WFInt.WellModel.AddRef().Layers.AddRef().SetLayerStatus(1, true);

                WFInt.AddRef().GetOpPtCalculator().AddRef().CalculateOperatingPoint(50, 0);

                double LiqRateAfterSet = WFInt.GetOpPtCalculator().AddRef().OilRate + WFInt.GetOpPtCalculator().AddRef().WaterRate;

                double PressureAfterSet = WFInt.GetOpPtCalculator().AddRef().OperatingPressure;

                Assert.AreEqual(4778.4, LiqRateAfterSet, DeltaFraction.Default(4778.4));
                Assert.AreEqual(3655.1, PressureAfterSet, DeltaFraction.Default(3655.1));

                bool firstLayerAfterChange = WFInt.WellModel.AddRef().Layers.AddRef().GetLayerStatus(1);
                bool secondLayerAfterChange = WFInt.WellModel.AddRef().Layers.AddRef().GetLayerStatus(2);

                Assert.AreEqual(true, firstLayerAfterChange);
                Assert.AreEqual(true, secondLayerAfterChange);

                // just making it unchanges beacuse many times changes in global variable causes a problem
                WFInt.WellModel.AddRef().Layers.AddRef().SetLayerStatus(2, true);
                WFInt.WellModel.AddRef().Layers.AddRef().SetLayerStatus(1, false);
            }
        }
开发者ID:prasannarhegde2015,项目名称:SampleUnitTests,代码行数:41,代码来源:WPS_Layer.cs


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