# Title: Air-water flow around a Series 60 cargo ship # # Description: # # The geometrical Volume-Of-Fluid (VOF) advection scheme of Gerris is # used to simulate the air-water interface around a ``Series 60 CB=0.6'' # ship hull. This hull shape is a classical towing tank test case and # several experimental dataset are available (see for example the # \htmladdnormallinkfoot{University # of Iowa web site}{http://www.iihr.uiowa.edu/\~{}shiphydro/efd\_vdata\_S60\_steady.htm}). # # The liquid is started impulsively from rest to a Froude number of # 0.316 corresponding to one of the towing tank cases. The evolution # of the interface is illustrated in Figures \ref{closeup} and # \ref{front}. After the initial transients have dissipated (Figure # \ref{f}), the stationary wave pattern can be compared with the # experimental measurements (Figure \ref{comparison}). Adaptivity is # used based on the value of vorticity in the liquid only. With the # relatively high-resolution used here, damping of the final wave # pattern is minimal which illustrates the good energy conservation # properties of the overall scheme (but requires a significant amount # of CPU time). # # Only one half of the flow is simulated. The GfsView parameter file # {\tt closeup.gfv} shows how to setup the ``Symmetry'' objects # to display the full symmetrical flow. # # \begin{figure}[htbp] # \caption{\label{closeup}MPEG movie of the interface # evolution. The interface is coloured according to elevation. The # vertical scale is exagerated by a factor of three.} # \begin{center} # \htmladdnormallinkfoot{\includegraphics[width=0.8\hsize]{closeup.eps}}{closeup.mpg} # \end{center} # \end{figure} # # \begin{figure}[htbp] # \caption{\label{front}Interface elevation in stationary regime.} # \begin{center} # \includegraphics[width=0.8\hsize]{front.eps} # \end{center} # \end{figure} # # \begin{figure}[htbp] # \caption{\label{f}Pressure drag and lift forces on the hull as # functions of time.} # \begin{center} # \includegraphics[width=0.8\hsize]{f.eps} # \end{center} # \end{figure} # # \begin{figure}[htbp] # \caption{\label{comparison}Interface elevation measured in a towing # tank (top-half, University of Iowa dataset) and simulation result # (bottom-half). The wave reflection in the experimental data is # caused by the lateral wall of the towing tank.} # \begin{center} # \includegraphics[width=0.8\hsize]{comparison.eps} # \end{center} # \end{figure} # # Author: St\'ephane Popinet # Command: gerris3D ship.gfs | gfsview-batch3D closeup.gfv | ppm2mpeg -s 640x480 > closeup.mpg # Version: 1.2.0 # Required files: S60-scaled.gts closeup.gfv front.gfv comparison.gfv tank-data.png # Running time: 4 days # Generated files: closeup.mpg closeup.eps front.eps f.eps comparison.eps # # Random notes: # waveprofile generation: # % zcat sim-8.gfs.gz | gfs2oogl3D -c Z -g -o -i | awk '{ if ($4 < 1000) print $1*3.,$2*3.,$3*3.,$4*3.;}' > waveprofile-8 # Static wetted area for S60-scaled.gts: As = 0.0190254 # 3 2 GfsSimulation GfsBox GfsGEdge {} { # The wave drag on the hull has strong starting transients, # also the mean wave field takes a relatively long time to # establish. Time { end = 10 } # Nine levels is enough to get good agreement with towing tank # data. Adding more levels will reveal finer-scale wave patterns # (but the runs will take even longer...) Global { #define LEVEL 9 #define FROUDE 0.316 #define RATIO (1.2/1000.) #define VAR(T,min,max) (min + CLAMP(T,0,1)*(max - min)) } # Translate the model to simulate only half the domain Solid S60-scaled.gts { ty = 0.5 } # Refine the hull to LEVEL RefineSolid LEVEL # Refine the water surface to four levels RefineSurface { return 4; } (1e-4 - z) VariableTracerVOF T # For high-density ratios we cannot use the volume fraction field # directly to define the density. We need a smoother version. VariableFiltered T1 T 1 Init {} { U = FROUDE } # Initialise the water surface at z = 1e-4 InitFraction T (1e-4 - z) # air/water density ratio PhysicalParams { alpha = 1./VAR(T1,RATIO,1.) } # Use the reduced gravity approach VariablePosition Z T z # g = 3, g' = 3*(rho1 - rho2) SourceTension T -3.*(1. - RATIO) Z # Force the horizontal component of the velocity to relax to # 'FROUDE' (= 0.316) in a band on inflow (x <= -0.375) Source U (x > -0.375 ? 0 : 10.*(FROUDE - U)) # Adapt the mesh using the vorticity criterion but only in the # water side (T > 0.) # The 'cmax' value can be lowered (e.g. to 1e-2) to increase # the accuracy with which the weaker far-field waves are resolved. AdaptFunction { istep = 1 } { cmax = 1e-2 # Faster coarsening than with the default cfactor of 4 reduces # the size of the simulation # cfactor = 2 # Coarse 'sponge' for x >= 1.5 maxlevel = (x < 1.5 ? LEVEL : 4) minlevel = 4 } { return (T > 0.)*fabs (Vorticity)*ftt_cell_size (cell)/FROUDE; } # Pressure (i.e. wave drag) force on the hull OutputSolidForce { istart = 1 istep = 1 } f OutputTime { istep = 1 } stderr OutputBalance { istep = 1 } stderr OutputProjectionStats { istep = 1 } stderr OutputTiming { istep = 10 } stderr # Generation of animations OutputSimulation { istep = 5 end = 4 } stdout EventScript { istep = 5 end = 4 } { echo "Save stdout { width = 1600 height = 1200 }" } OutputSimulation { start = 1 step = 1 } sim-%g.gfs # Compresses the saved simulation files EventScript { start = 1 step = 1 } { gzip -f -q sim-*.gfs } # Graphics EventScript { start = 10 } { echo "Save stdout { width = 1600 height = 1200 }" | \ gfsview-batch3D sim-10.gfs.gz closeup.gfv | \ convert -colors 256 ppm:- closeup.eps echo "Save stdout { width = 1600 height = 1200 }" | \ gfsview-batch3D sim-10.gfs.gz front.gfv | \ convert -colors 256 ppm:- front.eps echo "Save stdout { width = 800 height = 600 }" | \ gfsview-batch3D sim-10.gfs.gz comparison.gfv | \ convert -trim ppm:- comparison.ppm # echo "Save stdout { width = 800 height = 600 }" | \ # gfsview-batch3D sim-10.gfs.gz tank-data.gfv | \ # convert -trim -flip ppm:- tank-data.png convert tank-data.png tank-data.ppm montage -geometry +0+0 -tile 1x2 tank-data.ppm comparison.ppm png:- | \ convert -colors 256 png:- comparison.eps cat <