过热度和过冷度物性的计算
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
<add key="connecting5" value="Data Source=@Address@; Attachs=ems.db; Pooling=true;Min Pool Size=1"/>
|
<add key="connecting5" value="Data Source=@Address@; Attachs=ems.db; Pooling=true;Min Pool Size=1"/>
|
||||||
<add key="PLCScan" value="600"/>
|
<add key="PLCScan" value="600"/>
|
||||||
<add key="PLCIP" value="127.0.0.1"/>
|
<add key="PLCIP" value="127.0.0.1"/>
|
||||||
|
<add key="FluidsPath" value="C:\Program Files (x86)\REFPROP\fluids"/>
|
||||||
<add key="LocalDBPath" value="D:\MSDB\LocalDb\CapMachineDb"/>
|
<add key="LocalDBPath" value="D:\MSDB\LocalDb\CapMachineDb"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -723,6 +723,9 @@
|
|||||||
<None Update="Db\CapMachineDb.mdf">
|
<None Update="Db\CapMachineDb.mdf">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="EnvSupport\NIST2391.EXE">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Update="EnvSupport\SQL2022-SSEI-Expr.exe">
|
<None Update="EnvSupport\SQL2022-SSEI-Expr.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
BIN
CapMachine.Wpf/EnvSupport/NIST2391.EXE
Normal file
BIN
CapMachine.Wpf/EnvSupport/NIST2391.EXE
Normal file
Binary file not shown.
@@ -6,11 +6,12 @@ namespace CapMachine.Wpf.PPCalculation
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is C# Wrapper Class for REFPROP.
|
/// This is C# Wrapper Class for REFPROP.
|
||||||
|
/// REFPROP.DLL 是32程序的Dll文件,如果应用程序是32位的,需要使用REFPROP.DLL,修改为: [DllImport(@".\PPCalculation\REFPROP\REFPROP.DLL")]
|
||||||
|
/// REFPRP64.DLL 是64位程序的Dll文件,如果应用程序是64位的,需要使用REFPRP64.DLL 修改为: [DllImport(@".\PPCalculation\REFPROP\REFPRP64.DLL")]
|
||||||
|
/// 还请搭配流体文件的数据(请注意路径的长度)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class IRefProp64
|
public static class IRefProp64
|
||||||
{
|
{
|
||||||
static bool is64Bit = Environment.Is64BitProcess;
|
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
* Set the path where the fluid files are located.
|
* Set the path where the fluid files are located.
|
||||||
* The path does not need to contain the ending "\" and it can
|
* The path does not need to contain the ending "\" and it can
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
public ConfigService()
|
public ConfigService()
|
||||||
{
|
{
|
||||||
CurUserDto = new UserDto();
|
CurUserDto = new UserDto();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -57,6 +58,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int ChartRtDataCacheTimeSec { get; set; } = 3600_8;
|
public int ChartRtDataCacheTimeSec { get; set; } = 3600_8;
|
||||||
|
|
||||||
|
|
||||||
private HistoryExp _CurExpInfo;
|
private HistoryExp _CurExpInfo;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前的试验信息
|
/// 当前的试验信息
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using CapMachine.Shared.Controls;
|
using CapMachine.Core;
|
||||||
|
using CapMachine.Shared.Controls;
|
||||||
using CapMachine.Wpf.Models.Tag;
|
using CapMachine.Wpf.Models.Tag;
|
||||||
using CapMachine.Wpf.PPCalculation;
|
using CapMachine.Wpf.PPCalculation;
|
||||||
using Prism.Events;
|
using Prism.Events;
|
||||||
@@ -65,9 +66,21 @@ namespace CapMachine.Wpf.Services
|
|||||||
//Cond1TempTag = TagManager.DicTags.GetValueOrDefault("冷凝器出口水温[℃]");
|
//Cond1TempTag = TagManager.DicTags.GetValueOrDefault("冷凝器出口水温[℃]");
|
||||||
//CondInTempTag = TagManager.DicTags.GetValueOrDefault("冷凝器进口温度[℃]");
|
//CondInTempTag = TagManager.DicTags.GetValueOrDefault("冷凝器进口温度[℃]");
|
||||||
|
|
||||||
//RtScanDeviceStart();
|
FluidsPath = ConfigHelper.GetValue("FluidsPath");
|
||||||
|
|
||||||
|
RtScanDeviceStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 过热度和过冷度计算FLUID路径
|
||||||
|
/// REFPROP
|
||||||
|
/// REFPRP64.DLL
|
||||||
|
///
|
||||||
|
/// ****FluidsPath 路径不能太长,否则会导致错误***********
|
||||||
|
/// </summary>
|
||||||
|
public string FluidsPath { get; set; } = "C:\\Program Files (x86)\\REFPROP\\fluids";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 吸气压力
|
/// 吸气压力
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -123,7 +136,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启用计算
|
/// 启用计算
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool RtCalcEnable { get; set; }=true;
|
private bool RtCalcEnable { get; set; } = true;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -151,7 +164,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
|
|
||||||
//textBox5.Text = "";
|
//textBox5.Text = "";
|
||||||
|
|
||||||
string hpath = @".\PPCalculation\REFPROP\FLUIDS";
|
string hpath = FluidsPath;
|
||||||
long size = hpath.Length;
|
long size = hpath.Length;
|
||||||
|
|
||||||
hpath += new String(' ', 255 - (int)size);
|
hpath += new String(' ', 255 - (int)size);
|
||||||
@@ -199,7 +212,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
kph = 1;
|
kph = 1;
|
||||||
|
|
||||||
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
||||||
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
||||||
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
|
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
|
||||||
|
|
||||||
if (iErr == 0)
|
if (iErr == 0)
|
||||||
@@ -299,7 +312,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
|
|
||||||
//p1 = (ListKRLogCellValue.Find(a => a.Name == "膨胀阀前压力").Value) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
//p1 = (ListKRLogCellValue.Find(a => a.Name == "膨胀阀前压力").Value) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
||||||
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
||||||
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力(Mpa)
|
||||||
|
|
||||||
|
|
||||||
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
|
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
|
||||||
|
|||||||
Reference in New Issue
Block a user