更新
This commit is contained in:
@@ -133,15 +133,22 @@ namespace COFTester.Services
|
||||
// 測試速度:300±10 mm/min
|
||||
// 計算區間:通常在 20-90mm 之間(排除起始和結束不穩定段)
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 開始計算剝離強度");
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 原始數據點數: {rawData.Count}");
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 計算區間: {parameters.StaticCalcStart} - {parameters.StaticCalcEnd} mm");
|
||||
|
||||
var peelData = rawData.Where(p =>
|
||||
p.Displacement >= parameters.StaticCalcStart &&
|
||||
p.Displacement <= parameters.StaticCalcEnd).ToList();
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 區間內數據點數: {peelData.Count}");
|
||||
|
||||
if (!peelData.Any())
|
||||
{
|
||||
// 備用方案:取中間 70% 的數據
|
||||
int skipCount = rawData.Count / 6;
|
||||
peelData = rawData.Skip(skipCount).Take(rawData.Count - 2 * skipCount).ToList();
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 使用備用方案,數據點數: {peelData.Count}");
|
||||
}
|
||||
|
||||
if (peelData.Any())
|
||||
@@ -150,10 +157,15 @@ namespace COFTester.Services
|
||||
maxForce = peelData.Max(p => p.Force);
|
||||
avgKineticForce = avgPeelForce;
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 平均剝離力: {avgPeelForce:F3} N");
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 最大力值: {maxForce:F3} N");
|
||||
|
||||
// 獲取試樣寬度(默認 25mm)
|
||||
double sampleWidth_mm = parameters.SampleWidth > 0 ? parameters.SampleWidth : 25.0;
|
||||
double sampleWidth_cm = sampleWidth_mm / 10.0;
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 試樣寬度: {sampleWidth_mm} mm ({sampleWidth_cm} cm)");
|
||||
|
||||
// 計算剝離強度
|
||||
// 單位 N/cm:平均剝離力 / 試樣寬度(cm)
|
||||
peelStrength_N_cm = avgPeelForce / sampleWidth_cm;
|
||||
@@ -161,9 +173,16 @@ namespace COFTester.Services
|
||||
// 單位 N/25mm:平均剝離力 × (25 / 實際寬度)
|
||||
peelStrength_N_25mm = avgPeelForce * (25.0 / sampleWidth_mm);
|
||||
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 剝離強度 (N/cm): {peelStrength_N_cm:F3}");
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 剝離強度 (N/25mm): {peelStrength_N_25mm:F3}");
|
||||
|
||||
// 為了兼容性,將 N/25mm 值存入 StaticCOF(UI 顯示用)
|
||||
staticCOF = peelStrength_N_25mm;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"[GB/T 2792] 警告:沒有有效數據點!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user