|March 21, 2006, 07:53||
particle body force and scalar update.
I'm looking on particle transport between two plates subjected to a potential diff of 10kV.
The potential between the two plates has been defined as an user scalar, and calculated with boundary values 0 and 10kV. This is no problem.
The next step is modelling how the particles act in the potential field. First i define a charge of the particle as a scalar update(DEFINE_DPM_SCALAR_UPDATE). Then the body force as an additional acceleration DEFINE_DPM_BODY_FORCE. The code is at the bottom. Compiling works and loading does to.
When using these two UDF's in the discrete phase model I get the following error:
:>> Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () <<<
1. there is nothing but this event. 2. wont help. 3. same same. 4. they are a bit slow The error object is empty, why!!!!
I have an idea that it has something to do with the C_UDSI_G command, but I'm not sure.
#include "udf.h" #include "surf.h"
if (initialize) /* only if init */
P_charge_density = - 1.e-3; /* [C/kg], if minus => negative charge */
p->user = P_charge_density * P_MASS(p);
cell_t cell = P_CELL(p);
Thread *thread = P_CELL_THREAD(p);
P_charge = -1.0 * P_USER_REAL(p,0); /* makes the gradient negativ */
NV_V(P_accelleration, =, C_UDSI_G(cell, thread, 0)); /*Coulomb force*/
NV_S(P_accelleration, *=, P_charge);
NV_S(P_accelleration, /=, P_MASS(p)); /* acceleration required */
|March 21, 2006, 10:55||
Re: particle body force and scalar update.
There is nothing wrong with your code except the global "Particel *p;" which is not needed. It runs perfectly well on my machine. Maybe you did not allocate the particle scalar (define->models->discrete phase , in udf tab set number of scalars to 1)
|Thread||Thread Starter||Forum||Replies||Last Post|
|Adding side force to forceCoeffs.C||drrbradford||OpenFOAM Programming & Development||23||August 26, 2015 11:58|
|Tomiyama wall lubrication force||Edy||OpenFOAM||10||December 13, 2010 12:41|
|charged particle UDS, UDF||JJi||Fluent UDF and Scheme Programming||0||May 12, 2009 04:32|
|model particle movement under magnetic force||phsieh2005||Main CFD Forum||8||March 28, 2007 07:12|
|How to see Scalar Force Datas?||Tunc||CD-adapco||1||September 20, 2005 10:24|