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

Negative volumes when using UDF in VIV in a cylinder

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By w-coche

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2011, 02:42
Default Negative volumes when using UDF in VIV in a cylinder
  #1
New Member
 
w-coche
Join Date: Oct 2011
Posts: 1
Rep Power: 0
w-coche is on a distinguished road
Hello all,

I am trying to solve the VIV case in a cylinder when Re=100 in Fluent 6.3. I have the solution when the cylinder is at rest, and my results are accurate. However, my problems appear when I try to use an UDF. When it is iterating, it stops because negative volumes appear. I do not know what I am doing wrong. My udf that I am using is one that I found on Internet:

#include "udf.h"

static real v_prev = 0.0;

DEFINE_CG_MOTION(osc,dt,vel,omega,time,dtime)
{
Thread *t;
Domain *d = Get_Domain(1);
real x_cg[3], force[3], moment[3];
real accl, dv;
real mass = 0.2;
real wn = 12.0;
real k= mass * wn*wn;
real c = 2*mass*wn*0.00;
int i;

NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);
t = DT_THREAD(dt);
for(i=0;i<3;i++)
x_cg[i]=DT_CG(dt)[i];

Compute_Force_And_Moment(d, t, x_cg, force, moment, TRUE);
force[1] += -k*x_cg[1] - c*vel[1];

accl = force[1]/mass;
dv = accl*dtime;
v_prev+=dv;
vel[1] = v_prev;
printf("Computed force: %g \n", force[1]);
printf("Velocity: %g\n", vel[1]);
}


DEFINE_CG_MOTION(osc_inert,dt,vel,omega,time,dtime )
{
vel[0] = 0.0;
vel[1] = v_prev;
}

My parameters are based on smoothing and remeshing, and I am hooking osc to my cylinder. Here is attached my mesh. Please I need your help because I do not know if I need to change the mesh or I need to change some of the parameters.

Thanks,

Willy
Attached Images
File Type: jpg Mesh_cylinder.jpg (100.1 KB, 82 views)
File Type: jpg mesh_cylinder2.jpg (96.3 KB, 75 views)
zhaomu67 likes this.
w-coche is offline   Reply With Quote

Old   May 31, 2012, 13:34
Default
  #2
New Member
 
zhang guoqing
Join Date: May 2011
Posts: 10
Rep Power: 15
qing123 is on a distinguished road
Hi:
Have u solve your problem regarding the negative grid? Could u tell me? Tks.
qing123 is offline   Reply With Quote

Old   June 1, 2012, 05:06
Default
  #3
New Member
 
Jessica Simberg
Join Date: Mar 2012
Posts: 18
Rep Power: 14
Jessica.S is on a distinguished road
You need to define another fluid zone which surrounds your body and moves with it...
Can you send me your case & mesh (jessica.simberg@gmail.com)?
Jessica.S is offline   Reply With Quote

Old   June 4, 2012, 07:47
Default
  #4
New Member
 
Join Date: Apr 2012
Posts: 17
Rep Power: 14
Faby is on a distinguished road
W-COCHE...have you fixed your problem?
Faby is offline   Reply With Quote

Old   October 19, 2012, 08:25
Default
  #5
New Member
 
Myth
Join Date: Jul 2011
Location: Unitek kingdom
Posts: 17
Rep Power: 15
mg.mithun is on a distinguished road
Send a message via Yahoo to mg.mithun Send a message via Skype™ to mg.mithun
Hi
Is the above udf correct? how and where you are calculating the pressure and viscous forces? I guess there should be a loop for calculating pressure and viscous forces acting on the cylinder. If someone have an answer to this please reply
mg.mithun is offline   Reply With Quote

Reply


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
benchmark: flow over a circular cylinder goodegg Main CFD Forum 12 January 22, 2013 12:47
trailing edge negative volumes Nick R ANSYS Meshing & Geometry 2 February 2, 2011 03:05
Mesh orientation and negative volumes Nick R CFX 3 January 10, 2011 17:34
body has to move in positive and negative x-direction (UDF?) bobo FLUENT 0 July 2, 2009 07:41
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 13:20.