|
[Sponsors] |
Error in compiling UDF for computation of space charge density |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 18, 2009, 22:32 |
Error in compiling UDF for computation of space charge density
|
#1 |
New Member
Nil
Join Date: Jun 2009
Posts: 2
Rep Power: 0 |
Greetings all,
I am implementing the Poisson equation for electric field computations, thus there is a need to compute the space charge density in each cell. This charge density is due to steady-state simulation of charged particles using DPM. The code for the UDF is as such: __________________________________________________ _____________ #include "udf.h" #include "dpm.h" DEFINE_SOURCE(space_charge_source,c,t,dS,eqn) { real q_m_0 = 5; real number_of_particle_streams = 30000; real mass_flow_rate_0 = 0.000000883 / number_of_particle_streams; real cell_volume = C_VOLUME(c,t); real charge_flow_rate = q_m_0 * mass_flow_rate_0; real summation = 0; Particle *zz; real residence_time = 0; real space_charge_density = 0; begin_particle_cell_loop(zz,c,t) { residence_time = P_TIME(zz) - P_TIME0(zz); space_charge_density = charge_flow_rate * residence_time / cell_volume; summation = summation + space_charge_density; } end_particle_cell_loop(zz,c,t) real total_space_charge_density = summation; dS[eqn] = 0; return total_space_charge_density; } __________________________________________________ _____________ Upon compilation in Linux Fluent 6.3, I got the error message (attached screenshot). Please advice me on how to resolve this problem. Many Thanks (PS: I am suspecting that calculation of residence time is the problem) |
|
July 21, 2009, 03:29 |
Bump
|
#2 |
New Member
Nil
Join Date: Jun 2009
Posts: 2
Rep Power: 0 |
I would appreciate all help and comments. Thanks
|
|
Tags |
compile, error, residence time, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem in compiling property(density) UDF | satish2968 | FLUENT | 3 | October 31, 2008 16:06 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 09:23 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
Space charge density in ElectroStaticPrecipitator | Vijay | CFX | 1 | September 30, 2004 20:43 |
density update by UDF in non-premixed combustion | IKSOO | FLUENT | 2 | December 8, 2002 21:37 |