
[Sponsors] 
Can OpenFOAM give an resistance/velocity curve as output? 

LinkBack  Thread Tools  Search this Thread  Display Modes 
August 1, 2011, 13:05 
Can OpenFOAM give an resistance/velocity curve as output?

#1 
New Member
Lim
Join Date: Apr 2011
Posts: 2
Rep Power: 0 
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:
Cheers Lim 

August 1, 2011, 15:10 

#2 
Senior Member
Dave
Join Date: Jul 2010
Posts: 100
Rep Power: 15 
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 

September 5, 2011, 17:54 
how to get the resistance?

#3 
New Member
Eran
Join Date: Sep 2011
Location: Massachusetts
Posts: 11
Rep Power: 14 
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, 

September 5, 2011, 19:03 

#4 
Senior Member
Dave
Join Date: Jul 2010
Posts: 100
Rep Power: 15 
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. 

May 10, 2012, 05:15 

#5 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
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// 

May 10, 2012, 06:00 

#6 
Senior Member

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 … … 

May 10, 2012, 06:11 

#7 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
thanks
hs// 

May 10, 2012, 18:06 

#8 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
Hi
Do you have any reference to interpret the result of calculations (forces and forceCoeffs)? thanks again hs// 

May 11, 2012, 04:05 

#9 
Senior Member

The first column is the iteration/time, the second one is the force/force coefficient.


May 11, 2012, 05:50 

#10 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
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// 

May 16, 2012, 03:27 

#11 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
Hi lovecraft22
Do you have any comment about above post? thanks hs// 

May 16, 2012, 03:54 

#12 
Senior Member

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. 

May 16, 2012, 04:03 

#13 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
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. 

May 16, 2012, 04:08 

#14 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
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. 

May 16, 2012, 04:16 

#15 
New Member
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 13 
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.98816e06 2.01831e06 20 6.78435e05 7.86827e07 3.79263e07 30 5.26177e05 6.45394e07 5.54262e07 40 4.73338e05 1.32233e06 3.19874e07 50 4.66191e05 2.57221e07 5.23645e07 60 4.69513e05 1.30883e06 7.36664e07 70 4.87506e05 2.55959e06 9.88149e07 80 5.18026e05 5.86174e06 1.40848e06 90 5.50988e05 7.95755e06 2.02403e06 100 5.82616e05 1.18472e05 2.42179e06 110 6.24615e05 1.48948e05 3.16372e06 120 6.67133e05 1.71842e05 3.69373e06 130 7.01388e05 2.16093e05 3.88813e06 140 7.37891e05 2.29909e05 4.06339e06 150 7.88668e05 2.15329e05 3.43333e06 160 8.11324e05 2.05101e05 2.83645e06 170 8.33297e05 1.70105e05 1.6466e06 180 8.39984e05 9.09247e06 1.45903e07 190 8.49289e05 6.11879e07 1.09168e06 200 8.51563e05 7.23095e06 1.76413e06 210 8.39894e05 1.14279e05 1.89112e06 220 8.31182e05 1.49578e05 1.98931e06 230 8.18796e05 1.62699e05 1.88601e06 240 8.0021e05 1.76896e05 1.97983e06 250 7.93598e05 2.16389e05 2.34374e06 260 7.80435e05 1.94241e05 2.54275e06 270 7.87433e05 1.72517e05 2.01372e06 280 7.56193e05 2.29923e05 2.81159e06 290 7.38596e05 2.18482e05 2.97748e06 300 7.23155e05 2.42475e05 2.92539e06 

March 14, 2021, 20:08 
NetForce

#16 
Member
Deutschland
Join Date: Sep 2020
Posts: 69
Rep Power: 5 
hey,
Its a simple question and probably stupid, but I just need a confirmation I am simulating a kayak and I am using interDyFoam so that I get Trim and sinkage. My question is in the Sum of forces Total : (4.35846 59.0315 15.0256) should the total force become close to zero or become zero for the ship to be stable 

Tags 
flow 3d, friction, open foam, shipflow 
Thread Tools  Search this Thread 
Display Modes  


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 