Fixes in Buoyancy calculation, ver. 2.14.612

This commit is contained in:
Milan Hanajik 2017-07-20 16:16:55 +03:00
parent 229bec30cc
commit 8d249a96f4
14 changed files with 21 additions and 11 deletions

View File

@ -102,7 +102,7 @@ namespace Results.Entities
foreach (var tr in TestRslts)
{
if (tr.TestDone)
if (tr.TestData.Evaluate && tr.TestDone)
{
double duration = (tr.EndTime - tr.StartTime).TotalSeconds;
timeSum += duration;

View File

@ -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.605.0")]
[assembly: AssemblyFileVersion("2.14.605.0")]
[assembly: AssemblyVersion("2.14.611.0")]
[assembly: AssemblyFileVersion("2.14.611.0")]

View File

@ -331,6 +331,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume); /// Calculate master flowmeter coefficient
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]

View File

@ -617,7 +617,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
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 * cBrd.EtPulses(0) / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = TBF.BenchControl.Formulas.Buoyancy();
tstRslt.Buoyancy = Formulas.Buoyancy();
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

View File

@ -349,6 +349,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume); /// Corrected master pulses per liter
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]

View File

@ -458,7 +458,8 @@ 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 = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut;
double buoyancy = Formulas.Buoyancy();
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
///
/// Enter watermeter end states here
@ -517,6 +518,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
tstRslt.MassEnd = massEnd; /// [kg] calculated before displaying 'End state' dialog
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
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

View File

@ -703,7 +703,8 @@ 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 = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (massEnd - massStart) / densityOut;
double buoyancy = Formulas.Buoyancy();
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
double refEnergy = Energy.Sum * volumeCTV / VolumeForEnergy.Sum; /// [J]=[J]*[l]/[l]
///
@ -795,7 +796,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.Buoyancy = Formulas.Buoyancy();
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.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);

View File

@ -456,6 +456,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume); /// Corrected master pulses per liter
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]

View File

@ -761,7 +761,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
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.Buoyancy = TBF.BenchControl.Formulas.Buoyancy();
tstRslt.Buoyancy = Formulas.Buoyancy();
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

View File

@ -298,6 +298,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 0; /// [m3/h]
tstRslt.Buoyancy = 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]

View File

@ -209,6 +209,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
tstRslt.MassEnd = 0;
tstRslt.FlowMass = 0; /// [kg/h]
tstRslt.FlowVolume = 0; /// [m3/h]
tstRslt.Buoyancy = 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]

View File

@ -319,7 +319,8 @@ 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 = 1000.0 * TBF.BenchControl.Formulas.Buoyancy() * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityOut; /// [l] 1000.0f is because density is in [kg/m3]
tstRslt.Buoyancy = Formulas.Buoyancy();
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);

View File

@ -1738,6 +1738,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
tstRslt.StartTime = tstRslt.Batch.StartTime;
tstRslt.EndTime = endTime;
tstRslt.FlowSetTime = 0;
tstRslt.Buoyancy = Formulas.Buoyancy();
tstRslt.TestTime += testTime; /// [s] total communication time of all tests
for (int i = 0; i < iperlHeads.Count; i++)

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.14.609.1")]
[assembly: AssemblyFileVersion("2.14.609.1")]
[assembly: AssemblyVersion("2.14.612.1")]
[assembly: AssemblyFileVersion("2.14.612.1")]