|
[Sponsors] |
November 14, 2012, 17:37 |
please check DEFINE_ADJUST code
|
#1 |
New Member
IVI
Join Date: Oct 2012
Posts: 14
Rep Power: 14 |
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 |
|
|
|
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 |