本文整理汇总了C#中WFloInterface.AddRef方法的典型用法代码示例。如果您正苦于以下问题:C# WFloInterface.AddRef方法的具体用法?C# WFloInterface.AddRef怎么用?C# WFloInterface.AddRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFloInterface
的用法示例。
在下文中一共展示了WFloInterface.AddRef方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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);
}
}
示例3: 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);
}
}
示例4: 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);
}
}
示例5: Layer_A1_CGR
public void Layer_A1_CGR()
{
using (new LifeTimeScope())
{
WFloInterface WFInt = new WFloInterface();
WFInt.AddRef();
string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\layer.wflx");
WFInt.OpenFile(sfile);
double ActualCGR = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CGR;
double ActualCO2MolePct = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().CO2MolePct;
double ActualDarcySkin = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DarcySkin;
double ActualDietzFactor = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DietzFactor, 2);
double ActualDrainageArea = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().DrainageArea;
double ActualGasGravity = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().GasGravity, 1);
double ActualH2SMolePct = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().H2SMolePct;
double ActualHorizontalPermeability = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().HorizontalPermeability;
double ActualIPREntryModel = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().IPREntryModel;
double ActualIPRModel = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().IPRModel;
double ActualMD = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().MeasuredDepth;
double ActualN2MolePct = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().N2MolePct;
double ActualNonDarcySkin = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().NonDarcySkin;
double ActualOilGravity = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().OilGravity, 3);
double ActualPressure = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Pressure;
double ActualSalinity = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Salinity;
double ActualTemperature = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Temperature;
double ActualThickness = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Thickness;
double ActualTrueVerticalDepth = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().TrueVerticalDepth, 2);
double ActualVerticalPermeability = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().VerticalPermeability, 0);
double ActualWaterGravity = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WaterGravity, 4);
double ActualWellBoreRadius = Math.Round(WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellBoreRadius, 1);
double ActualWGR = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WGR;
bool ActualNonDarcyModel = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().NonDarcyModel;
int ActualSaturationModel = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().SaturationModel;
short ActualNumber = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Number;
string ActualName = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().Name;
double ExpectedCGR = 150;
double ExpectedCO2MolePct = 0;
double ExpectedDarcySkin = 1;
double ExpectedDietzFactor = 31.62;
double ExpectedDrainageArea = 27878006;
double ExpectedGasGravity = 0.7;
double ExpectedH2SMolePct = 0;
double ExpectedHorizontalPermeability = 200;
double ExpectedIPREntryModel = 0;
double ExpectedIPRModel = 3;
double ExpectedMD = 14680;
double ExpectedN2MolePct = 0;
double ExpectedNonDarcySkin = 0;
double ExpectedOilGravity = 0.785;
double ExpectedPressure = 8050;
double ExpectedSalinity = 30000;
double ExpectedTemperature = 230;
double ExpectedThickness = 100;
double ExpectedTrueVerticalDepth = 13299.66;
double ExpectedVerticalPermeability = 200;
double ExpectedWaterGravity = 1.0198;
double ExpectedWellBoreRadius = 0.4;
double ExpectedWGR = 150;
bool ExpectedNonDarcyModel = true;
int ExpectedSaturationModel = 0;
short ExpectedNumber = 1;
string ExpectedName = "Layer 1";
Assert.AreEqual(ExpectedCGR, ActualCGR, DeltaFraction.Default(ExpectedCGR));
Assert.AreEqual(ExpectedCO2MolePct, ActualCO2MolePct, DeltaFraction.Default(ExpectedCO2MolePct));
Assert.AreEqual(ExpectedDarcySkin, ActualDarcySkin, DeltaFraction.Default(ExpectedDarcySkin));
Assert.AreEqual(ExpectedDietzFactor, ActualDietzFactor, DeltaFraction.Default(ExpectedDietzFactor));
Assert.AreEqual(ExpectedDrainageArea, ActualDrainageArea, DeltaFraction.Default(ExpectedDrainageArea));
Assert.AreEqual(ExpectedGasGravity, ActualGasGravity, DeltaFraction.Default(ExpectedGasGravity));
Assert.AreEqual(ExpectedH2SMolePct, ActualH2SMolePct, DeltaFraction.Default(ExpectedH2SMolePct));
Assert.AreEqual(ExpectedHorizontalPermeability, ActualHorizontalPermeability, DeltaFraction.Default(ExpectedHorizontalPermeability));
Assert.AreEqual(ExpectedIPREntryModel, ActualIPREntryModel, DeltaFraction.Default(ExpectedIPREntryModel));
Assert.AreEqual(ExpectedIPRModel, ActualIPRModel, DeltaFraction.Default(ExpectedIPRModel));
Assert.AreEqual(ExpectedMD, ActualMD, DeltaFraction.Default(ExpectedMD));
Assert.AreEqual(ExpectedN2MolePct, ActualN2MolePct, DeltaFraction.Default(ExpectedN2MolePct));
Assert.AreEqual(ExpectedNonDarcySkin, ActualNonDarcySkin, DeltaFraction.Default(ExpectedNonDarcySkin));
Assert.AreEqual(ExpectedOilGravity, ActualOilGravity, DeltaFraction.Default(ExpectedOilGravity));
Assert.AreEqual(ExpectedPressure, ActualPressure, DeltaFraction.Default(ExpectedPressure));
Assert.AreEqual(ExpectedSalinity, ActualSalinity, DeltaFraction.Default(ExpectedSalinity));
Assert.AreEqual(ExpectedTemperature, ActualTemperature, DeltaFraction.Default(ExpectedTemperature));
Assert.AreEqual(ExpectedThickness, ActualThickness, DeltaFraction.Default(ExpectedThickness));
Assert.AreEqual(ExpectedTrueVerticalDepth, ActualTrueVerticalDepth, DeltaFraction.Default(ExpectedTrueVerticalDepth));
Assert.AreEqual(ExpectedVerticalPermeability, ActualVerticalPermeability, DeltaFraction.Default(ExpectedVerticalPermeability));
Assert.AreEqual(ExpectedWaterGravity, ActualWaterGravity, DeltaFraction.Default(ExpectedWaterGravity));
Assert.AreEqual(ExpectedWellBoreRadius, ActualWellBoreRadius, DeltaFraction.Default(ExpectedWellBoreRadius));
Assert.AreEqual(ExpectedWGR, ActualWGR, DeltaFraction.Default(ExpectedWGR));
Assert.AreEqual(ExpectedNonDarcyModel, ActualNonDarcyModel);
Assert.AreEqual(ExpectedSaturationModel, ActualSaturationModel);
Assert.AreEqual(ExpectedNumber, ActualNumber);
Assert.AreEqual(ExpectedName, ActualName);
}
}
示例6: Layer_A1B_2_WellOrientation_Input
public void Layer_A1B_2_WellOrientation_Input()
{
using (new LifeTimeScope())
{
WFloInterface WFInt = new WFloInterface();
WFInt.AddRef();
string sfile = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\horizontal.wflx");
string sfile1 = WellFloFileLocation.BaselineWPSModel("WPS_Layer\\horizontal_Output.wflx");
WFInt.OpenFile(sfile);
WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellOrientation = 0;
short Actual = WFInt.WellModel.AddRef().Layers.AddRef().Item(1).AddRef().WellOrientation;
short Expected = 0;
WFInt.SaveFile(sfile1);
WFInt.EndWellFlo();
Assert.AreEqual(Expected, Actual);
}
}
示例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));
//.........这里部分代码省略.........
示例8: 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));
}
}
示例9: 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);
//.........这里部分代码省略.........
示例10: 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);
}
}
示例11: 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));
}
}
示例12: 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));
}
}
示例13: 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);
}
}
示例14: 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));
}
}
示例15: 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));
}
}