This commit is contained in:
@@ -91,8 +91,8 @@ 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点/秒
|
||||
double heatingDuration =1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致)
|
||||
int samples = 800; // 1秒 * 1000点/秒
|
||||
double heatingDuration = 1; // 加热时间 0.8 秒(需与您的加热脉冲宽度一致)
|
||||
double totalDuration = 2; // 总采样时间(加热 + 冷却)
|
||||
public D7896ViewModel()
|
||||
{
|
||||
@@ -342,8 +342,8 @@ public partial class D7896ViewModel : ObservableObject
|
||||
if (dynamicR0 == 2.45) // 仍为默认值,说明基线无效
|
||||
{
|
||||
double sumR0 = 0; int cnt = 0;
|
||||
// 改用第 10 到 19 点(共10个点),避开前10个点的干扰
|
||||
for (int j = 10; j < Math.Min(20, ustd.Length); j++)
|
||||
// 改用第 2~5 点(索引 2,3,4,5)
|
||||
for (int j = 2; j < Math.Min(6, ustd.Length); j++)
|
||||
{
|
||||
if (ustd[j] > 0.01 && upt[j] > 0.01)
|
||||
{
|
||||
@@ -354,7 +354,7 @@ public partial class D7896ViewModel : ObservableObject
|
||||
if (cnt > 0)
|
||||
{
|
||||
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;
|
||||
if (exponent > 30) exponent = 30;
|
||||
double alpha = (_config.TestParameters.PlatinumWireDiameter / 2 * _config.TestParameters.PlatinumWireDiameter / 2 / 4.0) * Math.Exp(exponent);
|
||||
|
||||
alpha *= _config.TestParameters.CalibrationCoefficients.ThermalConductivityCorrection;
|
||||
if (_config.TestParameters.UseFixedAlpha)
|
||||
{
|
||||
alpha = _config.TestParameters.FixedAlpha;
|
||||
|
||||
Reference in New Issue
Block a user