|
[Sponsors] |
February 8, 2011, 03:43 |
Moving Wall Boundary Condition
|
#1 |
New Member
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 17 |
dear friends
Is there any udf for moving wall with time dependent velocity on the web? i need it ASAP. thanks, |
|
February 8, 2011, 04:49 |
|
#2 |
Senior Member
|
Hi Morteza,
I previously wrote a UDF for rotating wall. theta as a function of time, for other types of wall motions you can change some lines of that : #include "udf.h" #include "stdio.h" #include "math.h" // rotation theta=f(t) DEFINE_GRID_MOTION(eye,domain,dt,time,dtime) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real dtheta,a,b; int n; SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v=F_NODE(f,tf,n); if (NODE_POS_NEED_UPDATE (v)) { NODE_POS_UPDATED(v); dtheta=......; // compute dtheta as a function of dtime (differentiation) a=cos(dtheta)*NODE_X(v)-sin(dtheta)*NODE_Y(v); // rotation tensor b=sin(dtheta)*NODE_X(v)+cos(dtheta)*NODE_Y(v); NODE_X(v)=a; NODE_Y(v)=b; } } } end_f_loop(f,tf); } |
|
February 8, 2011, 04:56 |
Thanks
|
#3 |
New Member
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 17 |
Dear Amir
thank u for your help.can you explain differences between moving wall and grid motion? |
|
February 11, 2011, 04:36 |
|
#4 |
Senior Member
|
Hi Morteza,
you can hang this UDF where ever you want, obviously your wall also has grid points and they can move. but notice that you can use remeshing and smoothing options in your case. |
|
February 12, 2011, 05:00 |
|
#5 |
New Member
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 17 |
thank u Amir,
Consider a tank that contains water about its half height. and the whole tank begins to move with time dependent velocity. in this case i should use moving mesh or moving wall? tanks in advance. |
|
February 12, 2011, 09:58 |
|
#6 |
Senior Member
|
Hi Morteza,
of course you should use moving mesh without deforming or smoothing or... . if velocity was constant, you could easily use moving reference frame but in your case the above UDF works. just hook it to all of your zones like wall,interior,... except fluid ones. |
|
February 15, 2011, 05:02 |
|
#7 |
New Member
Morteza
Join Date: Nov 2009
Posts: 9
Rep Power: 17 |
Hi Amir
Thanks for your help.i will check it and whether i have problem i will inform you. thanks again. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
UDS problem with wall boundary condition | Alex F. | FLUENT | 15 | September 21, 2015 10:28 |
thermal boundary condition at coupled wall | gokul patil | FLUENT | 2 | June 19, 2014 06:07 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |