CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

udf fluent 6.3.26 don't work in fluent 12

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 13, 2010, 17:30
Default udf fluent 6.3.26 don't work in fluent 12
  #1
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
Hi all...
I wrote a udf that move my mesh, and it work well on fluent 6.3.26.
When I read it on fluent 12 it doesn't work, and says:

Warning: incorrect grid motion UDF (assuming no motion)

Could anybody help me???
Thanks a lot!


Last edited by enry; July 14, 2010 at 04:30.
enry is offline   Reply With Quote

Old   July 15, 2010, 18:10
Default
  #2
New Member
 
Arie Reath
Join Date: Jul 2010
Posts: 5
Rep Power: 6
ariereath is on a distinguished road
I am having this same problem. I downloaded a UDF for FLUENT 6 off the web and the newer version (12.0) will not read it.

Any ideas???

Last edited by ariereath; July 22, 2010 at 12:40.
ariereath is offline   Reply With Quote

Old   July 22, 2010, 17:36
Default
  #3
New Member
 
Zdeth
Join Date: Apr 2010
Posts: 14
Rep Power: 7
zdeth is on a distinguished road
Anyone find a solution to this yet? The udf I (assume) we're working with for the old version is something like:

#include "udf.h"

DEFINE_CG_MOTION(wave, dt, vel, omega, time, dtime)
{
vel[0]=(0.037098)*((1 - exp(-2.303*time))*7.7528*cos(7.7528*time) + ((2.303*exp(-2.303*time))*sin(7.7528*time)));
}



Anyone know what is incompatible-missing to get it working in version 12?
The UDF is meant to move a wall forward and back, like a piston.
my specific error when trying to apply the UDF to the zone is :

warning: incorrect cg motion UDF wave on zone 3 (assuming no motion)

with zone 3 being the wall that is supposed to move

Thanks
-Christopher
zdeth is offline   Reply With Quote

Old   July 22, 2010, 18:03
Default
  #4
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
Hi! I don't know how my udf didn't work on fluent 12... now is working...maybe there was an error in fluent journal... However, to this link there is an UDF that I use now on fluent 12... I hope that it could be interesting...

How can I twist a surface with UDF?


bye.
enry is offline   Reply With Quote

Old   July 22, 2010, 18:11
Default
  #5
New Member
 
Arie Reath
Join Date: Jul 2010
Posts: 5
Rep Power: 6
ariereath is on a distinguished road
Someone mentioned to me it could have to do with the "Load" command... instead of hitting "Load", you select your source "c" files (ex: xx.c) and hit "Build" to create a new Library and then hit "Load".

I tried this, it didn't quite work for me yet but it got me a step closer.
ariereath is offline   Reply With Quote

Old   July 22, 2010, 18:20
Default
  #6
New Member
 
Zdeth
Join Date: Apr 2010
Posts: 14
Rep Power: 7
zdeth is on a distinguished road
Thanks for the tips guys, I did what you said arierath, (add source code then build, then load) but I get this:
"open_udf_library: %1 is not a valid Win32 application."

I pulled these files directly out of a tutorial so I can only assume its a matter of version compatibility? (v12)

Do you know what the difference is between "compiled" and "interpreted" ? 'cause I can 'interpret' my *.c file with out the error above, but then get the "incorrect cg motion" error when trying to apply it to my wall
zdeth is offline   Reply With Quote

Old   July 22, 2010, 19:05
Default
  #7
New Member
 
Arie Reath
Join Date: Jul 2010
Posts: 5
Rep Power: 6
ariereath is on a distinguished road
From what I understand, you have to do this within the "Compiled" option
ariereath is offline   Reply With Quote

Old   July 23, 2010, 05:43
Default
  #8
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
most of mesh-motion-UDF can only be executed as COMPILED. In particular only DEFINE_SDOF_PROPERTIES can be executed ad interpreted or compiled udf.
You have at first to build it, and then load.
Bye.
enry is offline   Reply With Quote

Old   July 30, 2010, 11:39
Default udf for roration about z axis
  #9
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 6
almostafa67 is on a distinguished road
hi everybody...
dear enry i saw that u wrote an udf for a special kind of motion,i am trying to simulate peristaltic pump and for this i need to write an udf file to rotate on of edges about z axis,i will be thanfull if u could help me with this problem.
thank you in advance..
almostafa67 is offline   Reply With Quote

