本文整理汇总了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);
}
}
示例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);
}
}