CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Free Surface Ship Flow (https://www.cfd-online.com/Forums/openfoam-solving/58350-free-surface-ship-flow.html)

SGWANG March 29, 2020 12:49

Quote:

Originally Posted by Fauster (Post 685342)
Dear Foamer,

For all my hull resistance simulation the pressure coefficient shows large oscillations (as I described in a previous post). This behavior really slow down the time before reaching a quasy steady state.

I thought it came from the boundary condition used in the tutorials DTChull :
  • totaPressure for atmosphere
  • variableHeightFlowRate; for alpha @outlet
  • outletPhaseMeanVelocity; for U @Outlet
So I went back to more classical BC with fixedValue for p_rgh @outlet and zeroGradient for U and alpha (@outlet). The behavior is better and the convergence is reached quicker but I still have large pressure oscillation.


Is it possible that it comes from fvsolution settings ? (I used the same as the tutorial).


Has someone experienced the same thing ?


Thanks



Paul

Hello, Fasuter.

Do you solve this problem of large pressure oscillation?

I'm facing the same problem and would appreciate it if you could give me some hints.

Ship Designer December 1, 2020 01:00

Pressure Force Oscillations in Free Surface Hull Resistance Calculations
 
Hello all,

The boundary conditions you are using Fauster look about right. The ones used in the DTC Hull Tutorial are a good starting point, however if you have a look at published scientific literature (papers, thesis etc.) you will find that different BCs are used at times. Some of them seem to be interchangeable with same results. I prefer to use zeroGradient at the U outlet. On a sidenote, if you let the DTC Hull Tutorial run for long enough (> 10000 time steps), it can be noticed that the water level rises, which can't be correct.

The pressure oscillations are directly coupled to the wave pattern. The most time of a free surface resistance calculation is spent to develop the wave pattern. Usually, at the beginning one wave is formed with the crest at the bow and the trough at the stern. This creates a large pressure difference acting in the longitudinal direction, which is reflected as a very large pressure force amplitude at the beginning of the simulation. As the calculation progresses, the wave amplitude and length is reduced and more waves form. This is reflected in the pressure force amplitude reducing over time. Occasionally the pressure force becomes negative (depending on your orientation of the ship in respect to the x-axis), suggesting negative resistance (thust). Although it may seem wrong, this happens when the stern wave becomes temporarily larger in relation to the bow wave, creating a net forward pressure at the hull. This typically occurs if there are waves sloshing forth and back within the domain. Eventually the wave pattern is fully developed without changing anymore over time and that's also when the pressure force becomes almost a straight line. If it doesn't, it's usually because there's still a wave sloshing back and forth within the domain.

Refining the mesh in vertical direction as well as in plane helps to form the wave pattern much more quickly and avoid waves drifting away which then slosh back and forth. I suggest to try and have a look at Wolfdynamics' Wigley Hull Validation Case. The mesh is very fine at the free surface and if you solve the case, the pressure force oscillates just a couple of times and then it turns quickly into a straight line. That mesh however seems not to have been generated with OpenFOAM tools.

One challenge when meshing with snappyHexMesh is that the refinement of the free surface overlaps with other areas of the hull you may want to refine. This may result in a fine area refined even more and thus create large numbers of unnecessary cells. Also the high aspect ratio (long and flat) cells of the free surface might cause a distorted surface after snapping. I've worked around this problem by entirely mesh and snap the free surface as a separate region. Seems to be working so far, although it's not the most elegant way. Another way is to use a multi graded background mesh with the refinements already built-in and then just snapping the hull surface without refinement. This however results in cell overhead, adding small cells where they aren't needed, e.g. along the symmetry plane and besides the bow and stern.

Also bear in mind, that the lower the Froude number is, the shorter the waves get. In that case the mesh needs generally to be even finer to well capture the shape of the waves. If for example you just reduce the speed of the DTC Hull Tutorial and run the case with all other settings left unchanged, the resistance won't match anymore the model test results. Right meshing is probably the most important factor to obtain plausible resistance forces.

As for the schemes, I've tried div(phi,alpha) Gauss PLIC interfaceCompression vanLeer 1; in fvSchemes introduced in OpenFOAM v8 with good results. In my (brief) experience I've observed that schemes and solver settings affect stability and solution time, but not the ultimate resistance forces. The mesh does that. Hope you might find this helpful.

Cheers, Claudio

vava10 March 3, 2021 10:04

Trim and sinkage determination
 
1 Attachment(s)
Hey,

how do you determine trim and sinkage using interDyMFoam?

https://www.cfd-online.com/Forums/op...erdymfoam.html

1. How to determine my constrains direction. My case setups axis is shown in figure

2. My stl file is not that good. It is not watertight. So I am unable to use software to determine the inertia and CG. I found Cog and CoB using simpsons rule. Is it possible to determine the inertia using the same? if not how do you determine it?

Can anyone please please give me a case file for the determination of trim and sinkage so I can cross-refer ? (if possible)

kind regards
vava10


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