更改
This commit is contained in:
@@ -55,7 +55,7 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
InhPressTag = InhPressShortControlTag!;
|
||||
}
|
||||
|
||||
|
||||
if (TagManager.TryGetShortTagByName("吸气温度[℃]", out ShortValueTag? InhTempShortControlTag))
|
||||
{
|
||||
InhTempTag = InhTempShortControlTag!;
|
||||
@@ -291,7 +291,7 @@ namespace CapMachine.Wpf.Services
|
||||
double[] xlkg = new double[20], xvkg = new double[20];
|
||||
|
||||
double tk = 0.0, wm = 0.0, prevDeltaH = 0.0;//prevDeltaH 未使用
|
||||
|
||||
|
||||
// 统一初始化(仅必要时),避免循环内重复 SETUP/SETPATH
|
||||
if (!EnsureRefpropInitialized(out string initErrLoop))
|
||||
{
|
||||
@@ -357,15 +357,15 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
string dryErr;
|
||||
double ps = InhPressTag.PVModel.EngValue;//吸气压力
|
||||
ps = 2.374421;//Mpa ->BarA
|
||||
//ps = 2.374421;//Mpa ->BarA
|
||||
double pg = GasPreValvePressTag.PVModel.EngValue;//气路阀前压力
|
||||
pg = 19.77032;//Mpa ->BarA
|
||||
//pg = 19.77032;//Mpa ->BarA
|
||||
double tg = GasPreValveTempTag.PVModel.EngValue;//气路阀前温度
|
||||
tg = 61.76869;
|
||||
//tg = 61.76869;
|
||||
double plv = TxvFrPressTag.PVModel.EngValue;//膨胀阀前压力=液路阀前压力
|
||||
plv = 19.26757;//Mpa ->BarA
|
||||
//plv = 19.26757;//Mpa ->BarA
|
||||
double tlv = TxvFrTempTag.PVModel.EngValue;//膨胀阀前温度 = SUBCOOL出口温度 =液路阀前温度
|
||||
tlv = 64.96428;
|
||||
//tlv = 64.96428;
|
||||
|
||||
//液体流量=液冷媒流量 kg/h
|
||||
//气体流量=冷媒流量-液体流量 kg/h
|
||||
@@ -373,23 +373,26 @@ namespace CapMachine.Wpf.Services
|
||||
double GasMassFlowKgPerH, LiquidMassFlowKgPerH;
|
||||
|
||||
LiquidMassFlowKgPerH = LiqRefFlowTag.PVModel.EngValue; // [kg/h]
|
||||
// VRV 为体积流量 [L/min],需结合管段相态与 T/P 计算密度后换算为质量流量 [kg/h]
|
||||
double vrvLmin = VRVTag?.PVModel?.EngValue ?? 0.0;
|
||||
double totalMassKgPerH;
|
||||
string flowErr;
|
||||
if (TryConvertVolumetricFlowLMinToMassKgPerH(vrvLmin, plv, tlv, 1, out totalMassKgPerH, out flowErr)) // 1=液相(若 VRV 在液管)
|
||||
{
|
||||
GasMassFlowKgPerH = Math.Max(0.0, totalMassKgPerH - LiquidMassFlowKgPerH);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Warn($"VRV 体积流量→质量流量换算失败:{flowErr}。已将气体质量流量置 0。输入: VRV={vrvLmin:F3} L/min, Pl={plv:F3} BarA, Tl={tlv:F3} ℃");
|
||||
GasMassFlowKgPerH = 0.0;
|
||||
}
|
||||
|
||||
GasMassFlowKgPerH = (double)(VRVTag?.PVModel?.EngValue - LiquidMassFlowKgPerH);
|
||||
|
||||
////单位转换和数据计算
|
||||
//// VRV 为体积流量 [L/min],需结合管段相态与 T/P 计算密度后换算为质量流量 [kg/h]
|
||||
//double vrvLmin = VRVTag?.PVModel?.EngValue ?? 0.0;
|
||||
//double totalMassKgPerH;
|
||||
//string flowErr;
|
||||
//if (TryConvertVolumetricFlowLMinToMassKgPerH(vrvLmin, plv, tlv, 1, out totalMassKgPerH, out flowErr)) // 1=液相(若 VRV 在液管)
|
||||
//{
|
||||
// GasMassFlowKgPerH = Math.Max(0.0, totalMassKgPerH - LiquidMassFlowKgPerH);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Logger.Warn($"VRV 体积流量→质量流量换算失败:{flowErr}。已将气体质量流量置 0。输入: VRV={vrvLmin:F3} L/min, Pl={plv:F3} BarA, Tl={tlv:F3} ℃");
|
||||
// GasMassFlowKgPerH = 0.0;
|
||||
//}
|
||||
|
||||
//LiquidMassFlowKgPerH = 214.3051;
|
||||
//GasMassFlowKgPerH = 264.7956- 214.3051;
|
||||
|
||||
|
||||
|
||||
//压力参数要求为BarA
|
||||
double dryness = Step_ComputeDryness_LV_FlowWeighted(
|
||||
@@ -424,8 +427,8 @@ namespace CapMachine.Wpf.Services
|
||||
kph = 1;
|
||||
|
||||
p1 = (TxvFrPressTag.PVModel.EngValue) * 100.0;//textBox3 Evap.膨胀阀前压力(BarA→kPa)
|
||||
//p1 = Convert.ToDouble(textBox3.Text) * 100.0;//textBox3 Evap.膨胀阀前压力(BarA→kPa)
|
||||
// 重复的 SATP 与干度计算已在上方 lock(_refpropLock) 中统一完成,此处移除重复调用
|
||||
//p1 = Convert.ToDouble(textBox3.Text) * 100.0;//textBox3 Evap.膨胀阀前压力(BarA→kPa)
|
||||
// 重复的 SATP 与干度计算已在上方 lock(_refpropLock) 中统一完成,此处移除重复调用
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user