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

vortex induced vibration

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

Like Tree1Likes
  • 1 Post By Simon Wang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2011, 11:47
Default vortex induced vibration
  #1
New Member
 
Wang Xiaosong
Join Date: May 2011
Posts: 1
Rep Power: 0
Simon Wang is on a distinguished road
Hi, everybody
I'am do a numerical simulation of vortex induced vibration use fluent 6.3.But I met some very stange problems, if I use boundary layer in mesh, the cylinder amplitude is much too high and fore exerted on cylinder is also larger than normal level. If I don't use boundary layer in my mesh, the mesh near to the cylinder became very bad in simulation.
So is there anybody can help me, I have been stuck by this problem for months.

Here is the full text of my UDF.
#include <stdio.h>
#include "udf.h"
# define UDF_FILENAME "udf_loc_velo_acc"
# define Temp_File "mytemp"

/* read current location,velocity and accelerator from file */
static void
read_loc_vel_acc_file (real *loc1, real *vel1,real *acc1)
{
FILE *fp = fopen(Temp_File, "r");
if (fp != NULL)
{
float read_loc1, read_vel1, read_acc1;
fscanf (fp, "%e %e %e", &read_loc1, &read_vel1, &read_acc1);
fclose (fp);
*loc1 = (real) read_loc1;
*vel1 = (real) read_vel1;
*acc1=(real) read_acc1;
Message ("\nUDF read viv: y_vel = %f, acc = %f, loc(m)= %f\n",
*vel1, *acc1, *loc1);
}
else
{
*loc1 = 0.0;
*vel1 = 0.0;
*acc1 = 0.0;
Message("\nThe first reading of udf_loc_vel_acc_file\n");
}
}
/* write current location, velocity and acceleration into file */
static void
write_loc_vel_acc_file (real loc, real vel, real acc)
{
FILE *fp = fopen(UDF_FILENAME, "a");
if (fp != NULL)
{
fprintf (fp, "%e %e %e\n", loc, vel, acc);
fclose (fp);
}
else
Message ("\nWarning: cannot write %s file", UDF_FILENAME);
}
/* write current location,velocity and acceleration into temp_file */
static void
write_loc_vel_acc_file2 (real loc, real vel, real acc)
{
FILE *fp = fopen(Temp_File, "w");
if (fp != NULL)
{
fprintf (fp, "%e %e %e\n", loc, vel, acc);
fclose (fp);
}
else
Message ("\nWarning: cannot write %s file", Temp_File);
}
DEFINE_CG_MOTION(viv, dt, cg_vel, cg_omega, time, dtime)
{
#define DELTA 0.5
#define BETA 0.25
#define K_SPRING 22.406
#define MASS 4.864
#define xi 0.0054
real wn=sqrt(K_SPRING/MASS);
real CC=2*xi*wn*MASS;
/*fn=2.92745*/
/*mass ratio equaul 2.4*/
real loc,vel,acc,loc1,vel1,acc1;
real a0,a1,a2,a3,a4,a5,a6,a7,keff,reff;
static int id1=5; /* Face ID of the cylinder */
static real f_glob[3]; /* Total forces (global) */
static real m_glob[3]; /* Moment (global) */
static real x_cg[3]; /* CG location */
static real force[3];
int i=0;
Thread *tf1;
Domain *domain = Get_Domain(1);
tf1 = Lookup_Thread(domain, id1);
a0=1/(BETA*dtime*dtime);
a1=DELTA/(BETA*dtime);
a2=1/(BETA*dtime);
a3=0.5/BETA-1;
a4=DELTA/BETA-1;
a5=0.5*dtime*(DELTA/BETA-2);
a6=dtime*(1-DELTA);
a7=DELTA*dtime;
keff=a0*MASS+a1*CC+K_SPRING;
/* reset velocities */
NV_S (cg_vel, =, 0.0);
NV_S (cg_omega, =, 0.0);
if (!Data_Valid_P ())
return;

/* Get CG position */
for (i=0; i<ND_ND; i++) x_cg[i] = DT_CG(dt)[i];
/* compute force on cylinder */
force[1] = 0.0;
Compute_Force_And_Moment(domain, tf1, x_cg, f_glob, m_glob, TRUE);
for (i=0; i<ND_ND; i++)
{
force[i] = f_glob[i];
}

/*read data calculated in the former step*/
read_loc_vel_acc_file (&loc1, &vel1, &acc1);
/* compute response of cylinder by newmark method*/

reff=force[1]+MASS*(a0*loc1+a2*vel1+a3*acc1)+CC*(a1*loc1+a4*vel 1+a5*acc1);
loc=reff/keff;
acc=a0*(loc-loc1)-a2*vel1-a3*acc1;
vel=vel1+a6*acc1+a7*acc;

Message ("\nUDF of viv: time = %f, y_vel = %f, acc = %f, loc(m)= %f\n",
time, vel, acc, loc);
write_loc_vel_acc_file (loc, vel, acc);
write_loc_vel_acc_file2 (loc, vel, acc);
cg_vel[1] = vel;
}
zhaomu67 likes this.
Simon Wang is offline   Reply With Quote

