CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   3 functions for specific heat capacity in solid material (https://www.cfd-online.com/Forums/cfx/179576-3-functions-specific-heat-capacity-solid-material.html)

Pyotr November 2, 2016 18:46

3 functions for specific heat capacity in solid material
 
Hi everyone,


I need to insert 3 functions for Specific Heat Capacity related to 3 different temperature ranges in a solid material.


Here are the functions:


5.81E+2[J kg^-1 K^-1], for Temperature < 533.3[K]




-2.96E+3[J kg^-1 K^-1]+1.50E+1[J kg^-1 K^-2]*Temperature-2.33E-2[J kg^-1 K^-3]*Temperature^2+,1.64E-5[J kg^-1 K^-4]*Temperature^3-4.40E-9[J kg^-1 K^-5]*Temperature^4, for 533.3[K] <=Temperature < 1088.9[K]




4.14E+2[J kg^-1 K^-1]+8.63E-1[J kg^-1 K^-2]*Temperature-6.14E-4[J kg^-1 K^-3]*Temperature^2+2.09E-7[J kg^-1 K^-4]*Temperature^3-2.70E-11[J kg^-1 K^-5]*Temperature^4, for 1088.9[K] <= Temperature < 2200[K]


Is it possible? If so, how?


Thanks!

Lance November 3, 2016 02:03

Have you tried nested if statements?

if(T< 533[K],first expression,if(T<1088[K], second expression, if(T<2200[k], third expression,#)))
where # is the value for Cp above 2200 [K]

urosgrivc November 3, 2016 02:04

Yes, this can be simply done by expressions.

I would first make an (if) sentence that would chose in what sector the temperature is either(S1,S2,S3)
like this:

sector selector=...if(T<533[K],S1,if(T<1088[K],S2,S3)) [J kg^-1 K^-1]

than write three expresions for sectors:

S1=....your equation dependant on (T)
S2=....-ll-
S3=....-ll-

Than you set the, here called sector selector expression as a material property for heat capacity.

hehe it seems that lance and I were both tiping the same thing at the same time :)

Pyotr November 3, 2016 20:45

Lance and urosgrivc, thank you very much!:)

evcelica November 9, 2016 16:53

First of all, you will most likely need to include more significant digits when using higher polynomial expressions like that.

Second, another way to do this would be just using a user interpolation function, like a table of temperatures and values for specific heat.

Pyotr November 14, 2016 05:23

Thank you, evcelica :)


All times are GMT -4. The time now is 03:07.