-
Notifications
You must be signed in to change notification settings - Fork 16
Need your help! #217
Comments
What have you tried so far? All the people that have had success with On Tue, May 27, 2014 at 11:09 AM, spymate [email protected] wrote:
|
My operating system is Windows 8.1 (x64). I use method interpreted, error occurs (file cpexceptions.h). |
Copy-paste the error please, otherwise impossible to figure out how to help
On Tue, May 27, 2014 at 11:38 AM, spymate [email protected] wrote:
|
picture: http://1drv.ms/SJDIDr |
What are the contents of R744.c? What include path are you using? On Tue, May 27, 2014 at 12:12 PM, spymate [email protected] wrote:
|
I put all files in eosspanwagner folder:
|
What are the contents of R744.c? I don't think this is going to work. You will need to add an include to double PropsSI (const char_, const char_, double, const char_, double, and then add the CoolProp folder (with all the sources) to the project On Tue, May 27, 2014 at 12:27 PM, spymate [email protected] wrote:
|
R744.c: http://1drv.ms/SJN81N |
Ah I see. A couple of problems:
On Tue, May 27, 2014 at 12:37 PM, spymate [email protected] wrote:
|
Define\User-defined\Functions\Interpreted |
Sorry Sir Ibell! |
@ghobold Can you chime in here? |
I'm unfortunately not a Fluent user, but I think you need to compile a On Tue, May 27, 2014 at 1:04 PM, spymate [email protected] wrote:
|
Thanks! I'll try! |
Hi! When I compile, error as this picture: http://1drv.ms/1jWxnic |
Can you do a copy-paste, not a screenshot? There must be more errors above On Tue, May 27, 2014 at 3:17 PM, spymate [email protected] wrote:
|
Opening library "D:\Cao hoc 2012\Luan van\Chay mo phong\nozzle_Hoan\case01\libudf"... The system cannot find the file specified. D:\Cao hoc 2012\Luan van\Chay mo phong Generating ud_io1.hR744.c Done. |
First get this one compiling : Then get this one compiling : On Tue, May 27, 2014 at 3:35 PM, spymate [email protected] wrote:
|
UDF.c: Generating ud_io1.hUDF.c Done. |
file property.c
Done. |
Those errors are coming from Fluent - not CoolProp. Do they have anyUDF On Tue, May 27, 2014 at 4:02 PM, spymate [email protected] wrote:
|
Sorry sir Ibell! |
I was only able to make Coolprop work on Linux versions of Fluent, but it shouldn't be much more complicated to make it work on Windows. So far, the problem seems to be that you are trying to compile the entire Coolprop library in Fluent. It doesn't work that way. The Coolprop library should be compiled externally and then loaded into Fluent. As @ibell mentioned, suppose you have the library compiled and organized as it is supposed to be (I will try to explain what this means in a moment), then if you follow the instructions in this README (https://github.com/ibell/coolprop/tree/master/wrappers/Fluent) you should be fine. Note that the library is loaded into Fluent and the properties.c file is compiled as an UDF. The problem is on how to compile the library on Windows. It's actually pretty much just following what is in the compile.sh file, only it does not work on Windows. Fluent UDF libraries need a very specific directory structure. So, if you are currently working on "workingDirectory" in which you have a file "workingDirectory/UDF.c" you want to compile, your library must be structured as follows: workingDirectory/(libraryName)/src/ In your case, it looks like (libraryName) = libudf, (architecture) = win64, (solver) = 2ddp, so that you should have a directory structure in your working directory as follows: workingDirectory/libudf/src/ In each of those directories, you must have some specific files, and that's what the compile.sh file does on Linux: it compiles the Coolprop library and moves the necessary files to the directory structure Fluent needs. Here's what it does:
It is more difficult to automatize the process I described above in Windows than it is on Linux, but it is possible. However, if you are able to compile everything I mentioned above (just by running compile.sh) on Linux, you can theoretically just change the directory structure created for Linux into your Windows one, as long as you have the exact same version of Fluent in both systems (Fluent changes a thing or two on compiled UDFs from version to version). For example, on Linux it should look something like this: workingDirectory/libudf/src/ On your Windows, it looks like what I already discussed above. It's really just the architecture that is different. Perhaps you will also have to dig through all of the user.udf file to change the architecture in there, but I doubt it will be necessary, So that if you have the compiled library in the correct directory structure, you can follow steps 4-8 in the Fluent wrapper README and you should be fine. Hope this helps. |
@ghobold Thanks for your help! |
Thank to Sir Ian Bell and Gustavo! |
Let me know which version of Fluent you are running. If it is the same as mine, I might be able to compile the library on Linux and send you a .rar with all the files and directory structure you will need to load it into your Windows Fluent. |
Ansys Fluent V14 |
OK, I am not sure if it's going to work because my version is slightly different, but I will see what I can do tomorrow (I'm not on the computer where Fluent is installed right now). |
Thanks! I have other versions: v14.5, v15 (64bit). So if your version is one of them, I'll setup other version. |
Here's a compiled library ready to be imported into your Windows Fluent: https://www.dropbox.com/s/2zt0xpb9oafxkzu/libudf.zip Copy the libudf folder to your working directory (the same in which you have the properties.c file, make sure properties.c is the only .c file you have there, and your mesh/case files). Once you have extracted the libudf folder, follow steps 4-9 in the Fluent wrapper README. To check whether or not it is working, I suggest you run the EXECUTE_ON_DEMAND UDF call_coolprop after compiling properties.c on Fluent. However, you must understand that this is just a palliative solution and you should not think of it as permanent in case you really want to work with variable properties. The compiled library I sent you assumes you are using an operating pressure of 101325 Pa (Fluent's default) and so the specific heat is based on that pressure (remember that Fluent won't make specific heat a function of both pressure and temperature, only temperature, so you need a reference pressure in order to calculate it from Coolprop -- the operating pressure). |
Thanks, Gustavo! |
Hello Mr Gustavo! Generating ud_io1.hR744.c Done. I can't understand them! So, pls help me! Thanks! |
You don't compile the r744.c file. Make sure you are following steps 4-8 in this README: https://github.com/ibell/coolprop/blob/master/wrappers/Fluent/README.rst Here's what you do:
Please let me know if I am using some terminology/jargon/vocabulary you are not familiar with and I will try to make it clearer. |
Hello Mr. Gustavo! |
I understand, that is why I compiled the code and sent it to you. The On Fri, May 30, 2014 at 1:39 AM, spymate [email protected] wrote:
Gustavo |
Hello Sir Ibell!
I'm Huong Vo, from VietNam.
I am extremely grateful to you for your enthusiasm and the sharing of source code.
I'm using Ansys Fluent (windows x64). I use your source code to define EOS of R744 (Span and Wagner EOS). But I can't do it (your source code only for linux)
Please help me!
Thank you!
The text was updated successfully, but these errors were encountered: