CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Help with my proleme pls , i need it for my comunication next monthe

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2017, 06:22
Smile Help with my proleme pls , i need it for my comunication next monthe
  #1
New Member
 
Bagané Youssef
Join Date: Dec 2016
Posts: 5
Rep Power: 10
Youssef18 is on a distinguished road
Hello all,
wen i try to compile my udf i have this error :
air.c ..\..\src\air.c(31) : error C2198: 'SV_is_point_in_cell'˙: pas assez d'arguments pour un appel
..\..\src\air.c(75) : error C2198: 'SV_is_point_in_cell'˙: pas assez d'arguments pour un appel

pls help me i need to fix this



#include "udf.h"
#include "dpm.h"
/*******************************
Global Variables
*******************************/
real air_c_centroid[ND_ND]; /* Centroid of the injection cell */
real air_velo_momentum = 0.0;
real air_mass_stream = 6.125e-3; /* Mass steam used for mass source
and momentum source, in kg/s */
real air_c_volume; /* Volume of the injection cell */
extern real inj_pos[ND_ND];
extern real velo_momentum;
/************************************************** ********
Define the mass source of air exists in the marked cell.
************************************************** ********/
DEFINE_SOURCE(air_mass_source,c,t,dS,eqn)
{
#if !RP_HOST /* Compile this section for computing processes only
(serial and node) */
real air_mass_source;
CX_Cell_Id cx_cell; /* Define the current cell */
cell_t c_mark = 0; /* Define and initial the marked cell */
Thread *t_mark = NULL; /* Define and initial the marked thread */
if (inj_pos[0] != 0.) /* Excludes this variables as 0.0
in the other computer node or host */
{
if(SV_is_point_in_cell(&cx_cell,c,t,inj_pos))
/* If the injection point in this cell */
{
c_mark = RP_CELL(&cx_cell); /* Get the marked cell */
t_mark = RP_THREAD(&cx_cell); /* Get the thread of this
marked cell */
C_CENTROID(air_c_centroid,c_mark,t_mark); /* Get the cell
centroid of the
marked cell*/
air_c_volume = C_VOLUME(c_mark,t_mark); /* Get the volume of
the cell from ANSYS
FLUENT*/
air_mass_source = air_mass_stream / air_c_volume; /* Mass
source */
dS[eqn] = 0; /* No dependent variables of
the transport equation */
Message("\n****************air source*****************\n");
Message("\n air inj_pos: [%g, %g, %g]\n",
inj_pos[0],inj_pos[1],inj_pos[2]);
Message("\n air source centroid: [%g, %g, %g]\n",
air_c_centroid[0],air_c_centroid[1],air_c_centroid[2]);
Message("\n****************air source*****************\n");
}
}
else air_mass_source = dS[eqn] = 0;
return air_mass_source;
#endif /* !RP_HOST */
}
/************************************************** *********
Define the momentum source of air exists in the marked cell.
************************************************** **********/
DEFINE_SOURCE(air_momentum_source,c,t,dS,eqn)
{
#if !RP_HOST
real air_momentum_source;
air_velo_momentum = RP_Get_Real("air/velo_momentum");
/* initial velocity used for momentum source in DEFINE_SOURCE */
/* To set up this user Scheme variable in cortex type */
/* (rp-var-define ' air/velo_momentum 1 ' real #f) */
/* After set up you can change it to another variable: */
/* (rpsetvar ' air/velo_momentum 34) */
CX_Cell_Id cx_cell;
cell_t c_mark = 0;
Thread *t_mark = NULL;
if (inj_pos[0] != 0.)
{
if(SV_is_point_in_cell(&cx_cell,c,t,inj_pos))
{
c_mark = RP_CELL(&cx_cell);
t_mark = RP_THREAD(&cx_cell);
air_c_volume = C_VOLUME(c_mark,t_mark);
air_momentum_source = air_mass_stream * air_velo_momentum
/ air_c_volume;
dS[eqn] = 0;
}
}
else air_momentum_source = dS[eqn] = 0;
return air_momentum_source;
#endif /* !RP_HOST */
}
Youssef18 is offline   Reply With Quote

Old   June 22, 2017, 07:02
Default
  #2
Senior Member
 
KaLium's Avatar
 
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9
KaLium is on a distinguished road
If you look this example: https://www.sharcnet.ca/Software/Flu...udf/node72.htm

RP_Cell() might need the #include "surf.h"
KaLium is offline   Reply With Quote

Old   June 22, 2017, 07:10
Exclamation
  #3
New Member
 
Bagané Youssef
Join Date: Dec 2016
Posts: 5
Rep Power: 10
Youssef18 is on a distinguished road
Quote:
Originally Posted by KaLium View Post
If you look this example: https://www.sharcnet.ca/Software/Flu...udf/node72.htm

RP_Cell() might need the #include "surf.h"
thx for ur answer, but i try it nd i still have the same problem
Youssef18 is offline   Reply With Quote

Old   June 22, 2017, 09:25
Default
  #4
Senior Member
 
KaLium's Avatar
 
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9
KaLium is on a distinguished road
There were also some other differences between your code and the example. Maybe you should copy the example as much as possible.
KaLium is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need help following problem pls pls help gmani CFX 4 March 31, 2009 10:39


All times are GMT -4. The time now is 19:06.