Tags

- ANSYS
- ANSYS CFX
- ANSYS Fluent
- boundary conditions
- CD-Adapco
- CD-Adapco StarCCM+
- cfd
- CFD engineer
- Computational
- computational fluid dynamics
- Fluid Dynamics
- Fluid Mechanics
- fluid phase
- free surface
- free surface flow
- marine cfd
- mesh generation
- multiple fluids
- Navier Stokes
- OpenFoam
- phase fraction
- ship cfd
- StarCCM+
- VOF
- volume fraction
- volume of fluid

Oil and water don’t mix . . . unless you ask a computer. Computational Fluid Dynamics (CFD) models multiple fluids together with the volume of fluid method. (VOF) This article ignores the theory behind VOF and focuses on practical implementation. For a simulation with two fluids, VOF introduces one additional transport equation: the volume fraction. With this extra transport equation, we need new boundary conditions, and VOF modeling requires additional mesh refinements. Time to discuss the practical details of VOF modeling.

The VOF method supports two or more fluids. Practically, most CFD problems only require mixing two fluids. If more fluids get involved, that leads to more complicated transport equations. Helpful tip: the number of transport equations for volume fractions is always one less than the total number of fluids in your simulation. More transport equations require more boundary conditions. You essentially repeat the same process for each volume fraction transport equation. For simplicity, this article will assume only two fluids, only one transport equation of volume fraction.

VOF modeling required new boundary conditions for the volume fraction. This volume fraction represents which fluid (or fraction of both fluids) occupies each cell in the mesh. The volume fraction changes throughout the domain. To simulate a fluid water level, the volume fraction often needs to change with vertical position. Define the boundary condition as a mathematical function, rather than a single value. Apply the vertical variation to all boundaries on your fluid, including inlets, outlets, and your body.

Another modeling change is the pressure equation. Hydrostatic pressure now factors into the boundary conditions; pressure changes with vertical position. Check with your solver to see how your software handles the hydrostatic pressure. Some factor out hydrostatic pressure. Others include it. In any case, you must account for hydrostatic pressure when specifying boundary conditions.

Now to focus on a popular application for VOF modeling: ship resistance studies and free surface flow. This application affects our meshing strategy and expectations for simulation stability. The major defining feature of free surface flow is the single interface between air and water. Unlike cases of industrial flow that might model bubbles, free surface flow models a single continuous interface between the air and water. This creates a distinctive region to concentrate the meshing.

To capture that interface between air and water, we want a fast transition in the volume fraction; it should ideally change from a value of 0 to 1 in the space of 1 to 2 cells. Alas, reality does not match ideals. Interpolation equations for volume fraction do not support rapid changes in volume fraction. CFD developers tried to counter this with custom interpolation equations (high resolution interface compression (HRIC)), but that didn’t completely alleviate the problem. Instead, the CFD engineer must employ a modeling solution.

For the modeling solution, you need to concentrate the mesh in regions where you expect the volume fraction to change. Vertical cell spacing is in the range of 10-20% of regular cell size, with 6-12 cells across the region of transition. The transition region gets larger if you need to accommodate waves. Unfortunately, accurate resolution of the transition region can quickly drive to unreasonably high cell counts. Balancing mesh resolution with mesh size is one of the principle modeling challenges that CFD engineers face in VOF modeling.

VOF modeling also introduces instability into the simulation. You may need to switch to first order interpolation on the volume fraction to ensure simulation stability. And expect all residuals in the momentum and pressure equations to increase by at least 1 x 10^{2}. When monitoring VOF simulations for convergence, monitors become more reliable that residuals. VOF modeling offers no guarantees of simulation stability.

When post processing ship free surface models, every client wants to see the free surface. They want to see a surface marking where the water ends, and the air begins. Problem is that VOF does not track the interface; it tracks the portion of each fluid phase in each cell.

To produce a free surface, create an iso-surface, based on the variable of the volume fraction. Set the volume fraction to a value of 0.5, halfway between the two fluid phases. This marks the transition between water and air. That transition represents the free surface.

Also check another visualization for quality control: a volume plot. Plot out the volume of cells where the volume fraction lies between 0.10 and 0.90. This represents the transition region, where there fluid is not justifiably water or air. More like spray, or fog, which doesn’t match reality for free surface flow. In a ship free surface flow, the majority of the cells should be either water or air, corresponding to a volume fraction of 0 to 1. We want the transition region to remain small, the region where the volume fraction lies between 0.10 and 0.90. The volume plot allows the CFD engineer to check the transition region; ensure it remains small and the simulation faithfully reproduces reality.

The volume of fluid method opens new horizons for advanced modeling, which requires additional planning from the CFD engineer. New boundary conditions for the volume fraction, which need to vary with vertical position. Don’t forget hydrostatic pressure. The meshing strategy got more complicated, requiring additional refinements at the transition of the free surface. And a few more tools in post processing to visualize the free surface. To summarize in a single sentence, volume of fluid is not easy. VOF is advanced CFD modeling.

[1] | TCFD, “Axial Compressor CFD,” TCFD, 31 Dec 2018. . Available: https://www.cfdsupport.com/axial-compressor-cfd-simulation.html. . |

[2] | Atsushi Ueyama, “Progress of Time,” Cradle MSC Software Company, 31 Dec 2018. . Available: https://www.cradle-cfd.com/tec/column01/017.html. . |

[3] | YouTube Author: Holzmann CFD, “Holzmann CFD & OpenFOAM® – Dynamic Meshes in Multiphase Flows #2 (Topology Change, Ship Simulation),” YouTube, 10 Feb 2018. . Available: https://www.youtube.com/watch?v=B9KjnyDpsx0. . |