|
|||||
UDF for defining a body force in Singel ROtating Reference Frame |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
|
#1 |
|
New Member
Teymour
Join Date: Apr 2009
Posts: 7
Rep Power: 2 |
Dear all,
I am trying to use Discrete Phase Model (DPM) to look at particle behavior in the solution of my Single Rotating Reference Frame (SRF) which contains my countinues fluid. As long as SRF has rotating frames, therefore a Centrifugal and Coriolis term will be added to the equation of force balance of the particles. What I need to do, is writing a UDF which calculates these two forces. Then compile it with my model, so that it cancels those two additional forces. I wrote a UDF based on UDF manual section 2.5.2 file:///usr/ansys_inc/v120/fluent//f...udf/node67.htm as follow, but it did not work out and I get error when I want to compile it. I was wondering if anyone can help me with that. /* UDF for computing the force due rotating refrence frame on a particle */ #include "udf.h" #define ROHR 1.5 /* density ratio of particles (roh/roh_p) */ #define OMEGA 1.78 /* angular velocity [rad/sec] */ /* Calculate some of centrifugal & coriolis force on a particle */ /* axis of rotation is "Y" and there are two force components in "X" and "Z" */ /* Fx= (1-ROHR)*OMEGA^2*x + 2*OMEGA*(u_z,p - ROHR*u_z), Fz= (1-ROHR)*OMEGA^2*z + 2*OMEGA*(u_x,p - ROHR*u_x) */ DEFINE_DPM_BODY_FORCE(particle_body_force,p,i) { real bforce=0; if(P_TIME(p)>=TSTART) { if(i==0) bforce=(1-ROHR)*OMEGA^2*P_INIT_POS(p)[0] + 2*OMEGA*(P_VEL(p)[2] - ROHR*rel_vel[2]); else if(i==2) bforce=(1-ROHR)*OMEGA^2*P_INIT_POS(p)[2] + 2*OMEGA*(P_VEL(p)[0] - ROHR*rel_vel[0]); } else bforce=0.0; /* an acceleration should be returned */ return (bforce/P_MASS(p)); Thank you for your help in advance. -teymourj Last edited by teymourj; February 9, 2010 at 01:09. Reason: Correcting UDF lines |
|
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
| Moving Reference Frame UDF | Mark | FLUENT | 1 | March 17, 2008 18:57 |
| DPM and Forces in rotating reference frame | Xiana | FLUENT | 2 | March 13, 2008 07:00 |
| Single rotating reference frame | Belete Kiflie | FLUENT | 6 | June 18, 2006 03:38 |
| rotating reference frame | Pei-Ying Hsieh | Main CFD Forum | 1 | April 5, 2006 08:54 |