26 lines
694 B
C#
26 lines
694 B
C#
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|||
|
|
|
|||
|
|
namespace ASTM_D7896_Tester.ViewModels;
|
|||
|
|
|
|||
|
|
public partial class MeasurementResult : ObservableObject
|
|||
|
|
{
|
|||
|
|
[ObservableProperty]
|
|||
|
|
private int _index;
|
|||
|
|
|
|||
|
|
[ObservableProperty]
|
|||
|
|
private double _thermalConductivity; // W/m·K
|
|||
|
|
|
|||
|
|
[ObservableProperty]
|
|||
|
|
private double _thermalDiffusivity; // ×10⁻⁶ m²/s
|
|||
|
|
|
|||
|
|
[ObservableProperty]
|
|||
|
|
private double _volumetricHeatCapacity; // kJ/m³·K (自动计算)
|
|||
|
|
|
|||
|
|
public void CalculateVhc()
|
|||
|
|
{
|
|||
|
|
if (_thermalDiffusivity > 0)
|
|||
|
|
VolumetricHeatCapacity = _thermalConductivity / (_thermalDiffusivity * 1e-6) / 1000.0;
|
|||
|
|
else
|
|||
|
|
VolumetricHeatCapacity = 0;
|
|||
|
|
}
|
|||
|
|
}
|