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 for sinusoidally oscillating wall (https://www.cfd-online.com/Forums/fluent-udf/168211-udf-sinusoidally-oscillating-wall.html)

prawin March 17, 2016 09:51

udf for sinusoidally oscillating wall
 
can anyone please help me to create an udf for sinusoidally oscillating wall in y direction with velocity of 0.01m/s in 2d

AHF March 17, 2016 10:28

Quote:

Originally Posted by prawin (Post 590298)
can anyone please help me to create an udf for sinusoidally oscillating wall in y direction with velocity of 0.01m/s in 2d

i used this udf for cylinder vibration
i wish it helps you

#include"udf.h"
/* this function defines velocity of center of gravity for pure plunging motion*/
/* Plunging motion equation is z(t)=h*sin(2*pi*f*t) */
DEFINE_CG_MOTION(plung,dt,vel,omega,time,dtime)
{
Thread*t;
face_t*f;
/*reset velocities */
NV_S(vel,=,0.0);
NV_S(omega,=,0.0);
if(!Data_Valid_P())
return;
/* Get the thread pointer for which this motion is defined */
t=DT_THREAD(dt);
/* vel[1] is the vertical plunging velocity */
vel[1] = 10*cos(10*time);
}


i should note that this udf need microsoft visual stuido to compile.

prawin March 17, 2016 23:58

2d
 
amirhossein can i use this for 2d case also

AHF March 18, 2016 01:51

Quote:

Originally Posted by prawin (Post 590360)
amirhossein can i use this for 2d case also

yop
i used it for 2D case.

prawin March 18, 2016 07:06

how can i compile this in microsoft visual studio code

Bruno Machado March 18, 2016 07:25

Quote:

Originally Posted by prawin (Post 590415)
how can i compile this in microsoft visual studio code

you can easily find the answer for your question by searching in the forum....


http://www.cfd-online.com/Forums/flu...e-problem.html

AHF March 18, 2016 11:05

Quote:

Originally Posted by prawin (Post 590415)
how can i compile this in microsoft visual studio code

here is tutorial

https://www.simutechgroup.com/CFD/co...5-or-15-0.html


All times are GMT -4. The time now is 14:22.