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

2D Forced Roll Damping Simulation using FLUENT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2017, 02:48
Default 2D Forced Roll Damping Simulation using FLUENT
  #1
New Member
 
Join Date: Dec 2017
Posts: 2
Rep Power: 0
Sunflower_Li is on a distinguished road
Hello everyone,
Now I am working on predicting roll damping of a ship hull section, but now I have some questions. The hull section that I used is the SS5 section of the S60 ship, and the dimension of the hull section was the same with Ikeda's experiments. However, I did not have a good result. I am seeking for help.
On the model section a harmonic roll motion is imposed by moving the complete body and computational mesh at a prescribed period T and amplitude φ0. The structured grids were generated by ICEM. In FLUENT, I used dynamic mesh method. In my case, the 2D midsection mesh zone rotated around the roll axis. There is an interface between stationary zone and rigid moving zone. The following is my UDF code, could please help me find if there is some wrong?

Thanks!

UDF code:

#include"udf.h"
#define freq 0.84
#define ampl 0.175
#define density 998.2
#define GRAVITY 9.81
int id=14;

DEFINE_CG_MOTION(int_block_roll, dt, vel, omega, time, dtime)
{
omega[2] = 2*M_PI*freq*ampl*cos(2*M_PI*freq*time);
}

DEFINE_EXECUTE_AT_END(exe_end)
{
real x_cg[3],m_glob[3],f_glob[3],sita,time,m_plus;
real x[ND_ND],A[ND_ND];
FILE *fp;
Domain *domain=Get_Domain(1);
face_t f;
Thread *tf=Lookup_Thread(domain,id);
time = CURRENT_TIME;
x_cg[0] = 0.0;
x_cg[1] = 0.0;
m_plus=0.0;
sita = ampl*sin(2*M_PI*freq*time);
if(!Data_Valid_P())
return;
Compute_Force_And_Moment(domain,tf,x_cg,f_glob,m_g lob,TRUE);
begin_f_loop(f,tf)
{
F_CENTROID(x,f,tf);
F_AREA(A,f,tf);
if(x[1]<0.0)
m_plus+=density*GRAVITY*x[1]*fabs(x[1]*A[0]-x[0]*A[1]);
}
end_f_loop(f,tf)
m_glob[2]+=m_plus;

#if !RP_NODE
fp=fopen("roll.txt","a");
fprintf(fp,"%f,%f,%f,%f,%f,%f\n",time,sita,f_glob[0],f_glob[1],NV_MAG(f_glob),m_glob[2]);
fclose(fp);
#endif
}
Sunflower_Li is offline   Reply With Quote

Reply

Tags
dynamicmesh forcedroll


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
Start new Ansys Fluent Simulation automatically Malue Fluent UDF and Scheme Programming 1 October 4, 2017 01:48
Which Multiphase Model Should be selected in Fluent for my below described simulation oberstar Fluent Multiphase 0 September 28, 2017 12:05
Flux reports for transient simulation in Fluent khaham FLUENT 11 April 19, 2017 07:44
Simulation on fluent 14 NAD FLUENT 0 September 11, 2013 02:05
Fluent Remote Simulation Facility Service (RSF) di Rami FLUENT 2 June 4, 2008 05:38


All times are GMT -4. The time now is 12:35.