CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   What compilers can we use in Ansys Fluent to compile our UDF? (https://www.cfd-online.com/Forums/fluent-udf/206218-what-compilers-can-we-use-ansys-fluent-compile-our-udf.html)

Roh September 1, 2018 14:31

What compilers can we use in Ansys Fluent to compile our UDF?
 
Guys,
I think title of the thread is clear that what's my question.

What compilers can we use in Ansys Fluent to compile our UDF?
I read something about compiling UDF e.g.:


https://www.sharcnet.ca/Software/Ans...compilers.html


But for Windows OS they just talk about Microsoft visual studio. I'm using Ansys 19 and my OS is windows. Can I use other compilers? for example GCC?

blackmask September 1, 2018 23:37

The answer is YES. However you might need to manually write your own Makefile or build the dynamic library by hand. Believe it or not, it is not worth it. It is much easier to work under *nix, rather than mock the process in win*.

pakk September 3, 2018 04:38

Quote:

Originally Posted by blackmask (Post 704980)
The answer is YES.


To be clear: this is the answer to the question "Can I use other compilers?"


And I agree with blackmask. It is possible to use other compilers in Windows, but if you have to ask this question, you will need a lot of help to set everything up so that it really works, and it is much easier to just use the (freely available) Microsoft compiler.

gearboy September 10, 2018 01:24

Quote:

Originally Posted by Roh (Post 704956)
Guys,
I think title of the thread is clear that what's my question.

What compilers can we use in Ansys Fluent to compile our UDF?
I read something about compiling UDF e.g.:


https://www.sharcnet.ca/Software/Ans...compilers.html


But for Windows OS they just talk about Microsoft visual studio. I'm using Ansys 19 and my OS is windows. Can I use other compilers? for example GCC?

I have developed a tool to convert the default Fluent compiler from VC to GCC. Here the allowed attachment size is too small. Contact me if you need.

Roh September 11, 2018 13:28

Quote:

Originally Posted by gearboy (Post 705856)
I have developed a tool to convert the default Fluent compiler from VC to GCC. Here the allowed attachment size is too small. Contact me if you need.

Thank you,
I wanted to use another compiler because VS is huge and take much space of the memory. May I know what compiler do you use? how do you set it up?

pakk September 11, 2018 15:42

Quote:

Originally Posted by Roh (Post 706101)
Thank you,
I wanted to use another compiler because VS is huge and take much space of the memory. May I know what compiler do you use?

From the post that you replied to:
Quote:

I have developed a tool to convert the default Fluent compiler from VC to GCC
So on behalf of gearboy I can say: yes, you may know that the new compiler is GCC.

gearboy September 11, 2018 20:59

1 Attachment(s)
Quote:

Originally Posted by pakk (Post 706107)
From the post that you replied to:
So on behalf of gearboy I can say: yes, you may know that the new compiler is GCC.

Right, we recommend tdm-gcc 4.9.2. After conversion of the compiling environment, you can compile udf same way as VC compiler.

Attachment 65557

Roh September 12, 2018 00:53

Quote:

Originally Posted by gearboy (Post 706121)
Right, we recommend tdm-gcc 4.9.2. After conversion of the compiling environment, you can compile udf same way as VC compiler.

Attachment 65557


Thank you,
You have a PM from me. I use Ansys 19, Did you chack your tool to know if it has any problem with higher version of Ansys?

Roh September 12, 2018 01:00

Quote:

Originally Posted by gearboy (Post 706121)
Right, we recommend tdm-gcc 4.9.2. After conversion of the compiling environment, you can compile udf same way as VC compiler.

Attachment 65557

Sorry for bouble post but just wanted to ask Did you check the last version of tdm-gcc? Isn't there any problem if I get the last version? currently the last version is 5.1.0.2


http://tdm-gcc.tdragon.net/download

gearboy September 13, 2018 03:59

Quote:

Originally Posted by Roh (Post 706144)
Sorry for bouble post but just wanted to ask Did you check the last version of tdm-gcc? Isn't there any problem if I get the last version? currently the last version is 5.1.0.2


http://tdm-gcc.tdragon.net/download

Please give me some time to upgrade it to support fluent19.0. Currently, it only support up to 18.2. For TDM-GCC, we recommend you use 4.9.2 and do not check server for upgrading when installing. Other versions may not work. Anyway, you can try the lastest TDM-GCC version and tell me if it works.

Roh September 13, 2018 04:21

Quote:

Originally Posted by gearboy (Post 706273)
Please give me some time to upgrade it to support fluent19.0. Currently, it only support up to 18.2. For TDM-GCC, we recommend you use 4.9.2 and do not check server for upgrading when installing. Other versions may not work. Anyway, you can try the lastest TDM-GCC version and tell me if it works.

How much it will take time?
waiting to recieve it.

gearboy October 7, 2018 00:50

Quote:

Originally Posted by Roh (Post 706277)
How much it will take time?
waiting to recieve it.

We have upgraded UdfMinGW to version 19.2, which support fluent 6.3-19.2. Please read the manual in the zip package first.

https://vcudfstudio.bitbucket.io/dow...fMinGW19.2.zip

Roh October 7, 2018 02:56

1 Attachment(s)
Quote:

Originally Posted by gearboy (Post 709133)
We have upgraded UdfMinGW to version 19.2, which support fluent 6.3-19.2. Please read the manual in the zip package first.

https://vcudfstudio.bitbucket.io/dow...fMinGW19.2.zip


Thank you.
I uploaded the file in somewhere eles for other fellas because I had problem to download it(not good server).


http://www.mediafire.com/file/72tljt...W19.2.zip/file


I tried everything that you said and it worked very well. A screenshot


https://www.cfd-online.com/Forums/at...1&d=1538895150


Thank you so much.


I have a question:


If we have a workbench project and there is a fluent project in our workbench, how we have to use this program?

gearboy October 8, 2018 03:04

Quote:

Originally Posted by Roh (Post 709138)
Thank you.
I uploaded the file in somewhere eles for other fellas because I had problem to download it(not good server).


http://www.mediafire.com/file/72tljt...W19.2.zip/file


I tried everything that you said and it worked very well. A screenshot


https://www.cfd-online.com/Forums/at...1&d=1538895150


Thank you so much.


I have a question:


If we have a workbench project and there is a fluent project in our workbench, how we have to use this program?

I guess you have to add C:\TDM-GCC-64\bin to PATH environment variable first (say your GCC installing folder is C:\TDM-GCC-64).

Roh October 15, 2018 01:54

Quote:

Originally Posted by gearboy (Post 709217)
I guess you have to add C:\TDM-GCC-64\bin to PATH environment variable first (say your GCC installing folder is C:\TDM-GCC-64).

You guess? Could you please add more details about your approach here? or maybe it could be better to check it at first and inform us because you know what's going on in this tool.


And a suggestion,
I don't know if you want to release your program as an open source project but you can use github.com

Roh January 5, 2019 04:40

1 Attachment(s)
gearboy,
I'm trying to compile a UDF but get this error:


https://www.cfd-online.com/Forums/at...1&d=1546681107

The error:


Quote:

Copied F:\RDE\Rotating Detonation Engines- UDF.c to libudf\src user_nt.udf file is outdated. So, recreating the file for 2ddp ...
(chdir "libudf\win64\2ddp")nmake: Nothing to be done for 'clean'.
nmake: *** No rule to make target '../../src/Rotating', needed by 'Rotating'. Stop.
(system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\2ddp")nmake: *** No rule to make target '../../src/Rotating', needed by 'Rotating'. Stop.


Done.


What's the matter with it?

Roh January 5, 2019 13:32

Solved the problem and got a new error and have fallen in a new problem. Here is the new error:

Quote:

Error: received a fatal signal (Segmentation fault).

Error: received a fatal signal (Segmentation fault).
Error Object: #f



I managed to compile and load the UDF. Here is the report that I got after compilation:


Quote:

Creating user_nt.udf file for 2ddp ... (system "copy "C:\PROGRA~1\ANSYSI~1\v192\fluent"\fluent19.2.0\sr c\udf\makefile_nt.udf "libudf\win64\2ddp\makefile" ")
1 file(s) copied.
(chdir "libudf")(chdir "win64\2ddp")# Generating ud_io1.h
../../src/NewUDF.c: In function 'vel':
../../src/NewUDF.c:42:13: warning: variable 'To_in' set but not used [-Wunused-but-set-variable]
real T_in, To_in;
^
../../src/NewUDF.c:41:13: warning: variable 'po_in' set but not used [-Wunused-but-set-variable]
real p_in, po_in;
^
# Generating udf_names.c because of makefile NewUDF.o
# Linking libudf.dll because of makefile user_nt.udf udf_names.o NewUDF.o
################################################## ####################
#########UDF source has been compiled with UdfMinGW(ver 19.2)#########
###Please visit https://vcUdfStudio.bitbucket.io for latest version###
################################################## ####################
################################################## ####################


Done.

The UDF is compiled and loaded successfully but when I want to initialize the project I got that error.

EngJuanAntonioBlanco November 11, 2021 16:03

Quote:

Originally Posted by gearboy (Post 705856)
I have developed a tool to convert the default Fluent compiler from VC to GCC. Here the allowed attachment size is too small. Contact me if you need.

Hi friend, I have fluent 6.3.26 on Windows 10, I prove a lot of times compiled my udf, but I think that is impossible :(... I prove with VS 19, VS 17, VS Express 12... What is the correct? If you can give me another option I´ve really been enjoying that.

Thanks in advance,

Eng. Juan Antonio Blanco

pakk November 11, 2021 20:01

Out of curiosity: why Fluent 6? That is like ten years old... You are missing out on a lot of updates! Compiler support has improved a lot since that version!

AlexanderZ November 11, 2021 21:09

Quote:

Originally Posted by EngJuanAntonioBlanco (Post 816351)
Hi friend, I have fluent 6.3.26 on Windows 10, I prove a lot of times compiled my udf, but I think that is impossible :(... I prove with VS 19, VS 17, VS Express 12... What is the correct? If you can give me another option I´ve really been enjoying that.

Thanks in advance,

Eng. Juan Antonio Blanco

VS Express 10


All times are GMT -4. The time now is 07:35.