物性更改

This commit is contained in:
2025-10-11 09:36:02 +08:00
parent 17e15356d8
commit 3795dd3f9d
2 changed files with 68 additions and 1 deletions

View File

@@ -247,6 +247,7 @@ namespace CapMachine.Wpf.Services
// 计算过热度:吸气压力的饱和温度
double pForSat = (InhPressTag.PVModel.EngValue) * 1000.0; // MPa->kPa
double teSat = 0;
iErr = 0; // 确保按 ref 传入前已赋值
IRefProp64.SATPdll(ref pForSat, xLoc, ref kph, ref teSat, ref DlLoc, ref DvLoc, xliqLoc, xvapLoc, ref iErr, ref herr2, ref herrLen2);
if (iErr == 0)
Superheat.PVModel.EngValue = InhTempTag.PVModel.EngValue - (teSat - 273.15);
@@ -333,7 +334,7 @@ namespace CapMachine.Wpf.Services
// 在同一把锁中执行 REFPROP 计算,保证并发安全
lock (_refpropLock)
{
string herr = new string(' ', 255); long herrLen = 255;
string herr = new string(' ', 255); long herrLen = 255; iErr = 0; // 确保按 ref 传入前已赋值
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
if (iErr == 0)