C++出现fatal error C1004: unexpected end of file found是怎么回事? 5
程序最后一行出现这个错误,已经检查过很多次了,初学C语言,一直没弄明白是什么情况,请各位大神帮帮忙!程序如下:#include"udf.h"#include"unstea...
程序最后一行出现这个错误,已经检查过很多次了,初学C语言, 一直没弄明白是什么情况,请各位大神帮帮忙!程序如下:
#include "udf.h"
#include "unsteady.h"
#include "math.h"
#include "dynamesh_tools.h"
#define g_c 9.81
#define initial_mass 0.12
#define d_coal 0.045
#define d_pipe 0.05
#define den_water 1000.0
#define den_coal 1300.0
#define l_coal 0.057
#define V_water 3.0
#define con_factor 0.63
#define viscosity_water 0.000001
#define lift_factor 0.96
#define fric_factor 0.537
#define t_liftoff 0.1
float R_diameter;
float R_shape;
float Head_factor;
float L_depart;
float Pthrust;
float Re;
float Drag_factor;
float Func1;
float Func2;
float Energy_correction;
float G_coal;
float Float_water;
float Shear_force;
float Fric_coal;
float Lifting_force;
DEFINE_SDOF_PROPERTIES(coallog,prop,dt,time,dtime)
{
prop[SDOF_MASS]=initial_mass;
prop[SDOF_IXX]=0.0;
prop[SDOF_IYY]=0.0;
prop[SDOF_IZZ]=0.0;
prop[SDOF_LOAD_M_X]=0;
prop[SDOF_LOAD_M_Y]=0;
prop[SDOF_LOAD_M_Z]=0;
R_diameter=d_coal/d_pipe;
R_shape=l_coal/d_coal;
L_depart=3*(d_pipe-d_coal);
Head_factor=(1/con_factor-1)*(1/con_factor-1);
Func1=1/(1-R_diameter*R_diameter);
Func2=sqrt(1-(1-R_diameter)*(1-R_diameter));
Re=V_water*d_pipe/((d_pipe+d_coal)*viscosity_water);
Drag_factor=0.24/pow(Re,0.25);
G_coal=initial_mass*g_c;
V_avg=3.0;
Float_water=den_water*g_c*3.14*d_coal*d_coal*l_coal;
Energy_correction=1+0.193*R_diameter+0.0763*R_diameter*R_diameter;
Shear_force=Func1*Func1*(1-R_diameter*R_diameter)/(4*R_shape*R_diameter*(R_diameter+Func2))*(Energy_correction*(1+Head_factor)+Drag_factor*(l_coal-L_depart)/(d_pipe-d_coal)-1)*den_water*V_water*V_water/2;
Lifting_force=lift_factor*3.14*d_coal*d_coal/4*den_water*V_avg*V_avg/2;
Fric_coal=fric_factor*(g_c*(den_coal-den_water)*3.14*d_coal*d_coal/4*l_coal-Lifting_force);
prop[SDOF_LOAD_F_X]=Shear_force*3.14*d_coal*l_coal+Pthrust-Fric_coal;
prop[SDOF_LOAD_F_Y]=Float_water+Lifting_force-G_coal;
prop[SDOF_LOAD_F_Z]=0;
} 展开
#include "udf.h"
#include "unsteady.h"
#include "math.h"
#include "dynamesh_tools.h"
#define g_c 9.81
#define initial_mass 0.12
#define d_coal 0.045
#define d_pipe 0.05
#define den_water 1000.0
#define den_coal 1300.0
#define l_coal 0.057
#define V_water 3.0
#define con_factor 0.63
#define viscosity_water 0.000001
#define lift_factor 0.96
#define fric_factor 0.537
#define t_liftoff 0.1
float R_diameter;
float R_shape;
float Head_factor;
float L_depart;
float Pthrust;
float Re;
float Drag_factor;
float Func1;
float Func2;
float Energy_correction;
float G_coal;
float Float_water;
float Shear_force;
float Fric_coal;
float Lifting_force;
DEFINE_SDOF_PROPERTIES(coallog,prop,dt,time,dtime)
{
prop[SDOF_MASS]=initial_mass;
prop[SDOF_IXX]=0.0;
prop[SDOF_IYY]=0.0;
prop[SDOF_IZZ]=0.0;
prop[SDOF_LOAD_M_X]=0;
prop[SDOF_LOAD_M_Y]=0;
prop[SDOF_LOAD_M_Z]=0;
R_diameter=d_coal/d_pipe;
R_shape=l_coal/d_coal;
L_depart=3*(d_pipe-d_coal);
Head_factor=(1/con_factor-1)*(1/con_factor-1);
Func1=1/(1-R_diameter*R_diameter);
Func2=sqrt(1-(1-R_diameter)*(1-R_diameter));
Re=V_water*d_pipe/((d_pipe+d_coal)*viscosity_water);
Drag_factor=0.24/pow(Re,0.25);
G_coal=initial_mass*g_c;
V_avg=3.0;
Float_water=den_water*g_c*3.14*d_coal*d_coal*l_coal;
Energy_correction=1+0.193*R_diameter+0.0763*R_diameter*R_diameter;
Shear_force=Func1*Func1*(1-R_diameter*R_diameter)/(4*R_shape*R_diameter*(R_diameter+Func2))*(Energy_correction*(1+Head_factor)+Drag_factor*(l_coal-L_depart)/(d_pipe-d_coal)-1)*den_water*V_water*V_water/2;
Lifting_force=lift_factor*3.14*d_coal*d_coal/4*den_water*V_avg*V_avg/2;
Fric_coal=fric_factor*(g_c*(den_coal-den_water)*3.14*d_coal*d_coal/4*l_coal-Lifting_force);
prop[SDOF_LOAD_F_X]=Shear_force*3.14*d_coal*l_coal+Pthrust-Fric_coal;
prop[SDOF_LOAD_F_Y]=Float_water+Lifting_force-G_coal;
prop[SDOF_LOAD_F_Z]=0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询