This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user