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

gauss distribution of Cp using UDF not working as expected

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2015, 16:16
Default gauss distribution of Cp using UDF not working as expected
  #1
Member
 
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15
B.Hamada is on a distinguished road
hi
I work on the phase change of the PCM, so to model the solid-liquid change of PCM, I used the gauss distribution for the Cp, I used an UDF for this reason, my problem is that my UDF has no error, all is well, but when I run a calculation by Fluent, my results are not as I think, it means that Fluent has not worked by the UDF or there is another problem I do not know about it.
My UDF
PHP Code:
#include "udf.h" 
DEFINE_SPECIFIC_HEAT(my_user_cpTTrefhyi

real cp;  

if (
<= 299.6

cp 1413+232000*exp(-0.5*(T-299.6)*(T-299.6)); 

else

cp 1797+232000*exp(-0.5*(T-299.6)*(T-299.6)); 

*
cp*(T-Tref); 
return 
cp

Please help me. Thank's
B.Hamada is offline   Reply With Quote

Old   June 7, 2015, 09:18
Default help
  #2
Member
 
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15
B.Hamada is on a distinguished road
Pleaaaaaaaaaaaaaaaaaaaaaaaaaaaase help meeeeeeeeeeeeeeee
B.Hamada is offline   Reply With Quote

Old   June 9, 2015, 04:19
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
If you think Fluent does not use your UDF, try putting
Code:
Message("test");
somewhere in it.
If you see "test" appearing in your screen (many times), the UDF is used.
pakk is offline   Reply With Quote

Old   June 9, 2015, 10:38
Default Thank you
  #4
Member
 
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15
B.Hamada is on a distinguished road
Quote:
Originally Posted by pakk View Post
If you think Fluent does not use your UDF, try putting
Code:
Message("test");
somewhere in it.
If you see "test" appearing in your screen (many times), the UDF is used.
Thank you i will try it
B.Hamada 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
Free Surface Ship Flow timfranke OpenFOAM Running, Solving & CFD 322 March 3, 2021 10:04
error on turbulence scheme immortality OpenFOAM Pre-Processing 11 August 21, 2013 09:45
Convergence problem xxxx OpenFOAM Running, Solving & CFD 7 February 15, 2013 07:16
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
Compiling OpenFOAM13 on AMD64 with OpenSUSE 101 silent_missile OpenFOAM Installation 5 August 10, 2007 08:31


All times are GMT -4. The time now is 16:54.