version 0.6.0
mod_lsm_volume_fraction_bc Module Reference

Compute the volume fraction boundary conditions corresponding to the level set's bc.

Functions/Subroutines

subroutine translate_vf_bc_to_ls_bc (phi, vf_boundary_condition, ls_boundary_condition)
 Translate VF boundary conditions to equivalent LS boundary conditions. More...
 

Function/Subroutine Documentation

◆ translate_vf_bc_to_ls_bc()

subroutine mod_lsm_volume_fraction_bc::translate_vf_bc_to_ls_bc ( double precision, dimension(:,:,:), intent(in)  phi,
type(t_boundary_condition), intent(in)  vf_boundary_condition,
type(t_boundary_condition), intent(inout)  ls_boundary_condition 
)
Note
Dirichlet VF BNDC (called inlet in Notus) are given a value of 1 or 0. The associated LS BNDC is a bit tricky, as the inside/outside a phase is defined implicitly by the LS sign. To do so, we first extrapolate from the inside the LS towards the boundary and, depending on the sign, make sure that the LS BNDC is of the correct sign. Formulae:

\[ \begin{cases} max\left(\delta x,\phi_{e}\right) & \text{if \ensuremath{VF=0}}\\ min\left(-\delta x,\phi_{e}\right) & \text{if \ensuremath{VF=1}}\\ 0 & \text{otherwise} \end{cases} \]

where \( \phi_e \) is the extraplated value of the LS at the boundary.
The periodic/symmetric bndc are dealt with fill_ghost_nodes
Todo:
MCO: deal with Neumann bndc (impose Dirichlet with distance function)
Note
The extrapolation of the normal component at the boundary is done at first order. This works ok for now, but we might consider higher order (geometrical) approximation. High order extrapolation doesn's seem to work well with reinitialization, so first order is used.