Old   May 31, 2011, 03:18
Default
  #2
New Member
 
hisham
Join Date: May 2011
Posts: 6
Rep Power: 15
sham83 is on a distinguished road
Could you describe your error in more detail. What do you actually mena by BL here? Also how do you assign the UDF to your dynamic mesh?
sham83 is offline   Reply With Quote

Old   October 11, 2011, 04:17
Default
  #3
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 15
colopolo is on a distinguished road
Quote:
Originally Posted by Simon Wang View Post
Hi, everybody
I'am do a numerical simulation of vortex induced vibration use fluent 6.3.But I met some very stange problems, if I use boundary layer in mesh, the cylinder amplitude is much too high and fore exerted on cylinder is also larger than normal level. If I don't use boundary layer in my mesh, the mesh near to the cylinder became very bad in simulation.
So is there anybody can help me, I have been stuck by this problem for months.

Here is the full text of my UDF.
#include <stdio.h>
#include "udf.h"
# define UDF_FILENAME "udf_loc_velo_acc"
# define Temp_File "mytemp"

/* read current location,velocity and accelerator from file */
static void
read_loc_vel_acc_file (real *loc1, real *vel1,real *acc1)
{
FILE *fp = fopen(Temp_File, "r");
if (fp != NULL)
{
float read_loc1, read_vel1, read_acc1;
fscanf (fp, "%e %e %e", &read_loc1, &read_vel1, &read_acc1);
fclose (fp);
*loc1 = (real) read_loc1;
*vel1 = (real) read_vel1;
*acc1=(real) read_acc1;
Message ("\nUDF read viv: y_vel = %f, acc = %f, loc(m)= %f\n",
*vel1, *acc1, *loc1);
}
else
{
*loc1 = 0.0;
*vel1 = 0.0;
*acc1 = 0.0;
Message("\nThe first reading of udf_loc_vel_acc_file\n");
}
}
/* write current location, velocity and acceleration into file */
static void
write_loc_vel_acc_file (real loc, real vel, real acc)
{
FILE *fp = fopen(UDF_FILENAME, "a");
if (fp != NULL)
{
fprintf (fp, "%e %e %e\n", loc, vel, acc);
fclose (fp);
}
else
Message ("\nWarning: cannot write %s file", UDF_FILENAME);
}
/* write current location,velocity and acceleration into temp_file */
static void
write_loc_vel_acc_file2 (real loc, real vel, real acc)
{
FILE *fp = fopen(Temp_File, "w");
if (fp != NULL)
{
fprintf (fp, "%e %e %e\n", loc, vel, acc);
fclose (fp);
}
else
Message ("\nWarning: cannot write %s file", Temp_File);
}
DEFINE_CG_MOTION(viv, dt, cg_vel, cg_omega, time, dtime)
{
#define DELTA 0.5
#define BETA 0.25
#define K_SPRING 22.406
#define MASS 4.864
#define xi 0.0054
real wn=sqrt(K_SPRING/MASS);
real CC=2*xi*wn*MASS;
/*fn=2.92745*/
/*mass ratio equaul 2.4*/
real loc,vel,acc,loc1,vel1,acc1;
real a0,a1,a2,a3,a4,a5,a6,a7,keff,reff;
static int id1=5; /* Face ID of the cylinder */
static real f_glob[3]; /* Total forces (global) */
static real m_glob[3]; /* Moment (global) */
static real x_cg[3]; /* CG location */
static real force[3];
int i=0;
Thread *tf1;
Domain *domain = Get_Domain(1);
tf1 = Lookup_Thread(domain, id1);
a0=1/(BETA*dtime*dtime);
a1=DELTA/(BETA*dtime);
a2=1/(BETA*dtime);
a3=0.5/BETA-1;
a4=DELTA/BETA-1;
a5=0.5*dtime*(DELTA/BETA-2);
a6=dtime*(1-DELTA);
a7=DELTA*dtime;
keff=a0*MASS+a1*CC+K_SPRING;
/* reset velocities */
NV_S (cg_vel, =, 0.0);
NV_S (cg_omega, =, 0.0);
if (!Data_Valid_P ())
return;

/* Get CG position */
for (i=0; i<ND_ND; i++) x_cg[i] = DT_CG(dt)[i];
/* compute force on cylinder */
force[1] = 0.0;
Compute_Force_And_Moment(domain, tf1, x_cg, f_glob, m_glob, TRUE);
for (i=0; i<ND_ND; i++)
{
force[i] = f_glob[i];
}

/*read data calculated in the former step*/
read_loc_vel_acc_file (&loc1, &vel1, &acc1);
/* compute response of cylinder by newmark method*/

reff=force[1]+MASS*(a0*loc1+a2*vel1+a3*acc1)+CC*(a1*loc1+a4*vel 1+a5*acc1);
loc=reff/keff;
acc=a0*(loc-loc1)-a2*vel1-a3*acc1;
vel=vel1+a6*acc1+a7*acc;

Message ("\nUDF of viv: time = %f, y_vel = %f, acc = %f, loc(m)= %f\n",
time, vel, acc, loc);
write_loc_vel_acc_file (loc, vel, acc);
write_loc_vel_acc_file2 (loc, vel, acc);
cg_vel[1] = vel;
}
Did you solve your problems of udf file?
Please let me know the solution of your problem.

