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

Dynamic contact angle issue: fluent UDF couldn't set the correct contact angle

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2018, 00:57
Default Dynamic contact angle issue: fluent UDF couldn't set the correct contact angle
  #1
New Member
 
Join Date: Feb 2018
Posts: 6
Rep Power: 4
FelixJJ is on a distinguished road
Hi All,

I have been working on dynamic contact angle using fluent udf for 2 weeks and now, I still have some issues unresolved. Really hope someone could help me on this issue. Thanks in advance for your valuable time and help!
[My udf code is attached below]

I. Summary of the issue

The problem is that the contact angles from the results (I imported the .dat files to tecplot and visualized the phase fraction contour) are not the values the udf assigned.
For example:
1. At time t1, I give contact angle of 160, and at time t2, I give contact angle of 110. The results show that at t1, the contact angle is similar to 160, but at t2, it deviates too much from the prescribed value.
2. Moreover, the contact angle kind of oscillates as the time propagates.
--------------------------------------------------------------------------------------
II. Some efforts I have tried in debugging:

1. First, I thought it was the problem with my contact angle values. So, I update the dynamic contact angle boundary condition by my hand: I set a constant CA in the boundary condition panel in FLUENT, run it for 100 time steps, and then set a new CA in the panel and run it for another 100 time steps, and so on. Totally, I run 10000 time steps and this gave me correct dynamic contact angle behavior from the results. >>>So, the contact angle values should be physically reasonable.

2. I also write the contact angle values: 'dca' in the code and 'F_PROFILE(f,thread,position)' in the code to a separate txt files. This shows that the values at each face on the boundary, each iteration, each time step are the same as what I want. However, it just somehow couldn't give right angles from the calculation resultss.

3. I attached pictures containing the shape of the droplet at the wall for the first 5 camera times (I used high speed camera to measure the DCA) in the experiment (this corresponds to 100, 200, 300, 400, 500 time-steps, as the time step in the simulation is smaller than my camera recording time step), which should have contact angles of 154.79, 132.72, 117.04, 106.50 , 99.90 degress. However, from the pictures, we can see that the resulting contact angles are not the values the UDF assigned.


I have been really struggled with this problem for weeks. Really hope someone here could help me with this. Thanks again in advance!!!

--Felix



--------------------------------------------------------------------------------------
Fluent UDF for Dynamic Contact Angle
/*The dynamic contact angle is written as a function of the time*/
/*Simulation in run in SERIAL*/
--------------------------------------------------------------------------------------
#include "udf.h"

DEFINE_PROFILE(DCA_BC,thread,position)
{
face_t f;
/*real dca[ND_ND];//modification #1, original 30*/
/*int curr_ts;*/
real t,tt;
real dca;

FILE *file;

tt=CURRENT_TIME;
t=tt*1e3;

begin_f_loop(f,thread)
{
if PRINCIPAL_FACE_P(f,thread)
{
dca=-1.032244875620546e-04*pow(t,9)+0.005723424564095*pow(t,8)-0.133366560122603*pow(t,7)+1.700847927275960*pow(t ,6)-12.977642582601800*pow(t,5)+60.961695109221886*pow (t,4)-1.746424468335367e+02*pow(t,3)+2.865880427896289e+ 02*pow(t,2)-2.264048511404226e+02*t+1.606456866426765e+02;
F_PROFILE(f,thread,position) = dca;
}
}
end_f_loop(f,thread)

file = fopen("DCA_realtime.txt", "a+");
fprintf(file,"dynamic_contact_angle=%f for time = %f ms of the time-step=%d\n",dca,t,N_TIME);
fclose(file);
}
--------------------------------------------------------------------------------------
Attached Images
File Type: png realtime1.PNG (43.4 KB, 14 views)
File Type: png realtime2.PNG (45.7 KB, 11 views)
File Type: png realtime3.PNG (47.8 KB, 10 views)
File Type: png realtime4.PNG (50.2 KB, 10 views)
File Type: png realtime5.PNG (50.1 KB, 10 views)
FelixJJ is offline   Reply With Quote

Old   February 24, 2018, 00:06
Default
  #2
New Member
 
Join Date: Feb 2018
Posts: 6
Rep Power: 4
FelixJJ is on a distinguished road
Can anyone help me with this....
FelixJJ is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a smart interface matlab fluent chary FLUENT 22 July 30, 2020 09:14
dynamic contact angle / contact line velocity ThomasN CFX 6 September 23, 2014 07:07
Dynamic contact angle calculation in multiphaseInterFoam rajeshchem OpenFOAM 2 January 31, 2014 08:52
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 23:56
Theoretical background of formula for dynamic contact angle in interfoam sebastian_vogl OpenFOAM Running, Solving & CFD 3 June 22, 2009 13:25


All times are GMT -4. The time now is 12:55.