|
[Sponsors] |
December 5, 2017, 16:43 |
please help me to correct my udf
|
#1 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
hi
im trying to create a tornado ,so i write audf for simulating the tornado but i cant set the angle between two radial and tangential velocities in cylinderical domain which has the inlet in half of the body .in tornado i need swirling ratio .it's equation is s=tantetha/2a that 2a has a constant value but i dont have thetha , so by this udf that i have i should have s=.5 but i cant set thetha a canstant thetha to reach .5 in value beacase i dont have thetha can u correct my udf im really need it for my thesis /************************************************** ***********************/ /* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_radial_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); z = x[2]; F_PROFILE(f,thread,position)= 10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } /************************************************** ***********************/ /* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_tangential_velocity, thread, position) { real x[ND_ND],theta; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); z = x[2]; theta=atan(x[1]/x[0]); F_PROFILE(f,thread,position)= 2.*1.0176*(tan(theta)/2.05)*10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } |
|
December 6, 2017, 04:57 |
|
#2 | ||
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
Quote:
|
|||
December 6, 2017, 06:30 |
thank you pakk for your reply
|
#3 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
Boundary conditions for tornado simulator and bluff-body
At the inlet, the flow velocity has two components (radial and tangential) in order to produce the swirling flow field. The radial and tangential velocity components are given by equations (1) and (2), respectively. 1=V1*(z/z1)^1/7 2=Vt=2H0/R0*S*Vr i have the value of V1=10m/s ,Z1=106m,2H0/R0=2*1.0176,s=tantheta/2.05 that S should have value equal to 0.5 thetha is un known i set it constant like 45 degree once another time in radian but nothing happen
|
|
December 6, 2017, 06:40 |
im really appreciated pakk for your answer it,s the domain
|
#4 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
|
|
December 6, 2017, 06:42 |
|
#5 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
thank you so much i give you some information may be it help you to understand my problem pleasr read my replies
|
|
December 6, 2017, 06:44 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Copied from your code:
Code:
theta=atan(x[1]/x[0]); F_PROFILE(f,thread,position)= 2.*1.0176*(tan(theta)/2.05)*10.*pow((z/106.),1./7.); Code:
theta=atan(x[1]/x[0]); a=1.025; S=tan(theta)/(2*a); F_PROFILE(f,thread,position)= 2.*1.0176*S*10.*pow((z/106.),1./7.); And now you want to use a different definition for S, namely S=0.5. Code:
theta=atan(x[1]/x[0]); a=1.025; S=0.5; F_PROFILE(f,thread,position)= 2.*1.0176*S*10.*pow((z/106.),1./7.); Code:
F_PROFILE(f,thread,position)= 2.*1.0176*0.5*10.*pow((z/106.),1./7.); |
|
December 6, 2017, 07:10 |
|
#7 | |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
Quote:
|
||
December 6, 2017, 07:17 |
is this okay due to your correction?
|
#8 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
/************************************************** ***********************/
/* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_radial_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); z = x[2]; F_PROFILE(f,thread,position)= 10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } /************************************************** ***********************/ /* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_tangential_velocity, thread, position) { real x[ND_ND],theta; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); z = x[2]; theta=atan(x[1]/x[0]); a=1.025; S=0.5; S=tan(theta/2*a); F_PROFILE(f,thread,position)= 2.*1.0176*S*10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } |
|
December 6, 2017, 07:23 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
December 6, 2017, 07:26 |
|
#10 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
|
||
December 6, 2017, 07:28 |
thank you so much
|
#11 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
||
December 6, 2017, 15:23 |
hi i know that is untolerable but i need your help
|
#12 | |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
Quote:
i dont know how to apply both s=0.5 and s= tan(theta)/2a at the same time itry alot but i'm really weak in programming and udf |
||
December 11, 2017, 04:22 |
|
#13 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 11:29 |
how to correct the error of (c) file after the compile of udf? | mokrane | FLUENT | 0 | April 23, 2015 14:40 |
how can I correct the udf? | happyrabbit | FLUENT | 9 | January 28, 2011 10:50 |
DEFINE_GEOM UDF Problems | Pat | FLUENT | 0 | August 14, 2003 14:16 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |