Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 6533

Problems for calling variables when defining another variable

$
0
0

Hello,

I am having problems with defining variable. I am building a heat transfer model and I need to define the specific heat for the material because certain material does not exist in the material library.

I try to define the specific heat in local variable, and it is a piecewise function. When temperature is over the freezing point, c_p=c_u, otherwise, there is c_p=c_f+B/T^2. And for this model, the temperature T is a built-in variable, and I defined c_u and c_f in local variables, but while I am defining the piecewise function, I am not able to call c_u and c_f directly, but I can't put in all c_u, c_f and T in Arguments because I need T to be used for defining intervals for this function. So I tried to define c_u and c_f and all other related variables as global variables, but since T is only a variable for this model, so it still did not work.

I'd appreciate any help! Thank you very much!

Best regards, Shengyue Shan


Viewing all articles
Browse latest Browse all 6533

Trending Articles