Conversation
Results and ImprovementsDroplet-on-a-planeAfter applying the proposed correction to the droplet-on-a-plane benchmark, noticeable changes are observed in the description of the contact angle as a function of the component affinity parameter (
The input data used to reproduce this analysis are provided below: Python code used to generate the geometry Click to expand codeimport numpy as np
import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = 'notebook' # or 'browser' if you want
# --- Domain ---
Nx, Ny, Nz = 100, 100, 100
Lx, Ly, Lz = Nx - 1, Ny - 1, Nz - 1
# --- Flat plane at z = 0 ---
# We'll use value 0 for solid plane; 1 for background; 2 for droplet
npvol = np.ones((Nx, Ny, Nz), dtype='uint8')
# --- Spherical droplet that just touches the plane ---
R = 20
x0, y0 = Nx // 2, Ny // 2
z0 = R-int(R/4) # center placed so the sphere touches z=0
# Build droplet
x, y, z = np.indices((Nx, Ny, Nz))
mask = (x - x0)**2 + (y - y0)**2 + (z - z0)**2 < R**2
npvol[mask] = 2
npvol[:, :, 0:2] = 0 # single-voxel solid floor at z=0
npvol.tofile(f'droplet3D-{Nx}-{Ny}-{Nz}.raw').db file employed to run the simulation Click to expand codeDomain {
Filename = "droplet3D-100-100-100.raw"
ReadType = "8bit"
N = 100, 100, 100
nproc = 1, 1, 1
n = 100, 100, 100
voxel_length = 1.0
ReadValues = 0, 1, 2
WriteValues = 0, 1, 2
BC = 0
}
Color {
protocol = "fractional flow"
capillary_number = 1e-4
timestepMax = 60000
alpha = 0.005
rhoA = 1.0
rhoB = 1.0
tauA = 1.7
tauB = 1.7
F = 0, 0, 0
WettingConvention = "SCAL"
ComponentLabels = 0
ComponentAffinity = -0.3
Restart = false
}
Analysis {
analysis_interval = 200
subphase_analysis_interval = 100000
N_threads = 1
visualization_interval = 200
restart_interval = 10000000
restart_file = "Restart"
}
Visualization {
write_silo = true
save_8bit_raw = true
save_phase_field = true
save_pressure = true
save_velocity = true
}
FlowAdaptor {
min_steady_timesteps = 10000000
max_steady_timesteps = 11000000
fractional_flow_increment = 0.0
}Another aspect observed in the droplet-on-a-plane benchmark under high interfacial tension is that, in the current version of LBPM, the droplet tends to spread completely over the surface when high contact angles are prescribed. To illustrate this behavior, we compare in the GIFs below the droplet simulations performed with alpha=0.01 before and after the proposed correction. In the before-correction case, the droplet in the GIF gradually appears to disappear as spreading progresses. This effect occurs because the phase-field Left-Side: After-Correction and Right-Side: Before-Correction |



The present proposed correction to the lbpm_color_simulator routine aims to eliminate spurious diffusive effects on the phase field occurring across the fluid–solid interface. This diffusive effect is well know in the literature (e.g., Leclaire et al. 2017 ( https://doi.org/10.1002/fld.4226 ), Yu et al. 2017 ( https://doi.org/10.1177/0954406217749616), Akai et al. 2018 (https://doi.org/10.1016/j.advwatres.2018.03.014)). It arises when the computed color gradients are not properly incorporated into the recoloring step, causing the non-wetting fluid to segregate from the solid phase and form an artificial film along the interface.
Because the phase field term ($\phi$ ) is defined within the solid region, the segregation term incorrectly interprets the interface between the non-wetting fluid and the solid as a fluid–fluid interface that must be segregated. As a result, unphysical film formation occurs. This behavior is clearly illustrated in Figure bellow, adapted from McClure et al. (2014) (https://doi.org/10.1016/j.cpc.2014.03.012), where the formation of a fluid film along the solid surface interface with non-wetting fluid is evident. Moreover, the intensity of this film increases as the non-wetting character of the fluid becomes stronger.
However, the corrections proposed in the literature to address this problem are generally based on the standard color-gradient formulation, in which two distribution functions are used to discretize the coupled mass and momentum balances of each fluid. Consequently, these corrections cannot be directly applied to the LBPM framework, which discretizes mass and momentum balances separately: a single distribution function is used for the momentum balance of the mixture, while two additional distribution functions are employed for the mass balance of each fluid.
To correct this effect within the LBPM lattice Boltzmann formulation, we propose an implementation that preserves the standard LBPM computation of gradients over the entire domain for the momentum balance equation, since this approach is able to correctly capture the pressure response induced by wettability effects (e.g., via the Young equation). However, for the gradients applied in the mass balance distribution functions, we modify the interface normal vectors at locations where the fluid–fluid interface is in contact with the solid region.
The correction of the unit normal vector follows the same approach proposed by Yu et al. 2017, and Akai et al. 2018:
where$n_{c}$ is the unit normal vector of the fluid–fluid interface and $n_{w}$ is the unit normal vector of the solid wall.
Implementation
Click to expand code
To implement this correction, it is necessary to count the number of solid neighbors around the fluid–solid interface. Therefore, we introduce an
IDSolidarray in ScaLBL_ColorModel::Create():Allocate and Initialize IDSolid
Within the functions ScaLBL_D3Q19_AAeven_Color and ScaLBL_D3Q19_AAodd_Color, an initial data-reading step is introduced in which the IDSolid values are loaded together with the phase-field terms:
IDSolid data-reading
The vector "nx,ny,nz" used in the mass-balance distribution function is replaced by a corrected vector "npx,npy,npz", while the original formulation is preserved for the momentum balance. The computation of "npx,npy,npz" is provided in the code below:
Vector - Angle Correction