coolprop icon indicating copy to clipboard operation
coolprop copied to clipboard

About installing coolprop

Open dhananjayanayak opened this issue 12 years ago • 23 comments

Sir I've earliar sent a complaint at sourceforge.com regarding installation of coolprops and i got this reply, "Please file an issue at https://github.com/ibell/coolprop/issues - sourceforge is only used for website and release hosting.

Please in your issue include a screenshot of what your current working directory looks like (what files are in it), and what you did to get this error."

I am attaching Screen shot of both matlab error message directory with this message matlab matlab2 directory

dhananjayanayak avatar Mar 27 '14 05:03 dhananjayanayak

I think you have 64-bit version of MATLAB, so you need the 64-bit versions of Props and HAProps.

On Thu, Mar 27, 2014 at 6:38 AM, dhananjayanayak [email protected]:

Sir I've earliar sent a complaint at sourceforge.com regarding installation of coolprops and i got this reply, "Please file an issue at https://github.com/ibell/coolprop/issues - sourceforge is only used for website and release hosting.

Please in your issue include a screenshot of what your current working directory looks like (what files are in it), and what you did to get this error."

I am attaching Screen shot of both matlab error message directory with this message [image: matlab]https://camo.githubusercontent.com/7cb6cf1a7a773bdbc3028b05d62c6fde3330b227/68747470733a2f2f636c6f75642e67697468756275736572636f6e74656e742e636f6d2f6173736574732f373037373932342f323533343037302f66396161613462652d623537312d313165332d383531642d6533643739643261656338392e706e67 [image: matlab2]https://camo.githubusercontent.com/57579f28b9ac4dde2fa239a2bb169230ba1a1849/68747470733a2f2f636c6f75642e67697468756275736572636f6e74656e742e636f6d%202f6173736574732f373037373932342f323533343036392f66396161343863302d623537312d313165332d393765622d6336376330643762623262312e706e67 [image: directory]https://camo.githubusercontent.com/4e958d6bcedce8fb900d70187fa11351607b5412/68747470733a2f2f636c6f75642e67697468756275736572636f6e74656e742e636f6d2f6173736574732f373037373932342f323533343037312f66396161623937322d623537312d313165332d393236302d3864633666363665306162332e706e67

Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197 .

ibell avatar Mar 27 '14 07:03 ibell

Sir, my system is 32-bit. So installing MALAB 64-bit is not possible in that.

dhananjayanayak avatar Mar 27 '14 07:03 dhananjayanayak

Interesting. It seems you have things set up properly. Let me try on my 32-bit version this evening and get back to you.

On Thu, Mar 27, 2014 at 8:22 AM, dhananjayanayak [email protected]:

Sir, my system is 32-bit. So installing MALAB 64-bit is not possible in that.

Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197#issuecomment-38775195 .

ibell avatar Mar 27 '14 07:03 ibell

Sir, Thank You.

dhananjayanayak avatar Mar 27 '14 07:03 dhananjayanayak

Works for me, I think R2010 might be too old to be compatible with the MEX files generated by R2011. I seem to recall there is some issue like that.

clipboard01

ibell avatar Mar 27 '14 14:03 ibell

Sir, Shall I downgrade COOLPROP VERSION?? please suggest any compitable version.

dhananjayanayak avatar Mar 27 '14 16:03 dhananjayanayak

I'm not sure we have any compatible versions for R2010A currently. You would have to recompile CoolProp for MATLAB. If you want, I can give you some instructions to do that.

Ian

On Thu, Mar 27, 2014 at 5:02 PM, dhananjayanayak [email protected]:

Sir, Shall I downgrade COOLPROP VERSION?? please suggest any compitable version.

Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197#issuecomment-38823391 .

ibell avatar Mar 27 '14 16:03 ibell

Sir, Please give me the instructions , I will Try the same.

dhananjayanayak avatar Mar 27 '14 16:03 dhananjayanayak

  1. In matlab, run mex -setup , select lcc as your compiler (not sure this will work)
  2. Download the sources for CoolProp from https://github.com/ibell/coolprop/archive/master.zip, unzip
  3. Open matlab, go to the folder that you unzipped from the download. Then go to the wrappers/MATLAB folder.
  4. run the script MATLABBuilder . Hopefully that will create a new Props mex output file for you

