CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Howe to get swirl velocity component in 2D axisymtric swirl modeling

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2009, 13:32
Default Howe to get swirl velocity component in 2D axisymtric swirl modeling
  #1
New Member
 
Join Date: Dec 2009
Posts: 1
Rep Power: 0
Perra is on a distinguished road
I am reconstucting a old UDF that is used for a partial slip boundary condition from 3D to a 2D axisymetric swirl model. The UDF works fine with no modifications when hooking only the X and Y components but when adding the swirl component the solution diverges directly.

My thoughts are that when using ND_ SET for the nol vector I dont get the third component, same for the ND_DOT and NV_V_VS oprations. So when I call for vel_normal[2]; it should not exists I guess?

Am I corect in this? And also I wounder if the F_W(f,t) comand works in 2D axisymetric swirl flow to get the swirl component of the flow or if there is another way?

part of the UDF:
begin_f_loop(f, t) /* loops over faces in a face thread */
{
c0=F_C0(f,t);
tc0=THREAD_T0(t);
AN=pow((1.0+epN*pow(-epN,q))/2.0,1.0/(q+1.0));
AT=pow((1.0+pow(epT,q+1.0))/2.0,1.0/(q+1.0));
BN=pow((epN*(1.0+pow(-epN,q)))/(1.0+epN),1.0/(q+1.0));
BT=pow((epN+pow(epT,q+1.0))/(1.0+epN),1.0/(q+1.0));

F_CENTROID(center_face,f,t);
C_CENTROID(center_cell,c0,tc0);

NV_VV(distance,=,center_face,-,center_cell);
distance_cell = 2.0*NV_MAG(distance);
aN=AN-BN;
aT=AT-BT;
bN=AN*distance_cell;
bT=AT*distance_cell;
cN=0.0;
cT=0.0;
ND_SET(nol[0],nol[1],nol[2],0.0,0.0,0.0);
F_AREA(normal,f,t); /* obtaining normal direction of the wall */
U_vel=F_U(f,t); /* obtaining u direction of velocity on the wall */
V_vel=F_V(f,t); /* obtaining v direction of velocity on the wall */
W_vel=F_W(f,t); /* obtaining w direction of velocity on the wall */

mag_normal=ND_DOT(U_vel, V_vel, W_vel, normal[0], normal[1], normal[2]);
NV_V_VS(vel_normal, =, nol, +, normal, *, mag_normal);
velz_normal=vel_normal[2];
velz_tangen=W_vel - velz_normal;

mu=C_MU_L(c0,tc0);
vfrac=C_VOF(c0,tc0);
tao_z=vfrac*mu*(aN*velz_normal/bN + aT*velz_tangen/bT);

F_PROFILE(f, t, i) = tao_z;
}
end_f_loop(f, t)
}

Greatful for coments
Perra is offline   Reply With Quote

Old   December 12, 2009, 03:37
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hello Perra,
One necessary modification is for the area: in an axisymmetric computation, you should multiply the result with 2*PI. See chapter 3.2.1 in Fluent UDF Manual.
Code:
F_AREA(normal,f,t);
normal[0] *= 2*M_PI;
normal[1] *= 2*M_PI;
normal[2] *= 2*M_PI;
Another comment: are you imposing the same value on all 3 velocity components, or is just my impression?

Dragos
dmoroian is offline   Reply With Quote

Old   March 6, 2018, 03:14
Smile Axisymmetric swirl-----space distribution for UDF
  #3
New Member
 
DENG Weriping
Join Date: Jun 2015
Posts: 16
Rep Power: 10
wpdeng is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
Hello Perra,
One necessary modification is for the area: in an axisymmetric computation, you should multiply the result with 2*PI. See chapter 3.2.1 in Fluent UDF Manual.
Code:
F_AREA(normal,f,t);
normal[0] *= 2*M_PI;
normal[1] *= 2*M_PI;
normal[2] *= 2*M_PI;
Another comment: are you imposing the same value on all 3 velocity components, or is just my impression?

Dragos



Hi,

I simplified 3D geometry to 2D axisymmetry swirl. And I want to load a heat source about space distribution, but it's wrong when I use Cartesian coordinate system.

What should I do to deal with it?
wpdeng is offline   Reply With Quote

Reply

Tags
axisymmetric swirl, swirl component, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help- Modeling unsteady velocity Vidya Raja FLUENT 1 November 11, 2005 19:22
Modeling Unsteady velocity in Fluent Vidya Raja Main CFD Forum 0 November 11, 2005 17:11
Please Help- Modeling unsteady velocity Vidya Raja FLUENT 0 November 11, 2005 17:09
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


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