This commit is contained in:
xyy
2026-06-04 10:26:57 +08:00
parent 9a3cfff6d8
commit fed8c9b6dd
2 changed files with 18 additions and 18 deletions

View File

@@ -91,6 +91,6 @@ public class CalibrationCoefficients
public ushort PressureProtection { get; set; } public ushort PressureProtection { get; set; }
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; } = 28;//蒸馏水 public double ThermalConductivityCorrection { get; set; } = 39;//蒸馏水 比热率修正
public double ThermalDiffusivityCorrection { get; set; } = 0.59; public double ThermalDiffusivityCorrection { get; set; } = 0.5;//导热率修正
} }

View File

@@ -91,7 +91,7 @@ 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 = 400; // 1秒 * 1000点/秒 int samples = 200; // 1秒 * 1000点/秒
double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致) double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致)
double totalDuration = 2; // 总采样时间(加热 + 冷却) double totalDuration = 2; // 总采样时间(加热 + 冷却)
public D7896ViewModel() public D7896ViewModel()
@@ -609,22 +609,22 @@ public partial class D7896ViewModel : ObservableObject
coolingPoints.Add(new DataPoint(time[i], deltaT[i])); coolingPoints.Add(new DataPoint(time[i], deltaT[i]));
// 导出CSV // 导出CSV
try //try
{ //{
string tmp = Path.GetTempPath(); // string tmp = Path.GetTempPath();
string baseName = $"measure_{SampleId}_{DateTime.Now:yyyyMMdd_HHmmss}_{CurrentMeasurementIndex}"; // string baseName = $"measure_{SampleId}_{DateTime.Now:yyyyMMdd_HHmmss}_{CurrentMeasurementIndex}";
string dataPath = Path.Combine(tmp, baseName + ".csv"); // string dataPath = Path.Combine(tmp, baseName + ".csv");
ExportMeasurementCsv(dataPath, time, ustd, upt, deltaT, startIdx, endIdx); // ExportMeasurementCsv(dataPath, time, ustd, upt, deltaT, startIdx, endIdx);
Logger.Log($"已导出测量数据 CSV: {dataPath}"); // Logger.Log($"已导出测量数据 CSV: {dataPath}");
string winPath = Path.Combine(tmp, baseName + "_windows.csv"); // string winPath = Path.Combine(tmp, baseName + "_windows.csv");
ExportCandidateWindowsCsv(winPath, time, deltaT, startIdx, endIdx); // ExportCandidateWindowsCsv(winPath, time, deltaT, startIdx, endIdx);
Logger.Log($"已导出候选拟合窗 CSV: {winPath}"); // Logger.Log($"已导出候选拟合窗 CSV: {winPath}");
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
Logger.Log($"导出CSV失败: {ex.Message}"); // Logger.Log($"导出CSV失败: {ex.Message}");
} //}
return (lambda, alpha, deltaT, coolingPoints); return (lambda, alpha, deltaT, coolingPoints);
} }