Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Problems for calling variables when defining another variable
Posted 9 ago 2018, 17:33 GMT-4 General, Heat Transfer & Phase Change, Parameters, Variables, & Functions Version 5.3 2 Replies
Please login with a confirmed email address before reporting spam
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