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

please check DEFINE_ADJUST code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2012, 17:37
Default please check DEFINE_ADJUST code
  #1
New Member
 
IVI
Join Date: Oct 2012
Posts: 14
Rep Power: 14
89566008 is on a distinguished road
please check follow UDF code
I'm trying to calculate the V_cell (Eulerian particulate velocity) . I must summation the
variables around all particle injected to the control volume.
there are 368 particles injected to the C.V
and I want to storage the V_cell to the UDM5 .
What should I do? please help


DEFINE_ADJUST(v_cell_adjust, domain)
{
real sigma2=0, sigma3=0, v_cell;
Tracked_Particle *tp;
cell_t c = RP_CELL(&(tp->cCell));
Thread *t = RP_THREAD(&(tp->cCell));
Particle *p;
domain = Get_Domain(1);
thread_loop_c(t,domain)
{
begin_particle_cell_loop(p,c,t)
{
for(p=0;p<368;p++)
{
sigma3 += P_MASS(p)*P_VEL(p)[0]*0.65;
}
}
end_particle_cell_loop(p,c,t)
}

C_UDMI(c,t,5)=sigma2/(0.001*C_VOLUME(c,t));
}

thank you
IVI
89566008 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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 11:11
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56
own Code vs. commercial code Bernhard Mueck Main CFD Forum 10 February 16, 2000 11:07


All times are GMT -4. The time now is 20:18.