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

UDF for DPM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2014, 06:13
Default UDF for DPM
  #1
Member
 
souria
Join Date: Mar 2013
Location: Nancy
Posts: 66
Rep Power: 13
souria is on a distinguished road
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
souria is offline   Reply With Quote

Old   November 26, 2014, 06:29
Default
  #2
Senior Member
 
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0
CeesH is on a distinguished road
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
CeesH is offline   Reply With Quote

Old   November 26, 2014, 06:46
Default
  #3
Member
 
souria
Join Date: Mar 2013
Location: Nancy
Posts: 66
Rep Power: 13
souria is on a distinguished road
Quote:
Originally Posted by CeesH View Post
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
Thanks CeesH for your quick answer.
it helps me a lot
Have a nice day
souria is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 22:43.