This commit is contained in:
xyy
2026-05-20 19:46:52 +08:00
parent 47bb9f1538
commit a93b6c0897
7 changed files with 512 additions and 239 deletions

View File

@@ -13,14 +13,27 @@ public partial class MeasurementResult : ObservableObject
[ObservableProperty]
private double _thermalDiffusivity; // ×10⁻⁶ m²/s
[ObservableProperty]
private double _specificHeatCapacity; // 比热容 J/(kg·K)
public void CalculateVhcAndCp(double density)
{
CalculateVhc(); // 先计算 VHC
if (density > 0)
SpecificHeatCapacity = VolumetricHeatCapacity * 1000 / density; // 注意单位转换
else
SpecificHeatCapacity = 0;
}
[ObservableProperty]
private double _volumetricHeatCapacity; // kJ/m³·K (自动计算)
public void CalculateVhc()
{
if (_thermalDiffusivity > 0)
VolumetricHeatCapacity = _thermalConductivity / (_thermalDiffusivity * 1e-6) / 1000.0;
if (ThermalDiffusivity > 0)
VolumetricHeatCapacity = ThermalConductivity / (ThermalDiffusivity * 1e-6) / 1000.0;
else
VolumetricHeatCapacity = 0;
}
}