Howe to get swirl velocity component in 2D axisymtric swirl modeling
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 |
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); Dragos |
Axisymmetric swirl-----space distribution for UDF
Quote:
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? |
All times are GMT -4. The time now is 08:09. |