CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

i want your help please

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 23, 2007, 11:36
Default i want your help please
  #1
sihat
Guest
 
Posts: n/a
would you please send me a source.c code of UDF for 3D velocity inlet to cylinderical geometry really iam spent long time but i failed to write correct one thanks alot in avance sihat e mail sihatt2002@yahoo.com
  Reply With Quote

Old   March 24, 2007, 13:16
Default Re: i want your help please
  #2
Rizwan
Guest
 
Posts: n/a
wat is ur flow direction and inlet condition? normal to surface or only z velocity or what? and what type of boundary profile you expect at inlet?

Regrads Rizwan
  Reply With Quote

Old   March 24, 2007, 19:05
Default Re: i want your help please
  #3
sihat
Guest
 
Posts: n/a
thanks alot for your reply Mr. Rodwam, the flow direction is in the x-direction and the inlet is parabolic inlet velocity and here i have to use parabolic velocity equation to write the code and i try this alot but i fail to write correct code ,in fluent there is an example for parabolic inlet velocity for 2D flow but for me iwant this for 3D so i need your help thanks again sihat
  Reply With Quote

Old   March 24, 2007, 21:17
Default Re: i want your help please
  #4
Rizwan
Guest
 
Posts: n/a
send me the code u have wrote. il complete it. Regards Rizwan
  Reply With Quote

Old   March 25, 2007, 21:39
Default Re: i want your help please
  #5
sihat
Guest
 
Posts: n/a
Home News Index Post News Subscribe/Unsubscribe Forums Main Forum CFX Forum Fluent Forum Numeca Forum Phoenics Forum STAR-CD Forum CFD-Wiki Forum Wiki Introduction Recent Changes Reference Section Fluid Dynamics Turbulence Modeling Numerical Methods Meshing Special Topics Aero-Acoustics Combustion Parallel Computing Turbulence Application Areas Aerospace Automotive Turbomachinery Best Practise Guides Automotive CFD Turbomachiney CFD Heat Transfer CFD Validation Cases Codes Source Code Archive FAQ's Ansys CD-adapco Fluent Numeca History of CFD About CFD-Wiki Help FAQ Getting Started Community Portal Donate Texts Donated Texts Links Introduction Homepages People Organizations Companies Universities Other Organizations CFD Gurus Modeling & Numerics Turbulence Discretization Schemes Solvers Multigrid Methods Finite Element Methods Cartesian Grid Methods Numerial Analysis Mesh Generation General Resources Selected Projects Companies Adaptivity Programming & Comp. Data Formats Software Libraries Parallel Computing Software Fluid Dynamics Numerical Software Visualization Mesh Generation Commercial CFD Codes Hardware Benchmarks News and Reviews Hardware Vendors Clusters Misc References Validation Cases Airfoils Material Properties Misc Finding Documents Preprints Online Papers & Reports Books Journals Publishers Online Tools Unit Converters Calculators y+ Estimation Compressible Flow Simple Cases Heat Transfer Cycles & Processes Online Books & Guides CFD Introductions Books Best Practice Guidelines Fluid & Aero Dynamics Encyclopedias Online Communities Online Forums Usenet Newsgroups Mailing Lists Chats Education CFD Programmes Online Labs Online Courses Course Material Employment CFD Job Resources Specific Organizations General Resources Events Event Calendars Specific Organizations Misc Pictures and Movies Online CFD Services Fun Links to Links Suggest New Link About this Section Jobs Post Job Ad List All Jobs List Jobs by Type Position in Industry (102) Position in Academia (19) Contract Work (14) PostDoc Position (41) PhD Studentship (49) Diploma Work (2) Misc (1) List Jobs by Location Asia China (4) Hong Kong (3) India (10) Singapore (5) South Korea (3) Taiwan (1) Europe Austria (2) Belgium (20) Denmark (1) Estonia (1) France (8) Germany (23) Ireland (2) Italy (3) Netherlands (2) Norway (2) Spain (1) Sweden (4) Switzerland (4) United Kingdom (35) North America Canada (7) United States (85) Oceania Australia (1) South America Brazil (1) Search Job Ads Books Browse Categories Search Submit a Book Help Events Post New Event List All Events List Events by Type Conferences (23) Workshops (4) Courses (1) List Events by Location Asia India (2) Turkey (1) Europe Belgium (10) Croatia (1) Germany (3) Greece (1) United Kingdom (2) North America Canada (1) United States (5) About About CFD Online Contacts & Feedback Web Server Statistics Advertising on this Site List of Sponsors Search