Old   July 30, 2010, 16:53
Default
  #10
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
Hi.
I don't know anything about peristaltic pump. I have red quickly this page:

http://en.wikipedia.org/wiki/Peristaltic_pump

Do you have to simulate this type of pump? Is your domain elastic like the link suggest?
If you want to impose only a rigid body rotation of some geometry , you can use sliding interface, is simpler and is the best for this type of motion. As an example, I use sliding interface to rotate a turbine along z axis.
Regards.
enry is offline   Reply With Quote

Old   July 31, 2010, 02:36
Default ratation about z axis
  #11
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 6
almostafa67 is on a distinguished road
hi dear enry...
I sent you 2 image of the case that i'm working on it,actually both of them are kind of peristaltic pump that i simulated them in gambit,i want to move the small circle on the edge of bigger circle,i think it needs a very simple udf to rotate the center of small circle about axis that passes through center of bigger circle,my case is a DM(dynamic mesh) case;
in fact i dont know which command in C can do this simple movement for;
Was wondering if you could help me out


i'm looking forward to ur help. ^ ^

Attached Images
File Type: jpg untitled.JPG (78.5 KB, 44 views)
File Type: jpg 2.JPG (71.9 KB, 27 views)
almostafa67 is offline   Reply With Quote

Old   July 31, 2010, 04:24
Default
  #12
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
I think that you should create UDF describing the movement of 2 circles mathematically. Try to write a simple UDF in which you describe the rotation, like the following:

DEFINE_CG_MOTION(myudf, dt, cg_vel, cg_omega, time, dtime)
{

real omega;

omega = your value

cg_vel[0] = 0.0;
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;
cg_omega[0] = 0.0;
cg_omega[1] = 0.0;
cg_omega[2] = omega;

}


Impose, to begin:
-Spring constant factor 0
-Convergence tolerance 0.0001
-Number of iteration 200
-UDF to the 2 circle;
-Deforming to the fluid around the circle

With this options fluent should move your circle adapting the mesh around them. In order to have big angle of rotation of the circle, you have to enable the re-meshing, and change spring constant factor properly. Try to move your circles with mesh motion GUI command.

I think that you will have some problem with re-meshing, because in my experience fluent is not so clever to re-mesh the domain.

Furthermore obviously you have to modify your UDF in order to have a complete rotation of the circles, and invent something that can simulate the presence and absence of the circle when they aren't in the domain.


I hope that it can help you.
Regards.
enry is offline   Reply With Quote

Old   August 1, 2010, 08:51
Default rotation about z axis
  #13
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 6
almostafa67 is on a distinguished road
hi dear Enry...
I just modified your code and compiled but there is a problem,Fluent does not let me to set it as a motion UDF/profile (FLUENT even does not show it)
a; any idea?
almostafa67 is offline   Reply With Quote

Old   August 1, 2010, 11:05
Default
  #14
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
Hi,
you must compile it first. Define->User-defined->Function->Compiled. Add the .c code, build it and then load. Check if Fluent reports some errors.
After this operation you should have your motion udf in dynamic mesh zones ( if I remember well under rigid body).
bye
enry is offline   Reply With Quote

Old   August 3, 2010, 10:02
Default rotation about z axis
  #15
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 6
almostafa67 is on a distinguished road
dear enry...
a long time since we did not correspondence
i have 2 news for you:what do u want first?the good news or the bad?
the good one:the udf worked and it displaced the small cylinder,and the bad one
cylinder has been locked in its end points;how can i tell fluent to release it and move cylinder???
Attached Images
File Type: jpg problem.JPG (22.7 KB, 27 views)
File Type: jpg problem 2.JPG (8.9 KB, 21 views)
almostafa67 is offline   Reply With Quote

Old   August 5, 2010, 12:57
Default
  #16
Senior Member
 
Herman
Join Date: Nov 2009
Posts: 122
Rep Power: 7
enry is on a distinguished road
hi, I answered to the other post that you posted on another thread.
However, I don't know how cylinder could desappear arriving at the end of the semicircular domain... maybe you should "invent" a function of the cilynder describing the shape of the "desappearing cylinder"... I don't think that fluent has a funtion to do it. I think that you should try something with UDF.
enry is offline   Reply With Quote

Old   September 9, 2010, 02:44
Default wave generation
  #17
