15. Initial conditions

This chapter describes options for initialization of the flow solution.

15.1. Initial liquid distribution

There are several methods for specifying the initial liquid distribution:

  • No initialization (all cells are empty).
  • Initialization by the built-in wave model as specified in the section waves/. This option is enabled when waves/model/@model is set to anything but "none". The attribute @start_with_still_water can be set to "true" or "false" to start with still water or a fully developed wave field. The attributes @initialize_fs must be set to "true".
  • Initialization by a plug-in as specified in the section coupling/external_solution/. This option is only applied when the attribute external_solution/@specialbc_initialize is set to "true".

The above methods cannot be combined in one simulation. However, it is possible to add additional liquid sections by means of the options described in sections 15.1.1, 15.1.2 and 15.1.3.

  • basic geometric shapes by means of the liquid/box/ construct,
  • detailed configurations by means of the liquid/object/ construct, which contains geometrical building blocks, similar to those used for the geometry definition (this option was formerly implemented by means of the program LIQDEF),
  • a dedicated option for greenwater simulations, located in the section liquid/greenwater/.

15.1.1. Liquid boxes

In many situations only a simple initial liquid configuration is required. Using the box/ construct one or more bounding boxes can be filled with liquid.

A frequently encountered example is the “still water” box which defines the half-space \(z\leq0\):

<initial_conditions>

     <liquid>

          <box shape="rectangular" mask="0">-Inf Inf   -Inf Inf   -Inf 0.</box>

     </liquid>

</initial_conditions>

15.1.2. Liquid building blocks

In the following example the simulation is initialized with still water and a spherical droplet of water with a radius of 5 cm is included at the location (0,0,1) using a spherical building block, which is documented in Chapter 5:

<initial_conditions>

     <liquid>

          <!-- still water -->
          <box shape="rectangular" mask="0">-Inf Inf   -Inf Inf   -Inf 0.</box>

          <!-- spherical droplet -->
          <object>
              <element shape="4">
                  0.   0.   1.
                  0.05 0.05 0.05
              </element>
          </object>

     </liquid>

</initial_conditions>

In the following example the initial liquid configuration is stored in an external file using the file_reader/ construct as explained in Chapter 5:

<initial_conditions>

     <liquid>

          <!-- still water -->
          <box shape="rectangular" mask="0">-Inf Inf   -Inf Inf   -Inf 0.</box>

          <!-- add extra liquid as specified in external file -->
          <object>
               <file_reader geodef_legacy_file="${INPUT}/liquid.in" filter="all"/>
          </object>

     </liquid>

</initial_conditions>

The file ${INPUT}/liquid.in contains the same information as would be read by the pre-processing program LIQDEF, which was included in previous ComFLOW. In versions 4.0 and later pre-processing is no longer necessary.

15.1.3. Green water box

This option is currently not officially supported.

15.2. Initial velocity field

The velocity field is initialized to zero, unless one of the following holds:

  • a wave model is active,
  • a plug-in is used.