Home > Forums > Fluent User Forum Archive, Current Year > Message Display Fluent User Forum Archive, Current Year - Message Display

this is my code which is not give me the correct answer that iam using initial parabolic velocity inlet for 3D cylinderical geometry thanks in advance Mr. Rizwan

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity,thread,position) {

real x[ND_ND];

real y,z;

face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);

y=x[0];

z=x[2];

F_PROFILE(f,thread,position)=0.55-.0.55*pow(z+Y,20)/pow(0.05,20)*0.55;

}

end_f_loop(f,thread);

}

  Reply With Quote

Old   March 25, 2007, 22:43
Default Re: i want your help please
  #6
Rizwan
Guest
 
Posts: n/a
what is the size of ur pipe, diameter and max velocity?
  Reply With Quote

Old   March 26, 2007, 04:13
Default Re: i want your help please
  #7
sihat
Guest
 
Posts: n/a
0.55-.0.55*pow(z+Y,20)/pow(0.05,20)*0.55;

0.55 = max inlet velocity the flow is in the x-direction y-direction =the radial direction z-direction =the angular direction

annd this is the profile witen in the fluent manual 0.55-.0.55*pow(z+Y,20)/pow(0.05,20)*0.55;

so please help to write correct inlet parabolic velocity for 3D cylinderical geometry sihat

  Reply With Quote

Old   March 26, 2007, 07:52
Default Re: i want your help please
  #8
Bogdan
Guest
 
Posts: n/a
Have a look at this function. You should define in your header (or at the beginning of your file) FLOW_DIRECTION (1 for x direction, 2 for y direction and 3 for z direction) U0 (maximum velocity) and RP(pipe radius).

DEFINE_PROFILE(velocity_profile,thread,index) { #if !RP_HOST #if FLOW_DIRECTION==1

real x[ND_ND]; /* this will hold the position vector */

real y,z;

face_t f;

/* loops over all faces in the thread */

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);

y = x[1];

z = x[2];

F_PROFILE(f,thread,index) = U0*(1.0-(y*y+z*z)/(RP*RP));

}

end_f_loop(f,thread) #elif FLOW_DIRECTION==2

real y[ND_ND]; /* this will hold the position vector */

real x,z;

face_t f;

/* loops over all faces in the thread */

begin_f_loop(f,thread)

{

F_CENTROID(y,f,thread);

x = y[0];

z = y[2];

F_PROFILE(f,thread,index) = U0*(1.0-(x*x+z*z)/(RP*RP));

}

end_f_loop(f,thread) #elif FLOW_DIRECTION==3

real z[ND_ND]; /* this will hold the position vector */

real x,y;

face_t f;

/* loops over all faces in the thread */

begin_f_loop(f,thread)

{

F_CENTROID(z,f,thread);

x = z[0];

y = z[1];

F_PROFILE(f,thread,index) = U0*(1.0-(x*x+y*y)/(RP*RP));

}

end_f_loop(f,thread) #else

Error("FLOW_DIRECTION should be 1, 2 or 3"); #endif /* FLOW_DIRECTION */ #endif /* RP_HOST */ }

  Reply With Quote

Old   March 26, 2007, 22:31
Default Re: i want your help please
  #9
sihat
Guest
 
Posts: n/a
thanks alot for your help but i have alittle bead confusion because i try so many but it give massage you have prase error in line 1 my question can you Mr Bogdan give me the typically what i must write to have corrct code if my flow is in x-ditection of 3D cylinder radius=0.55 max velocity=3.2m/s thanks alot sihat
  Reply With Quote

Old   March 27, 2007, 02:43
Default Re: i want your help please
  #10
Bogdan
Guest
 
Posts: n/a
so a minimum file should be like this:

#include "udf.h"

#define U0 3.2

#define RP 0.55

#define FLOW_DIRECTION 1 /*for x direction*/

then the function previous posted.

Hope this helps, Bogdan
  Reply With Quote

Old   April 1, 2007, 03:34
Default Re: i want your help please
  #11
sihat
Guest
 
Posts: n/a
i want u please to help me how to write this function correctely to complet the code to be interpreted in fluent because i try so many times and it give massage error prase lin 23 in this function line that means it is not written correctely. so please help if u have experience. the function is:

V = 0.55[(1-(z+y)/(0.6)]^20 thanks alot in advance sihat
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:06.