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

Problem with Cp UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By upeksa
  • 1 Post By upeksa

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2014, 03:03
Default Problem with Cp UDF
  #1
New Member
 
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 12
ho3ein.agl is on a distinguished road
Hi
I have a very 2D Unsteady simple case without inlet or outlet boundary.


my Cp udf is:
Code:
 DEFINE_SPECIFIC_HEAT(cp_pcm_paper, T, Tref, h, yi)
 {
   real cp;
   if (T < 303.0)
      cp = 2200.;
    else if (T >= 303.0 && T <= 304.0)
      cp = 192800.;
	else 
      cp = 1400.;
   *h = cp*(T-Tref);
   return cp;
 }
problem is when the temperature of first cell reaches upper than 303 k, the residual of energy equation wont be converge.


I did this:
reduce under relaxation
reduce time step size
change energy solver method

what wrong?
Attached Images
File Type: jpg Capture.jpg (9.6 KB, 14 views)
File Type: jpg 1.jpg (21.0 KB, 13 views)

Last edited by ho3ein.agl; December 23, 2014 at 14:42.
ho3ein.agl is offline   Reply With Quote

Old   December 23, 2014, 04:41
Default
  #2
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 12
upeksa is on a distinguished road
According to the values of Cp that you have defined, it would be really unexpected if you found convergence in your case.
Whatever are you trying, you should give it another approach.
Cheers
ho3ein.agl likes this.
upeksa is offline   Reply With Quote

Old   December 23, 2014, 07:34
Default
  #3
New Member
 
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 12
ho3ein.agl is on a distinguished road
sorry about cp = 18880000. right cp is 192800.

my main case is modeling melting a PCM (CaCl26H2O). in above case instead air would be PCM.

Heat capacity at constant pressure, cp 1400 (liquid) - 2200 (solid)
Latent heat of fusion, L (J kg-1) 190,800

if i use PCM property instead air , that problem still there. even when i use "else if (T >= 303.0 && T <= 304.0) cp = 2201.;"
refining mesh has no effect on that problem.



Last edited by ho3ein.agl; December 23, 2014 at 14:45.
ho3ein.agl is offline   Reply With Quote

Old   December 23, 2014, 10:41
Default
  #4
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 12
upeksa is on a distinguished road
I see a lot of confusion here: if you want to simulate the melting of a substance, you have the possibility in fluent of choosing a model of "solidification & melting".
On the other hand, you have first to know the difference between Cp [kJ/kg-K] and latent heat [kJ/Kg]. You have used them as similar concept but they are completely different.
I have never simulated anything with the melting model, but I pretty sure you can set Cp of both solid and liquid phases as an UDF (or constant), and you can somehow set as well latent heat in the interface of the menu, in a similar way as you can set latent heat in the mass transfer menu in the multiphase model.
Cheers
ho3ein.agl likes this.
upeksa is offline   Reply With Quote

Old   December 23, 2014, 13:35
Default
  #5
New Member
 
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 12
ho3ein.agl is on a distinguished road
yes i know solidification model must be use in melting simulation . in the first post, i want to test my udf with air without melting model just simple unsteady heat transfer case.
the only way to set Cp in solid or liquid is using 'DEFINE_SPECIFIC_HEAT' macro. in that macro cp is a function of temp.
do you know other way to set Cp function of liquid fraction?

in equation number 13 we have Cp= [kJ/Kg]/k + [kJ/kg-K] = [kJ/kg-K]

all paper i read have been used solidification model not multiphase model or VOF.
ho3ein.agl is offline   Reply With Quote

Old   December 23, 2014, 14:09
Default
  #6
New Member
 
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 12
ho3ein.agl is on a distinguished road
pleas focus on first post.
I would be thankful if you can run that case in your PC, maybe my PC has issue.
ho3ein.agl is offline   Reply With Quote

Old   October 19, 2016, 10:44
Default
  #7
New Member
 
stalukar
Join Date: Aug 2016
Posts: 13
Rep Power: 9
shaonme is on a distinguished road
Hello, I need to know if Cp uses the UDF which includes the heat of fusion also, Is there any necessity to put the value of heat of fusion in the material dialogue box?
shaonme 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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
udf loading problem santu Fluent UDF and Scheme Programming 1 May 22, 2015 15:47
Vaporization pressure UDF property problem? lehoanganh07 Fluent UDF and Scheme Programming 1 September 13, 2014 10:59
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
UDF problem mansha goraya FLUENT 0 October 29, 2007 00:31


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