CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Can OpenFOAM give an resistance/velocity curve as output?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 1, 2011, 13:05
Question Can OpenFOAM give an resistance/velocity curve as output?
  #1
lim
New Member
 
Lim
Join Date: Apr 2011
Posts: 2
Rep Power: 0
lim is on a distinguished road
Dear all

I'm new with openFOAM and I'm trying to simulate te resistance of a small boat in OpenFOAM after it didn't succeed in FLOW3D due to the inability to simulate skin friction.
I'm quite new so I want to now:
  1. Is it possible to get a resistance/velocity curve out OpenFoam?
  2. Has someone simulated boat resistances before?
  3. Is the solution accurate?
Thanks in advance

Cheers
Lim
lim is offline   Reply With Quote

Old   August 1, 2011, 15:10
Default
  #2
Member
 
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 6
daveatstyacht is on a distinguished road
Lim,
In answer to your questions:
1) Yes it is possible to develop a series of runs at different speeds to develop a resistance curve for a hull (you need to have different boundary layer meshes at each speed to maintain the same y+ value).
2) You can use either interFoam or LTSinterFoam for fixed heave and trim cases or interDyMFoam for cases where trim and heave matter (though with some effort and no guarantee of it being entirely stable). Alternatively consider using the modified solver shipFoam.
3) The solution accuracy is only as good as your mesh, boundary conditions and solver setting permit which in large part comes down to experience. If those are good your accuracy should be as well. Consider using a standard validation case such as a Wigley hull as a way to validate your setup is correct and if possible validate against tank test data of your actual hull if available.
Regards,
Dave
daveatstyacht is offline   Reply With Quote

Old   September 5, 2011, 17:54
Question how to get the resistance?
  #3
New Member
 
Eran
Join Date: Sep 2011
Location: Massachusetts
Posts: 11
Rep Power: 5
Surfboy is on a distinguished road
how do i use shipFoam?

and if i use LTSInterFoam and get U and P, how can i calculate the resirance?

is there a solver/code for that? or i need to go to matlab and integrate the data for the pressure and velocity?..

thanks,
Surfboy is offline   Reply With Quote

Old   September 5, 2011, 19:03
Default
  #4
Member
 
Dave
Join Date: Jul 2010
Posts: 97
Rep Power: 6
daveatstyacht is on a distinguished road
The integration of forces can be done using the forces library. You place in the controlDict file:

libs
(
"libforces.so"
);
functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
log true;
outputControl timeStep;
outputInterval 5;
patches (hull); //Name of patche to integrate forces
rhoInf 1025.0; //Reference density for fluid - can be changed later ...
CofR (-3.23 0 1.21); //Origin for moment calculations
}
);

For more details, about the forces library search "forces in OF 1.6" (might be OF 1.5, I forget which) in the forum. There is a example file set for shipFoam in the ship OF hydrodynamics group, though you should know that shipFoam currently doesn't work for OF 1.7 or 2.0, though it does work in 1.6.
daveatstyacht is offline   Reply With Quote

Old   May 10, 2012, 05:15
Default
  #5
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
Hi daveatstyacht

I'v run the Foam with the "controlDict" and got the "forces" and "forceCoeffs" folders. Each folder has "forces.dat" and "forceCoeffs.dat". Could you give me some guides how to visualize the data?

thanks

hs//
parkh32 is offline   Reply With Quote

Old   May 10, 2012, 06:00
Default
  #6
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 463
Rep Power: 9
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
You can load those data within whatever software you like and then plot them…
Some examples:
matlab
gnuplot
excel
libreoffice calc
openoffice calc
kaleidagraph
origin

lovecraft22 is offline   Reply With Quote

Old   May 10, 2012, 06:11
Default
  #7
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
thanks

hs//
parkh32 is offline   Reply With Quote

Old   May 10, 2012, 18:06
Default
  #8
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
Hi

Do you have any reference to interpret the result of calculations (forces and forceCoeffs)?

thanks again

hs//
parkh32 is offline   Reply With Quote

Old   May 11, 2012, 04:05
Default
  #9
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 463
Rep Power: 9
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
The first column is the iteration/time, the second one is the force/force coefficient.
lovecraft22 is offline   Reply With Quote

Old   May 11, 2012, 05:50
Default
  #10
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
Hi

sorry for uncertain question, English is my second language.

I mean,

1) In "forces.dat", can i calculate "pressure force" and "viscous force" at specific time as "Pf= SRT[(Pf_x)^2 + (Pf_y)^2 +(Pf_z)^2]" and "Vf= SRT[(Vf_x)^2 + (Vf_y)^2 +(Vf_z)^2]" ?
and is Total_forces on the hull surface, "Tf= Pf + Vf" ?

