CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF in 3D domain (https://www.cfd-online.com/Forums/fluent/73656-udf-3d-domain.html)

aviitkgp1 March 13, 2010 13:53

UDF in 3D domain
 
hello everyone!

Can anyone please give me some tutorials (or their link) related to 3D UDFs. All the examples given in fluent tutorials are in 2D.

Thanks in advance!

Regards

Ankit Verma
aviitkgp1@gmail.com

sega March 14, 2010 10:08

Whats the problem with 3D?!

aviitkgp1 March 14, 2010 11:30

I have read many examples of 2D UDFs, but there's no example of 3D UDF given in fluent tutorial.

I wrote a 2D UDF to vary contact angle along x axis at the bottom surface. I am not sure whehter it would work for 3D as well.

The UDF is :

#include "udf.h"

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=y[1];
F_PROFILE(f,t,i)=90-(1700*x);
}
end_f_loop(f,t)

}


x varies from 0 to 0.05
y varies from 0 to 0.01
z varies from 0 to 0.02

The contact angle is defined at y=0 and does not change with z direction.


--Ankit Verma


All times are GMT -4. The time now is 07:56.