Implemented Phase output again

Added PhaseSI function which will return phase for given input - exposed to DLL
PropsSI can also return phase as double if "Phase" is the input

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-10-14 11:21:07 +02:00
parent c200e9e057
commit 199ced3f86
7 changed files with 90 additions and 29 deletions

View File

@@ -130,6 +130,14 @@ EXPORT_CODE double CONVENTION PropsSI(const char *Output, const char *Name1, dou
std::string _Output = Output, _Name1 = Name1, _Name2 = Name2, _FluidName = FluidName;
return CoolProp::PropsSI(_Output, _Name1, Prop1, _Name2, Prop2, _FluidName);
}
EXPORT_CODE long CONVENTION PhaseSI(const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char * FluidName, char *phase)
{
std::string _Name1 = Name1, _Name2 = Name2, _FluidName = FluidName;
std::string ph = CoolProp::PhaseSI(_Name1, Prop1, _Name2, Prop2, _FluidName);
if (ph.size() > strlen(phase)){
strcpy(phase, ph.c_str());
}
}
EXPORT_CODE double CONVENTION PropsSIZ(const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char * FluidName, const double *z, int n)
{
std::string _Output = Output, _Name1 = Name1, _Name2 = Name2, _FluidName = FluidName;