CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Dynamic Mesh UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 1, 2003, 10:09
Default Dynamic Mesh UDF
  #1
Jkl
Guest
 
Posts: n/a
I'm actually dealing with simple 2D test cases on Dynamic Meshes.

What I'm trying to do is to simulate a piston moving with constant velocity in a very long cylinder, by UDF, using Layering Dynamic Procedure on a Quad mesh.

I've written some VERY VERY simple UDF functions, like this:

#include "udf.h" DEFINE_CG_MOTION(Piston,dt,vel,omega,time,dtime) {

NV_S(vel,=,0.0);

NV_S(omega,=,0.0);

if(!Valid_Data_P())

return;

vel[0]=10; }

BUT It doesn't work.....

could anyone please provide me some samples of such an UDF???

Am I missing something else ???

I've read the documentation, is there something more I should read ???

Thanks a lot,

Jkl
  Reply With Quote

Old   April 1, 2003, 13:04
Default Re: Dynamic Mesh UDF
  #2
Alex Munoz
Guest
 
Posts: n/a
Hi

Careful with "return" before "vel[0]=10"; better write else {}

Regards

Alex Munoz
  Reply With Quote

Old   April 2, 2003, 02:22
Default Re: Dynamic Mesh UDF
  #3
Alexandre
Guest
 
Posts: n/a
Did you compile your UDF (DM only works with compiled UDFs).
  Reply With Quote

Old   April 3, 2003, 11:53
Default Re: Dynamic Mesh UDF
  #4
Jkl
Guest
 
Posts: n/a
Sorry for replying so late !!!

I compiled the UDF and hooked It to the right boundary, defined the deforming zones confining with the moving wall BUT when I want to view the mesh motion Preview nothing happens....

Any Samples would really be appreciated !

Thank you,

Jkl.
  Reply With Quote

Old   April 12, 2003, 15:50
Default Re: Dynamic Mesh UDF
  #5
caloggero
Guest
 
Posts: n/a
Hi JKL! I did the same with a moving airfoil, I realised that you need to set a very small time step otherwise, there are remeshing errors! thus you cannot see in real time the displacement of your piston! all what you can do is checking it at small intervals. I have questions about the UDF you wrote: NV_S(vel,=,0.0); NV_S(omega,=,0.0); if(!Valid_Data_P()) return; vel[0]=10; #1-this syntax (e.g. NV_S(vel,=,0.0))is it the C language one? or is it imposed by fluent? #2-here, you didn't declare as variable NV_S, does that mean that it is a variable recongnized by fluent? #3-when you write vel[0]=10, why this zero between [] ? vel is it an array of x, y & z component of the linear velocity? if you have any help about writing UDFs, please tellme where i can find it! ciao
  Reply With Quote

Old   April 15, 2003, 02:24
Default Re: Dynamic Mesh UDF
  #6
calogero
Guest
 
Posts: n/a
Hi JKL! another question please: what is the definition of the angle Z to define in the CG_MOTION dialog box ? thanx
  Reply With Quote

Old   April 29, 2003, 05:17
Default Re: Dynamic Mesh UDF
  #7
jkl
Guest
 
Posts: n/a
Dear caloger I'm sorry for replying so late but I've been away for few days.

Anyway: #1: That syntax is imposed by fluent

#2: NV_S(vel,=,0.0) is an instruction that states velocity vector is initialized to 0.0

#3: vel[0]=10 means the first component of velocity vector, namely the x-component, is 10 m/s.

You can find Help on UDF on the fluent user's area, downloading pdf fl61udf.pdf.

Best regards,

Jkl.

Buon Lavoro.
  Reply With Quote

Old   April 29, 2003, 09:05
Default Re: Dynamic Mesh UDF
  #8
calogero
Guest
 
Posts: n/a
thanx JKL ! since I've posted the last message, I've got fluent doc and I wrote the UDF. the movement is ok. but the pb, is that when I preview the dynamic mesh, it gives a very bad mesh deforming coz the mvt is large and the foil crosses its own wake several times. I wonder IF I'm setting bad remeshing method parameters ! (i posted message on that):coz I didn't find any case on that, and the fluent doc isn't sufficient. OR should I look for another method to model this movement coz it's too large ! (I posted another-recent- message on that) : what I'm trying to do for the moment with sliding mesh for the rotation + dynamic mesh for the foil oscillation. thanx for any help.
  Reply With Quote

Old   July 24, 2010, 06:46
Default need help
  #9
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 7
almostafa67 is on a distinguished road
hi,
I want to simulate motion of a rigid cylinder,to do this I should prepare a udf,when I load the udf file I face with this error
Error: open_udf_library: The system cannot find the file specified.
Can anybody help.
almostafa67 is offline   Reply With Quote

Old   September 6, 2011, 23:43
Default Visual studio
  #10
New Member
 
Haroon
Join Date: Aug 2011
Posts: 6
Rep Power: 6
imharoon1 is on a distinguished road
hi,
I want to simulate motion of a rigid cylinder,to do this I should prepare a udf,when I load the udf file I face with this error
Error: open_udf_library: The system cannot find the file specified.
Can anybody help.


Install the Microsoft visual studio 6.0.I think it will solve your problem
Regards
Haroon
imharoon1 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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Dynamic mesh UDF problem Peter FLUENT 2 November 12, 2007 03:10
writing a dynamic mesh udf ALPER ALBAYRAQ FLUENT 0 October 24, 2005 08:41
Problem related with UDF for dynamic mesh Ryan FLUENT 6 April 29, 2004 09:29
UDF problem for dynamic mesh??? lyf FLUENT 1 April 19, 2004 06:43


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