Skip to content
Snippets Groups Projects
Commit 0bf815b2 authored by Ian Bell's avatar Ian Bell
Browse files

More debugging of REFPROP setup

parent 1329ae64
No related branches found
No related tags found
No related merge requests found
...@@ -53,13 +53,13 @@ int REFPROP_setup() { ...@@ -53,13 +53,13 @@ int REFPROP_setup() {
// Load the shared library and set up the fluid // Load the shared library and set up the fluid
std::string err; std::string err;
bool loaded_REFPROP = load_REFPROP(err, path, DLL_name); bool loaded_REFPROP = load_REFPROP(err, path, DLL_name);
//printf("Loaded refprop: %s @ address %zu\n", loaded_REFPROP ? "true" : "false", REFPROP_address()); printf("Loaded refprop: %s @ address %zu\n", loaded_REFPROP ? "true" : "false", REFPROP_address());
if (!loaded_REFPROP) { throw std::invalid_argument("Bad load of REFPROP"); } if (!loaded_REFPROP) { throw std::invalid_argument("Bad load of REFPROP"); }
SETPATHdll(const_cast<char*>(path.c_str()), 400); SETPATHdll(const_cast<char*>(path.c_str()), 400);
int ierr = 0, nc = 1; int ierr = 0, nc = 1;
char herr[255], hfld[10000] = "PROPANE", hhmx[255] = "HMX.BNC", href[4] = "DEF"; char herr[256], hfld[10000] = "PROPANE", hhmx[255] = "HMX.BNC", href[4] = "DEF";
SETUPdll(nc, hfld, hhmx, href, ierr, herr, 10000, 255, 3, 255); SETUPdll(nc, hfld, hhmx, href, ierr, herr, 10000, 255, 3, 255);
if (ierr != 0) { throw std::invalid_argument("Bad load of REFPROP"); } if (ierr != 0) { throw std::invalid_argument("Bad setup of REFPROP: "+std::string(herr)); }
} }
struct REFPROP_sat_output { struct REFPROP_sat_output {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment