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/)
-   -   Parallel temperature prandtl udf (https://www.cfd-online.com/Forums/fluent-udf/234502-parallel-temperature-prandtl-udf.html)

gauravkmr March 9, 2021 09:49

Parallel temperature prandtl udf
 
How can I parallelize the following temperature prandtl number udf??

/* Specifying a Constant Temperature Prandtl Number */
#include "udf.h" DEFINE_PRANDTL_T(user_pr_t,c,t)
{
real pr_t;
pr_t = 0.25;
return pr_t;
}

pakk March 9, 2021 14:42

There is nothing to parallelise here... Just use it.

gauravkmr March 9, 2021 14:48

Thanks for your answer, but when I compile it in fluent, it shows error, that the code is not for parallel use.

pakk March 10, 2021 02:08

Can you copy that error? I've never seen that one before when you compile...

pakk March 10, 2021 02:10

And I assumed you had it working for serial, is that correct?

gauravkmr March 10, 2021 02:14

Following is the error:
The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64).

I had not worked it for serial, I just wrote the script and compiled then it shows the above error.

pakk March 10, 2021 08:30

This is not the error you get when you compile. This is the error you get when you try to load. (Read it!)

Show the error that you get after you click "build".

pakk March 10, 2021 08:32

Oh, I hope that you did not really put

Code:

#include "udf.h" DEFINE_PRANDTL_T(user_pr_t,c,t)
literally as one line... In all the examples in the manual, this is split into two lines:

Code:

#include "udf.h"
DEFINE_PRANDTL_T(user_pr_t,c,t)

If you put this as one line, it will probably not compile, and the compiler should have given you an error in line 1...

gauravkmr March 11, 2021 02:10

I had split into two lines and wrote in notepad and saved in .c format.

gauravkmr March 11, 2021 02:51

When I click build then TUI shows the below message.

Copied E:\Projects\Gaurav\Simulation\18\pr2.c to libudf45\src
Creating user_nt.udf file for 3ddp_host ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v201\fluent"\fluent20.1.0\sr c\udf\makefile_nt.udf "libudf45\win64\3ddp_host\makefile" ")
1 file(s) copied.
(chdir "libudf45")(chdir "win64\3ddp_host")'nmake' is not recognized as an internal or external command,
operable program or batch file.
Creating user_nt.udf file for 3ddp_node ...
(system "copy "C:\PROGRA~1\ANSYSI~1\v201\fluent"\fluent20.1.0\sr c\udf\makefile_nt.udf "libudf45\win64\3ddp_node\makefile" ")
1 file(s) copied.
(chdir "libudf45")(chdir "win64\3ddp_node")'nmake' is not recognized as an internal or external command,
operable program or batch file.

Done.

pakk March 11, 2021 03:24

'nmake' is not recognized as an internal or external command,
operable program or batch file.

This is your error.

Search for this text on this forum. It is a Fluent installation / configuration problem, it has nothing to do with your code. Your code is not even read. I am no expert on how to solve that.

gauravkmr March 11, 2021 05:36

Many many thanks for your concern on this thread.
Thanks again.


All times are GMT -4. The time now is 11:57.