Skip to content

Commit 2dbaa50

Browse files
LasNikasLasNikasefaulhaber
authored
add TLSPH support (#954)
Co-authored-by: LasNikas <[email protected]> Co-authored-by: Erik Faulhaber <[email protected]>
1 parent 305bf62 commit 2dbaa50

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

src/general/semidiscretization.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,26 @@ function update_nhs!(neighborhood_search,
825825
semi, points_moving=(true, true), eachindex_y=each_active_particle(neighbor))
826826
end
827827

828+
function update_nhs!(neighborhood_search,
829+
system::OpenBoundarySystem{<:BoundaryModelDynamicalPressureZhang},
830+
neighbor::TotalLagrangianSPHSystem,
831+
u_system, u_neighbor, semi)
832+
update!(neighborhood_search,
833+
current_coordinates(u_system, system),
834+
current_coordinates(u_neighbor, neighbor),
835+
semi, points_moving=(true, true), eachindex_y=each_active_particle(neighbor))
836+
end
837+
838+
function update_nhs!(neighborhood_search,
839+
system::TotalLagrangianSPHSystem,
840+
neighbor::OpenBoundarySystem{<:BoundaryModelDynamicalPressureZhang},
841+
u_system, u_neighbor, semi)
842+
update!(neighborhood_search,
843+
current_coordinates(u_system, system),
844+
current_coordinates(u_neighbor, neighbor),
845+
semi, points_moving=(true, true), eachindex_y=each_active_particle(neighbor))
846+
end
847+
828848
function update_nhs!(neighborhood_search,
829849
system::OpenBoundarySystem, neighbor::TotalLagrangianSPHSystem,
830850
u_system, u_neighbor, semi)

src/schemes/structure/total_lagrangian_sph/system.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,12 @@ end
496496

497497
# To account for boundary effects in the viscosity term of the RHS, use the viscosity model
498498
# of the neighboring particle systems.
499-
@inline function viscosity_model(system::TotalLagrangianSPHSystem, neighbor_system)
499+
@inline function viscosity_model(system::TotalLagrangianSPHSystem,
500+
neighbor_system::AbstractFluidSystem)
500501
return neighbor_system.viscosity
501502
end
502503

503-
@inline function viscosity_model(system::AbstractFluidSystem,
504+
@inline function viscosity_model(system::Union{AbstractFluidSystem, OpenBoundarySystem},
504505
neighbor_system::TotalLagrangianSPHSystem)
505506
return neighbor_system.boundary_model.viscosity
506507
end

0 commit comments

Comments
 (0)