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

UDF problem with specific heat

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2023, 05:03
Default UDF problem with specific heat
  #1
New Member
 
Damir
Join Date: Apr 2023
Posts: 7
Rep Power: 3
salkynbekov is on a distinguished road
I am modeling PCM using solidifcation/melting module in ANSYS FLUENT.
(laminar, transient simualtion)

to define properties of the PCM, I use UDF.

and for specific heat I have following:

Code:
DEFINE_SPECIFIC_HEAT(cell_cp,T, Tred,h,yl)
{
    real cp;
    
    if(T < T_m) {cp = f(T);}
    else {cp = 2150;}
    *h = cp*(T-Tref);

    return cp;	
}
But it errors as
"Warning: invalid cp (-1.15454545 J/kgK) for PCM at temperature 230.5151 K"

As you see in udf there can not be negative specific heat.

best regards.

Last edited by salkynbekov; June 16, 2023 at 05:40.
salkynbekov is offline   Reply With Quote

Old   June 8, 2023, 07:51
Default
  #2
Senior Member
 
Moritz Kuhn
Join Date: Apr 2010
Location: Germany, Dresden
Posts: 207
Rep Power: 17
MKuhn is on a distinguished road
Check your polynome. For 230 K I get a negative value as well. Anyway, you do not have to define the specific heat with an UDF. The possibilities in the material data panal are sufficient, as you can define even stepwise polynomes for temperature depend data.
MKuhn is offline   Reply With Quote

Reply

Tags
ansys fluent, pcm modeling, specific heat, udf and programming


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
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 05:37
UDF for Specific Heat - Problem Hamjaj Fluent UDF and Scheme Programming 17 June 17, 2017 01:28
UDF for defining specific heat ratio,gas constant,molecular weight n.soumya Fluent UDF and Scheme Programming 6 February 17, 2016 08:37
fluent udf problem: write specific data for every iteration in a file. nnvoro Fluent UDF and Scheme Programming 1 May 27, 2013 15:26
Specific Heat (Cp) cannot be calculated by UDF??? João Fernandes FLUENT 0 October 16, 2008 18:58


All times are GMT -4. The time now is 00:25.