On Thu, Mar 27, 2014 at 5:18 PM, dhananjayanayak [email protected]:

Sir, Please give me the instructions , I will Try the same.

Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197#issuecomment-38825516 .

ibell avatar Mar 27 '14 16:03 ibell

Sir, I will try them Sir. Thank You.

dhananjayanayak avatar Mar 27 '14 16:03 dhananjayanayak

Sir, Two errors while running two MATLABBuilder files... 1)Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder_OSX at 30 eval(['mex -DEXTERNC -c', include_string,' -outdir . ',file]) 2)path_to_src =

../../CoolProp/

mexopts_string =

-f mexopts_w32.bat -DCONVENTION=__cdecl

Error: Could not find the compiler "cl" on the DOS path. Use mex -setup to configure your environment properly.

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.

??? Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder at 32 eval(['mex -c', include_string,mexopts_string,' -DCOOLPROP_LIB -outdir . ',file])

dhananjayanayak avatar Mar 27 '14 16:03 dhananjayanayak

what happened when you ran mex -setup? Seems you didnt set compiler properly.

On Thu, Mar 27, 2014 at 5:43 PM, dhananjayanayak [email protected]:

Sir, Two errors while running two MATLABBuilder files... 1)Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder_OSX at 30 eval(['mex -DEXTERNC -c', include_string,' -outdir . ',file]) 2)path_to_src =

../../CoolProp/

mexopts_string =

-f mexopts_w32.bat -DCONVENTION=__cdecl

Error: Could not find the compiler "cl" on the DOS path. Use mex -setup to configure your environment properly.

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.

??? Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder at 32 eval(['mex -c', include_string,mexopts_string,' -DCOOLPROP_LIB -outdir . ',file])

-- Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197#issuecomment-38828824 .

ibell avatar Mar 27 '14 16:03 ibell

Sir, Sorry I could not understand what you mean by running MEX_ setup and I dont know to change/select the compiler

dhananjayanayak avatar Mar 27 '14 16:03 dhananjayanayak

At matlab prompt type the command

mex -setup

And then follow the prompt to select LCC compiler

On Thu, Mar 27, 2014 at 5:55 PM, dhananjayanayak [email protected]:

Sir, Sorry I could not understand what you mean by running MEX_ setup and I dont know to change/select the compiler

Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/197#issuecomment-38830392 .

ibell avatar Mar 27 '14 17:03 ibell

Sir, with the mentioned compiler I am getting this error while running.. path_to_src =

../../CoolProp/

mexopts_string =

-f mexopts_w32.bat -DCONVENTION=__cdecl

Error: Could not find the compiler "cl" on the DOS path. Use mex -setup to configure your environment properly.

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.

??? Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder at 32 eval(['mex -c', include_string,mexopts_string,' -DCOOLPROP_LIB -outdir . ',file])

dhananjayanayak avatar Mar 28 '14 05:03 dhananjayanayak

Do you have any version of Microsoft Visual Studio installed? The "Express" version is also fine, that is a free download.

jowr avatar Mar 28 '14 09:03 jowr

Ah, can you remove the -f mexopts_w32.bat from the BuildMATLAB file? That compiler options file over-writes the selection of LCC and chooses visual studio. Or you could install visual studio, but I think it would be easier to just modify the build file

ibell avatar Mar 28 '14 10:03 ibell

path_to_src =

../../CoolProp/

mexopts_string =

-DCONVENTION=__cdecl

Warning: Function C:\Users\dj\AppData\Local\Temp\full.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.

