fluent中利用UDF定义物性随温度变化,初始化报错?

浏览:860

用UDF定义了流体物性随温度变化,初始化时报错出现Error: received a fatal signal (segmentation fault)
UDF 程序如下:
#include "udf.h"
DEFINE_PROPERTY(cell_density_hot,c,t)
{
  Thread*t;
  cell_t c;
  real rho;
  real temp;
  temp=C_T(c,t);
  rho=29440*exp(-0.01821*temp)+240.4*exp(-0.001971*temp);
  return rho;
}

DEFINE_SPECIFIC_HEAT(cell_specificheat_hot,T,Tref,h,yi)
{
  Thread*t;
  cell_t c;
  real cp;
  real temp;
  temp=C_T(c,t);
    if(temp>=360&&temp<=425)
    {
      cp=1.658e8*exp(-0.0373*temp)+1598*exp(-0.0007418*temp);  
    }
    else
    {
      cp=2.388e5*exp(-0.01836*temp)+980.9*exp(0.0002479*temp);
    }
  *h=cp*(temp-Tref);
  return cp;
}

DEFINE_PROPERTY(cell_thermalcond_hot,c,t)
{
  Thread*t;
  cell_t c;
  real ktc;
  real temp;
  temp=C_T(c,t);
  ktc=1.828e10*exp(-0.08465*temp)+0.01377*exp(0.00194*temp);
  return ktc;
}

DEFINE_PROPERTY(cell_viscosity_hot,c,t)
{
  Thread*t;
  cell_t c;
  real mu;
  real temp;
  temp=C_T(c,t);
  mu=-1.696e-19*exp(0.04779*temp)+1.17e-5*exp(0.001517*temp);
  return mu;
}

请问,这是什么原因,如何解决

邀请回答 我来回答

当前暂无回答

回答可获赠 200金币

没解决?试试专家一对一服务

换一批