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

UDF for vapor pressure

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2017, 08:22
Default UDF for vapor pressure
  #1
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 4
anuarun is on a distinguished road
Hello friends,
I have a temperature profile file (not udf but boundary profile in tabular form)as my wall BC. I thought my profile file is working fineas I get the expected Temperature change at wall from T plots after convergence. I have written a UDF to vary vapour pressure as a function of temperature. I have hooked it to the vapour pressure option while activating mass transfer from liquid to vapour>cavitation. It gets interpreted neatly and solution converges also.Now, the solution obtained is not showing the expected improvement (rather change) when compared to a case where Pv=const.
My UDF looks like this.

#include "udf.h"
/*for Vapour pressure*/
DEFINE_PROPERTY(Vapour_pressure,c,t)
{
real T = C_T(c,t);
real p_v;
p_v = (0.00329*exp(0.19039*T) - 0.05762)*1000000.0;
return p_v;
}

How will I know if this is working fine? Do I need to write the UDF specifically in terms of SUB_THREAD, SUPER_THREAD etc. I assumed that since I am calling UDF from vapour pressure options, it will take appropriately. Is that right?

To check if it is a problem with the UDF, I changed vapour pressure to a polynomial fit and temperature as explained before(as boundary profile)and tried. This is not working either. Now I doubt whether I can give Twall as boundary profile. How to confirm this? Fluent user's manual and udf manual are so abstract on this topic. Is there any source from which I can read more on boundary profile and udf for vapour pressure?
Has anybody done something similar? Any help is greatly appreciated.

PS:edited title and re-posted a previous thread material to get better visibility. Pardon me if it caused any inconvenience.
anuarun is offline   Reply With Quote

Old   May 18, 2017, 10:28
Default vapour pressure change not accepted by Fluent
  #2
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 4
anuarun is on a distinguished road
Simulation_check1: Vapour pressure kept constant; energy equation switched ON with a UDF written for Twall.
Result: Predicted inlet temperature matched with experiment. Plotted wall temperature showed correct profile.
Simulation_Check2: Energy OFF; vapour pressure was assigned a real constant value using a UDF.
Result: Plotted pressure profile showed 3.5 bar inlet pressure instead of the expected 2.5 bar.
Simulation_check3: Enenry ON; Pv defined as piecewise linear.
Result: Plotted pressure profile showed 3.3 bar inlet pressure instead of the expected 2.5 bar.

Previously when vapour pressure was constant and Energy eqn OFF, I got the correct inlet pressure. The moment I change vapour pressure from constant value, something is going haywire. Any solution?
anuarun is offline   Reply With Quote

Old   October 10, 2019, 05:21
Default
  #3
New Member
 
Dnyanesh Mirikar
Join Date: Jul 2019
Posts: 11
Rep Power: 2
DnyanMiri is on a distinguished road
Did you able write correct UDF for vapor pressure? If you have, could you please share it with me? much appreciated. dnyansohm@gmail.com
DnyanMiri is offline   Reply With Quote

Old   October 21, 2019, 09:17
Default
  #4
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 4
anuarun is on a distinguished road
yes, I got the vapour pressure UDF correctly. I have sent that to you by email.
anuarun is offline   Reply With Quote

Old   January 24, 2020, 21:08
Default
  #5
Member
 
CWL
Join Date: Nov 2015
Posts: 35
Rep Power: 6
cwl6750084 is on a distinguished road
Quote:
Originally Posted by anuarun View Post
yes, I got the vapour pressure UDF correctly. I have sent that to you by email.
I wonder if you would mind sharing your UDF function as well. I have been struggling of it.
cwl6750084 is offline   Reply With Quote

Old   February 4, 2020, 07:27
Default Vapour pressure udf
  #6
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 4
anuarun is on a distinguished road
Please give your mail id.
anuarun is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
Parallelize UDF? Which kind of UDF? Lilly FLUENT 5 March 25, 2014 03:05
Help! Delete the UDM codes in the UDF Messi Fluent UDF and Scheme Programming 2 January 28, 2014 10:01
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 17:32.