how to write an expression in ansys

pc_singhpc_singh Member Posts: 9

this is an expression for specific heat (CP). Please help me to write an expression for it in Ansys. CP which is used here is a polynomial function of temperature T.

Time = CURRENT_TIME;

for(;;)

    {

     if(Time<=4.2)

       break;

     Time=Time-4.2;

   }

         CP=0;

        if(Time<=0.1)

     CP=a+b*T+c*T*T+d*T*T*T+e*T*T*T*T;

   if(Time<=2.1 && Time>0.1)

          CP=f+g*T+h*T*T+i*T*T*T+j*T*T*T*T;

   if(Time>2.1 && Time<=2.2)

       CP=a+b*T+c*T*T+d*T*T*T+e*T*T*T*T;

   if(Time>2.2)

        CP=k+l*T+h*T*T+m*T*T*T+n*T*T*T*T;

thanking you in advance.

Answers

Sign In or Register to comment.