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

Fluent UDF for Non linear wall temperature gives constant wall T after initialisation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2017, 09:13
Default UDF for vapour pressure
  #1
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9
anuarun is on a distinguished road
Hello all,
I have a temperature profile file as my wall BC. My profile file is working fine (as evident 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? Has anybody done something similar? Any help is greatly appreciated. I am stuck here for more than a month.

Last edited by anuarun; May 16, 2017 at 11:22. Reason: Encountered a new problem
anuarun is offline   Reply With Quote

Old   May 16, 2017, 11:17
Default Vapour Pressure UDF
  #2
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9
anuarun is on a distinguished road
Hello all,
I found that defining temperature BC as a profile file is better than including a UDF especially when I have to include(by interpreting) other UDFs(say for properties in terms of temperature). Now my profile file is working fine. 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? Has anybody done something similar? Any help is greatly appreciated. I am stuck here for more than a month.
anuarun is offline   Reply With Quote

Old   May 16, 2017, 11:25
Default
  #3
New Member
 
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9
anuarun is on a distinguished road
I am really sorry for the bad editing. My first post was regarding a Temperature UDF for wall temperature not working fine. I have solved it by including a profile file instead of a UDF. That post got deleted while editing.
anuarun 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
Divergence in AMG solver! marina FLUENT 20 August 1, 2020 12:30
UDF for linear temperature variation nonstopthinker Fluent UDF and Scheme Programming 2 September 4, 2016 01:36
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 08:29
UDF of linear distribution of temperature in a 2D tank arailos Fluent UDF and Scheme Programming 1 August 19, 2010 15:14
udf variable for wall temperature Kiran FLUENT 0 July 31, 2008 09:31


All times are GMT -4. The time now is 21:55.