计算公式
This commit is contained in:
@@ -221,6 +221,26 @@ namespace CapMachine.Wpf.PPCalculation
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* 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
|
* compute the transport properties of thermal conductivity and
|
||||||
* viscosity as functions of temperature, density, and composition
|
* viscosity as functions of temperature, density, and composition
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user