|
[Sponsors] |
December 23, 2014, 04:03 |
Problem with Cp UDF
|
#1 |
New Member
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 13 |
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; } I did this: reduce under relaxation reduce time step size change energy solver method what wrong? Last edited by ho3ein.agl; December 23, 2014 at 15:42. |
|
December 23, 2014, 05:41 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
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 |
|
December 23, 2014, 08:34 |
|
#3 |
New Member
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 13 |
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 15:45. |
|
December 23, 2014, 11:41 |
|
#4 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
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 |
|
December 23, 2014, 14:35 |
|
#5 |
New Member
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 13 |
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. |
|
December 23, 2014, 15:09 |
|
#6 |
New Member
hosein
Join Date: Sep 2013
Posts: 16
Rep Power: 13 |
pleas focus on first post.
I would be thankful if you can run that case in your PC, maybe my PC has issue. |
|
October 19, 2016, 11:44 |
|
#7 |
New Member
stalukar
Join Date: Aug 2016
Posts: 13
Rep Power: 10 |
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?
|
|
|
|
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 07:05 |
udf loading problem | santu | Fluent UDF and Scheme Programming | 1 | May 22, 2015 16:47 |
Vaporization pressure UDF property problem? | lehoanganh07 | Fluent UDF and Scheme Programming | 1 | September 13, 2014 11:59 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 01:31 |