Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
two-phase-clsvof.h File Reference
#include "vof.h"
#include "tracer.h"
#include "two-phase-generic.h"
#include "redistance.h"
Include dependency graph for two-phase-clsvof.h:

Go to the source code of this file.

Functions

void event_init (void)
 The initial volume fraction is computed from the initial distance field, which must be initialised by the user.
 
void event_properties (void)
 The distance function is reinitialised at each timestep.
 

Variables

scalar d []
 
scalar f []
 
scalarinterfaces = {f}
 The height functions are stored in the vector field associated with each VOF tracer.
 
scalartracers = {d}
 Here we set the gradient functions for each tracer (as defined in the user-provided tracers list).
 

Function Documentation

◆ event_init()

void event_init ( void  )

The initial volume fraction is computed from the initial distance field, which must be initialised by the user.

Event: init (i = 0)

Definition at line 36 of file two-phase-clsvof.h.

References _i, d, f, fractions(), phi, and x.

Here is the call graph for this function:

◆ event_properties()

void event_properties ( void  )

The distance function is reinitialised at each timestep.

Event: properties (i++)

In interfacial cells, the signed distance is obtained directly from the VOF reconstruction of the interface. This distance is combined with the existing distance using a small weight, thus ensuring exponential time relaxation of the signed distance toward its VOF value.

The redistancing operation itself is quite expensive. We do not use the second-order subcell correction because it tends to introduce noise on the distance field and does not seem to improve results.

Definition at line 50 of file two-phase-clsvof.h.

References _i, alpha, d, f, HUGE, interface_normal(), n, normalize(), plane_alpha, point, redistance(), and x.

Here is the call graph for this function:

Variable Documentation

◆ d

scalar d[]

Two-phase interfacial flows with coupled VOF and levelset

This file helps setup simulations for flows of two fluids separated by an interface (i.e. immiscible fluids). It is typically used in combination with a Navier–Stokes solver.

The interface between the fluids is tracked with a Volume-Of-Fluid method. The signed distance field d is advected as a tracer and is relaxed toward the VOF-defined interface.

This coupling ensures a mass conservation at least as good as that of the pure VOF solver.

This solver can be combined with the integral formulation of surface tension.

The volume fraction in fluid 1 is \(f=1\) and \(f=0\) in fluid

  1. The densities and dynamic viscosities for fluid 1 and 2 are rho1, mu1*, rho2, mu2, respectively.

Definition at line 27 of file two-phase-clsvof.h.

Referenced by event_init(), and event_properties().

◆ f

scalar f[]

Definition at line 27 of file two-phase-clsvof.h.

Referenced by event_init(), and event_properties().

◆ interfaces

scalar * interfaces = {f}

The height functions are stored in the vector field associated with each VOF tracer.

We will need basic functions for volume fraction computations.

They need to be updated every time the VOF field changes. For the centered Navier-Stokes solver, this means after initialisation and after VOF advection.

Note that strictly speaking this should be done for each sweep of the direction-split VOF advection, which we do not do here i.e. we use the normal at the beginning of the timestep and assume it is constant during each sweep. This seems to work fine.

Definition at line 27 of file two-phase-clsvof.h.

◆ tracers

scalar * tracers = {d}

Here we set the gradient functions for each tracer (as defined in the user-provided tracers list).

Integral formulation for surface tension

See Al Saud et al., 2018 and Popinet & Zaleski, 1999 for details.

The surface tension field \(\sigma\) will be associated to each levelset tracer. This is done easily by adding the following field attributes.

Definition at line 27 of file two-phase-clsvof.h.