Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
87da03c
swap extrapolation
Jul 2, 2025
ea700a9
Merge branch 'main' into fix-obc-extrapolation
Jul 2, 2025
f30f019
swap density pressure
Jul 3, 2025
61ea456
adapt docs
Jul 3, 2025
350c791
rm example
Jul 3, 2025
a8b6555
fix missing nhs update
Jul 9, 2025
ac9108c
implement different mirror methods
Jul 9, 2025
d69f03d
add docs
Jul 10, 2025
8863884
fix tests
Jul 10, 2025
8beb4d9
fix typos
Jul 10, 2025
f060318
add docs
Jul 10, 2025
bf610b8
add tests
Jul 10, 2025
8ca3825
apply formatter
Jul 10, 2025
6481f3e
Merge branch 'main' into fix-obc-extrapolation
Jul 15, 2025
15c737c
add `average_velocity!` for `BoundaryModelLastiwka`
Jul 15, 2025
f285ccd
fix
Jul 15, 2025
91b0aab
Merge branch 'main' into fix-obc-extrapolation
Jul 23, 2025
5eb6442
add interpolation functions
Jul 23, 2025
81989b5
Merge branch 'main' into fix-obc-extrapolation
Jul 23, 2025
888ef53
restructure again
Jul 23, 2025
2cdd9e9
Merge branch 'main' into fix-obc-extrapolation
Jul 23, 2025
4fd1b32
fix gpu bugs
Jul 23, 2025
fb9f333
remove unnecessary argument
Jul 23, 2025
c5fa956
fix gpu again
Jul 23, 2025
0925255
fix gpu
Jul 24, 2025
3a001f3
implement suggestions
Jul 24, 2025
d611748
fix
Jul 24, 2025
70105bb
add comments
Jul 24, 2025
1425637
implement suggestions
Jul 24, 2025
956ad94
first prototype: NOT VALIDATED YET
Jul 24, 2025
b888b3f
fix avg vel in LastiwkaModel
Jul 25, 2025
df291e7
fix avg in mirroring
Jul 25, 2025
91b308f
fix tests
Jul 25, 2025
28061d2
adapt example file
Jul 25, 2025
99f5eaf
fix allocations
Jul 25, 2025
8136ba1
fix gpu
Jul 25, 2025
452b5c5
first GPU working prototype
Jul 26, 2025
df39f14
improve API
Jul 26, 2025
5f99a18
fix tests
Jul 26, 2025
ecabe1e
rm export
Jul 26, 2025
ced1f86
fix
Jul 26, 2025
42c7b3e
fix type stability
Jul 26, 2025
70422b9
implement suggestions
Jul 28, 2025
7e0d618
rm ref
Jul 28, 2025
fcfd477
format
Jul 28, 2025
440cb71
Merge branch 'fix-obc-extrapolation' into revise-open-boundaries
Jul 28, 2025
08de264
Rename 'tlsph' to 'place_on_shell' (#814)
svchb Jun 13, 2025
3e0b8d8
Merge branch 'dev' into revise-open-boundaries
Jul 29, 2025
0ed7dd5
fix merge bugs
Jul 29, 2025
0150a1f
supersede #852
Jul 29, 2025
95ee811
supersede #850
Jul 29, 2025
76411ff
fix
Jul 29, 2025
8ac88be
rename boundary models
Jul 29, 2025
2b94538
fix?
Jul 30, 2025
d45fbdd
fix tests
Jul 31, 2025
ce0ed1d
Rename 'tlsph' to 'place_on_shell' (#814)
svchb Jun 13, 2025
c77b0f6
Merge branch 'dev' into revise-open-boundaries
Jul 31, 2025
3367db3
fix characteristics
Aug 1, 2025
fcb7675
revise pipe flow example
Aug 1, 2025
49b10b3
fix include bug
Aug 1, 2025
c1e8589
Rename 'tlsph' to 'place_on_shell' (#814)
svchb Jun 13, 2025
b8309d3
Merge branch 'dev' into revise-open-boundaries
Aug 25, 2025
38f5f07
Merge branch 'main' into dev
efaulhaber Aug 26, 2025
b9d091c
Combine PST and TVF into a unified framework (#884)
efaulhaber Aug 26, 2025
1e4c4e3
Merge branch 'dev' into revise-open-boundaries
Aug 26, 2025
a4d77da
Merge branch 'dev' into revise-open-boundaries
Sep 2, 2025
fc2c268
Merge branch 'dev' into revise-open-boundaries
Sep 4, 2025
d220902
add doc strings
Sep 4, 2025
680db78
Merge branch 'dev' into revise-open-boundaries
Sep 4, 2025
9e6e1d5
implement suggestions
Sep 4, 2025
e546f45
remove duplicated system
Sep 4, 2025
fcc6675
rm unnecessary variable
Sep 4, 2025
bdea859
apply formatter
Sep 4, 2025
3d6e417
set pressure for WCSPH
Sep 5, 2025
4dc6090
setter for open boundary
Sep 5, 2025
cb03a26
rename reference values
Sep 5, 2025
faf0a25
Merge branch 'dev' into revise-open-boundaries
Sep 5, 2025
e96aae1
fix gpu tests
Sep 5, 2025
964c816
fix sign
Sep 5, 2025
db35fcc
implement suggestions
Sep 6, 2025
aa4c522
fix unit tests
Sep 6, 2025
31f39db
revise doc strings
Sep 8, 2025
1e7904c
add NEWS entry
Sep 8, 2025
5cff887
update NEWS
Sep 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/schemes/boundary/open_boundary/boundary_zones.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ There are three ways to specify the actual shape of the boundary zone:
resulting in a potential numerical instability.
Averaging mitigates these effects.
- `reference_velocity`: Reference velocity is either a function mapping each particle's coordinates
Comment thread
LasNikas marked this conversation as resolved.
and time to its velocity, an array where the ``i``-th column holds
the velocity of particle ``i`` or, for a constant fluid velocity,
and time to its velocity, or, for a constant fluid velocity,
a vector holding this velocity.
- `reference_pressure`: Reference pressure is either a function mapping each particle's coordinates
and time to its pressure, a vector holding the pressure of each particle,
Expand All @@ -88,10 +87,19 @@ There are three ways to specify the actual shape of the boundary zone:
plane_points = ([0.0, 0.0], [0.0, 1.0])
plane_normal=[1.0, 0.0]

# Reference velocity function for the inflow: parabolic velocity profile
# Constant reference velocity:
Comment thread
LasNikas marked this conversation as resolved.
velocity_in = [1.0, 0.0]

# Reference velocity as a function (parabolic velocity profile):
velocity_in = (pos, t) -> SVector(4.0 * pos[2] * (1.0 - pos[2]), 0.0)
Comment thread
LasNikas marked this conversation as resolved.
Outdated

# Reference pressure function for the inflow: y-dependent profile, sinusoidal in time
# Reference pressure as a vector:
pressure_in = zeros(40) # `40` corresponds to `nparticles(inflow.initial_condition)`

# Constant reference pressure:
pressure_in = 0.0

# Reference pressure as a function (y-dependent profile, sinusoidal in time):
pressure_in = (pos, t) -> pos[2] * sin(2pi * t)

inflow = BoundaryZone(; plane=plane_points, plane_normal, particle_spacing=0.1, density=1.0,
Expand All @@ -102,12 +110,8 @@ inflow = BoundaryZone(; plane=plane_points, plane_normal, particle_spacing=0.1,
plane_points = ([0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0])
plane_normal=[0.0, 0.0, 1.0]

# Reference velocity function for the outflow: constant in flow direction
velocity_out = [0.0, 0.0, -1.0]

outflow = BoundaryZone(; plane=plane_points, plane_normal, particle_spacing=0.1, density=1.0,
open_boundary_layers=4, boundary_type=OutFlow(),
reference_velocity=velocity_out)
open_boundary_layers=4, boundary_type=OutFlow())

# 3D particles sampled as cylinder
circle = SphereShape(0.1, 0.5, (0.5, 0.5), 1.0, sphere_type=RoundSphere())
Expand Down Expand Up @@ -159,7 +163,6 @@ function BoundaryZone(; plane, plane_normal, density, particle_spacing,
(reference_velocity isa Vector && length(reference_velocity) == NDIMS))
throw(ArgumentError("`reference_velocity` must be either a function mapping " *
"each particle's coordinates and time to its velocity, " *
"an array where the ``i``-th column holds the velocity of particle ``i`` " *
"or, for a constant fluid velocity, a vector of length $NDIMS for a $(NDIMS)D problem holding this velocity"))
else
if reference_velocity isa Function
Expand Down
2 changes: 2 additions & 0 deletions src/schemes/boundary/open_boundary/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function OpenBoundarySPHSystem(boundary_zones::Union{BoundaryZone, Nothing}...;
boundary_zone_indices = zeros(Int, nparticles(initial_conditions))

# Create new `BoundaryZone`s with `reference_values` set to `nothing` for type stability.
Comment thread
LasNikas marked this conversation as resolved.
# `reference_values` are only used as API feature to temporarily store the reference values
# in the `BoundaryZone`, but they are not used in the actual simulation.
boundary_zones_new = map(zone -> BoundaryZone(zone.initial_condition,
Comment thread
LasNikas marked this conversation as resolved.
zone.spanning_set,
zone.zone_origin,
Expand Down
1 change: 0 additions & 1 deletion test/schemes/boundary/open_boundary/boundary_zone.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

error_str = "`reference_velocity` must be either a function mapping " *
"each particle's coordinates and time to its velocity, " *
"an array where the ``i``-th column holds the velocity of particle ``i`` " *
"or, for a constant fluid velocity, a vector of length 2 for a 2D problem holding this velocity"

reference_velocity = 1.0
Expand Down
Loading