Thanks
colopolo is offline   Reply With Quote

Old   June 17, 2012, 06:22
Default
  #4
New Member
 
zhang guoqing
Join Date: May 2011
Posts: 10
Rep Power: 15
qing123 is on a distinguished road
Hi Simon Wang:
Have you already solved your problem, I am currently doing some simulation like yours. Could you exchange with me through email? My email address is zhangguoqing@ntu.edu.sg
qing123 is offline   Reply With Quote

Old   December 25, 2017, 04:23
Default why am i getting this error?
  #5
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 210
Rep Power: 16
arunraj is on a distinguished road
Hello everyone,

I am trying to load the UDF Newmann method vortex induced vibration which you have posted in CFD online forum. But I am getting error like this.. could you help me

..\..\src\main.c(107) : error C2143: syntax error : missing ')' before 'constant'
..\..\src\main.c(107) : error C2059: syntax error : ')'
arunraj is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
vortex induced vibration from dynamic mesh natto Main CFD Forum 4 April 18, 2015 20:42
vortex induced vibration dorin CFX 11 December 1, 2009 14:03
Vortex Induced Vibration modelling Kwong FLUENT 0 March 24, 2007 01:41
"bit" phenomenon in Vortex Induced Vibration? JOEY Main CFD Forum 0 August 4, 2006 09:49
Vortex Induced vibration of subsea pipeline Mobasheri FLUENT 5 February 9, 2006 08:07


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