|
174 | 174 | neighbor_system::AbstractFluidSystem, |
175 | 175 | particle, neighbor, pos_diff, distance, |
176 | 176 | rho_a, rho_b, grad_kernel) |
177 | | - # No cohesion with oneself |
178 | | - distance < sqrt(eps()) && return zero(pos_diff) |
| 177 | + # No cohesion with oneself. See `src/general/smoothing_kernels.jl` for more details. |
| 178 | + distance^2 < eps(initial_smoothing_length(particle_system)^2) && return zero(pos_diff) |
179 | 179 |
|
180 | 180 | m_b = hydrodynamic_mass(neighbor_system, neighbor) |
181 | 181 | support_radius = compact_support(smoothing_kernel, |
|
194 | 194 | (; surface_tension_coefficient) = surface_tension_a |
195 | 195 |
|
196 | 196 | smoothing_length_ = smoothing_length(particle_system, particle) |
197 | | - # No surface tension with oneself |
198 | | - distance < sqrt(eps()) && return zero(pos_diff) |
| 197 | + # No surface tension with oneself. See `src/general/smoothing_kernels.jl` for more details. |
| 198 | + distance^2 < eps(initial_smoothing_length(particle_system)^2) && return zero(pos_diff) |
199 | 199 |
|
200 | 200 | m_b = hydrodynamic_mass(neighbor_system, neighbor) |
201 | 201 | n_a = surface_normal(particle_system, particle) |
|
215 | 215 | rho_a, rho_b, grad_kernel) |
216 | 216 | (; surface_tension_coefficient) = surface_tension_a |
217 | 217 |
|
218 | | - # No surface tension with oneself |
219 | | - distance < sqrt(eps()) && return zero(pos_diff) |
| 218 | + # No surface tension with oneself. See `src/general/smoothing_kernels.jl` for more details. |
| 219 | + distance^2 < eps(initial_smoothing_length(particle_system)^2) && return zero(pos_diff) |
220 | 220 |
|
221 | 221 | n_a = surface_normal(particle_system, particle) |
222 | 222 | curvature_a = curvature(particle_system, particle) |
|
285 | 285 | rho_a, rho_b, grad_kernel) |
286 | 286 | (; surface_tension_coefficient) = surface_tension_a |
287 | 287 |
|
288 | | - # No surface tension with oneself |
289 | | - distance < sqrt(eps()) && return zero(pos_diff) |
| 288 | + # No surface tension with oneself. See `src/general/smoothing_kernels.jl` for more details. |
| 289 | + distance^2 < eps(initial_smoothing_length(particle_system)^2) && return zero(pos_diff) |
290 | 290 |
|
291 | 291 | S_a = stress_tensor(particle_system, particle) |
292 | 292 | S_b = stress_tensor(neighbor_system, neighbor) |
|
302 | 302 | pos_diff, distance) |
303 | 303 | (; adhesion_coefficient) = neighbor_system |
304 | 304 |
|
305 | | - # No adhesion with oneself |
306 | | - distance < sqrt(eps()) && return zero(pos_diff) |
| 305 | + # No adhesion with oneself. See `src/general/smoothing_kernels.jl` for more details. |
| 306 | + distance^2 < eps(initial_smoothing_length(particle_system)^2) && return zero(pos_diff) |
307 | 307 |
|
308 | 308 | # No reason to calculate the adhesion force if adhesion coefficient is near zero |
309 | 309 | abs(adhesion_coefficient) < eps() && return zero(pos_diff) |
|
0 commit comments