Skip to content

Commit e2bcba8

Browse files
author
LasNikas
committed
add comment
1 parent 8ff54d5 commit e2bcba8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/general/buffer.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ end
4747
(; active_particle) = buffer
4848

4949
# TODO: Parallelize (see https://github.com/trixi-framework/TrixiParticles.jl/issues/810)
50+
# Update the number of active particles and the active particle indices
5051
buffer.active_particle_count[] = sum(active_particle)
5152
buffer.eachparticle[1:buffer.active_particle_count[]] .= findall(x -> x == true,
5253
active_particle)

src/schemes/boundary/open_boundary/mirroring.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ function extrapolate_values!(system, v_open_boundary, v_fluid, u_open_boundary,
8787

8888
correction_matrix[] += L
8989

90-
if !prescribed_pressure && fluid_system isa EntropicallyDampedSPHSystem
90+
# For a WCSPH system, the pressure is determined by the state equation if it is not prescribed
91+
if !prescribed_pressure && !(fluid_system isa WeaklyCompressibleSPHSystem)
9192
extrapolated_pressure_correction[] += pressure_b * R
9293
end
9394

@@ -145,6 +146,8 @@ function extrapolate_values!(system, v_open_boundary, v_fluid, u_open_boundary,
145146
pressure[particle] = reference_value(reference_pressure, pressure[particle],
146147
particle_coords, t)
147148
elseif fluid_system isa WeaklyCompressibleSPHSystem
149+
# For a WCSPH system, the pressure is determined by the state equation
150+
# if it is not prescribed
148151
pressure[particle] = state_equation(density[particle])
149152
else
150153
f_d = L_inv * extrapolated_pressure_correction[]

0 commit comments

Comments
 (0)