From 9bf66f651a0454d4acdcbdc7d567fd8571c7f2e4 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 18 Jul 2017 13:17:18 +0200 Subject: [PATCH] Buoyancy is 1.00103, not 1001.03 --- Results/Properties/AssemblyInfo.cs | 4 ++-- Results/WMeterRsltItemSpec.cs | 2 +- TestBenchFramework/BenchControl/Formulas.cs | 2 +- TestBenchFramework/BenchControl/Sequences/SequenceBase.cs | 2 +- .../CombinedWithDetection/CombinedWithDetectionSeq.cs | 2 +- .../TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs | 2 +- .../FixedStartMassCollection/FixedStartMassCollectionSeq.cs | 2 +- .../FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs | 2 +- .../ReferenceFlowmeterCalibrationSeq.cs | 2 +- TestBenchFramework/Properties/AssemblyInfo.cs | 4 ++-- TestBenchFramework/Screens/ProcessTabPageCtrl24.cs | 2 +- TestBenchFramework/Screens/ProcessTabPageCtrl48.cs | 2 +- TestBenchFramework/Screens/ProcessTabPageCtrl6.cs | 2 +- TestBenchFramework/TBF.csproj | 4 +++- 14 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Results/Properties/AssemblyInfo.cs b/Results/Properties/AssemblyInfo.cs index 88fc58967..40c91194b 100644 --- a/Results/Properties/AssemblyInfo.cs +++ b/Results/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.14.599.0")] -[assembly: AssemblyFileVersion("2.14.599.0")] +[assembly: AssemblyVersion("2.14.605.0")] +[assembly: AssemblyFileVersion("2.14.605.0")] diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index 4ca92277c..2871b0d9c 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -236,7 +236,7 @@ namespace Results AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_temperature, string.Format("{0} Amb M", Strings.VName_Temp), Strings.Tooltip_T_Amb_M, Quantity.Temperature, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbTempMean()).ToString(GetPr(p, "F1")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbTempMean).ToString(GetPr(p, "F1")))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_pressure, string.Format("{0} Amb M", Strings.VName_Press), Strings.Tooltip_P_Amb_M, Quantity.Pressure, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbPressMean()).ToString(GetPr(p, "F0")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbPressMean).ToString(GetPr(p, "F0")))); AllItems.Add(new WMeterRsltItemSpec(ItemID.Ambient_humidity, string.Format("{0} Amb M", Strings.VName_Humi), Strings.Tooltip_Hu_Amb_M, Quantity.Humidity, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? Config.Units.ConvertTo(u, w.Batch.AmbHumiMean()).ToString(GetPr(p, "F1")) : Config.Units.ConvertTo(u, w.GetTestRslt(t).AmbHumiMean).ToString(GetPr(p, "F1")))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.Batch.Buoyancy().ToString(GetPr(p, "F2")) : ((w.GetTestRslt(t) != null) ? w.GetTestRslt(t).Buoyancy.ToString(GetPr(p, "F2")) : ""))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.Buoyancy, "Buoyancy ()", Quantity.Number, ItemCategory.TestResult, (w, t, u, f, p) => string.IsNullOrEmpty(t) ? w.Batch.Buoyancy().ToString(GetPr(p, "F5")) : ((w.GetTestRslt(t) != null) ? w.GetTestRslt(t).Buoyancy.ToString(GetPr(p, "F5")) : ""))); /// /// Error diff --git a/TestBenchFramework/BenchControl/Formulas.cs b/TestBenchFramework/BenchControl/Formulas.cs index 1771edeb2..47e68dcd3 100644 --- a/TestBenchFramework/BenchControl/Formulas.cs +++ b/TestBenchFramework/BenchControl/Formulas.cs @@ -320,7 +320,7 @@ namespace TBF.BenchControl public static double Buoyancy() { - return 1001.03; + return 1.00103; } } } diff --git a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs index 821fcae86..1e7b1d38e 100644 --- a/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs +++ b/TestBenchFramework/BenchControl/Sequences/SequenceBase.cs @@ -879,7 +879,7 @@ namespace TBF.BenchControl.Sequences sb.Append(";"); sb.Append(tstRslt.DensityIn); sb.Append(";"); sb.Append(tstRslt.DensityOut); sb.Append(";"); sb.Append(" "); /// d_air: Hustota vzduchu: Sheet1 - K9 - sb.Append(";"); sb.Append(" "); /// Buoyancy: Sheet1 - X9 + sb.Append(";"); sb.Append(tstRslt.Buoyancy); /// Buoyancy: Sheet1 - X9 sb.Append(";"); sb.Append(Program.LocalSettings.RealDensity); sb.Append(";"); sb.Append(Program.LocalSettings.AtTemperature); sb.Append(";"); sb.Append(" "); /// pipe expansion: teraz vynechat diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 854756fa4..d314081ac 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -618,7 +618,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h] tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h] tstRslt.Buoyancy = TBF.BenchControl.Formulas.Buoyancy(); - tstRslt.VolumeCTV = tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3] + tstRslt.VolumeCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [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.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index f0d1f1d4a..57a11a65c 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -458,7 +458,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced double massStart = Formulas.CorrectedValue(StartMass.Val, outPath.Scale.Corrections); double massEnd = Formulas.CorrectedValue(EndMass.Val, outPath.Scale.Corrections); double densityOut = Formulas.WaterDensityFromTemp(TempDownStat.Average); - double volumeCTV = TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut; + double volumeCTV = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut; /// /// Enter watermeter end states here diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index e4173aeb6..012a9f362 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -703,7 +703,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection double massStart = Formulas.CorrectedValue(StartMass.Val, outPath.Scale.Corrections); double massEnd = Formulas.CorrectedValue(EndMass.Val, outPath.Scale.Corrections); double densityOut = Formulas.WaterDensityFromTemp(TempDownStat.Average); /// [kg/m3] - double volumeCTV = TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut; + double volumeCTV = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut; double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l] /// diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index b48100fd1..38f29958e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -762,7 +762,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h] tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h] tstRslt.Buoyancy = TBF.BenchControl.Formulas.Buoyancy(); - tstRslt.VolumeCTV = tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3] + tstRslt.VolumeCTV = 1000.0 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [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.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 3f655664e..61e6f6bdb 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -319,7 +319,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections); tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h] tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h] - tstRslt.VolumeCTV = TBF.BenchControl.Formulas.Buoyancy() * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3] + tstRslt.VolumeCTV = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [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.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV); diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index bf6cce67c..e5e7592a7 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.14.604.1")] -[assembly: AssemblyFileVersion("2.14.604.1")] +[assembly: AssemblyVersion("2.14.606.1")] +[assembly: AssemblyFileVersion("2.14.606.1")] diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs index 2a43d40d7..f26789d9c 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl24.cs @@ -453,7 +453,7 @@ namespace TBF.Screens double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); - double volumeCtv = TBF.BenchControl.Formulas.Buoyancy() * massDiff / TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); + double volumeCtv = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * massDiff / TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); volumeCtvLabel.Text = volumeCtv.ToString("F2"); double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv); refErrorLabel.Text = refError.ToString("F3"); diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs index 61ff0fa7b..c705e058c 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl48.cs @@ -482,7 +482,7 @@ namespace TBF.Screens double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); - double volumeCtv = TBF.BenchControl.Formulas.Buoyancy() * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); + double volumeCtv = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); volumeCtvLabel.Text = volumeCtv.ToString("F2"); double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv); refErrorLabel.Text = refError.ToString("F3"); diff --git a/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs b/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs index 0bb49d0de..8def1026d 100644 --- a/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs +++ b/TestBenchFramework/Screens/ProcessTabPageCtrl6.cs @@ -486,7 +486,7 @@ namespace TBF.Screens double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val; massDiffLabel.Text = massDiff.ToString("F3"); - double volumeCtv = TBF.BenchControl.Formulas.Buoyancy() * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); + double volumeCtv = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * massDiff / (float)TBF.BenchControl.Formulas.WaterDensityFromTemp(ProcessData.TempDown.Val); volumeCtvLabel.Text = volumeCtv.ToString("F2"); double refError = TBF.BenchControl.Formulas.ErrorFromVolumes(refVolume, volumeCtv); refErrorLabel.Text = refError.ToString("F3"); diff --git a/TestBenchFramework/TBF.csproj b/TestBenchFramework/TBF.csproj index 6b917f44b..acfeeb820 100644 --- a/TestBenchFramework/TBF.csproj +++ b/TestBenchFramework/TBF.csproj @@ -2163,7 +2163,9 @@ - + + Designer + Designer