C 飞机液滴箱内流体的运动

C 飞机液滴箱内流体的运动,c,user-defined-functions,fluent,C,User Defined Functions,Fluent,我一直在研究飞机升降舱内流体的运动。在我最初的例子中,流体是来回移动的。对于本例,我使用了以下代码,但产生了错误 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

我一直在研究飞机升降舱内流体的运动。在我最初的例子中,流体是来回移动的。对于本例,我使用了以下代码,但产生了错误

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);
}
#包括“udf.h”
定义区域运动(fmotion,omega,axis,origin,velocity,time,dtime)
{

如果(time我可能帮不了你,但也许其他人会觉得这很有用。我有一个与你的问题类似的工作代码。该代码在域的早期和达到它所能容纳的最大欧米伽值后会快速增长。享受:

#include "udf.h"

DEFINE_ZONE_MOTION(fmotion2,omega,axis,origin,velocity,time,dtime)
{
float omega_max, t_end, ramp, rpm;

omega_max=314.0;
t_end=10.0;
ramp=omega_max / t_end;
velocity[0]=0.0;
velocity[1]=0.0;
velocity[2]=0.0;

origin[0]=-0.1;
origin[1]=-0.1;
origin[2]=0.0;

axis[0]=0.0;
axis[1]=0.0;
axis[2]=1.0;

    if (CURRENT_TIME < t_end) 
    {
    *omega = ramp * CURRENT_TIME;
    //print("Current omega value %fn",*omega);
    }
    else
    {
    *omega = omega_max;
    }
  return;
}
#包括“udf.h”
定义区域运动(fmotion2,ω,轴,原点,速度,时间,dtime)
{
浮动欧米伽最大值,t端,斜坡,rpm;
omega_max=314.0;
t_end=10.0;
斜坡=最大ω/t端;
速度[0]=0.0;
速度[1]=0.0;
速度[2]=0.0;
原点[0]=-0.1;
原点[1]=-0.1;
原点[2]=0.0;
轴[0]=0.0;
轴[1]=0.0;
轴[2]=1.0;
如果(当前时间<结束时间)
{
*ω=斜坡*电流时间;
//打印(“当前ω值%fn”,*ω);
}
其他的
{
*omega=omega_max;
}
返回;
}

zone\u motion.c..\src\zone\u motion.c(7):错误C2100:非法间接寻址..\src\zone\u motion.c(11):错误C2100:非法间接寻址..\src\zone\u motion.c(14):错误C2109:下标需要数组或指针类型..\src\zone\u motion.c(14):错误C2100:非法间接寻址..\src\zone\u motion.c(14):错误C2109:下标需要数组或指针类型..\\src\zone\u motion.c(14):错误C2109:下标需要数组或指针类型在问题本身中添加错误。无论这是否有用,您都应该只发布问题的适当答案,而不发布其他内容