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

Uds udf issue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2010, 10:52
Question Uds udf issue
  #1
Member
 
CJ
Join Date: Jun 2009
Posts: 34
Rep Power: 16
solefire is on a distinguished road
Currently I have some trouble in implementing UDF.

It is about adding a scalar equation :UDS:…. Which is almost like mass fraction equation re writing myself , I didn’t get right result. Could u help me take a look! I am so grateful ! . There are no grammar mistakes, and I can compile as well! But I feel some where there is mistake! And I don’t know how to save data from UDSI to UDMI.



/*to define scalar source*/

#define SV_YN SV_UDS_I(YN)

#define SV_OTHER SV_UDM_I

#define C_YN(c,t) C_UDSI(c,t,YN)
#define F_YM(f,t) F_UDMI(f,t,YM)



/*User-Defined-Scalars-Pollutant-mass-fraction-Normalization by well-mixed concentration*/

enum

{YN,

N_REQUIRED_UDS

};

/*Initialize parameters in the domain*/

DEFINE_INIT(init_parameter,domain)
{
Domain *d;
Thread *t;
cell_t c;
face_t f;
int i;

if(n_uds<N_REQUIRED_UDS)
{
Error("Not enough user defined scalars!\n");
}
d = Get_Domain(1);
thread_loop_c(t,d)
{
if(NNULLP(THREAD_STORAGE(t,SV_YN)))
{
begin_c_loop(c,t)
{
for(i=0;i<N_REQUIRED_UDS;i++)
C_UDSI(c,t,i)=0.0;
}
end_c_loop(c,t);
}
}

thread_loop_f (t,domain)
{

if(BOUNDARY_FACE_THREAD_P(t)&NNULLP(THREAD_STORAGE (t,SV_YN)))
{
begin_f_loop(f,t)
{
for(i=0;i<N_REQUIRED_UDS;i++)
F_UDSI(f,t,i)=0.0;
}
end_f_loop(f,t);
}

}

}


DEFINE_DIFFUSIVITY(diffusivity, c, t, i)

{

(information….correct)



}





DEFINE_SOURCE(scalar_source,c,t,dS,eqn)

{

(information….correct)

}

Last edited by solefire; September 27, 2010 at 15:48.
solefire 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
error about uds in udf a.maroofi Fluent UDF and Scheme Programming 0 September 22, 2010 02:23
connection between udf and uds a.maroofi Fluent UDF and Scheme Programming 1 September 19, 2010 08:46
UDS UDF for post-processing KRK FLUENT 1 January 19, 2007 04:31
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 15:58
UDF Adjust to redefine UDS Diffusivity David harvey FLUENT 4 February 27, 2004 07:47


All times are GMT -4. The time now is 10:35.