March 16, 2023 at 12:26 pm
Subscriber
DEFINE_SOURCE(elec_power,c,t,ds,eqn)
{
real x[3];
real ir;
real source;
C_CENTROID(x,c,t);
ir=1.687E+06+31657*x[0]+62239*x[1]-4.902E+08*x[0]*x[0]-1.869E+06*x[0]*x[1]-4.944E+08*x[1]*x[1]+1.008E+06*x[0]*x[0]*x[0]+1.698E+07*x[0]*x[0]*x[1]+6.09E+06*x[0]*x[1]*x[1]-3.391E+07*x[1]*x[1]*x[1]+8.459E+09*x[0]*x[0]*x[0]*x[0]+4.648E+08*x[0]*x[0]*x[0]*x[1]+1.584E+11*x[0]*x[0]*x[1]*x[1]+1.243E+08*x[0]*x[1]*x[1]*x[1]+9.672E+09*x[1]*x[1]*x[1]*x[1];
source=-(0.0144*0.55894609*ir*(((0.21+((-0.002)*(C_T(c,t)-298.15)))*(1+((((2.62323E-23)*(C_T(c,t)))/((1.602176E-19)*(0.93040049+((-0.002)*(C_T(c,t)-298.15)))))*((double)log((double)833)))))-(((0.0263+(0.0000355*833)+(0.00178*(C_T(c,t)-298)))*833*833*(pow((0.009637761+((-0.0007)*(C_T(c,t)-298.15))),2.))))))/0.00000864;
C_UDMI(c,t,0)=source;
return source;
}
this is my udf which i have a problem in ansys
so i want to make the same thing in named expression
so i had a problem in defining the cell temperature at centriod in named expression like udf