CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF for varying contact angle (wettability gradient)) (http://www.cfd-online.com/Forums/fluent/72795-udf-varying-contact-angle-wettability-gradient.html)

aviitkgp1 February 18, 2010 05:28

UDF for varying contact angle (wettability gradient))
 
Hi all Fluent users!

I am working on 'CFD simulation (3D)of a droplet moving under a wettability gradient'.
I want to introduce a wettability gradient by varying the contact angle. Could anyone help me with writing a UDF for introducing a contact angle variation along X axis in a 3D domain ? My domain is a 3D cuboid.


Ankit Verma

aviitkgp1 March 10, 2010 15:37

#include "udf.h"
I wrote this UDF for a 2D domain.


DEFINE_PROFILE(contact_angle,t,i)
{
real y[ND_ND];
real x;
face_t f;

begin_f_loop(f,t)
{
F_Centroid(y,f,t)
x=[1];
F_PROFILE(f,t,i)=30-(300*x);
}
end_f_loop(f,t)

}



Can anyone please help me in converting it to a 3D domain?
Thanks in advance!


All times are GMT -4. The time now is 18:35.