Skip to content

Commit

Permalink
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
svchb committed Jan 22, 2025
2 parents 4db3601 + f7f8620 commit 9924bac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/schemes/fluid/surface_normal_sph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@ function calc_normal!(system::FluidSystem, neighbor_system::FluidSystem, u_syste
end

# Section 2.2 in Akinci et al. 2013 "Versatile Surface Tension and Adhesion for SPH Fluids"
# and Section 5 in Morris 2000 "Simulating surface tension with smoothed particle hydrodynamics"
function calc_normal!(system::FluidSystem, neighbor_system::BoundarySystem, u_system, v,
v_neighbor_system, u_neighbor_system, semi, surfn, nsurfn)
# Note: This is the simplest form of normal approximation commonly used in SPH and comes
# with serious deficits in accuracy especially at corners, small neighborhoods and boundaries
function calc_normal_akinci!(system::FluidSystem, neighbor_system::BoundarySystem, u_system,
v,
v_neighbor_system, u_neighbor_system, semi, surfn)
(; cache) = system
(; colorfield, colorfield_bnd) = neighbor_system.boundary_model.cache
(; boundary_contact_threshold) = surfn

system_coords = current_coordinates(u_system, system)
neighbor_system_coords = current_coordinates(u_neighbor_system, neighbor_system)
nhs = get_neighborhood_search(system, neighbor_system, semi)
nhs = get_neighborhood_search(neighbor_system, system, semi)

# First we need to calculate the smoothed colorfield values of the boundary
# TODO: move colorfield to extra step
Expand Down

0 comments on commit 9924bac

Please sign in to comment.