|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
程序:
#include "udf.h"
/*define which user-defined scalars to use*/
enum
{
VOLT,/*define voltage*/
N_REQUIRED_UDS
};
DEFINE_ADJUST(volt_adjust,domain)
{
cell_t c;
Thread* t;
face_t f;
if(n_uds<N_REQUIRED_UDS)
/*make sure there are enough user defined-scalars*/
Internal_Error("not enough user-defined scalar allocated");
}
#define DIELECTRIC_CONSTANT 1.00005;
#define CAPACITANCE 3.0;
#define REAL_CONSTANT 1.0;
DEFINE_DIFFUSIVITY(volt_diffusivity,c,t,i)
{
real diffusivity;
diffusivity=1.0;
return diffusivity;
}
DEFINE_SOURCE(voltage_source,c,t,dS,eqn) /*define the source*/
{
real volt_source;
volt_source=CAPACITANCE*C_UDSI(c,t,VOLT)/DIELECTRIC_CONSTANT;
dS[eqn]=-CAPACITANCE/DIELECTRIC_CONSTANT;
return volt_source;
}
错误提示:
cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "J:\tongdao\uDS\src\V.c"
Error: J:\tongdao\uDS\src\V.c: line 29: invalid type for pointer dereference: float. |
|