**The Surface Marker and Micro Cell Method**

**Introduction**

The surface marker and micro cell (SMMC) method can be used to simulate two-dimensional, incompressible, free-surface fluid flow problems. The SMMC method is capable of simulating transient free surface fluid flow problems that include the impact of a free surface with a solid obstacle or the convergence of two free surfaces.

This website is divided into two main sections. The first is devoted to a brief discussion of the development of the SMMC method and contains links to the full texts of five papers associated with the development of the method. The second section contains links to the complete FORTRAN computer code for the implementation of the SMMC method and to the twenty-nine associated subroutines.

An interested reader is welcome to use the code for the SMMC method to simulate free surface fluid flow problems of interest or to use it as a point of departure for future research. The authors of the SMMC method were motivated in part to make the SMMC computer code available because the computer code for the Simplified Marker and Cell (SMAC) method, which was made available by the Los Alamos National Laboratory, represented an important point of departure for their own research in free surface fluid flow.

**Development of the SMMC Method**

The SMMC method was developed during the 1990s at SMU in

*The Surface Marker Method (1991)* includes fundamental modifications
of the original marker and cell (MAC) method which result in significant
reductions in the computer time and mass storage required for the solution of
transient, free surface fluid flow problems. The MAC method, which was
developed in the late 1960s, and its successor, the simplified marker and cell
method (SMAC), which was presented in 1970, both require markers initially
evenly distributed throughout the fluid. During each computational step in the
MAC and SMAC methods, all markers must be moved, and all cells containing
markers must be reflagged. Consequently, for the MAC
and SMAC methods, approximately three-fourths of the total computing time is
required to solve the pressure potential Poisson equation and to move markers
and reflag cells. In the surface marker method, only
one string of markers that stretches along the free surface is required and
only the cells adjacent to the free surface must be reflagged.
As a result, the time required to move markers and reflag
cells is significantly less for the surface marker method. A second significant
increase in efficiency was realized with the surface marker method by replacing
the successive overrelaxation method with the
preconditioned conjugate gradient method for the solution of the pressure
potential Poisson equation.

Accurate velocity boundary conditions are critical to the successful
simulation of free surface fluid flow. In *Velocity Boundary Conditions for
the Simulation of Free Surface Fluid Flow (1995)*, it is shown that previous
approaches for the assignment of free surface velocity boundary conditions in
marker and cell methods artificially introduce asymmetry and can even cause the
simulation to break up. New procedures that improve the accuracy of the
treatment of the free surface velocity boundary conditions and which do not artificially
introduce asymmetry are presented. It also is shown that use of the new
velocity boundary conditions enables the simulation of problems with realistic
values of viscosity and gravity, problems for which the breakup of the solution
occurs if previous approaches are employed.

Deficiencies associated with the simulation of impacts of fluid free
surfaces with solid boundaries were identified and addressed in *
Simulation
of Impacts of Fluid Free Surfaces with Solid Boundaries (1994).* New
procedures are introduced that affect the movement of markers in cells adjacent
to a solid boundary, the flags of the cells that comprise a solid boundary, and
the pressure boundary conditions for a cell in which impact occurs. Combined
with fundamental changes in the sequence of steps in the computational cycle,
these new procedures allow the intentional treatment of impact. As a result,
improved estimates are obtained of the pressure associated with the cells
adjacent to a boundary along which impact occurs. Consequently, more
appropriate adjustments are made of the tentative internal velocities
associated with such cells. In addition, a special procedure is presented for
the adjustment of the tentative internal velocity between two surface cells.
Finally, a new cell type termed a corner cell is defined and a procedure for
its treatment is presented. Numerical examples illustrate the previous
deficiencies associated with the treatment of impact as well as the
effectiveness of the new procedures. Validation of the new procedures is
achieved by comparison of simulation and experimental results for flow over a
containment dike.

In *The Introduction of Micro Cells to Treat Pressure in Free Surface
Fluid Flow Problems (1995)*, an entirely new method of calculating the
pressure field for the simulation of free surface fluid flow is presented. A
critical feature of the mew method is the introduction of a finer mesh of cells
in addition to the regular mesh of finite volume cells. The smaller (micro)
cells are used only near the free surface, while the regular (macro) cells are
used throughout the computational domain. The advancement of the free surface
is accomplished by use of surface markers, while the discrete representation of
the free surface for the purpose of the application of pressure boundary
conditions is accomplished by use of micro cells. In order to exploit the
advantages offered by micro cells, a new general equation governing the
pressure field is derived. Micro cells enable the identification and treatment
of multiple points on the free surface in a single surface cell and of points
on the free surface in a macro cell has no empty macro cell neighbors. Both of
these situations are likely to occur repeatedly in a free surface fluid flow
simulation, but neither situation has been explicitly taken into account in
previous methods. The new capabilities enabled by use of surface markers and
micro cells are essential for the successful simulation of free surface fluid
flow problems that involve multivalued free surfaces
and breaking fluid fronts.

