Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

About installing coolprop #197

Open
dhananjayanayak opened this issue Mar 27, 2014 · 23 comments
Open

About installing coolprop #197

dhananjayanayak opened this issue Mar 27, 2014 · 23 comments

Comments

@dhananjayanayak
Copy link

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

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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//issues/197
.

@dhananjayanayak
Copy link
Author

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

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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//issues/197#issuecomment-38775195
.

@dhananjayanayak
Copy link
Author

Sir,
Thank You.

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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

@dhananjayanayak
Copy link
Author

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

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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//issues/197#issuecomment-38823391
.

@dhananjayanayak
Copy link
Author

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

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

  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//issues/197#issuecomment-38825516
.

@dhananjayanayak
Copy link
Author

Sir,
I will try them Sir. Thank You.

@dhananjayanayak
Copy link
Author

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])

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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//issues/197#issuecomment-38828824
.

@dhananjayanayak
Copy link
Author

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

@ibell
Copy link
Owner

ibell commented Mar 27, 2014

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//issues/197#issuecomment-38830392
.

@dhananjayanayak
Copy link
Author

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])

@jowr
Copy link
Collaborator

jowr commented Mar 28, 2014

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

@ibell
Copy link
Owner

ibell commented Mar 28, 2014

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

@dhananjayanayak
Copy link
Author

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
Copy link
Author

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

@ibell
Copy link
Owner

ibell commented Mar 28, 2014

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
Copy link
Owner

ibell commented Apr 10, 2014

Any luck?

@adex987
Copy link

adex987 commented Dec 27, 2015

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,

@jowr
Copy link
Collaborator

jowr commented Dec 28, 2015

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')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants