5. Spilling breaker

Download input files as ZIP archive here.

In this example ComFLOW is used to simulate an irregular wave on a 2D domain with a spilling breaker event.

<?xml version="1.0"?>

 <comflow>

 <!-- SIMULATION: A brief description of the simulation -->
      <simulation title="2D simulation of a spilling breaker">
           <description>2D simulation of a spilling breaker</description>
      </simulation>

 <!-- DOMAIN: Definition of computational domain -->
      <domain>
           <extents>-101. 307. -1. 1. -115. 41.</extents>          
      </domain>

 <!-- WAVES: Definition of incoming/initial wave field and current -->
      <waves start_with_still_water="true" initialize_fs="true" mean_depth="90.">

      <!-- MODEL: Definition of wave model -->
           <model model="none" period="8." length="0." height="0." angle="0."/>

      <!-- RAMPING: Ramping for smooth startup of a simulation -->
           <ramping ramptype="1" rampfs="1" ramp1="1." ramp2="0."/>
      </waves>

 <!-- TIME: Time parameters and time integration settings -->
      <time tmax="70." dt="2.5E-002" dtmax="2.5E-002">

      <!-- CFL_FLOW: time step control based on a flow CFL criterion -->
           <cfl_flow enable="true" min="0.5" max="0.9"/>

      <!-- CFL_WAVE: time step control based on a wave CFL criterion -->
           <cfl_wave enable="false" min="1." max="1."/>

      <!-- INTEGRATION_METHOD: Time integration method -->
           <integration_method feab1="1.5" feab2="-0.5"/>
      </time>

 <!-- BOUNDARIES: Setup of boundary conditions -->
      <boundaries>
           <boundary io="52">-101. -101. -Inf Inf -Inf Inf</boundary>
           <boundary io="11"> 307.  307. -Inf Inf -Inf Inf</boundary>

      <!-- GABC: Parameters for the (generating-)absorbing boundary condition (G)ABC -->
           <gabc order="1" auto_tune="true"/>

      </boundaries>

 <!-- PHYSICAL: Physical parameters -->
      <physical>

      <!-- LIQUID_PHASE: Properties of the liquid phase (phase 1) -->
           <liquid_phase density="1025." viscosity="1.E-003"/>

      <!-- SURFACE_TENSION: Surface tension properties -->
           <surface_tension sigma="0." theta="90."/>
           <gravitation>0. 0. -9.81</gravitation>
      </physical>

 <!-- GRID: Grid and local refinement setup -->
      <grid>
           <dimension>204 1 78</dimension>
           <blocksize>6 1 6</blocksize>
           <refinement>2 1 2</refinement>

      <!-- SUBGRIDS: Definition of subgrids for local grid refinement -->
           <subgrids>
                <subgrid active="true" everywhere="true"  level="-1" persistent="false"/>
                <subgrid active="true" everywhere="false" level="0"  persistent="false">-Inf Inf -Inf Inf -30. 35.</subgrid>
                <subgrid active="true" everywhere="false" level="1"  persistent="false">-Inf Inf -Inf Inf -20. 25.</subgrid>
           </subgrids>

      <!-- ADAPTIVITY: Adaptive grid refinement -->
           <adaptivity enable="true">
                <criterion type="surface" level="1" threshold="5.E-002">

                <!-- TIME_INTERVAL: Time interval for refinement criterion -->
                     <time_interval tmin="0." tmax="Inf"/>

                <!-- EXTENTS: Spatial extents of refinement criterion -->
                     <extents everywhere="false" moves_according_to="0" shape="bounding_box">-Inf Inf -Inf Inf -Inf Inf</extents>
                </criterion>
           </adaptivity>
      </grid>

 <!-- COUPLING: Settings for coupling to a.o. moving objects (prescribed and 
      interactive motions), XMF mooring module, external solutions (e.g. other 
      ComFLOW simulations), ... -->
      <coupling>
      
      <!-- EXTERNAL_SOLUTION: Settings for coupling to a shared library -->
           <external_solution dllfile="linearwavesuperposition" initialize="false" ramp="false"/>

      </coupling>

 <!-- NUMERICAL: Setup of the discretization method and linear solver -->
      <numerical>

      <!-- LINEAR_SOLVER: Settings for the linear solver -->
           <linear_solver solver_choice="bicgstab_ilu" verbosity="0">

           <!-- ILU_PRECONDITIONER: Settings for the ILU preconditioner (only used by 
                the BiCGSTAB solver) -->
                <ilu_preconditioner droptol_p="1.E-002" droptol_uvw="1.E-002" droptol_gabc="1.E-006"/>

           <!-- STOPPING_CRITERION: Stopping criterion and maximum number of iterations -->
                <stopping_criterion inner_p="1.E-07" inner_uvw="-1." outer_p="1.E-08" outer_uvw="-1." iter_max="250"/>
           </linear_solver>

      <!-- VOF: Settings for the Volume-of-Fluid method -->
           <vof method="PLIC_VOF" correction="basic" advection="MACHO" plic_scheme="PLIC/Youngs"/>

      <!-- CONVECTION: Settings for the discretization of convection -->
           <convection artificial_diffusion="1." scheme="b2" limiter="false"/>

      <!-- INTERPOLATIONS: Settings for reconstruction of velocities (1-phase) / 
           densities (2-phase) at the free surface -->
           <interpolations velocity_extrapolation="linear" pressure_extrapolation="linear" surface_irrotationality="false" density_averaging="gravity_consistent"/>
      </numerical>

 <!-- OUTPUT: Settings for post-processing output -->
      <output>

      <!-- PRINT: Output interval for time step summaries -->
           <print dt="0.0"/>

      <!-- VTK: Output interval for binary VTK-XML snapshot files -->
           <vtk dt="0.1"/>

      <!-- BOXES: Setup of observation boxes -->
           <boxes>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf"> 50.  50. 0. 0.  -20. 20.</fill>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf">100. 100. 0. 0. -20. 20.</fill>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf">150. 150. 0. 0. -20. 20.</fill>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf">200. 200. 0. 0. -20. 20.</fill>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf">250. 250. 0. 0. -20. 20.</fill>
                <fill name="*" active="true" moves_according_to="0" method="1" dt="0.0" tmin="-Inf" tmax="Inf">300. 300. 0. 0. -20. 20.</fill>
           </boxes>

      <!-- RELATIVE_WATER_HEIGHT: Definition of relative water height lines -->
           <relative_water_height>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf"> 50.  50. -1. 1. -20. 20.</line>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf">100. 100. -1. 1. -20. 20.</line>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf">150. 150. -1. 1. -20. 20.</line>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf">200. 200. -1. 1. -20. 20.</line>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf">250. 250. -1. 1. -20. 20.</line>
                <line name="*" active="true" moves_according_to="0" dt="0.0" tmin="-Inf" tmax="Inf">300. 300. -1. 1. -20. 20.</line>
           </relative_water_height>

      </output>

 <!-- RESTART: Settings for checkpoints and restarts -->
      <restart dt="20.0"/>

