Skip to content

Commit d9f148d

Browse files
committed
Fix fin open boundaries and add velocity averaging
1 parent a6a225d commit d9f148d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

examples/fsi/fin_2d.jl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ boundary_layers = 3
8181
# fully sampled.
8282
# Note: Due to the dynamics at the inlets and outlets of open boundaries,
8383
# it is recommended to use `open_boundary_layers > boundary_layers`
84-
open_boundary_layers = 6
84+
open_boundary_layers = 10
8585

8686
fluid_density = 1000.0
8787
tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density,
@@ -255,7 +255,7 @@ structure_system = TotalLagrangianSPHSystem(structure, smoothing_kernel, smoothi
255255
modulus, poisson_ratio;
256256
n_clamped_particles, clamped_particles_motion=boundary_motion,
257257
boundary_model=boundary_model_structure,
258-
velocity_averaging=nothing,
258+
velocity_averaging=TrixiParticles.VelocityAveraging(5e-4),
259259
viscosity=ArtificialViscosityMonaghan(alpha=0.1),
260260
penalty_force=PenaltyForceGanzenmueller(alpha=0.1))
261261

@@ -293,7 +293,7 @@ else
293293
open_boundary_model = BoundaryModelDynamicalPressureZhang()
294294
# open_boundary_model = BoundaryModelMirroringTafuni(; mirror_method=ZerothOrderMirroring())
295295
reference_velocity_in = SVector(1.0, 0.0)
296-
reference_pressure_in = nothing
296+
reference_pressure_in = 0.0
297297
reference_density_in = nothing
298298
boundary_type_in = InFlow()
299299
face_in = ([0.0, 0.0], [0.0, tank_size[2]])
@@ -305,12 +305,10 @@ else
305305
reference_velocity=reference_velocity_in,
306306
initial_condition=inlet.fluid, boundary_type=boundary_type_in)
307307

308-
reference_velocity_out = nothing
309-
reference_pressure_out = 0.0
308+
reference_velocity_out = SVector(1.0, 0.0)
309+
reference_pressure_out = nothing
310310
reference_density_out = nothing
311-
# Vortices with negative x-velocity can pass through the outlet,
312-
# which a pure outflow boundary cannot handle.
313-
boundary_type_out = BidirectionalFlow()
311+
boundary_type_out = OutFlow()
314312
face_out = ([min_coords_outlet[1], 0.0], [min_coords_outlet[1], tank_size[2]])
315313
outflow = BoundaryZone(; boundary_face=face_out, face_normal=(-flow_direction),
316314
open_boundary_layers, density=fluid_density, particle_spacing,
@@ -321,8 +319,7 @@ else
321319

322320
open_boundary_system = OpenBoundarySystem(inflow, outflow; fluid_system,
323321
boundary_model=open_boundary_model,
324-
buffer_size=n_buffer_particles,
325-
shifting_technique=nothing)
322+
buffer_size=n_buffer_particles)
326323

327324
wall = union(tank.boundary, inlet.boundary, outlet.boundary)
328325
min_corner = minimum(wall.coordinates, dims=2) .- 5 * fluid_particle_spacing

0 commit comments

Comments
 (0)