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

UDF VOF model on Fluent

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 14, 2009, 02:19
Default UDF VOF model on Fluent
  #1
New Member
 
baechtelguillaume
Join Date: Apr 2009
Posts: 13
Rep Power: 8
baechtel is on a distinguished road
Hi everybody,

I have just wrote a new UDF to have 2 different contact angles as I am working on blood droplet impact onto inclines. But I can't see if my udf is working, that's why, before continuing my work, I want to have your point of view.
Does my UDF look OK ?

Thanks you very much for answer. I would appreciate to talk to someone who has already work on drop impact models with Fluent.

Guillaume

/* UDF To add advancing receding angles*/

#include <udf.h>
DEFINE_PROFILE(contact_angle,thread, position)
{
real r[ND_ND]; /* this will hold the position vector */
real x;
face_t f ;
begin_f_loop(f,thread)
{
F_CENTROID(r,f,thread);
x = r[0];
if (y <= 17.03862) /* center of my droplet */
{
F_PROFILE(f, thread, position) = 44; /* advancing angle */
}
F_PROFILE(f, thread, position) = 34; /* receding angle */
}
end_f_loop(f,t)
}
baechtel is offline   Reply With Quote

Old   July 14, 2009, 19:05
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,646
Rep Power: 84
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Hi,

Your UDF seems to have several bugs.

1) You use "y <= 17.03862" but the variable y is not defined anywhere. This should give a compilation error about undeclared variables.
2) Your line "F_PROFILE(f, thread, position) = 34;" is done regardless of whether it is in the drop or not - so all faces will have this applied and nothing will get the 44 value set previously.

Glenn Horrocks
ghorrocks is offline   Reply With Quote

Old   July 14, 2009, 19:41
Default
  #3
New Member
 
baechtelguillaume
Join Date: Apr 2009
Posts: 13
Rep Power: 8
baechtel is on a distinguished road
Hi,

Thank you for answer, I had forgotten to change some parameters. Do you think it is alright now ?

Thaks a lot for answer,

/* UDF To add advancing and receding angles*/
#include <udf.h>
DEFINE_PROFILE(contact_angle,thread, position)
{
real r[ND_ND]; /* this will hold the position vector */
real y;
face_t f ;
begin_f_loop(f,thread)
{
F_CENTROID(r,f,thread);
y = r[0];
if (y <= 17.03862) /* center of my droplet */
{
F_PROFILE(f, thread, position) = 44; /* advancing angle */
}
else
F_PROFILE(f, thread, position) = 34; /* receding angle */
}
end_f_loop(f,t)
}
baechtel is offline   Reply With Quote

Old   July 14, 2009, 20:27
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,646
Rep Power: 84
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
You have fixed the obvious errors. The only thing now is to try it and test it works!

I recommend you test it using a wide range in contact angles (maybe 30 and 150) so it will be obvious that the contact angles you nominate are being correctly set.
ghorrocks is offline   Reply With Quote

Old   July 14, 2009, 21:02
Default
  #5
New Member
 
baechtelguillaume
Join Date: Apr 2009
Posts: 13
Rep Power: 8
baechtel is on a distinguished road
Ok, thank you for help Glenn. I'll do it as soon as possible.

Guillaume
baechtel is offline   Reply With Quote

Old   March 29, 2011, 17:59
Default udf working
  #6
Member
 
rose
Join Date: Dec 2010
Posts: 30
Rep Power: 6
rubis is on a distinguished road
where we can see udf working ????????

thank you
rubis is offline   Reply With Quote

Old   February 19, 2013, 01:56
Default
  #7
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 8
Josyula is on a distinguished road
Guillaume,
What is the radius of the droplet you have used?
Josyula 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 4 September 20, 2013 16:30
HELP! UDF sinusoidal wave, VOF model, porous face! A8anato_psofimi FLUENT 2 November 10, 2009 15:42
Film formation in VOF model using fluent Ajay FLUENT 0 September 6, 2007 05:57
about VOF model rey FLUENT 5 August 13, 2002 06:02


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