*The Surface Marker and Micro Cell Method ( 1997)* combines the new
procedures presented in the four papers referenced above and presents a
complete new method for the simulation of two-dimensional, incompressible, free
surface fluid flow problems. The SMMC method is capable of simulating transient
free surface fluid flow problems that include multivalued
free surfaces, impact of free surfaces with solid obstacles, and converging
fluid fronts such as those that occur during wave breaking. The first method to
address the challenges associated with the simulation of free surface fluid
flow was the MAC method, which was published in 1965 and which introduced the
concept of massless markers that move with the fluid.
The SMMC method, like the MAC method, employs massless
markers to track the movement of the fluid. The SMMC method is therefore a
marker and cell method, but it otherwise differs from the MAC method in
essentially every significant detail. Surface markers, rather than markers
distributed throughout the fluid, are used in the SMMC method. New procedures
are used to insure that only physically meaningful velocity information is used
to move the surface markers and advect the free
surface. Physically motivated new procedures to carefully approximate momentum
fluxes, as opposed to straightforward use of finite difference approximations
of terms in the Navier-Stokes equations, are used for
the calculation of the tentative internal velocity field. To avoid the
physically unrealistic use in previous methods of the continuity equation to
calculate tentative surface velocities, as well as the resulting inconsistency
between the treatments of pressure and continuity in surface and full cells, a
new approach also is used for the determination of tentative surface
velocities. In connection with converging fluid fronts, new procedures that
incorporate multivalued velocities insure the use of
physically relevant information in the calculation of the velocity and pressure
fields. In order to assign appropriate values at different stages of the
computational cycle to velocities between converging fluid fronts, the physical
purpose for which the velocity is needed is taken into account. For the same
velocity, one value is appropriate for a given purpose, such as marker
movement, but inappropriate for a different purpose, such as momentum transfer
or the development of a physically appropriate pressure field. It is recognized
that for a particular discrete velocity that is associated with the convergence
of two fluid fronts, as many as five different values are appropriate for
different purposes during a single computational cycle. To demonstrate both the
capabilities and the validity of the SMMC method, simulation and experimental
results are compared for water sloshing in a tank. The comparison reveals good
agreement between the shapes and locations of the simulated and experimental
free surfaces even after repeated occurrences of impact of the water with the
tank walls and of the convergence of fluid fronts as the water sloshes back and
forth in the tank. A grid refinement study also demonstrates the convergence of
the new method.

**SMMC Computer Code**

The FORTRAN code for the implementation of the SMMC method is SMMC_PLUS.f, which calls twenty-nine associated subroutines. The name and purpose of each subroutine is listed below in the order of appearance in SMMC_PLUS.f:

__Subroutine__ __Purpose__

domain.f Define the solution domain and initialize variables.

obst.f If applicable, define fixed obstacles.

outlet.f If applicable, define outlets.

inlet.f If applicable, define inlets.

fluid_rect.f If applicable, define rectangular fluid filled regions.

fluid_drop.f If applicable, define a circular fluid filled region.

miscel.f Define various system and output parameters.

dtilde.f Compute the tilde accelerations.

move_marker.f Move markers.

tilde_velocity.f Compute the tilde velocities.

pre_flag.f Assign check flags to appropriate macro and micro cells.

flag_micro.f Assign micro cell flags.

droplet.f Track the movement of droplets (fluid region smaller than one macro cell.)

flag_macro.f Assign macro cell flags.

new_velocity.f Assign new fluid cell velocities.

separation_wall.f Treat separation of fluid from a fixed obstacle.

pcg_setup.f Prepare for use of the preconditioned conjugant gradient method.

pcg_solver.f Compute the pressure potential field.

final_velocity.f Compute the final velocities.

surface_velocity.f Assign the surface velocities.

converging_surfaces.f Treat converging fluid fronts.

output_control.f Control program output.

print_marker_positions.f Output marker position information.

volume_check.f Check the fluid volume.

print_velocity_info.f Output velocity information.

print_pressure_info.f Output pressure information.

print_macro_cell_info.f Output macro cell information.

print_micro_cell_info.f Output micro cell information.

symmetry_check.f If appropriate, check for solution symmetry.

The macro compile can be used to create the executable file smmc.x.