Density calculated from (T up + T dn) / 2 and (Pr up + Pr dn) / 2 used everywhere, ver. 2.18.1053
This commit is contained in:
parent
f04cdccd20
commit
78408ed5eb
@ -621,16 +621,15 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, 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.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 = Config.Formulas.Buoyancy();
|
||||
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.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
/// Calculated master pulses per liter
|
||||
/// Calculated master pulses per liter
|
||||
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
||||
|
||||
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
||||
|
||||
@ -488,7 +488,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTemp(TempDownStat.Average, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
|
||||
|
||||
|
||||
@ -853,7 +853,10 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTemp(TempDownStat.Average, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); /// [kg/m3]
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
|
||||
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
|
||||
|
||||
@ -841,9 +841,11 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTemp(TempDownStat.Average, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature); /// [kg/m3]
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3] ///
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
|
||||
double volumeCTV = 1000.0 * buoyancy * (massEnd - massStart) / densityOut;
|
||||
if (debugLevel == Config.Entities.DebugMode.Simulate) volumeCTV = test.Volume;
|
||||
|
||||
|
||||
@ -774,14 +774,13 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
|
||||
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.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime; /// [kg/h]
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (tstRslt.VolumeMaster == 0) ? tstRslt.ConstMasterCorr : (LtrPerRefPulse * tstRslt.VolumeCTV / tstRslt.VolumeMaster);
|
||||
/// Calculated master pulses per liter
|
||||
/// Calculated master pulses per liter
|
||||
tstRslt.ErrorMaster = Config.Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
||||
|
||||
tstRslt.DiverterStart = switchTimeStart.Val;
|
||||
|
||||
@ -770,17 +770,16 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged
|
||||
tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
|
||||
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
|
||||
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
|
||||
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.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
double collectedVoluemCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
tstRslt.ConstMaster = (massPulses == 0) ? tstRslt.ConstMasterCorr : (collectedVoluemCTV / massPulses);
|
||||
/// Calculated master pulses per liter
|
||||
/// Calculated master pulses per liter
|
||||
tstRslt.VolumeCTV = tstRslt.ConstMaster * totalPulses;
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * totalPulses; /// [l] volume from the master flow meter
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * totalPulses; /// [l] volume from the master flow meter
|
||||
tstRslt.ErrorMaster = Formulas.ErrorFromVolumes(tstRslt.VolumeMaster, tstRslt.VolumeCTV);
|
||||
|
||||
tstRslt.FlowMean = (float)RefFlowStat.Average;
|
||||
|
||||
@ -762,8 +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 = Config.Formulas.Buoyancy();
|
||||
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.VolumeCTV = 1000 * tstRslt.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
tstRslt.ConstMasterCorr = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume, rangeIx); /// Corrected master pulses per liter
|
||||
|
||||
@ -486,7 +486,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection
|
||||
tstRslt.FlowMass = 0;
|
||||
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
|
||||
tstRslt.Buoyancy = 0;
|
||||
double density = Config.Formulas.WaterDensityFromTemp((tstRslt.TempUpMean + tstRslt.TempDownMean) / 2.0, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature);
|
||||
tstRslt.VolumeCTV = volumeBox.Val; /// [l]
|
||||
tstRslt.VolumeMaster = LtrPerRefPulse * tstRslt.PulsesMaster; /// [l] volume from the master flow meter
|
||||
tstRslt.ConstMasterRaw = outPath.FlowMeter.LtrPerPulse; /// Uncorrected master flowmeter coefficient
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1052.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1052.0")]
|
||||
[assembly: AssemblyVersion("2.18.1053.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1053.0")]
|
||||
|
||||
@ -453,8 +453,11 @@ namespace TBF.Screens
|
||||
|
||||
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
|
||||
massDiffLabel.Text = massDiff.ToString("F3");
|
||||
double volumeCtv = 1000.0 * Config.Formulas.Buoyancy() * massDiff / Config.Formulas.WaterDensityFromTemp((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature);
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double volumeCtv = 1000 * Config.Formulas.Buoyancy() * massDiff / Config.Formulas.WaterDensityFromTempPress((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2,
|
||||
(ProcessData.PressUp.Val + ProcessData.PressDown.Val) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3]
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double refError = Config.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
|
||||
refErrorLabel.Text = refError.ToString("F3");
|
||||
|
||||
|
||||
@ -482,8 +482,11 @@ namespace TBF.Screens
|
||||
|
||||
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
|
||||
massDiffLabel.Text = massDiff.ToString("F3");
|
||||
double volumeCtv = 1000.0 * Config.Formulas.Buoyancy() * massDiff / (float)Config.Formulas.WaterDensityFromTemp((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature);
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double volumeCtv = 1000 * Config.Formulas.Buoyancy() * massDiff / Config.Formulas.WaterDensityFromTempPress((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2,
|
||||
(ProcessData.PressUp.Val + ProcessData.PressDown.Val) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3]
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double refError = Config.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
|
||||
refErrorLabel.Text = refError.ToString("F3");
|
||||
|
||||
|
||||
@ -486,8 +486,11 @@ namespace TBF.Screens
|
||||
|
||||
double massDiff = ProcessData.Mass.Val - ProcessData.StartMass.Val;
|
||||
massDiffLabel.Text = massDiff.ToString("F3");
|
||||
double volumeCtv = 1000.0 * Config.Formulas.Buoyancy() * massDiff / (float)Config.Formulas.WaterDensityFromTemp((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2, Program.LocalSettings.RealDensity, Program.LocalSettings.AtTemperature);
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double volumeCtv = 1000 * Config.Formulas.Buoyancy() * massDiff / Config.Formulas.WaterDensityFromTempPress((ProcessData.TempUp.Val + ProcessData.TempDown.Val) / 2,
|
||||
(ProcessData.PressUp.Val + ProcessData.PressDown.Val) / 2,
|
||||
Program.LocalSettings.RealDensity,
|
||||
Program.LocalSettings.AtTemperature); /// [kg/m3]
|
||||
volumeCtvLabel.Text = volumeCtv.ToString("F2");
|
||||
double refError = Config.Formulas.ErrorFromVolumes(refVolume, volumeCtv);
|
||||
refErrorLabel.Text = refError.ToString("F3");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user