</comflow>
; MODEL 1: LINEAR SUPERPOSITION W/ EXTRAPOLATION AT FREE SURFACE
om_cutoff = 2.0
wd = 115.0
componentsfile=${INPUT}/components.in
   127
   0.27965    0.06274   -0.37818
   0.50956    0.12547    2.00028
   0.30514    0.18821   -3.42244
   0.81656    0.25094   -0.93713
   2.11012    0.31368   -1.32605
   6.14684    0.37641    0.56363
   7.59716    0.43915   -3.59918
   3.24425    0.50189   -0.10402
   0.87410    0.56462   -2.84143
   0.42244    0.62736   -3.60548
   1.01702    0.69009   -3.31476
   0.45363    0.75283   -6.02112
   0.26867    0.81556   -5.33883
   0.50725    0.87830   -7.87558
   0.31402    0.94104  -11.06370
   0.51657    1.00377  -11.83251
   0.45981    1.06651  -11.44028
   0.21644    1.12924  -10.22902
   0.14102    1.19198  -12.09660
   0.18325    1.25471  -15.62191
   0.05086    1.31745  -15.19736
   0.20983    1.38018  -21.89442
   0.19753    1.44292  -21.81007
   0.13707    1.50566  -23.10238
   0.03706    1.56839  -28.07729
   0.18052    1.63113  -29.64146
   0.03728    1.69386  -29.49961
   0.11875    1.75660  -29.75235
   0.02071    1.81933  -36.92489
   0.04503    1.88207  -36.34227
   0.03227    1.94481  -36.96779
   0.08853    2.00754  -42.13743
   0.07798    2.07028  -41.83655
   0.06732    2.13301  -47.81916
   0.02489    2.19575  -47.22373
   0.04583    2.25848  -54.93979
   0.06096    2.32122  -54.81498
   0.05393    2.38396  -61.48891
   0.03579    2.44669  -61.99101
   0.01921    2.50943  -66.96868
   0.02180    2.57216  -67.27626
   0.03341    2.63490  -73.43820
   0.03066    2.69763  -73.42508
   0.01826    2.76037  -79.49898
   0.02823    2.82311  -80.74334
   0.02309    2.88584  -85.95024
   0.05245    2.94858  -86.83201
   0.00200    3.01131  -90.26924
   0.04801    3.07405  -99.20329
   0.00786    3.13678  -99.66902
   0.05378    3.19952 -105.42040
   0.01027    3.26225 -108.74557
   0.05640    3.32499 -111.40846
   0.00779    3.38773 -120.19756
   0.06023    3.45046 -124.05499
   0.01245    3.51320 -126.06867
   0.06544    3.57593 -130.19554
   0.02927    3.63867 -138.34314
   0.04801    3.70140 -142.56237
   0.02183    3.76414 -144.82467
   0.04729    3.82688 -148.61477
   0.02316    3.88961 -156.68401
   0.03547    3.95235 -161.25296
   0.02950    4.01508 -163.42713
   0.03778    4.07782 -173.42576
   0.02956    4.14055 -175.85238
   0.03032    4.20329 -179.49970
   0.02860    4.26603 -188.17942
   0.02639    4.32876 -191.79709
   0.03101    4.39150 -200.93775
   0.03156    4.45423 -204.37237
   0.02639    4.51697 -207.29627
   0.01995    4.57970 -216.80539
   0.02482    4.64244 -219.40346
   0.02111    4.70518 -228.73112
   0.02227    4.76791 -232.00413
   0.02168    4.83065 -241.20464
   0.02292    4.89338 -244.08171
   0.02197    4.95612 -253.41767
   0.02225    5.01885 -256.67937
   0.02067    5.08159 -265.77729
   0.02726    5.14432 -275.07578
   0.02131    5.20706 -278.23009
   0.02325    5.26980 -287.70512
   0.01423    5.33253 -291.03485
   0.01717    5.39527 -300.11029
   0.01226    5.45800 -308.89631
   0.02813    5.52074 -312.38727
   0.01280    5.58347 -321.66370
   0.02546    5.64621 -331.17217
   0.01051    5.70895 -333.54226
   0.02575    5.77168 -343.68438
   0.00937    5.83442 -351.74526
   0.02716    5.89715 -356.12431
   0.00945    5.95989 -363.85858
   0.02293    6.02262 -374.61695
   0.01712    6.08536 -382.90977
   0.02345    6.14810 -387.33964
   0.01695    6.21083 -395.00881
   0.01999    6.27357 -406.16890
   0.01848    6.33630 -413.65459
   0.01637    6.39904 -418.66889
   0.01690    6.46177 -432.50635
   0.01502    6.52451 -437.77971
   0.01762    6.58725 -444.81592
   0.01500    6.64998 -456.74750
   0.01559    6.71272 -463.49024
   0.01200    6.77545 -469.54828
   0.01559    6.83819 -482.22886
   0.00972    6.90092 -488.09184
   0.01310    6.96366 -501.22537
   0.01538    7.02639 -507.27434
   0.01336    7.08913 -519.94566
   0.01230    7.15187 -526.14131
   0.01184    7.21460 -538.74892
   0.01138    7.27734 -544.84910
   0.01336    7.34007 -557.63860
   0.01374    7.40281 -563.91279
   0.01441    7.46554 -576.40710
   0.01082    7.52828 -582.50101
   0.01249    7.59102 -595.13768
   0.00823    7.65375 -601.72805
   0.01479    7.71649 -614.01878
   0.01069    7.77922 -620.70233
   0.01489    7.84196 -632.69158
   0.00941    7.90469 -645.85569
   0.01440    7.96743 -651.41793