|
[Sponsors] |
November 26, 2014, 06:13 |
UDF for DPM
|
#1 |
Member
souria
Join Date: Mar 2013
Location: Nancy
Posts: 66
Rep Power: 13 |
Hey every one,
I'm trying to adapt an UDF to follow particles, so in Fluent-UDF-Manuel I fund some examples, I want to know what does mean this : alpha = M_PI/2. - acos(MAX(-1.,MIN(1.,NV_DOT(normal,P_VEL(p))/ MAX(NV_MAG(P_VEL(p)),DPM_SMALL)))) I understand : NV_DOT(normal,P_VEL(p))/(NV_MAG(P_VEL(p)) But I have no idea about the presence of MIN, MAX, DPM_SMALL PS. Alpha is the angle of particle path with face normal I hope I'm clear Thanks for your help |
|
November 26, 2014, 06:29 |
|
#2 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
Hi Souria,
MIN and MAX are functions to select a value. For example, MIN(1.,NV_DOT(normal,P_VEL(p)) will give as an output the minimum of 1 and NV_DOT(normal,P_VEL(p)). So, if NV_DOT(normal,P_VEL(p)) is larger than 1, the output is 1, otherwise it is whatever value the above expression has. MAX does the same, but selecting the maximum. DPM_SMALL I guess is some macro that has a certain value; it's basically just a number. So the line MAX(NV_MAG(P_VEL(p)),DPM_SMALL)))) says: pick whatever is larger, NV_MAG(P_VEL(p)) or DPM_SMALL. I hope that answers your question! Best, Cees |
|
November 26, 2014, 06:46 |
|
#3 | |
Member
souria
Join Date: Mar 2013
Location: Nancy
Posts: 66
Rep Power: 13 |
Quote:
it helps me a lot Have a nice day |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
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 |