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

UDF moving wall

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   November 1, 2012, 17:27
Default
  #21
Member
 
Vidit Sharma
Join Date: Aug 2012
Location: Delhi, India
Posts: 32
Rep Power: 4
Vidit Sharma is on a distinguished road
Quote:
Originally Posted by Vidit Sharma View Post
Dear Sir,

Thank you for the reply. I was not able to compile it in fluent as for that fluent is asking two files one is .c the code and the other one is .h header file. Can u plz explain how to do that in fluent I have wasted a lot of time with Visual Stdio may be that was not the right way. So, plz tell me.

Regards.
Dear Sir,

I tried to compile the UDF in fluent but it is showing some error as given below that i am not able to solve.

"Deleted old libudf\ntx86\2ddp\libudf.dll
The system cannot find the file specified.
The system cannot find the file specified.
(system "copy C:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2ddp\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "ntx86\2ddp")()
'nmake' is not recognized as an internal or external command,
operable program or batch file.
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Done."

Is anything i can do to eliminate this??

regards.
Vidit Sharma is offline   Reply With Quote

Old   November 1, 2012, 18:40
Default
  #22
New Member
 
Join Date: Sep 2011
Posts: 27
Rep Power: 5
Komon is on a distinguished road
Hi!

Well, .c is the file type in which UDFs have to be saved. For the .h header file I assume that it is asking you for the #include "udf.h" command. and for dynamic meshes you have to add #include "dynamesh_tools.h" as well.

I don't know if this helps you at all as these are basic things reagrding UDFs...as for regarding ''nmake'' problem which I've not yet come across I found this thread:
About UDF compiling issues: 'nmake'

hope it helps.
Komon is offline   Reply With Quote

Old   November 2, 2012, 07:57
Default
  #23
Member
 
Vidit Sharma
Join Date: Aug 2012
Location: Delhi, India
Posts: 32
Rep Power: 4
Vidit Sharma is on a distinguished road
Quote:
Originally Posted by Komon View Post
Hi!

Well, .c is the file type in which UDFs have to be saved. For the .h header file I assume that it is asking you for the #include "udf.h" command. and for dynamic meshes you have to add #include "dynamesh_tools.h" as well.

I don't know if this helps you at all as these are basic things reagrding UDFs...as for regarding ''nmake'' problem which I've not yet come across I found this thread:
About UDF compiling issues: 'nmake'

hope it helps.
Dear Sir,

I have tried so many ways to compile the UDF on windows 64 bits, then I did not get anywhere. I still have this error, What should I do, Please let me know the details.

Deleted old libudf\win64\2d\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v130\fluent"\fluent13.0. 0\sr c\makefile_nt.udf "libudf\win64\2d\makefile" ")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\2d")()
# Generating ud_io1.h
time_step.c
# Generating udf_names.c because of makefile time_step.obj
udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj time_step.obj
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

Done.
Vidit Sharma is offline   Reply With Quote

Old   November 2, 2012, 23:27
Default
  #24
New Member
 
Join Date: Sep 2011
Posts: 27
Rep Power: 5
Komon is on a distinguished road
Hi!

