|
[Sponsors] |
(ask) how to create UDF for inlet velocity profile |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 7, 2011, 05:23 |
|
#21 | |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Quote:
Dear Amir, Thank you for the info. Since I m a new user of FLUENT, may I know how to get to this command "surface->quadratic or plane" Is this thing read the result at the cross section? Besides, what is mean by read to journal file? I have tried to read data at certain interval that I set up. However, It come out with a lot of nodes number at 1 time interval. may I know how to extract this data? Thank you so much for your help. Regards, Naimah |
||
December 7, 2011, 06:28 |
|
#22 | ||
Senior Member
|
Quote:
Quote:
Bests,
__________________
Amir |
|||
December 7, 2011, 06:49 |
|
#23 | |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Quote:
My project is to perform CFD simulation for aortic dissecting aneurysm. I would like to see what happen in the geometry at particular time and location (cross section). To see how it changes from certain time to time. Therefore, I need to see the plot at different part of the aorta. Thank you Regards, Naimah |
||
December 7, 2011, 10:41 |
|
#24 | |
Senior Member
|
Quote:
Bests,
__________________
Amir |
||
December 9, 2011, 00:44 |
|
#25 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Dear Amir,
Thank you so much for the info. I still working on it. However, may i ask you question regarding how fluent function? Based on tutorial 4 : modeling compressible transient flow A steady state solution is run first before it used as the initial condition for transient. In the tutorial, after simulation for steady state is done, the next steps is to change the time from steady to transient. May I know how the software function/how the software read the result from steady state solution to be used as input/initial condition for transient simulation. I believe it is not just a simple click by changing the steady to transient. Thank you. Regards, Naimah |
|
December 9, 2011, 03:54 |
|
#26 | |
Senior Member
|
Quote:
In contrast to your belief, it's done by simply changing steady to unsteady solver in current case. I other words, FLUENT uses any data stored in computational domain which can be provided via direct initialization or any previous simulations as initial condition .... (Also, you can use results of one case for initialization of other case; for this purpose, you need to use "file->interpolate") Bests,
__________________
Amir |
||
December 30, 2011, 04:15 |
|
#27 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Dear Amir,
Thank you so much for the info. I have another questions regarding the Fluent. 1. I have set the value at inlet boundary condition at : velocity inlet : 0.175 m/s At the solution initialization when I click compute from inlet, it will give diffrence value: Initial value: Gauge pressure : 0 Pa X velocity :- 0.036 m/s Y velocity: -0.0053 m/s Z velocity : 0.165821 m/s Why it give difference value? Are these value initial guess calculated by the Fluent? 2. Can I used different types of Solution methods for transient and steady case for the same case: Transient : PISO and second order upwind Steady : SIMPLE and first order upwind REgards, Naimah |
|
December 30, 2011, 06:29 |
|
#28 |
Senior Member
|
Hi,
1) Maybe you've set the velocity magnitude normal to the boundary and FLUENT computes its projections in required direction. I don't think this would be an important issue; this is just an initial guess which improved later. 2) Note that PISO, SIMPLE and ... are pressure velocity coupling methods and can be used with other interpolation schemes such as first order, .... Obviously, you cannot use 2 velocity-pressure coupling methods simultaneously! but you can use them separately and may used as initial values for others. Note that you can also use "SIMPLE and first order upwind" for transient and vice versa; although, the PISO algorithm is more preferable for unsteady simulations. (for more info regarding algorithms and schemes you can refer to the user manual) Bests,
__________________
Amir |
|
January 4, 2012, 04:35 |
|
#29 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Hi Amir,
Thank you very much for the info. May I ask some more questions? I have real image from CT scan data. After smoothing, the inner part that I want to evaluate is lose. Therefore I would like to create this part in Design Modeler in ANSYS. Can it be done? Thank you. Regards, Naimah |
|
January 4, 2012, 09:14 |
|
#30 | |
Senior Member
|
Quote:
I'm not sure it can be done via ANSYS Design Modeler. I heard mimics software can process these data for importing to grid generator softwares but I don't have further info in this field. Bests,
__________________
Amir |
||
February 14, 2012, 23:50 |
Axial velocity
|
#31 |
Member
Naimah
Join Date: Nov 2011
Posts: 58
Rep Power: 15 |
Hi Amir,
I would like to ask several questions regarding how to define and plot the axial velocity and how to define the rotation axis direction in Cell Zone Condition. Herewith I attached the figures that showed the plane in a curved tube. Based on my understanding, I need to define the rotation axis direction for the flow to select the axial velocity. Is it correct? How Im going to determine the rotation axis direction in the curved plane as per attached file? the rotation axis direction is not 90 degree (perpendicular) to the plane. How Im going to take/Define the result of axial velocity? Looking forward for your feedback. Thank you so much. naimah |
|
February 15, 2012, 08:56 |
|
#32 | |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Quote:
I think you can create a custom field function in fluent (http://hpce.iitm.ac.in/website/Manua...g/node1364.htm) to decompose for example the x velocity into a velocity perpendicular to your plane (use sin and cos). Daniele |
||
February 15, 2013, 08:31 |
UDF_logarithmic velocity profile
|
#33 |
New Member
Join Date: Feb 2013
Posts: 18
Rep Power: 13 |
Hi everybody,
I'm studying, with Fluent, the model shown in the attached image. I've to impose a loarithmic velocity profile at the upwind boundary, that is: U(h)=Uo/k*ln(h/ho) where: Uo= 1,068 m/s ho=o,005 m k=0,41 (-) The questions are two: 1)In setting the boundary conditions,I've to select, for the upwind face, a UDF velocity profil (created on the basis of the formula: U(h)=Uo/k*ln(h/ho)). While, for the other three faces, which are also inlet faces, I have to select the same UDF or to create other ones? 2)I've imposted a possible code for UDF, that is: #include "udf.h" #DEFINE Uo 1,068 //unit m/s #DEFINE k 0,41 #DEFINE ho 0,005 //unit m DEFINE_PROFILE(inlet_x_velocity,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,thread,index) = Uo/k*log(y/ho); } end_f_loop(f,t) } Is it correct in your opinion? I've never programmed in C language, so I don't know how to crate a UDF file, for loading it in FLUENT. Someone could please tell me how to do this? Or, eventually, could I copy the code directly within command lines of fluent? Thanks |
|
February 15, 2013, 10:02 |
|
#34 | |
Senior Member
|
Quote:
1) Yes, you can hook this UDF to all three faces (like aerodynamic examples) 2) Your UDF needs few modifications, try this: Code:
#include "udf.h" #define Uo 1.068 //unit m/s #define k 0.41 #define ho 0.005 //unit m DEFINE_PROFILE(inlet_x_velocity,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = Uo/k*log(y/ho); } end_f_loop(f,t) } Bests,
__________________
Amir |
||
February 15, 2013, 11:24 |
|
#35 |
New Member
Join Date: Feb 2013
Posts: 18
Rep Power: 13 |
Dear Amir,
Thanks for the corrections. Someone else has suggested to me to set the top, left and right faces as symmetry boundary conditions. But I can't understand what this means. I should not have a symmetry with respect to anything? Someone said that: "the problem with inlet BCs at the side walls is that the flow should be perpendicular to the face. In my case, the velocity is tangential to the surface. A symmetry boundary condition (zero shear stress) is the usual way to model such a boundary". I've seen that setting the boundary conditions at the other 3 faces, besides the upwind one, I can choose, within Velocity Inlet, the option "Magnitude and Direction" and, as Reference frame, the option "Relative to adjacent cell zone", and then select the UDF inlet_x_velocity as Velocity Magnitude. What do you think about this way?Should be more correct to use Symmetry BC, rather than velocity inlet?In which way? Finally, as regard the definition of UDF, since I don't have basis of C programmation, I've seen that I can write these simple boundary conditions in a txt file, then save it as c.file and intrerpret it in fluent. Thanks a lot. Bests |
|
February 15, 2013, 11:58 |
|
#36 | ||
Senior Member
|
Quote:
- Setting U velocity means: Specific U velocity, Zero lateral velocities - Setting Symmetry BC means: Zero shear stress, Zero lateral velocity (There is not any constrain on tangential velocity magnitude) If you're modelling a building among others, the symmetry bc in better but if it's the only building in a rather large domain, I suggest velocity bc. As I said this is a common choice in aerodynamic cases in incompressible flow field too where we want to set bc around a single wing. Quote:
Do not hesitate to ask if it's not clear or face any difficulties. Bests,
__________________
Amir |
|||
February 26, 2013, 05:55 |
|
#37 |
New Member
Join Date: Feb 2013
Posts: 18
Rep Power: 13 |
Dear Amir,
I've done some simulations with the different boundary conditions, already discussed in the previous post. Finally my BC are: On the frontal face of the huge air parallelepiped: inlet velocity with a UDF imposing a velocity profile changing with a log-law. On the upper and side faces of the huge air parallelepiped: inlet velocity with the same UDF on x direction On the back face of the huge domain: pressure outlet=0 On the building walls, there is no slip and a roughness height=0 and roughness constant=0.5. While the basis of the huge air parallelepiped is a wall, with no slip and a roughness height of 5*10^(-5) and a roughness constant=0.5. Then, I've a k-epsilon RNG model, with Standard Wall Function It=4% and Lt=0.4 m Now, I've to calculate a Volume flow rate on an opening, located on the front wall of the building, so while meshing I've created a name selection on the surface of this opening, which is set as "Interior"on boundary condition in Fluent. The problem is that I obtain a Volume flow rate too small, and I can't understand the reason. The model converges, the mass conservation is respected. I've tried to change BC on the upper and side faces of the domain, to eliminate the roughness on the basis but nothing changes. What could be the problem? Thanks a lot |
|
February 26, 2013, 06:05 |
|
#38 | |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Quote:
What is the calculated value and the real one? |
||
February 26, 2013, 18:57 |
|
#39 |
New Member
Join Date: Feb 2013
Posts: 18
Rep Power: 13 |
Hi everybody,
Probably the problem is not the mesh but the boundary conditions. I want to try to separate the outdoor air domain (the huge air parallelepiped) and the internal building air domain, setting the building window not as "interior" but as velocity inlet or pressure inlet for the domain constitutes of the interior air. This might be correct in your opinion? My aim is to evaluate the volume flow rate on the building window. Thanks a lot |
|
April 11, 2013, 04:26 |
|
#40 |
New Member
Ashutosh
Join Date: Jan 2013
Location: mhow
Posts: 3
Rep Power: 13 |
Dear Sir
I am working on fluent for last one year. I am familier with C++ and MATLAB. In writing UDF for inlet boundary or for moving wall I feel difficulty. From last few weeks only due to one error in my code I can not proceed further. Please help me or contact me on my personal mail id so we can discuss in detail: my mail id is : ashutoshverma194@ymail.com vermaashutosh143@gmail.com |
|
|
|
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 |