CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Making wave udf in fluent (http://www.cfd-online.com/Forums/fluent-udf/124500-making-wave-udf-fluent.html)

sunggun1212 October 6, 2013 21:29

Making wave udf in fluent
 
hello, everyone.
I have being tried to generate the wave in fluent using udf.
Also, I used the open channel fluent suggesting for generating wave.

It is not working to generate wave using both of them.
Actually, I don't know how I can set the inlet, outlet boundary.

Simplely, I made 2D boundary and set the boundary.

Inlet boundary is velociy inlet, x,y component -> udf
outlet boundary is pressure outlet
upper and bottom boundary is wall, no slip

is it correct?

If not, anyone would inform me to go ahead, how can the boundary setting is correct and tell me a tip, please.


x component udf,

#include <udf.h>
#include <metric.h>
DEFINE_PROFILE(udf_inlet_u,thread,position)
{
face_t f;
real yy,k,height,depth,omega,time,z[ND_ND];
h=2.6;
k=0.10507;
dep=10.6;
omega=0.787367;

begin_f_loop(f,thread)
{
time=RP_Get_Real("flow-time");
yy=z[1];
F_CENTROID(z,f,thread);
F_PROFILE(f,thread,position)=(h/2.*omega*(cosh(k*(dep+yy))/sinh(k*dep))*sin(omega*time));


end_f_loop(f,thread)
}

y component udf,

#include <udf.h>
#include <metric.h>
DEFINE_PROFILE(udf_inlet_u,thread,position)
{
face_t f;
real yy,k,height,depth,omega,time,z[ND_ND];
h=2.6;
k=0.10507;
dep=10.6;
omega=0.787367;

begin_f_loop(f,thread)
{
time=RP_Get_Real("flow-time");
yy=z[1];
F_CENTROID(z,f,thread);
F_PROFILE(f,thread,position) = -h/2.*omega*(sinh(k*(dep+yy))/sinh(k*dep))*sin(omega*time);
end_f_loop(f,thread)
}

dnlrichy January 20, 2014 00:09

hi,
im dealing with the same project . can u let me know if the udf you provided here worked . if not can u mail me the udf to dnlrichy@gmail.com , it would be very helpful for me.
thanks

vasava January 21, 2014 04:54

Have you guys tried 'Open channel wave BC' in VOF? For using this condition you simply have to activate 'Open Channel Flow' and 'Open Channel Wave BC'. These options are available when you select 'Volume of Fluid' in 'Multiphase Model'. There is no need of UDF for generating waves.

Please look in to the tutorial titled 'Heave and Pitch Simulation of Ship hull moving
through head sea waves' for more help.

vasava January 21, 2014 04:56

I am not sure about these options in older versions of Fluent. These options are available in Fluent 13 and 14.

sanikamsah May 7, 2014 01:00

Dear Vasava,

I'm facing this problem to. Can u send me the file of mesh 'Heave and Pitch Simulation of Ship hull moving through head sea waves' at my email: sani_pirates@yahoo.com

i'm appreciate your help. Thank you.

vasava May 7, 2014 07:45

The tutorial case is 850 MB zip file. I will see what I can do.

Nidhin R December 31, 2014 08:48

my project involve generation of wave in a tank. I am using fluent latest version which does have "Open Channel and Open Channel wave BC" as a part of "Volume of fluid model" However I am not sure about the case setup and is getting errors in the simulation. Can someone who has experience tell me how to go about. I also request people with the "Heave and Pitch Simulation of Ship hull moving through head sea waves" tutorial files to share it with me.
If some one have UDF for moving boundary wave generator do share that too.

email: nidhirajan91@gmail.com


All times are GMT -4. The time now is 02:41.