From 1c073df91315214045a7c741b7710a5d7a86aad3 Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Wed, 3 Jun 2026 19:52:57 +0800 Subject: [PATCH] --- Models/AppConfig.cs | 4 ++-- Services/LanScpiSocket.cs | 2 +- ViewModels/D7896ViewModel.cs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Models/AppConfig.cs b/Models/AppConfig.cs index e6f856c..3d224c5 100644 --- a/Models/AppConfig.cs +++ b/Models/AppConfig.cs @@ -93,6 +93,6 @@ public class CalibrationCoefficients public ushort ResistanceCoefficient { get; set; } //public double ThermalConductivityCorrection { get; set; } = 69;//乙二醇 - public double ThermalConductivityCorrection { get; set; } = 100;//乙二醇 - public double ThermalDiffusivityCorrection { get; set; } = 19.9; + public double ThermalConductivityCorrection { get; set; } = 28;//乙二醇 + public double ThermalDiffusivityCorrection { get; set; } = 0.59; } \ No newline at end of file diff --git a/Services/LanScpiSocket.cs b/Services/LanScpiSocket.cs index ed19682..4af7a83 100644 --- a/Services/LanScpiSocket.cs +++ b/Services/LanScpiSocket.cs @@ -94,7 +94,7 @@ namespace ASTM_D7896_Tester.Services await SendCommandAsync($"VOLT:DC:RANG {DefaultVoltageRange}"); // 3. 设置积分时间 0.02PLC(最快速度) - await SendCommandAsync("VOLT:DC:NPLC 0.02"); + await SendCommandAsync("VOLT:DC:NPLC 0.1"); // 4. 关闭自动归零(提高速度) await SendCommandAsync("VOLT:DC:ZERO:AUTO OFF"); diff --git a/ViewModels/D7896ViewModel.cs b/ViewModels/D7896ViewModel.cs index ac131ae..3635da3 100644 --- a/ViewModels/D7896ViewModel.cs +++ b/ViewModels/D7896ViewModel.cs @@ -91,7 +91,7 @@ public partial class D7896ViewModel : ObservableObject private const double EulerGamma = 0.5772156649; // 欧拉常数 //private const double WireRadius = 0.00003; // 铂丝半径 (0.03 mm) [ObservableProperty] private double _sampleDensity = 1000.0; // 新增,密度默认值1000 kg/m³(水) - int samples = 1000; // 1秒 * 1000点/秒 + int samples = 400; // 1秒 * 1000点/秒 double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致) double totalDuration = 2; // 总采样时间(加热 + 冷却) public D7896ViewModel() @@ -579,6 +579,7 @@ public partial class D7896ViewModel : ObservableObject lambda = _config.TestParameters.FixedLambda; Logger.Log($"使用固定 lambda={lambda:F6} W/(m·K)"); } + lambda *= _config.TestParameters.CalibrationCoefficients.ThermalDiffusivityCorrection; Logger.Log($"constantCurrent(avg)={avgCurrent:E6} A, avgResistance={avgResistance:F6} Ω, powerPerLength={powerPerLength:E6} W/m, 斜率 B = {slope:F5}"); // 计算热扩散率