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

Error in compiling UDF for computation of space charge density

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2009, 21:32
Default Error in compiling UDF for computation of space charge density
  #1
New Member
 
Nil
Join Date: Jun 2009
Posts: 2
Rep Power: 0
greensociety is on a distinguished road
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)
Attached Images
File Type: jpg error_message.JPG (85.1 KB, 27 views)
greensociety is offline   Reply With Quote

Old   July 21, 2009, 02:29
Default Bump
  #2
New Member
 
Nil
Join Date: Jun 2009
Posts: 2
Rep Power: 0
greensociety is on a distinguished road
I would appreciate all help and comments. Thanks
greensociety is offline   Reply With Quote

Reply

Tags
compile, error, residence time, udf


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
Problem in compiling property(density) UDF satish2968 FLUENT 3 October 31, 2008 15:06
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Warning 097- AB Siemens 6 November 15, 2004 04:41
Space charge density in ElectroStaticPrecipitator Vijay CFX 1 September 30, 2004 19:43
density update by UDF in non-premixed combustion IKSOO FLUENT 2 December 8, 2002 20:37


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