|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我用的是fluent6.3.26,想用VC编译程序。麻烦大家帮忙看下有什么问题,在此万分感谢。程序如下:
#include "stdafx.h"
//write your include header here......
#include "udf.h"
# define Irf 285.88
# define permeability 1.747e-6
extern "C"{
DEFINE_SOURCE(momentum_x_source, c, t, dS, i)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//normal function body here
real velocity;
real source;
velocity= sqrt(pow(C_U(c,t),2)+pow(C_V(c,t),2)+pow(C_W(c,t),2));
source= -C_MU_T(c,t)*C_U(c,t)/permeability - Irf*0.5*C_R(c,t)*C_U(c,t)*velocity;
ds[eqn]= -C_MU_T(c,t)/permeability - Irf*0.5*C_R(c,t)*velocity-Irf*0.5*C_R(c,t)*pow(C_U(c,t),2)/velocity;
return source;
}
编译时出现错误,错误如下:
Error: CAR: invalid argument [1]: wrong type [not a pair]
Error Object: ()
> adapt/ file/ report/
define/ grid/ solve/
display/ parallel/ surface/
exit plot/ view/
> adapt/ file/ report/
define/ grid/ solve/
display/ parallel/ surface/
exit plot/ view/
> /file/rj c:\temp.jou
> /define/user-defined/compiled-functions load E:\TMP312\libudf "e:/tmp312"
Opening library "E:\TMP312\libudf"...
Error: open_udf_library: 系统找不到指定的文件。
Error Object: ()
Warning: An error or interrupt occurred while reading the journal file.
Some commands may not have been completed.
VC6.0环境设置如下:
C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include
C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib
C:\Program Files\Microsoft Visual Studio\Common\MSDev98
C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\StormⅡ\Codec;C:\Program Files\StormⅡ;C:\PROGRA~1\MIAF9D~1\vc98\Bin;d:\ansys fluent\fluent\fluent.inc\ntbin\ntx86 |
|