|
[Sponsors] |
December 19, 2013, 12:17 |
New in UDF and C
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 197
Rep Power: 14 |
Hi
This is a parabolic inlet profile written in UDF Can anybody interpret each line into words? I couldn't understand all of them Many thanks |
|
December 19, 2013, 13:34 |
|
#2 |
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 17 |
Which lines are causing you such a headache?
|
|
December 20, 2013, 06:15 |
|
#3 |
Senior Member
Join Date: Jan 2012
Posts: 197
Rep Power: 14 |
Hi Zaktatir
Thanks for your concern For x[1] in equation of y, I think the domain is assumed to be from 0 to a positive value, isn't it? In other case, for example, the domain could be between -2 and 2 How the equations of y and F_profile been derived? |
|
December 20, 2013, 06:52 |
|
#4 |
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 17 |
X is any array or vector holding your coordinates. In C we enumerate starting from 0 that means x[1] will be you y-coordinate x[0] your x-coordinate, x[2] your z-coordinate.
Then you apply F_Profile where you put your formula or your law in that case this velocity profile. Why F_Profile because your making an input to a boundary condition that means your law or your function should apply to the faces localized on that boundary |
|
December 20, 2013, 07:01 |
|
#5 | |
Senior Member
Join Date: Jan 2012
Posts: 197
Rep Power: 14 |
Quote:
My point is, for example, we got a pipe with diameter in 1m, will the value of x[1] coordinate be input to equation of y from bottom to top, from top to bottom or from middle to both sides? |
||
December 20, 2013, 07:04 |
|
#6 |
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 17 |
it will scan your y in positive y direction
|
|
December 20, 2013, 07:38 |
|
#7 |
Senior Member
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 17 |
and it will handle the faces of the cells as ordered in the matrix since we are using unstructured meshes
|
|
October 30, 2014, 00:47 |
|
#8 |
New Member
Nguyen Duc Thuyen
Join Date: Jul 2014
Posts: 7
Rep Power: 12 |
To Zaktatir.
Code:
it will scan your y in positive y direction My mean: y be scan from 0. to...? |
|
October 30, 2014, 04:53 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
It will not 'scan' anything, I think you are thinking in the wrong way.
You write the code for the profile, and add it as a boundary condition to a surface (let's call it surface A). During the calculation, Fluent will at some point need to put a velocity to a cell face from surface A. It then asks the UDFs that you wrote: "which velocity should I give to the cell face with coordinates x[0],x[1],x[2]?" The UDF does not scan, or define the order in which the cells are accessed. Fluent does that. And for a properly written UDF, the order in which that happens should not matter for the result. |
|
October 30, 2014, 09:19 |
|
#10 |
New Member
Nguyen Duc Thuyen
Join Date: Jul 2014
Posts: 7
Rep Power: 12 |
To pakk
Thanks for your reply, i try to think your hehp |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |