-
-
March 15, 2019 at 9:24 am
ahmetgultekin
SubscriberHi,
I have been working to set dynamic contact angle at a boundary condition using UDF for a droplet impingement problem. It is a 2D axi-symmetric and Volume of Fluid model with air and water.
In my case, the dynamic contact angle will change like the below;
θ_d (t)=θ_e+(θ_a-θ_r)*tanh((U_c (t)/U_t )
U_c(t) is the component of the interface velocity parallel to the substrate at the contact point. The other parameters are constant. I couldn’t figure out to get the dynamic contact velocity.
I hope someone could help me on this issue. Thanks for your valuable time and help. The UDF code is as follows;
Â
Â
-
March 15, 2019 at 9:35 am
Rob
Forum ModeratorThe contact velocity will be the particle velocity? Or do you mean when the particle hits the free surface? Have you gone through the accretion UDF example in the manual?
-
March 15, 2019 at 9:49 am
ahmetgultekin
SubscriberAfter hitting surface droplet is spreading, and the contact velocity is the interface velocity parallel to the surface. I'm using VOF method for single droplet
-
March 15, 2019 at 10:02 am
DrAmine
Ansys EmployeeYou want to provide advancing and receding angle for your interface: correct? Then you need to use DEFINE_PROFILE to change the contact angle. Offcourse you can calculate everything in a ADJUST assign the results in UDMI then use that UDMI value in the profile.
Â
-
March 15, 2019 at 10:13 am
ahmetgultekin
SubscriberYes I want to change the contact angle with constant advancing, receding angle and time-dependent interface velocity. My main problem, I couldn't get the interface velocity Â
Â
#include "udf.h"
int T_e = 90;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //Equilibrium contact angle
int T_a = 60;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //Advancing contact angle
int T_r = 110;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //Receding contact angle
double U_t = 0.6;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â //Characteristic velocity
double contact_velocity=0.0;Â Â Â Â Â Â Â Â Â Â Â Â Â //Contact velocity
double dynamic_contact_angle=90.0;Â Â Â //Dynamic contact angle
double contact_line_position=0.0;
double time=0.0;
FILE *file;
double sum=0.0 ;
Â
DEFINE_ADJUST(Contact_Angle_Update, domain)
{
           Thread *thread = Lookup_Thread(domain, 5);
           Thread **pt = THREAD_SUB_THREADS(thread);Â
           cell_t cell;
           face_t f;
           real x[ND_ND]; Â
           double max_y=0, volume;
           int n;
           sum=0.0;
           begin_c_loop_all (cell,pt[1])
           {
                       if(C_VOF(cell,pt[1])!=0)
                       {
                                  C_CENTROID(x,cell,pt[1]);
                                  printf("## x=%f y=%f z=%f vof=%fn",x[0],x[1],x[2],C_VOF(cell,pt[1]));
                                  if(x[1]>max_y)
                                  max_y=x[1];
                       }
                       sum+=C_VOF(cell,pt[1]);
           }
           end_c_loop_all (cell,pt[1])
Â
contact_velocity= (max_y-contact_line_position)/(RP_Get_Real("physical-time-step"));
contact_line_position = max_y;
time+= RP_Get_Real("physical-time-step");
printf("max_y=%f contact_velocity=%f time=%f dynamic_contact_angle=%f sum=%fn  contact_line_position=%f",max_y,contact_velocity,time,dynamic_contact_angle,sum,contact_line_position);
dynamic_contact_angle=T_e+(T_a-T_r)*tanh(contact_velocity/U_t);
}
DEFINE_PROFILE(Contact_Angle_Set_Profile,t,i)
{
           face_t f;
           begin_f_loop(f,t)
           {
                       F_PROFILE(f,t,i) = dynamic_contact_angle;
   }
           end_f_loop(f,t)
}
-
March 15, 2019 at 11:38 am
Rob
Forum ModeratorAh, so you need the velocity at which the droplet strikes the free surface. Given the VOF formulation tells us where the interface is and not it's angle (or exact position) I think you can use the droplet velocity & cell (fluid) velocity where the volume fraction is 0.5Â However, unless you have a lot of droplets tracking the film will be difficult: working it out will also be beyond the level at which ANSYS staff can help on a public forum!Â
-
March 16, 2019 at 7:29 am
ahmetgultekin
SubscriberThanks rwoolhou for your comment
I am going to explain my problem more clearly.I have a single droplet and I have an expression for dynamic contact angle which is a function of contact line velocity. Also, I attached a basic geometry to show the contact line.
Can anyone help me to uderstand that how the velocity of contact point (at three phase contact line) can be evaluated and used as a variable in Ansys ? By the way, the contact point moves when there will be change in the contact angle.
-
March 16, 2019 at 9:08 am
DrAmine
Ansys EmployeeYou might have a look into: VOF simulations of the contact angle dynamics during the drop spreading: standard models and a new wetting force model
-
- The topic ‘UDF for dynamic contact velocity’ is closed to new replies.
-
3597
-
1243
-
1092
-
1068
-
953
© 2025 Copyright ANSYS, Inc. All rights reserved.