Well at this point there is not much I could suggest. I have to admit, my experience in writing UDFs is not very vast. But from kernel32.lib trouble I would assume there is something wrong with the way you compile. Therefore I would suggest a manual I used to get Fluent on 64bit win7 accept compiled UDFs. check if what you do is ok regarding this (as there might be some problems if you don't set the compiler correctly-32 instead 64 bit):
http://www.cfd-online.com/Wiki/Fluen...ows_7_64bit.3F
Komon is offline   Reply With Quote

Old   October 21, 2013, 03:14
Default
  #25
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 3
KITetima is on a distinguished road
hello,


I know that this post is quite old, however I have the same problem with the cylinder error. Did you solve your problem ?

thanks
KITetima is offline   Reply With Quote

Old   October 21, 2013, 03:37
Default
  #26
New Member
 
Join Date: Sep 2011
Posts: 27
Rep Power: 5
Komon is on a distinguished road
could you describe at first the geometry(axisymmetric, 3d, ...)-there was a suggestion here that define_cg_motion might not be an appropriate udf for such simulations. for me it was, but maybe for someone else's geometry it is not. I assume that in such way, a better response can be found faster.
Komon is offline   Reply With Quote

Old   October 22, 2013, 05:11
Default
  #27
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 3
tranvantrung551987 is on a distinguished road
hi
how to fluent message error ?
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 05:17
Default
  #28
New Member
 
Join Date: Sep 2011
Posts: 27
Rep Power: 5
Komon is on a distinguished road
sorry, but I do not understand your question-can you re-post it as I think you left something out of it.
Komon is offline   Reply With Quote

Old   May 9, 2014, 09:14
Exclamation
  #29
New Member
 
Khalid Ansari
Join Date: Apr 2014
Posts: 8
Rep Power: 3
khalidansari4u is on a distinguished road
hi guys

will some1 please help me. i m also working on flow past a cylinder and my cylinder wall is rotationally oscillating. i want to write a program for that but i dont know how to write it so some1 pls help!!!!!!!!!
khalidansari4u is offline   Reply With Quote

Old   April 9, 2015, 01:01
Default
  #30
Member
 
sanjeet Limbu
Join Date: Mar 2015
Posts: 91
Rep Power: 2
sanjeetlimbu is on a distinguished road
Dear frds

I am trying the rigid body motion in CFD fluent but UDF is showing error in preview. Warning unable to read the motion history


i got the following lines for UDF velocity :

#include "udf.h"
#include "dynamesh_tools.h"

DEFINE_CG_MOTION(oscillate, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f; /* define the variables */

t = DT_THREAD(dt); /* get the thread pointer for which the motion is defined */

/* if (!Data_Valid_P())
/* return; /* check if the values of the variables are accessible before you compute the function */

begin_f_loop(f, t) /* loop over each face in the zone to create an array of data */
{
if (time <= 0.012)
vel[0] = (643* time); /* define the velocity of the moving zone---*/
else if (0.012 < time < 0.019)
vel[0] = vel[0] + (0.057 * time);
else if (0.019 < time < 0.027)
vel[0] = 14;
else if (0.027 < time < 0.03)
vel[0] = vel[0] - (0.162*time);
else if (0.03 < time)
vel[0] = 0;
}
end_f_loop(f, t)
}


I tried using the profile but the displacement is not meeting the 254mm as i mentioned in profile...

Please help to get this error
Attached Images
File Type: jpg velocity and distance vs time(milisec).jpg (19.6 KB, 1 views)
File Type: jpg Referance mesh needed.jpg (35.9 KB, 2 views)
sanjeetlimbu is offline   Reply With Quote

Old   April 9, 2015, 12:05
Default
  #31
Member
 
sanjeet Limbu
Join Date: Mar 2015
Posts: 91
Rep Power: 2
sanjeetlimbu is on a distinguished road
I am trying to move using the folowing UDF
getting the warning that its unable to read the file

#include "udf.h"
DEFINE_CG_MOTION(oscillate, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f; /* define the variables */

t = DT_THREAD(dt); /* get the thread pointer for which the motion is defined */

/* if (!Data_Valid_P())
/* return; /* check if the values of the variables are accessible before you compute the function */

begin_f_loop(f, t) /* loop over each face in the zone to create an array of data */
{
if (time <= 0.02)
vel[0] = (673* time); /* define the velocity of the moving zone---*/
else if (0.02 < time < 0.027)
vel[0] = 14;
else if (0.027 < time < 0.03)
vel[0] = 3 - 2800*(time-0.03);
else if (0.03 < time)
vel[0] = 0;
}
end_f_loop(f, t)
}
Attached Images
File Type: jpg velocity and distance vs time(milisec).jpg (19.6 KB, 1 views)
File Type: jpg Referance mesh needed.jpg (35.9 KB, 0 views)
sanjeetlimbu 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
How to use UDF to define a moving wall lingo FLUENT 9 August 19, 2014 09:14
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20
stationary wall vs. moving wall user0314 FLUENT 0 August 26, 2011 09:42
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 08:31
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 16:15.