Skip to content

Commit 41a397f

Browse files
committed
Move mean density calculation into the free surface correction
1 parent 061078c commit 41a397f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/general/corrections.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ end
3535
# `rho_mean` is the mean density of the fluid, which is used to determine correction values near the free surface.
3636
# Return a tuple `(viscosity_correction, pressure_correction, surface_tension_correction)` representing the correction terms.
3737
@inline function free_surface_correction(correction::AkinciFreeSurfaceCorrection,
38-
particle_system, rho_mean)
38+
particle_system, rho_a, rho_b)
3939
# Equation 4 in ref
40+
rho_mean = (rho_a + rho_b) / 2
4041
k = correction.rho0 / rho_mean
4142

4243
# Viscosity, pressure, surface_tension
4344
return k, 1, k
4445
end
4546

46-
@inline function free_surface_correction(correction, particle_system, rho_mean)
47+
@inline function free_surface_correction(correction, particle_system, rho_a, rho_b)
4748
return 1, 1, 1
4849
end
4950

0 commit comments

Comments
 (0)