物性更改
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace CapMachine.Wpf.PPCalculation
|
||||
{
|
||||
@@ -220,6 +220,24 @@ namespace CapMachine.Wpf.PPCalculation
|
||||
ref double hjt // (OUTPUT) isenthalpic Joule-Thomson coefficient [K/kPa]
|
||||
);
|
||||
|
||||
/********************************************************************************
|
||||
* Solve for density given T and P using the most robust iterative routine.
|
||||
* This mirrors the LabVIEW TPRHO DLL call path to obtain phase-specific density.
|
||||
********************************************************************************/
|
||||
[DllImport(@".\PPCalculation\REFPROP\REFPRP64.DLL", CharSet = CharSet.Ansi)]
|
||||
public static extern void TPRHOdll
|
||||
(
|
||||
ref double t, // (INPUT) temperature [K]
|
||||
ref double p, // (INPUT) pressure [kPa]
|
||||
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] double[] x, // (INPUT) composition [array of mol frac]
|
||||
ref long kph, // (INPUT) phase flag: 1=liquid, 2=vapor
|
||||
ref long kguess, // (INPUT) initial guess: 0=let routine choose
|
||||
ref double D, // (OUTPUT) molar density [mol/L]
|
||||
ref long ierr, // (OUTPUT) error flag: 0=success
|
||||
[MarshalAs(UnmanagedType.VBByRefStr)] ref string herr, // (OUTPUT) error string
|
||||
ref long herrLen
|
||||
);
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* compute the transport properties of thermal conductivity and
|
||||
|
||||
Reference in New Issue
Block a user