From bb3be1c649b3282a83e8baf010384bdeaf08967c Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Fri, 27 Apr 2018 11:00:05 +0200 Subject: [PATCH] Results.Entities.TestRslt.ConstMasterRaw added, set to outPath.FlowMeter.LtrPerPulse in sequences --- Results/Entities/TestRslt.cs | 6 ++++-- Results/ItemID.cs | 1 + Results/WMeterRsltItemSpec.cs | 3 ++- TBF/BenchControl/Sequences/SequenceBase.cs | 5 ++++- TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs | 1 + .../CombinedWithDetection/CombinedWithDetectionSeq.cs | 3 ++- TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs | 3 ++- TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs | 3 ++- .../TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs | 3 ++- .../FixedStartDeferredEvaluationSeq.cs | 3 ++- .../FixedStartMassCollection/FixedStartMassCollectionSeq.cs | 3 ++- TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs | 3 ++- .../FlyingStartFirstRepetWithMassCollSeq.cs | 6 ++++-- .../FlyingStartMassCollProlongedSeq.cs | 1 + .../FlyingStartMassCollectionSeq.cs | 3 ++- TBF/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs | 3 ++- TBF/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs | 3 ++- .../TestMethods/SensitivityTest/SensitivityTestSeq.cs | 3 ++- .../TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs | 3 ++- 19 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Results/Entities/TestRslt.cs b/Results/Entities/TestRslt.cs index 965369edd..e5584cce4 100644 --- a/Results/Entities/TestRslt.cs +++ b/Results/Entities/TestRslt.cs @@ -26,8 +26,9 @@ namespace Results.Entities public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds public virtual double TestTime { get; set; } /// [s] Measurement time in seconds public virtual double PulsesMaster { get; set; } - public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter - public virtual double MassStartRaw { get; set; } /// [kg] + public virtual double ConstMasterRaw { get; set; } /// [l/pls] Liters per pulse of the master flow meter uncorrected + public virtual double ConstMaster { get; set; } /// [l/pls] Liters per pulse of the master flow meter + public virtual double MassStartRaw { get; set; } /// [kg] public virtual double MassStart { get; set; } /// [kg] public virtual double MassEndRaw { get; set; } /// [kg] public virtual double MassEnd { get; set; } /// [kg] @@ -215,6 +216,7 @@ namespace Results.Entities FlowSetTime = src.FlowSetTime; TestTime = src.TestTime; PulsesMaster = src.PulsesMaster; + ConstMasterRaw = src.ConstMasterRaw; ConstMaster = src.ConstMaster; MassStartRaw = src.MassStartRaw; MassStart = src.MassStart; diff --git a/Results/ItemID.cs b/Results/ItemID.cs index 7e0eae3a5..5186b1cc3 100644 --- a/Results/ItemID.cs +++ b/Results/ItemID.cs @@ -250,6 +250,7 @@ namespace Results Flow_ctv_max, /// 216 Flow_ctv_start, /// 217 Flow_ctv_end, /// 218 + ConstMasterRaw, /// 219 ConstMaster (like 194) uncorrected Count, } diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index 1e5235a85..ae4d2ad10 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -218,7 +218,8 @@ namespace Results AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_fall, string.Format("{0} {1}", Strings.VName_Flow, Strings.fall), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QFall == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QFall)) : "")); AllItems.Add(new WMeterRsltItemSpec(ItemID.Q_sensitivity, string.Format("{0} {1}", Strings.VName_Flow, Strings.sensitivity), Quantity.Flow, ItemCategory.MeterResult, (w, t, u, f, p) => (string.IsNullOrEmpty(t) || (w.GetTestRslt(t) != null)) ? ((w.QRise == 0) ? "-" : FormatDbl(u, f, p, "V3", w.QRise)) : "")); - AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMaster, string.Format("k MID ()"), "Const. of the reference flow meter", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", ((w.GetTestRslt(t).ConstMaster < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMaster))))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMaster, string.Format("k MID ()"), "Const. of the reference flow meter", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", ((w.GetTestRslt(t).ConstMaster < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMaster))))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMasterRaw, string.Format("k MID raw ()"), "Const. of the ref. flow meter uncorrected",Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V3", ((w.GetTestRslt(t).ConstMasterRaw < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMasterRaw))))); /// /// Temperature diff --git a/TBF/BenchControl/Sequences/SequenceBase.cs b/TBF/BenchControl/Sequences/SequenceBase.cs index 7bb5472a1..c1e1f9ad4 100644 --- a/TBF/BenchControl/Sequences/SequenceBase.cs +++ b/TBF/BenchControl/Sequences/SequenceBase.cs @@ -1133,6 +1133,7 @@ namespace TBF.BenchControl.Sequences tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date tstRslt.PulsesMaster = (LtrPerRefPulse > 1E-6) ? (tstRslt.TargetVolume() / LtrPerRefPulse) : 1; + tstRslt.ConstMasterRaw = LtrPerRefPulse; tstRslt.ConstMaster = LtrPerRefPulse; tstRslt.MassStartRaw = 0; tstRslt.MassStart = 0; @@ -1242,7 +1243,8 @@ namespace TBF.BenchControl.Sequences tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date tstRslt.PulsesMaster = (LtrPerRefPulse > 1E-6) ? (tstRslt.TargetVolume() / LtrPerRefPulse) : 1; - tstRslt.ConstMaster = LtrPerRefPulse; + tstRslt.ConstMasterRaw = LtrPerRefPulse; + tstRslt.ConstMaster = LtrPerRefPulse; tstRslt.MassStartRaw = 0; tstRslt.MassStart = 0; tstRslt.MassEndRaw = tstRslt.TargetVolume() * Program.LocalSettings.RealDensity / 1000.0f; @@ -1370,6 +1372,7 @@ namespace TBF.BenchControl.Sequences tstRslt.TestTime = tstRslt.TargetTime(); /// TODO: Verify whether 'ltrPerRefPulse' is up to date tstRslt.PulsesMaster = (LtrPerRefPulse > 1E-6) ? (tstRslt.TargetVolume() / LtrPerRefPulse) : 1; + tstRslt.ConstMasterRaw = LtrPerRefPulse; tstRslt.ConstMaster = LtrPerRefPulse; tstRslt.MassStartRaw = 0; tstRslt.MassStart = 0; diff --git a/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 5d01a573b..00af2a4f1 100644 --- a/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -381,6 +381,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h] tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Calculate master flowmeter coefficient tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.ErrorMaster = 0.0f; /// Cannot be determined without the collected water mass measurement diff --git a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 7614850a7..e9d65559d 100644 --- a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -619,7 +619,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection double density = Config.Formulas.WaterDensityFromTemp((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2.0, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); tstRslt.VolumeCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / density; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index fa1d9d049..ee5119f91 100644 --- a/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -362,7 +362,8 @@ namespace TBF.BenchControl.TestMethods.Endurance tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h] tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.ErrorMaster = 0.0; /// Cannot be determined without a mass measurement diff --git a/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs b/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs index 19cc4e8f7..54085b328 100644 --- a/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs @@ -907,7 +907,8 @@ namespace TBF.BenchControl.TestMethods.FixedStart tstRslt.FlowVolume = flowVolume; /// [m3/h] tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter tstRslt.Buoyancy = Config.Formulas.Buoyancy(); - tstRslt.ConstMaster = constMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = constMaster; /// Corrected master pulses per liter tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.ErrorMaster = 0; diff --git a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index 1095a00f6..92441b818 100644 --- a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -516,7 +516,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced tstRslt.Buoyancy = buoyancy; tstRslt.VolumeCTV = volumeCTV; /// [kg] calculated before displaying 'End state' dialog tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs index 7d5820e08..214b3894d 100644 --- a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs @@ -946,7 +946,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter tstRslt.Buoyancy = buoyancy; tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3] - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 94eca76a5..afd763dd2 100644 --- a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -977,7 +977,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter tstRslt.Buoyancy = buoyancy; tstRslt.VolumeCTV = volumeCTV; /// [l] 1000.0f is because density is in [kg/m3] - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 450007855..6cb79e896 100644 --- a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -528,7 +528,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h] tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.ErrorMaster = 0.0; /// Cannot be determined without a mass measurement diff --git a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs index 82d54ab2d..d534df51f 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs @@ -805,7 +805,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl double density = Config.Formulas.WaterDensityFromTemp((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2.0, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); tstRslt.VolumeCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / density; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.DiverterStart = switchTimeStart; /// Math.Abs(switchTimeStartHi.Val - switchTimeStartLo.Val); @@ -832,7 +833,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl tstRslt.MassEndRaw = 0; tstRslt.MassEnd = 0; tstRslt.FlowMass = 0; - tstRslt.ConstMaster = tstResRepet1.ConstMaster; /// Master constant ( pulses per liter) from the first repetition (=against the scale) + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = tstResRepet1.ConstMaster; /// Master constant ( pulses per liter) from the first repetition (=against the scale) tstRslt.VolumeMaster = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] volume from the master flow meter tstRslt.VolumeCTV = tstRslt.VolumeMaster; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.ErrorMaster = tstResRepet1.ErrorMaster; /// Cannot be determined without a mass measurement diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs index d99ce4cf3..80d501752 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs @@ -801,6 +801,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged tstRslt.Buoyancy = Formulas.Buoyancy(); double density = Formulas.WaterDensityFromTemp((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2.0, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); double collectedVoluemCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / density; /// [l] 1000.0f is because density is in [kg/m3] + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient tstRslt.ConstMaster = collectedVoluemCTV / massPulses; /// Corrected master pulses per liter tstRslt.VolumeCTV = tstRslt.ConstMaster * totalPulses; tstRslt.VolumeMaster = LtrPerRefPulse * totalPulses; /// [l] volume from the master flow meter diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 98b5feb09..78b94e913 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -849,7 +849,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection double density = Config.Formulas.WaterDensityFromTemp((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2.0, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); tstRslt.VolumeCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / density; /// [l] 1000.0f is because density is in [kg/m3] tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter - tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter + tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient + tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TBF/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 8d51ad771..75f0bc3fa 100644 --- a/TBF/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TBF/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -292,7 +292,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeMaster = 0; /// [l] volume from the master flow meter tstRslt.VolumeCTV = 0; /// [l] 1000.0f is because density is in [kg/m3] - tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h] + tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h] + tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h] tstRslt.ErrorMaster = 0; tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0; diff --git a/TBF/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TBF/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index c6a02fceb..787d123c4 100644 --- a/TBF/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TBF/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -203,7 +203,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeMaster = 0; /// [l] volume from the master flow meter tstRslt.VolumeCTV = 0; /// [l] 1000.0f is because density is in [kg/m3] - tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h] + tstRslt.ConstMasterRaw = 0; /// Convert the flow to [m3/h] + tstRslt.ConstMaster = 0; /// Convert the flow to [m3/h] tstRslt.ErrorMaster = 0; tstRslt.ErrorFlagsMd = (ErrorFlagsComp != null) ? (sbyte)ErrorFlagsComp.Mode : (sbyte)0; diff --git a/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs b/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs index 99145608b..6c3743e79 100644 --- a/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs +++ b/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs @@ -455,7 +455,8 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest tstRslt.Buoyancy = Config.Formulas.Buoyancy(); tstRslt.VolumeCTV = 0; tstRslt.VolumeMaster = 0; - tstRslt.ConstMaster = 0; + tstRslt.ConstMasterRaw = 0; + tstRslt.ConstMaster = 0; tstRslt.ErrorMaster = 0; tstRslt.FlowMean = (float)RefFlowStat.Average; diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index def71d7c3..970e739eb 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -263,7 +263,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication tstRslt.FlowSetTime = oriTestRslt.FlowSetTime; tstRslt.TestTime = oriTestRslt.TestTime; tstRslt.PulsesMaster = oriTestRslt.PulsesMaster; - tstRslt.ConstMaster = oriTestRslt.ConstMaster; + tstRslt.ConstMasterRaw = oriTestRslt.ConstMasterRaw; + tstRslt.ConstMaster = oriTestRslt.ConstMaster; tstRslt.MassStartRaw = oriTestRslt.MassStartRaw; tstRslt.MassStart = oriTestRslt.MassStart; tstRslt.MassEndRaw = oriTestRslt.MassEndRaw;