2) In "forcesCoeffs.dat", Cd, Cl, and Cm are just coefficients, right? How can I use these coefficients to calculate Resistance, Lift, and Pitch ? I think frictional resistance of hull can be calculated as "(1/2)*rho*(v^2)*wetted_surface_area*Cd".

3) In each file, there are "forces" and "coefficients" for each iteration. The last iterated value is used to calculate forces or drag for the hull ? or calculate each forces or drag at each iteration then sum whole iteration ?

thanks again,

hs//
parkh32 is offline   Reply With Quote

Old   May 16, 2012, 03:27
Default
  #11
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
Hi lovecraft22

Do you have any comment about above post?

thanks

hs//
parkh32 is offline   Reply With Quote

Old   May 16, 2012, 03:54
Default
  #12
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 463
Rep Power: 9
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
1. Don't have experience on free surface flow. Anyway what you get in forces is the total force, i.e. pressure and viscous force.

2. Yes, depending on how you define them you should change the reference area.

3. You should use the values for some converged iterations and the average them. Let's say your simulation converged at time 1000. Keep it running until time 1500 then average the last 500 values.
lovecraft22 is offline   Reply With Quote

Old   May 16, 2012, 04:03
Default
  #13
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
hi

in "forces.dat", there are "force(viscous, pressure)" and "moment(viscous, pressure)".

# Time forces(pressure, viscous) moment(pressure, viscous)
10 (((-115911 -9821.58 -1.76054e+06) (477.818 0.216173 -22.1441)) ((8560.4 6.33051e+06 -35146.9) (-2.9727 466.215 16.1051)))
20 (((10768.1 182.562 166635) (455.248 0.138734 -11.4165)) ((-1585.44 -703266 1934.63) (-2.10171 392.186 12.8028)))
30 (((5886.75 -4.82486 131072) (433.074 0.192013 -4.92419)) ((143.617 -875162 -240.688) (-1.58389 350.027 12.3352)))
~
~
~
~


hs//

Last edited by parkh32; May 16, 2012 at 04:30.
parkh32 is offline   Reply With Quote

Old   May 16, 2012, 04:08
Default
  #14
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
2. Yes, depending on how you define them you should change the reference area.

--> in my case, the reference area is hull wetted_surface_area.
parkh32 is offline   Reply With Quote

Old   May 16, 2012, 04:16
Default
  #15
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
3. You should use the values for some converged iterations and the average them. Let's say your simulation converged at time 1000. Keep it running until time 1500 then average the last 500 values.

--> i got the "forceCoeffs.dat" as below, for instance, to calculate Drag of the hull, Cd is average value of (Cd@10 + ....+Cd@300)/30 ?

# Time Cd Cl Cm
10 0.000128828 -1.98816e-06 2.01831e-06
20 6.78435e-05 -7.86827e-07 3.79263e-07
30 5.26177e-05 6.45394e-07 5.54262e-07
40 4.73338e-05 1.32233e-06 3.19874e-07
50 4.66191e-05 2.57221e-07 5.23645e-07
60 4.69513e-05 -1.30883e-06 7.36664e-07
70 4.87506e-05 -2.55959e-06 9.88149e-07
80 5.18026e-05 -5.86174e-06 1.40848e-06
90 5.50988e-05 -7.95755e-06 2.02403e-06
100 5.82616e-05 -1.18472e-05 2.42179e-06
110 6.24615e-05 -1.48948e-05 3.16372e-06
120 6.67133e-05 -1.71842e-05 3.69373e-06
130 7.01388e-05 -2.16093e-05 3.88813e-06
140 7.37891e-05 -2.29909e-05 4.06339e-06
150 7.88668e-05 -2.15329e-05 3.43333e-06
160 8.11324e-05 -2.05101e-05 2.83645e-06
170 8.33297e-05 -1.70105e-05 1.6466e-06
180 8.39984e-05 -9.09247e-06 1.45903e-07
190 8.49289e-05 -6.11879e-07 -1.09168e-06
200 8.51563e-05 7.23095e-06 -1.76413e-06
210 8.39894e-05 1.14279e-05 -1.89112e-06
220 8.31182e-05 1.49578e-05 -1.98931e-06
230 8.18796e-05 1.62699e-05 -1.88601e-06
240 8.0021e-05 1.76896e-05 -1.97983e-06
250 7.93598e-05 2.16389e-05 -2.34374e-06
260 7.80435e-05 1.94241e-05 -2.54275e-06
270 7.87433e-05 1.72517e-05 -2.01372e-06
280 7.56193e-05 2.29923e-05 -2.81159e-06
290 7.38596e-05 2.18482e-05 -2.97748e-06
300 7.23155e-05 2.42475e-05 -2.92539e-06
parkh32 is offline   Reply With Quote

Reply

Tags
flow 3d, friction, open foam, shipflow

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
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
How to maintain spacing along a new curve? KB Main CFD Forum 2 June 5, 2007 16:45
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 07:14
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 07:04.