CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Udf - Periodic Boundaries (https://www.cfd-online.com/Forums/fluent-udf/91759-udf-periodic-boundaries.html)

Erny August 22, 2011 05:44

Udf - Periodic Boundaries
 
I have searched the forums for a few weeks now but cannot find any relevant information on this so I finally signed up to ask.

I am creating a UDF to form a periodic boundary condition for inlet/outlet boundaries of different lengths. The basic UDF file I have written is below;-

#include "udf.h"

DEFINE_PROFILE(x_velocity_inlet, thread, index)
{
real x[ND_ND];
face_t f;
real Uvel[ND_ND];
real Vvel[ND_ND];
Domain *domain;
Thread *tf;

int Zone_ID=3;
domain=Get_Domain(1);
tf= Lookup_Thread(domain, Zone_ID);

begin_f_loop(f, tf)
{
Uvel[1]=F_U(f, tf);
Vvel[1]=F_V(f, tf);
}
end_f_loop(f, tf)

begin_f_loop(f, thread)
{
F_PROFILE(f, thread, index) = (Uvel[1]);
}
end_f_loop(f,thread)
}


This seems to work for just the x-velocity components. I have tried linking the Y-velocity as;-

F_PROFILE(f, thread, index) = (Uvel[1], Vvel[1]);

However the results are the same.

Eventually this will be done in 3D for a multiphase flow. If there are any useful posts/websites/guides out there then please feel free to just point me in the right direction. I would be happy to answer any questions and GREATLY appreciative of any help you could give me.

Thanks,
Ern

Erny August 22, 2011 09:34

It should be noted that the outlet boundary has a zone id of 3.

The UDF interprets however it is clear that there is no velocities passed to the inlet as there is no mass flow in or out of the VOF. As though the inlet and outlet are just walls.

Could someone confirm if I am referencing the F_U (X-velocity) and F_V(y-velocity) correctly?

Alex Zak July 7, 2013 14:22

Hi!

I think in this case need a two UDF both U and V velocity components.

Alex.


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