|
[Sponsors] |
May 4, 2014, 20:08 |
body force as distance
|
#1 |
New Member
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
Hello,
I am trying to assign the body force for DPM model. It is the magnetic force form and I've modified the existing udf file as follows. When I compile it, I get the following warning message. "warning C4700: uninitialized local variable 'x' used" Could you help me if there is any problem with this udf? Thanks in advance. #include "udf.h" #define Q 1.0 #define BZ 3.0 DEFINE_DPM_BODY_FORCE(particle_body_force,p,i) { real x[ND_ND]; real bforce=0; if(i==0) bforce=Q*BZ*P_VEL(p)[1]/sqrt(x[0]*x[0]+x[1]*x[1])/pow(10,10); else if(i==1) bforce=-Q*BZ*P_VEL(p)[0]/sqrt(x[0]*x[0]+x[1]*x[1])/pow(10,10); else bforce=0; return (bforce/P_MASS(p)); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 11:12 |
force convergence problems in CFX 6DOF rigid body solver | ajay_ks | CFX | 8 | March 25, 2013 04:02 |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 22:03 |
Body force at the cell face | Souviktor | Fluent UDF and Scheme Programming | 0 | March 31, 2009 08:54 |
UDF for lift force on a bluff body | sawa | FLUENT | 2 | April 11, 2005 03:06 |