#include "udf.h"
DEFINE_SOURCE(heat_gen,c,t,dS,eqn)
{
real i=15.;
real c1=15.;
real F=96485.;
real source;
real t1=RP_Get_Real("flow-time" );
real T=C_T(c,t);
real soc=1-i*t1/c1;
if(0<=soc<=0.77)
{
if(293<=T<303)
source=2.258e-6*pow(soc,-0.3952)*i*i-i*T*(99.88*soc-76.67)/F;
else if(303<=T<313)
source=1.857e-6*pow(soc,-0.2787)*i*i-i*T*(99.88*soc-76.67)/F;
else
source=1.659e-6*pow(soc,-0.1692)*i*i-i*T*(99.88*soc-76.67)/F;
}
else if(0.77<soc<=0.87)
{
if(293<=T<303)
source=2.258e-6*pow(soc,-0.3952)*i*i+i*T*30/F;
else if(303<=T<=313)
source=1.857e-6*pow(soc,-0.2787)*i*i+i*T*30/F;
else
source=1.659e-6*pow(soc,-0.1682)*i*i+i*T*30/F;
}
else
{
if(293<=T<303)
source=2.258e-6*pow(soc,-0.3952)*i*i+i*T*20/F;
else if(303<=T<313)
source=1.857e-6*pow(soc,-0.2787)*i*i+i*T*20/F;
else
source=1.659e-6*pow(soc,-0.1692)*i*i+i*T*20/F;
}
dS[eqn]=0;
return source;
}
![用UDF定义电池的热源,以下是电池发热表达式以及程序,结果发散了,问题在哪?]()
~]M@IE8{WRB79@99SPKIW_T.png
![用UDF定义电池的热源,以下是电池发热表达式以及程序,结果发散了,问题在哪?-1]()
5O]L2TN5DYKXJFH733W}LPD.png
![用UDF定义电池的热源,以下是电池发热表达式以及程序,结果发散了,问题在哪?-2]()
)}6FJ5$8DTIZSDUCX9GP({R.png
![用UDF定义电池的热源,以下是电池发热表达式以及程序,结果发散了,问题在哪?-3]()
{8([`H`A{52%JV5I~K]0Q3G.png |