Minimum and maximum (reference) flow during a test calculated and saved to Results.Entities.TestRslt.

This commit is contained in:
Milan Hanajik 2016-08-02 14:48:18 +02:00
parent 606c74f3dc
commit 111e3d8647
11 changed files with 33 additions and 3 deletions

View File

@ -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; }

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)
{