Skip to content

Commit 145944f

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)