In tempdir at 31 In tempname at 18 In mex_helper>make_rsp_file at 392 In mex_helper>runCmdInShell at 82 In mex_helper at 53 In mex at 220 In MATLABBuilder at 32 lcc preprocessor error: ....\COOLPROP\AllFluids.cpp:3 Could not find include file lcc preprocessor error: ....\COOLPROP\AllFluids.cpp:4 Could not find include file lcc preprocessor error: ....\COOLPROP\AllFluids.cpp:5 Could not find include file lcc preprocessor error: ....\COOLPROP\AllFluids.cpp:6 Could not find include file lcc preprocessor error: ....\COOLPROP\rapidjson\rapidjson.h:7 ....\COOLPROP\rapidjson_CoolProp.h:11 ....\COOLPROP\AllFluids.cpp:8 Could not find include file lcc preprocessor error: ....\COOLPROP\rapidjson\rapidjson.h:8 ....\COOLPROP\rapidjson_CoolProp.h:11 ....\COOLPROP\AllFluids.cpp:8 Could not find include file lcc preprocessor error: ....\COOLPROP\rapidjson\rapidjson.h:20 ....\COOLPROP\rapidjson_CoolProp.h:11 ....\COOLPROP\AllFluids.cpp:8 Could not find include file <inttypes.h> lcc preprocessor error: ....\COOLPROP\rapidjson\rapidjson.h:79 ....\COOLPROP\rapidjson_CoolProp.h:11 ....\COOLPROP\AllFluids.cpp:8 Could not find include file lcc preprocessor error: ....\COOLPROP\rapidjson\reader.h:10 ....\COOLPROP\rapidjson\document.h:4 ....\COOLPROP\rapidjson_CoolProp.h:12 ....\COOLPROP\AllFluids.cpp:8 Could not find include file Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 63 syntax error; found rapidjson' expecting;' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 63 syntax error; found {' expecting;' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 63 skipping {' Error ..\..\COOLPROP\AllFluids.cpp: ..\..\COOLPROP\rapidjson\rapidjson.h: 68 unrecognized declaration Error ..\..\COOLPROP\AllFluids.cpp: ..\..\COOLPROP\rapidjson\rapidjson.h: 90 syntax error; foundrapidjson' expecting ;' Error ..\..\COOLPROP\AllFluids.cpp: ..\..\COOLPROP\rapidjson\rapidjson.h: 90 syntax error; found{' expecting ;' Error ..\..\COOLPROP\AllFluids.cpp: ..\..\COOLPROP\rapidjson\rapidjson.h: 90 skipping{' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 132 syntax error; found CrtAllocator' expecting;' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 132 syntax error; found {' expecting;' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 132 skipping {' Error ..\..\COOLPROP\AllFluids.cpp: ..\..\COOLPROP\rapidjson\rapidjson.h: 133 syntax error; found:' expecting `;' Error ....\COOLPROP\AllFluids.cpp: ....\COOLPROP\rapidjson\rapidjson.h: 133 too many errors

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Compile of '....\COOLPROP\AllFluids.cpp' failed.

??? Error using ==> mex at 222 Unable to complete successfully.

Error in ==> MATLABBuilder at 32 eval(['mex -c', include_string,mexopts_string,' -DCOOLPROP_LIB -outdir . ',file])

dhananjayanayak avatar Mar 28 '14 11:03 dhananjayanayak

Sir, I will try installing microsoft visual studio as well.. Thank you

dhananjayanayak avatar Mar 28 '14 11:03 dhananjayanayak

According to http://www.mathworks.nl/support/compilers/R2010a/win32.html you can use VS2010 express, but you need to apply a patch - see the note on the linked page.

ibell avatar Mar 28 '14 12:03 ibell

Any luck?

ibell avatar Apr 10 '14 10:04 ibell

I just started using coolprop, MATLAB Wrapper. I have difficulty, how to define bubble and dew properties.

For saturated liquid: I defined "CoolProp.PropsSI('D', 'P', p, 'Q', 0, 'Water')"- this works but for buble, I defined: CoolProp.PropsSI('dl', 'P', p, 'Q', 0, 'Water'), this one didn't works.

How I can define for dew and bubble properties? saturated liquid/ vapor properties are different from bubble/dew.

Thank you,

adex987 avatar Dec 27 '15 18:12 adex987

You do use version 5 of CoolProp, which can be found at https://github.com/coolprop/coolprop. This repository is only for version 4.2.6 and below.

Besides that, hijacking threads is not very well received and @jonwel already answered your question in his comment to Coolprop/externalmedia#3:

presure = CoolProp.PropsSI('P', 'T', 373, 'Q', 0, 'Water')
dl = CoolProp.PropsSI('D', 'P', presure, 'Q', 0, 'Water')
dv = CoolProp.PropsSI('D', 'P', presure, 'Q', 1, 'Water')

jowr avatar Dec 28 '15 10:12 jowr