This commit is contained in:
@@ -91,6 +91,6 @@ public class CalibrationCoefficients
|
||||
public ushort PressureProtection { get; set; }
|
||||
public ushort TemperatureCoefficient { get; set; }
|
||||
public ushort ResistanceCoefficient { get; set; }
|
||||
public double ThermalConductivityCorrection { get; set; } = 28;//蒸馏水
|
||||
public double ThermalDiffusivityCorrection { get; set; } = 0.59;
|
||||
public double ThermalConductivityCorrection { get; set; } = 39;//蒸馏水 比热率修正
|
||||
public double ThermalDiffusivityCorrection { get; set; } = 0.5;//导热率修正
|
||||
}
|
||||
@@ -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 = 400; // 1秒 * 1000点/秒
|
||||
int samples = 200; // 1秒 * 1000点/秒
|
||||
double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致)
|
||||
double totalDuration = 2; // 总采样时间(加热 + 冷却)
|
||||
public D7896ViewModel()
|
||||
@@ -609,22 +609,22 @@ public partial class D7896ViewModel : ObservableObject
|
||||
coolingPoints.Add(new DataPoint(time[i], deltaT[i]));
|
||||
|
||||
// 导出CSV
|
||||
try
|
||||
{
|
||||
string tmp = Path.GetTempPath();
|
||||
string baseName = $"measure_{SampleId}_{DateTime.Now:yyyyMMdd_HHmmss}_{CurrentMeasurementIndex}";
|
||||
string dataPath = Path.Combine(tmp, baseName + ".csv");
|
||||
ExportMeasurementCsv(dataPath, time, ustd, upt, deltaT, startIdx, endIdx);
|
||||
Logger.Log($"已导出测量数据 CSV: {dataPath}");
|
||||
//try
|
||||
//{
|
||||
// string tmp = Path.GetTempPath();
|
||||
// string baseName = $"measure_{SampleId}_{DateTime.Now:yyyyMMdd_HHmmss}_{CurrentMeasurementIndex}";
|
||||
// string dataPath = Path.Combine(tmp, baseName + ".csv");
|
||||
// ExportMeasurementCsv(dataPath, time, ustd, upt, deltaT, startIdx, endIdx);
|
||||
// Logger.Log($"已导出测量数据 CSV: {dataPath}");
|
||||
|
||||
string winPath = Path.Combine(tmp, baseName + "_windows.csv");
|
||||
ExportCandidateWindowsCsv(winPath, time, deltaT, startIdx, endIdx);
|
||||
Logger.Log($"已导出候选拟合窗 CSV: {winPath}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log($"导出CSV失败: {ex.Message}");
|
||||
}
|
||||
// string winPath = Path.Combine(tmp, baseName + "_windows.csv");
|
||||
// ExportCandidateWindowsCsv(winPath, time, deltaT, startIdx, endIdx);
|
||||
// Logger.Log($"已导出候选拟合窗 CSV: {winPath}");
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// Logger.Log($"导出CSV失败: {ex.Message}");
|
||||
//}
|
||||
|
||||
return (lambda, alpha, deltaT, coolingPoints);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user