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

What are the differences between ABS_P(p[c], op_pres) and ABS_P(p[c]) ?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2017, 00:10
Default What are the differences between ABS_P(p[c], op_pres) and ABS_P(p[c]) ?
  #1
Senior Member
 
Join Date: Jun 2014
Location: Taiwan
Posts: 100
Rep Power: 11
SJSW is on a distinguished road
Hi~

I found ABS_P(p[c], op_pres) in the example of DEFINE_CAVITATION_RATE in ANSYS Help.

Then I found ABS_P(p[c]) in the description above :
If ABS_P < p_vapor, then
c_evap * rhoV[c] * sqrt(2.0/3.0*rhoL[c]) * ABS(p_vapor - ABS_P(p[c]))

1. What are the differences between ABS_P(p[c], op_pres) and ABS_P(p[c]) ?
2. What is op_pres?

Thanks!
SJSW is offline   Reply With Quote

Old   March 23, 2017, 02:42
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
The first part ("If ABS_P < p_vapor, then ... ABS_P(p[c])") from the Fluent help is not really UDF code, but is an explanation of what the goal is, but they wrote the equation already in programming code.

But they obviously made a mistake: ABS_P(p[c]) means the absolute pressure, but they forgot op_pres. In the code below, they did not make this mistake.

"op_pres" means operating pressure.

I am happy that you asked this question: until now I used
Code:
RP_Get_Float("operating-pressure")
to obtain the operating pressure in my UDFs. But now I see that I could just use op_pres, which should make my code more simple (and a tiny bit faster, but I don't think I will notice that).
SJSW and souza.emer like this.
pakk 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



All times are GMT -4. The time now is 23:52.