|
[Sponsors] |
March 17, 2016, 10:51 |
udf for sinusoidally oscillating wall
|
#1 |
New Member
L Prawin Lukanus Santhanaraj
Join Date: Mar 2016
Posts: 5
Rep Power: 10 |
can anyone please help me to create an udf for sinusoidally oscillating wall in y direction with velocity of 0.01m/s in 2d
|
|
March 17, 2016, 11:28 |
|
#2 | |
Member
amirhossein
Join Date: Jul 2014
Location: Canada
Posts: 81
Rep Power: 12 |
Quote:
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. |
||
March 18, 2016, 00:58 |
2d
|
#3 |
New Member
L Prawin Lukanus Santhanaraj
Join Date: Mar 2016
Posts: 5
Rep Power: 10 |
amirhossein can i use this for 2d case also
|
|
March 18, 2016, 02:51 |
|
#4 |
Member
amirhossein
Join Date: Jul 2014
Location: Canada
Posts: 81
Rep Power: 12 |
||
March 18, 2016, 08:06 |
|
#5 |
New Member
L Prawin Lukanus Santhanaraj
Join Date: Mar 2016
Posts: 5
Rep Power: 10 |
how can i compile this in microsoft visual studio code
|
|
March 18, 2016, 08:25 |
|
#6 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
you can easily find the answer for your question by searching in the forum....
http://www.cfd-online.com/Forums/flu...e-problem.html |
|
March 18, 2016, 12:05 |
|
#7 |
Member
amirhossein
Join Date: Jul 2014
Location: Canada
Posts: 81
Rep Power: 12 |
||
Tags |
moving boundaries, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use a UDF to set the volume fraction in the cells next to a wall? | DF15 | Fluent UDF and Scheme Programming | 33 | August 20, 2020 14:36 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
Accessing wall shear stress using UDF | Robert | Fluent UDF and Scheme Programming | 2 | July 31, 2013 09:34 |
udf variable for wall temperature | Kiran | FLUENT | 0 | July 31, 2008 09:31 |