0
我一直在研究液體在飛機液滴罐內的運動。對於我最初的情況,流體正在來回移動。對於這種情況,我使用了下面的代碼,但正在產生錯誤。FLUENT-區域運動UDF錯誤
zone_motion.c ..\..\src\zone_motion.c(7) : error C2100: illegal indirection
..\..\src\zone_motion.c(11) : error C2100: illegal indirection
..\..\src\zone_motion.c(14) : error C2109: subscript requires array or pointer type
..\..\src\zone_motion.c(14) : error C2100: illegal indirection
..\..\src\zone_motion.c(14) : error C2109: subscript requires array or pointer type
..\..\src\zone_motion.c(14) : error C2109: subscript requires array or pointer type
如何修改此代碼?
#include "udf.h"
DEFIINE_ZONE_MOTION(fmotion, omega, axis, origin, velocity, time, dtime)
{
if(time<10)
{
*omega=10;
}
else
{
*omega=0;
}
N3V_D(velocity,=,0.01*sin(*omega*time), 0.0, 0.0);
}
任何幫助將不勝感激。 謝謝
zone_motion.c .. \ .. \ SRC \ zone_motion.c(7):錯誤C2100:非法的間接 .. \ .. \ SRC \ zone_motion.c(11):錯誤C2100 :非法間接 .. \ .. \ src \ zone_motion.c(14):錯誤C2109:下標需要數組或指針類型 .. \ .. \ src \ zone_motion.c(14):錯誤C2100:非法間接尋址 .. \ .. \ src \ zone_motion.c(14):錯誤C2109:下標需要數組或指針類型 .. \ .. \ src \ zone_motion.c(14):錯誤C2109:下標需要數組或指針類型 – shivakumar
在問題本身中添加錯誤。 –