Add derived quantity functions to Mathcad wrapper for speed improvement
New functions (general and saturation (f/g) as function of either t, p, or both) follow naming convention of all other thermodynamic functions in the Mathcad wrapper:
Prandtl Number (rp_prtp, rp_prft, rp_prgt, rp_prfp, rp_prgp)
Compressibility, Z (rp_ztp, rp_zft, rp_zgt, rp_zfp, rp_zgp, & rp_zcrit)
Additional Items:
Mathcad wrapper version update to 2.0.3.
Added function rp_getRPnum to retrieve the loaded major.minor version of REFPROP loaded as a double. In preparation for adding REFPROP 10 high-level API functions, his will help Mathcad worksheets and templates be able discern the REFPROP version number and make quick version comparisons (e.g. pre-/post-REFPROP10) when allowing/disallowing high-level API calls.
Handle significant changes in error codes returned from TRNPRPdll between REFPROP 9.1 and REFPROP 10
Miscellaneous updates to code comments
Benefits
Calling these derived quantity functions from the compiled add-in DLL should be slightly faster than performing the underlying calculations natively within Mathcad, especially when called repeatedly.
Transport functions now provide correct error handling of codes returned by REFPROP 10.
Possible Drawbacks
Because the Mathcad unit handling include file (REFPROP_units.mcdx) is a binary file, it has not been updated in this PR, but will be updated to include the above derived quantity functions once the planned REFPROP 10 high-level API functions are added to the Mathcad wrapper.
Verification Process
Ran extended regression testing successfully.
Ran new verification worksheet (Derived Test H2O v3.pdf) for quantitative checking against REFPROP values and range checking using both CO2 and H2O fluids.
Description of the Change
Add derived quantity functions to Mathcad wrapper for speed improvement
New functions (general and saturation (f/g) as function of either t, p, or both) follow naming convention of all other thermodynamic functions in the Mathcad wrapper:
rp_prtp
,rp_prft
,rp_prgt
,rp_prfp
,rp_prgp
)rp_gammatp
,rp_gammaft
,rp_gammagt
,rp_gammafp
,rp_gammagp
)rp_betatp
,rp_betaft
,rp_betagt
,rp_betafp
,rp_betagp
)rp_ztp
,rp_zft
,rp_zgt
,rp_zfp
,rp_zgp
, & rp_zcrit)Additional Items:
rp_getRPnum
to retrieve the loaded major.minor version of REFPROP loaded as a double. In preparation for adding REFPROP 10 high-level API functions, his will help Mathcad worksheets and templates be able discern the REFPROP version number and make quick version comparisons (e.g. pre-/post-REFPROP10) when allowing/disallowing high-level API calls.TRNPRPdll
between REFPROP 9.1 and REFPROP 10Benefits
Possible Drawbacks
Because the Mathcad unit handling include file (REFPROP_units.mcdx) is a binary file, it has not been updated in this PR, but will be updated to include the above derived quantity functions once the planned REFPROP 10 high-level API functions are added to the Mathcad wrapper.
Verification Process
Applicable Issues (none)