This commit is contained in:
xyy
2026-06-02 20:13:30 +08:00
parent dea0d29d18
commit 9d59b439eb
3 changed files with 17 additions and 12 deletions

View File

@@ -68,8 +68,11 @@ public class TestParameters
public double FitStartTime { get; set; } = 0.01; // 默认0.35秒,避开早期扰动 //public double FitStartTime { get; set; } = 0.01; // 默认0.35秒,避开早期扰动
public double FitEndTime { get; set; } = 0.1; //public double FitEndTime { get; set; } = 0.1;
public double FitStartTime { get; set; } = 0.20; // 默认0.35秒,避开早期扰动
public double FitEndTime { get; set; } = 0.60;
@@ -89,6 +92,6 @@ public class CalibrationCoefficients
public ushort TemperatureCoefficient { get; set; } public ushort TemperatureCoefficient { get; set; }
public ushort ResistanceCoefficient { get; set; } public ushort ResistanceCoefficient { get; set; }
public double ThermalConductivityCorrection { get; set; } = 0.606; public double ThermalConductivityCorrection { get; set; } = 36.8;
public double ThermalDiffusivityCorrection { get; set; } = 19.9; public double ThermalDiffusivityCorrection { get; set; } = 19.9;
} }

View File

@@ -91,8 +91,8 @@ public partial class D7896ViewModel : ObservableObject
private const double EulerGamma = 0.5772156649; // 欧拉常数 private const double EulerGamma = 0.5772156649; // 欧拉常数
//private const double WireRadius = 0.00003; // 铂丝半径 (0.03 mm) //private const double WireRadius = 0.00003; // 铂丝半径 (0.03 mm)
[ObservableProperty] private double _sampleDensity = 1000.0; // 新增密度默认值1000 kg/m³ [ObservableProperty] private double _sampleDensity = 1000.0; // 新增密度默认值1000 kg/m³
int samples = 1000; // 1秒 * 1000点/秒 int samples = 800; // 1秒 * 1000点/秒
double heatingDuration =1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致) double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致)
double totalDuration = 2; // 总采样时间(加热 + 冷却) double totalDuration = 2; // 总采样时间(加热 + 冷却)
public D7896ViewModel() public D7896ViewModel()
{ {
@@ -342,8 +342,8 @@ public partial class D7896ViewModel : ObservableObject
if (dynamicR0 == 2.45) // 仍为默认值,说明基线无效 if (dynamicR0 == 2.45) // 仍为默认值,说明基线无效
{ {
double sumR0 = 0; int cnt = 0; double sumR0 = 0; int cnt = 0;
// 改用第 10 到 19 点共10个点避开前10个点的干扰 // 改用第 2~5 点(索引 2,3,4,5
for (int j = 10; j < Math.Min(20, ustd.Length); j++) for (int j = 2; j < Math.Min(6, ustd.Length); j++)
{ {
if (ustd[j] > 0.01 && upt[j] > 0.01) if (ustd[j] > 0.01 && upt[j] > 0.01)
{ {
@@ -354,7 +354,7 @@ public partial class D7896ViewModel : ObservableObject
if (cnt > 0) if (cnt > 0)
{ {
dynamicR0 = sumR0 / cnt; dynamicR0 = sumR0 / cnt;
Logger.Log($"使用加热段第10~19点计算 R0 = {dynamicR0:F6} Ω"); Logger.Log($"使用加热段第2~5点计算 R0 = {dynamicR0:F6} Ω");
} }
} }
@@ -550,6 +550,8 @@ public partial class D7896ViewModel : ObservableObject
double exponent = intercept / slope + EulerGamma; double exponent = intercept / slope + EulerGamma;
if (exponent > 30) exponent = 30; if (exponent > 30) exponent = 30;
double alpha = (_config.TestParameters.PlatinumWireDiameter / 2 * _config.TestParameters.PlatinumWireDiameter / 2 / 4.0) * Math.Exp(exponent); double alpha = (_config.TestParameters.PlatinumWireDiameter / 2 * _config.TestParameters.PlatinumWireDiameter / 2 / 4.0) * Math.Exp(exponent);
alpha *= _config.TestParameters.CalibrationCoefficients.ThermalConductivityCorrection;
if (_config.TestParameters.UseFixedAlpha) if (_config.TestParameters.UseFixedAlpha)
{ {
alpha = _config.TestParameters.FixedAlpha; alpha = _config.TestParameters.FixedAlpha;

View File

@@ -25,10 +25,10 @@
"TestParameters": { "TestParameters": {
"MeasurementCount": 10, "MeasurementCount": 10,
"IntervalSeconds": 30, "IntervalSeconds": 30,
//"PlatinumWireLength": 0.056, //铂丝长度(单位:米) "PlatinumWireLength": 0.1250, //铂丝长度(单位:米)
//"PlatinumWireDiameter": 0.00006, "PlatinumWireDiameter": 0.00006,
"PlatinumWireLength": 0.41, //铂丝长度(单位:米) //"PlatinumWireLength": 0.41, //铂丝长度(单位:米)
"PlatinumWireDiameter": 0.00018, //"PlatinumWireDiameter": 0.00021,
"ReportOutputPath": "Reports\\", "ReportOutputPath": "Reports\\",
"DefaultSampleVolume": 40.0, "DefaultSampleVolume": 40.0,
"DefaultPressure": 0.0, "DefaultPressure": 0.0,