diff --git a/Results/Entities/TestRslt.cs b/Results/Entities/TestRslt.cs index 9fb7a763f..df606a587 100644 --- a/Results/Entities/TestRslt.cs +++ b/Results/Entities/TestRslt.cs @@ -66,8 +66,8 @@ namespace Results.Entities public virtual float TempDivEnd { get; set; } /// [°C] public virtual float TempDivMin { get; set; } /// [°C] public virtual float TempDivMax { get; set; } /// [°C] - public virtual float FlowMin { get; set; } /// [kg/m3] minimum flow - public virtual float FlowMax { get; set; } /// [kg/m3] maximum flow + public virtual float FlowMin { get; set; } /// [m3/h] minimum flow + public virtual float FlowMax { get; set; } /// [m3/h] maximum flow public virtual float Custom1 { get; set; } public virtual float Custom2 { get; set; } diff --git a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs index dcf7699df..ec9a963eb 100644 --- a/TestBenchFramework/BenchControl/Sequences/ProcessData.cs +++ b/TestBenchFramework/BenchControl/Sequences/ProcessData.cs @@ -76,6 +76,7 @@ namespace TBF.BenchControl.Sequences public static FloatStatistics TempDivStat = new FloatStatistics(); public static FloatStatistics PressureUpStat = new FloatStatistics(); public static FloatStatistics PressureDownStat = new FloatStatistics(); + public static FloatStatistics RefFlowStat = new FloatStatistics(); protected static void ClearAllStatistics() { @@ -87,6 +88,7 @@ namespace TBF.BenchControl.Sequences TempDivStat.Clear(); PressureUpStat.Clear(); PressureDownStat.Clear(); + RefFlowStat.Clear(); } protected static void UpdateAllStatistics() @@ -99,6 +101,7 @@ namespace TBF.BenchControl.Sequences TempDivStat.Update(TempDiv); PressureUpStat.Update(PressureUp); PressureDownStat.Update(PressureDown); + RefFlowStat.Update(RefFlow); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 3a839adb5..d6259ef31 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -298,6 +298,9 @@ namespace TBF.BenchControl.TestMethods.Adjustment 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 + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs index fe4e51b89..47811c466 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/CombinedMetersSeq.cs @@ -493,6 +493,9 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 56bd927ae..234426b53 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -570,6 +570,9 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index 7f1bfba1c..1732a3c54 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -526,6 +526,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs index ee6f8ae77..fe9dd3450 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/FixedStartCombinedMetersSeq.cs @@ -536,6 +536,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index c3916c780..ff753a05c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -525,6 +525,9 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 2f591cb94..2e4c89434 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -273,6 +273,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStart 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 + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 931d8f139..25af2e0cf 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -478,7 +478,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection tstRslt.TempDivEnd = TempDivStat.Last; tstRslt.TempDivMin = TempDivStat.Min; tstRslt.TempDivMax = TempDivStat.Max; - tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3] + tstRslt.DensityIn = Formulas.WaterDensityFromTemp(tstRslt.TempInAvrg); /// [kg/m3] tstRslt.DensityOut = Formulas.WaterDensityFromTemp(tstRslt.TempOutAvrg); /// [kg/m3] tstRslt.DensityDiv = Formulas.WaterDensityFromTemp(tstRslt.TempDivAvrg); /// [kg/m3] @@ -499,6 +499,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + for (int i = 0; i < BatchRslts.WMPositionsCount; i++) { if (test.Part != 0 && test.Part != Utils.PartNr(i + 1, BatchRslts.Batch.Compound)) continue; diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index f2fa5ee52..cf03c911b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -353,6 +353,9 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration tstRslt.ConstMaster = LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster; /// Corrected master pulses per liter tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); + tstRslt.FlowMin = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Min * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Min; + tstRslt.FlowMax = (tstRslt.VolumeMaster != 0) ? (float)(RefFlowStat.Max * tstRslt.VolumeCTV / tstRslt.VolumeMaster) : RefFlowStat.Max; + /// Update flowmeter constant with the measured one if (outPath.FlowMeter.Idx1 > 0 && outPath.FlowMeter.Idx1 <= ReferenceFlowmetersCount) {