CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

UDF for defining a body force in Singel ROtating Reference Frame

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By teymourj
  • 1 Post By mingersai

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2010, 02:06
Default UDF for defining a body force in Singel ROtating Reference Frame
  #1
New Member
 
Teymour
Join Date: Apr 2009
Location: Seattle
Posts: 21
Rep Power: 9
teymourj is on a distinguished road
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 02:09. Reason: Correcting UDF lines
teymourj is offline   Reply With Quote

Old   July 28, 2011, 13:46
Default Solution!
  #2
New Member
 
Teymour
Join Date: Apr 2009
Location: Seattle
Posts: 21
Rep Power: 9
teymourj is on a distinguished road
I found the solution to this problem. Read the MRF/SRF limitations for tracking particles in ANSYS FLUENT user's guide at:

// User's Guide :: 1 // 10. Modeling Flows with Moving Reference Frames // 10.3. Flow in Multiple Moving Reference Frames // 10.3.1. The Multiple Reference Frame Model

Note that the particle track in rotating reference frame for inert particles is MEANINGLESS (see the user's guide). You should use the TUI command to track particles and extract their data in absolute reference frame.

Best,

Teymour
mingersai likes this.
teymourj is offline   Reply With Quote

Old   July 28, 2011, 17:45
Default
  #3
Member
 
Ming Cai
Join Date: Mar 2011
Posts: 50
Rep Power: 7
mingersai is on a distinguished road
THANK YOU SO MUCH!!!!!!
That's why I can not get anyting. With rotating reference frame.
Ansys customer support seems to made a mistake, I had asked them whether I can inject particles without being affected by rotation reference frame and they said no......

I had been stucked here for a long time.

Thanks for your help!

Quote:
Originally Posted by teymourj View Post
I found the solution to this problem. Read the MRF/SRF limitations for tracking particles in ANSYS FLUENT user's guide at:

// User's Guide :: 1 // 10. Modeling Flows with Moving Reference Frames // 10.3. Flow in Multiple Moving Reference Frames // 10.3.1. The Multiple Reference Frame Model

Note that the particle track in rotating reference frame for inert particles is MEANINGLESS (see the user's guide). You should use the TUI command to track particles and extract their data in absolute reference frame.

Best,

Teymour
teymourj likes this.
mingersai is offline   Reply With Quote

Old   August 18, 2016, 14:33
Default
  #4
New Member
 
mahya
Join Date: Jul 2016
Posts: 21
Rep Power: 2
mahayheidari is on a distinguished road
can you explain it for me ?
i have problem in it yet
mahayheidari is offline   Reply With Quote

Old   August 18, 2016, 15:01
Default Please be specific about your problem/question.
  #5
New Member
 
Teymour
Join Date: Apr 2009
Location: Seattle
Posts: 21
Rep Power: 9
teymourj is on a distinguished road
@mahayheidari: Please be specific about your problem and what you are not understanding and I will provide you inputs.

This thread is very old and I am not sure what you need me to explain. Explain your problem from scratch.
teymourj is offline   Reply With Quote

Old   August 18, 2016, 15:07
Default
  #6
New Member
 
mahya
Join Date: Jul 2016
Posts: 21
Rep Power: 2
mahayheidari is on a distinguished road
I have a prticle in a fluid
And the particle have transitional and rotational movement
I simulate it
But the particle just have transitional movement
And it cant rotate
I want to know what should i do
Thanks
mahayheidari is offline   Reply With Quote

Old   August 18, 2016, 15:09
Default
  #7
New Member
 
Teymour
Join Date: Apr 2009
Location: Seattle
Posts: 21
Rep Power: 9
teymourj is on a distinguished road
What are the models you are using to simulate the flow field and particle respectively in FUENT?
teymourj is offline   Reply With Quote

Old   August 18, 2016, 15:13
Default
  #8
New Member
 
mahya
Join Date: Jul 2016
Posts: 21
Rep Power: 2
mahayheidari is on a distinguished road
There is a canal that a circular particle move in it
If you want i will sent the picture
mahayheidari is offline   Reply With Quote

Old   August 18, 2016, 15:15
Default
  #9
New Member
 
mahya
Join Date: Jul 2016
Posts: 21
Rep Power: 2
mahayheidari is on a distinguished road
Dynamic mesh
Remeshing
Smoothing
6dof
mahayheidari is offline   Reply With Quote

Old   August 18, 2016, 15:33
Default
  #10
New Member
 
Teymour
Join Date: Apr 2009
Location: Seattle
Posts: 21
Rep Power: 9
teymourj is on a distinguished road
Well to be honest these informations are not helpful for me to help you.

This thread was about changing the Reference Frame for particle tracking of particles using DRW model coupled with the SRF or MRF model. In the SRF or MRF model RANS equations are solved in rotating reference frame and particles are tracked in that frame.

It seems that you are using Dynamic mesh model in which the movement of particles should be physical by default.

Hope this helps.
teymourj is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DPM and Forces in rotating reference frame Xiana FLUENT 3 May 8, 2015 06:35
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Moving Reference Frame UDF Mark FLUENT 1 March 17, 2008 18:57
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


All times are GMT -4. The time now is 02:41.