Closed henningjp closed 2 years ago
@ianhbell - Squash merge will be fine. Testing complete (see verification PDF above) & ready to go. This is the last set of low level functions. Next PR will implement the REFPROP 10 High-Level API functions ,specifically REFPROP(), to better simplify and extend add-in functionality.
Thanks as usual
Description of the Change
The Mathcad wrapper was originally written with pure fluids in mind. Added functionality and some additional functions for better handling and evaluation of mixtures.
Modified
rp_getname
, which callsNAMEdll
to return the mixture name from the first line of the mixture file. REFPROP 10 does this by callingNAMEdll
with icomp = 0, but REFPROP 9.1 does not. This function now works for both.New functions to assist with retrieving saturation curve information for mixtures (vapor & liquid do not overlap for mixtures) following naming convention of all other thermodynamic functions in the Mathcad wrapper:
rp_tsatpf(fluid,p)
for saturated liquid,rp_tsatpg(fluid,p)
for saturated vapor)rp_psattf(fluid,t)
for saturated liquid,rp_psattg(fluid,t)
for saturated vapor)rp_maxX(fluid,X
)rp_getx(fluid)
)fluid
may be an empty string "", a blank space " ", or the previous mixture string loaded.fluid
is a new mixture, that mixture is loaded and its mixture composition is returned.rp_setx(mfrac)
)mfrac
as an array of mole fractionsAdditional Items:
Benefits
Possible Drawbacks
Mathcad unit handling include file (REFPROP_units.mcdx) is a Mathcad worksheet and a binary file. It is updated in this PR to handle the functions above, as well as the derived quantity functions in PR #475 . It will need to be updated one more time to include the planned REFPROP 10 high-level API function additions to the Mathcad wrapper (coming soon).
Verification Process
Applicable Issues