New Member
 
krishna
Join Date: Sep 2010
Posts: 6
Rep Power: 6
krishnaprasad is on a distinguished road
i have a program to generate stock's second order waves. but after loading in fluent the file name is not showing in the DYNAMIC ZONE WINDOW...and an error is showing that no moving zone selected!!...

can u please help me.. i am including the udf.
thank u in adv

#include "udf.h"
#define PI 3.14159265
#define GRAV 9.81
#define H 1.5
#define D 10.0
#define T 6
#define L 20

DEFINE_PROFILE(x_velocity, thread, position)
{
real x[ND_ND];
real y;
real AA,BB,CC,DD,EE,FF,GG,LL,ZZ,K;
face_t f;
begin_f_loop(f, thread)
{
real t = RP_Get_Real("flow-time");
F_CENTROID(x,f,thread);
y = x[1];
ZZ= y - D;
K = 2*PI/L;
AA= cosh (K*(ZZ + D));
BB= cosh (K* D);
CC = sinh (K*D);
DD= cos (PI/2.0 -2.0 *PI*(t/T));
EE= cos (2.0*(PI/2.0 -2.0 *PI*(t/T)));
FF= cosh (2.0*K*D);
GG= cosh (2.0*(K*(ZZ + D)));
LL= D+(H*DD/2.0)+(PI*H*H/(8.0*L))*(BB/pow (CC,3.0))*(2.0+FF)*EE;

if (y <= D)
F_PROFILE(f,thread,position)=H/2.0*(GRAV*T/L)*AA*DD/BB+0.75*PI*PI*H*H/(L*T)*GG*EE/pow(CC,4.0);
else if (y <= LL)
F_PROFILE(f,thread,position)=H/2.0*(GRAV*T/L)*BB*DD/BB+0.75*PI*PI*H*H/(L*T)*FF*EE/pow(CC,4.0);
else
F_PROFILE(f, thread, position) = 0;
}
end_f_loop(f, thread)
}
DEFINE_PROFILE(y_velocity, thread, position)
{
real x[ND_ND];
real y;
real K,MM,NN,OO,PP,QQ,RR,SS,TT,UU,VV,WW,ZZZ;
face_t f;
begin_f_loop(f, thread)
{
real t = RP_Get_Real("flow-time");
F_CENTROID(x,f,thread);
y = x[1];
ZZZ= y - D;
K = 2*PI/L;
MM= sinh (K*(ZZZ + D));
NN= cosh (K* D);
OO= cos (PI/2.0 - (2.0 *PI* t/T));
WW= cos (2.0*(PI/2.0 -2.0 *PI*(t/T)));
VV= sin (PI/2.0 - (2.0 *PI* t/T));
QQ= sin (2.0*(PI/2.0 -2.0 *PI*(t/T)));
RR= sinh (K*D);
SS= cosh (2.0*K*D);
TT= sinh (2.0*(K*(ZZZ + D)));
UU= sinh (2.0*K*D);
PP= D+(H*OO/2.0)+(PI*H*H/(8.0*L))*(NN/pow (RR,3.0))*(2.0+SS)*WW;
if (y <= D)
F_PROFILE(f,thread,position)=H/2.0*(GRAV*T/L)*MM*VV/NN+0.75*PI*PI*H*H/(L*T)*TT*QQ/pow(RR,4.0);
else if (y <= PP)
F_PROFILE(f,thread,position)=H/2.0*(GRAV*T/L)*RR*VV/NN+0.75*PI*PI*H*H/(L*T)*UU*QQ/pow(RR,4.0);
else
F_PROFILE(f, thread, position) = 0;
}
end_f_loop(f, thread)
}
krishnaprasad is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble: Sandia UV UDF on FLUENT 12.0.16 RPJones Fluent UDF and Scheme Programming 31 May 25, 2011 11:15
Using Fluent with a UDF frm a remote m/c aarti FLUENT 2 September 11, 2008 19:53
Fluent 6.1/6.2 UDF compatability Allan Walsh FLUENT 1 April 29, 2005 11:49
UDF in parallel version of fluent yobee FLUENT 2 August 5, 2004 00:36
Fluent 5.2, UDF and Pressure BC's Alfonso Ferrandez FLUENT 0 May 4, 2000 07:02


All times are GMT -4. The time now is 04:36.