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/)
-   -   Help, parallelizing UDF problem. (https://www.cfd-online.com/Forums/fluent-udf/66337-help-parallelizing-udf-problem.html)

blivurmind July 13, 2009 01:58

Help, parallelizing UDF problem.
 
Hello,

I have a working udf. How can I use this udf for parallel computing. I have a look at the udf manual in Fluent. But it is quite complicated. What do you suggest me to do?
Above thing is my UDF.


#include "udf.h"
DEFINE_PROFILE(pressure, thread, p)
{
real t;
face_t f;
t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, p)=-84.0*sin(0.017453292*90.0*t);
}
end_f_loop(f, thread)
}


Waiting from you.
Thank you.

lullywood July 14, 2009 22:55

#include "udf.h"
DEFINE_PROFILE(pressure, thread, p)
{
real t;
t = CURRENT_TIME;
#if RP_NODE
face_t f;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, p)=-84.0*sin(0.017453292*90.0*t);
}
end_f_loop(f, thread)
#endif
}

yorelchr July 24, 2009 11:40

UDF Parallele
 
Olà

I am also trying to run simulations in parallele with a UDF. It seems that my file.jou, written for launching the program is ok, i've tested it on serial run. But when i want to launch the calculations on parallele, when the iterations are to start, the program stops and gives me errors..quite incomprehensible for me.
I haven't used any of the #IF NODE ecc, because i don't understand how to use them.
My UDF is like this :

#include "udf.h"
#include "math.h"
#include "stdio.h"
#include <stdlib.h>
#include <unistd.h>

then the list of variables...
then

DEFINE_ON_DEMAND(calc_holewall)

list of variables...

the program reads a file of parameters..

then it starts a series of loops...

begin_c_loop(c,t)
...
end_c_loop(c,t)

then after that

DEFINE_SOURCE(xmom_source,c,t,dS,eqn)
DEFINE_SOURCE(ymom_source,c,t,dS,eqn)
DEFINE_SOURCE(zmom_source,c,t,dS,eqn)

Can someone explain me how to deal with that? I can't send my program for "confidential reasons", but i can give maybe more indications if necessary.

Thanks a lot

Yorelchr


All times are GMT -4. The time now is 00:10.