|
[Sponsors] |
(ask) how to create UDF for inlet velocity profile |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 18, 2011, 08:38 |
(ask) how to create UDF for inlet velocity profile
|
#1 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
hi all
i have a question what should i do if i wanna go to use UDF for my inlet velocity profile 3D case how can i define it just a simple question, hope it will be answered by you.regards |
|
March 18, 2011, 09:34 |
|
#3 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
hi amir thanks for attention
actually the UDF manual is not helping me at all because i want to create UDf for 3D case inlet velocity profile, but i dont know how to define the velocity function in 3D vector (x,y,z) maybe you have some tutorial or case example??regards. |
|
March 18, 2011, 10:44 |
|
#4 |
Senior Member
|
Hi Wibi,
here's a example for fully developed flow in a pipe: Code:
#include "udf.h" #define Q 1.5625e-5 //unit m3/sec #define Diameter 4.5e-3 //unit m DEFINE_PROFILE(axialVelocity,t,i) { real x[ND_ND]; real r,Area; face_t f; Area=(M_PI/4.0)*pow(Diameter,2); begin_f_loop(f,t) { F_CENTROID(x,f,t); r=sqrt(pow(x[0],2)+pow(x[1],2)); F_PROFILE(f,t,i)=(2.0*Q/Area)*(1-pow(2.0*r/Diameter,2)); } end_f_loop(f,t) } |
|
March 18, 2011, 11:49 |
|
#5 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
mmm...is it UDF for 3D case amir??
|
|
March 18, 2011, 14:07 |
|
#6 |
Senior Member
|
it computes axial velocity magnitude in a pipe(z-direction) as a function of x & y.
you can also define three UDFs for each velocity components that are similar to above. it depends on the method that you want to set velocity in B.C. panel; magnitude normal or components. |
|
March 19, 2011, 00:32 |
|
#7 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
amir my friend,
i am very confuse about what were you talking about, since i'm new user for UDF so i hope you have more time to explain about this topic. amir in defining UDF should i plot my velocity data first to get the function or just go straight use your UDF example that you gave to me? please answer.regards |
|
March 19, 2011, 09:51 |
|
#8 |
Senior Member
|
Ok,
first you should decide what kind of velocity declaration you want to use.(in B.C. panel) e.g. you can use velocity magnitude normal to plane or setting individual velocity components. without UDF, you can set constant values for them in GUI. but for your case that three components change with coordinates(I think), you should write 3 UDF for velocity components and declare them as functions of x,y,z and hook them in respective places. it's obvious that you should have velocities as functions of x,y,z. if you post your velocity function, I may help you more. regards, Amir |
|
March 21, 2011, 00:44 |
|
#9 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
its going converging.. my question is i have no idea about that velocity function, that's what i want to talk about you. how can i extract my own velocity function, especially in my 3D case??
|
|
March 21, 2011, 04:01 |
|
#10 |
Senior Member
|
if your inlet velocity profile is obtained from another FLUENT calculation, it's easy to handle. else you need to use other post processing softwares like MATLAB or others to fit functions to them and then use obtained functions in UDFs.
|
|
March 21, 2011, 04:31 |
|
#11 |
Member
wibi ario
Join Date: Feb 2011
Posts: 46
Rep Power: 15 |
could i just adapting the function from another velocity function and put it on my UDF??maybe your function? or maybe any general form of function that i could use
|
|
November 16, 2011, 18:41 |
|
#13 |
New Member
Yingying Wang
Join Date: Nov 2011
Posts: 2
Rep Power: 0 |
Can you tell me how to extract the 3D velocity profile from another FLUENT calculation and load the velocity file as the input? I don't know how to get the velocity file. I read some tutorial saying the velocity file can be obtained as a file format of "XY".
|
|
November 17, 2011, 03:40 |
|
#14 | |
Senior Member
|
Quote:
you can use (file->write->profile) in your previous results and the use (file->read->profile) in new case. (for more info, refer to manual) Bests,
__________________
Amir |
||
November 22, 2011, 06:46 |
|
#15 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Hi,
My project is to perform CFD analysis on dissecting aneurismal aorta. I have to create pulsatile inlet velocity and pulsatile outlet pressure waveform at inlet and outlet of the aorta respectively. The example of pulsatile inlet velocity is as shown in the link below http://www.google.com.my/imgres?q=Ti...Wl_WbBw&zoom=1 May I know how to define this type of graph using UDF? Thank you so much |
|
November 22, 2011, 08:39 |
|
#16 | |
Senior Member
|
Quote:
you have 2 choices: 1) you can prepare a file with special format which defines desires parameter at different time; it this method, you cannot specify spacial variation. (you can find further explanation in manual in setting unsteady BCs) 2) you can fit functions for different segments and write a UDF for it; this method doesn't have ant restrictions in special declaration. Bests,
__________________
Amir |
||
November 22, 2011, 21:59 |
|
#17 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
2) you can fit functions for different segments and write a UDF for it; this method doesn't have ant restrictions in special declaration.
May I know in details what is mean by fir functions for different segments and write a UDF for it? Thank you. REgards, Naimah |
|
November 23, 2011, 05:57 |
|
#18 | |
Senior Member
|
Quote:
Bests,
__________________
Amir |
||
December 5, 2011, 05:12 |
|
#19 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Hi Amir,
May I know how to do post processing in FLUENT? For example I would like to see the plotted graph (pressure/velocity) vs time. Besides, how to get the data for cross sectional area at certain parts of geometry at certain time? Thank you. Regards, Naimah |
|
December 5, 2011, 09:53 |
|
#20 | |
Senior Member
|
Quote:
It depends, e.g. if you want to have pressure or velocity in a specified point, you can use "solve->monitor->surface ...."; if you didn't activate it before iteration, you have to write a simple journal file for this purpose. For extracting data of cross-sections; firstly you need to generate these cross-sections in "surface->quadratic or plane" then you can export desired data to other post processors in "file->export". But if you want to export these data for successive time steps; you have to choices: 1) there is such capability in ver. 13 in "file-> export" I think. 2) you can write a journal file to do what you want during iteration. Bests,
__________________
Amir |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF problems - velocity profile | Oli | Fluent UDF and Scheme Programming | 6 | October 24, 2016 11:38 |
How to create non-uniform velocity profile in FLUENT? | pankaj | FLUENT | 7 | October 24, 2016 05:52 |
udf for velocity profile in a geometry having two inlets | shubham208011 | Fluent UDF and Scheme Programming | 0 | April 6, 2009 16:13 |
UDF velocity and temperature | Raj | FLUENT | 3 | February 1, 2009 19:29 |
UDF velocity profile at nodes | Emad | FLUENT | 2 | January 29, 2009 07:35 |