Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
355 commits
Select commit Hold shift + click to select a range
f47d55f
fix
svchb May 17, 2026
c382bce
cleanup
svchb May 17, 2026
8433ea1
Fix rectangular shape input handling
svchb May 17, 2026
0b678dd
Fix rectangular tank validation and overlap
svchb May 17, 2026
ca4fe12
Fix complex boundary sampling bounds
svchb May 17, 2026
af3e52a
Validate shape cutout and extrusion inputs
svchb May 17, 2026
700ebcd
Fix open-boundary characteristic zone handling
svchb May 17, 2026
2ffebc9
Validate 3D open-boundary face geometry
svchb May 17, 2026
4a6bb4e
Enhance Semidiscretization interaction matrix handling and tests for …
svchb May 21, 2026
d274c8b
review
svchb May 21, 2026
ab09860
Enhance boundary pressure handling and interaction matrix filtering i…
svchb May 22, 2026
e594c65
add show output and fix summation density
svchb May 22, 2026
b92e0e4
review
svchb May 22, 2026
9634fb0
format
svchb May 22, 2026
6927e67
format
svchb May 26, 2026
a895243
Merge branch 'main' into fix/rectangular-shape-inputs
svchb May 26, 2026
eaf401d
Merge branch 'fix/rectangular-shape-inputs' of https://github.com/svc…
svchb May 26, 2026
da0ee32
Merge branch 'main' into fix/rectangular-tank-validation-overlap
svchb May 26, 2026
98a62a0
Merge branch 'main' into fix/complex-shape-sample-boundary
svchb May 26, 2026
75458e4
Merge branch 'main' into fix/setup-shape-extrude-validation
svchb May 26, 2026
c0a73ef
Merge branch 'main' into fix/boundary-zone-geometry-validation
svchb May 26, 2026
6397b86
Merge branch 'main' into fix/open-boundary-characteristics
svchb May 26, 2026
14192e4
review
svchb May 26, 2026
5721f18
review
svchb May 26, 2026
fed6d70
review
svchb May 26, 2026
d40be92
review
svchb May 26, 2026
e1b580e
review
svchb May 26, 2026
4ed8dec
review
svchb May 26, 2026
537edd7
review
svchb May 26, 2026
2c132c8
Fix EDAC restart pressure row
svchb May 26, 2026
d7d71b5
Validate fluid surface tension consistency
svchb May 26, 2026
30c7ba4
Fix IISPH density error accounting
svchb May 26, 2026
691219a
Fix IISPH neighbor coordinate wrapping
svchb May 26, 2026
bb26a60
Reject IISPH EDAC mixing
svchb May 26, 2026
25428e9
Update EDAC correction caches
svchb May 26, 2026
117c368
Merge branch 'main' into more_semi_refactor
svchb May 27, 2026
a16e0a4
fix tests
svchb May 27, 2026
82e6d99
Merge branch 'main' into preprocessing/fix-deleteat-geometry-cache-co…
svchb May 27, 2026
6317c25
format
svchb May 27, 2026
3d0974a
Merge branch 'main' into fix/rectangular-shape-inputs
svchb May 27, 2026
bc871fe
fix split_integration callback
svchb Jun 2, 2026
de2b633
better comment
svchb Jun 2, 2026
adbe2b2
remove foreach_interacting_system
svchb Jun 2, 2026
7db7d51
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
5bf053b
remove params
svchb Jun 2, 2026
e593e50
update
svchb Jun 2, 2026
9521807
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
d3e4e1d
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
398296e
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
a5674ce
implement suggestion
svchb Jun 2, 2026
154a7d5
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
39dac9f
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
5fd3557
implement suggestions
svchb Jun 2, 2026
57c062a
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jun 2, 2026
769cc0d
Update src/general/semidiscretization.jl
svchb Jun 2, 2026
0a7b7c0
implement suggestion
svchb Jun 2, 2026
fd8c9f3
implement suggestion
svchb Jun 2, 2026
2e441c3
implement suggestion
svchb Jun 2, 2026
8f8df8b
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jun 2, 2026
9f8c1d6
Update test/general/semidiscretization.jl
svchb Jun 2, 2026
a2ab1c2
Update test/general/semidiscretization.jl
svchb Jun 2, 2026
f6575f5
Merge branch 'main' into more_semi_refactor
svchb Jun 2, 2026
4730e3f
format
svchb Jun 2, 2026
c5ecbb8
fix test
svchb Jun 2, 2026
60df040
fix allocs
svchb Jun 3, 2026
a2de186
remove interacting variants
svchb Jun 3, 2026
5707663
Merge branch 'main' into more_semi_refactor
svchb Jun 3, 2026
a6e8400
get rid of allocs
svchb Jun 3, 2026
90ce5ab
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jun 3, 2026
cce6eed
fix allocations
svchb Jun 3, 2026
e78bad5
format
svchb Jun 3, 2026
7fd6206
Merge branch 'main' into more_semi_refactor
svchb Jul 6, 2026
39ccb5c
review
svchb Jul 6, 2026
803105d
remove foreach_system_wrapped_if
svchb Jul 6, 2026
59c6515
Update src/general/semidiscretization.jl
svchb Jul 6, 2026
fe62b58
Update test/general/semidiscretization.jl
svchb Jul 6, 2026
de6df92
review
svchb Jul 6, 2026
355c318
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jul 6, 2026
7ed29d6
format
svchb Jul 6, 2026
0f089a2
Merge remote-tracking branch 'upstream/main' into add_tutorial_for_ST…
svchb Jul 6, 2026
bed33ff
fix
svchb Jul 6, 2026
6583c15
fix geom
svchb Jul 6, 2026
4f8d3e3
format
svchb Jul 7, 2026
9bcf0ec
fix docs
svchb Jul 7, 2026
8916eb2
fix
svchb Jul 7, 2026
3f657e3
Merge branch 'main' into more_semi_refactor
svchb Jul 7, 2026
ae4b14b
fixes
svchb Jul 7, 2026
5131cd0
Merge remote-tracking branch 'upstream/main' into check_math_in_docs
svchb Jul 7, 2026
22522ac
Merge remote-tracking branch 'upstream/main' into check_math_in_docs
svchb Jul 7, 2026
c86c514
Merge branch 'check_math_in_docs' of https://github.com/trixi-framewo…
svchb Jul 7, 2026
7e6967b
Clarify SPH docs wording
svchb Jul 7, 2026
c79d885
fixes
svchb Jul 7, 2026
cba6a95
Merge branch 'main' into fix/edac-restart-continuity-density
svchb Jul 7, 2026
ae2403b
Merge branch 'main' into fix/iisph-density-error-accounting
svchb Jul 7, 2026
9b46c0a
Merge branch 'main' into fix/iisph-neighbor-coordinate-wrap
svchb Jul 7, 2026
a9cc49e
Merge branch 'main' into fix/iisph-reject-edac-mixing
svchb Jul 7, 2026
d7c46e9
Merge branch 'main' into fix/edac-update-corrections
svchb Jul 7, 2026
5be0ddf
fix alloc
svchb Jul 9, 2026
88f8474
format
svchb Jul 9, 2026
3be7eda
Merge branch 'main' into more_semi_refactor
svchb Jul 9, 2026
b5624da
fix tests
svchb Jul 9, 2026
a9a66a4
remove second way of counting
svchb Jul 23, 2026
cf65780
resolve foreach comment
svchb Jul 23, 2026
8a88bb2
Update src/general/semidiscretization.jl
svchb Jul 23, 2026
23c25ad
address concern regardin foreach_noalloc
svchb Jul 23, 2026
a16fb95
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jul 23, 2026
a9ced0d
Merge branch 'main' into more_semi_refactor
svchb Jul 23, 2026
44867c7
Merge branch 'main' into improve_dt
svchb Jul 23, 2026
0c91804
Use capillary CFL condition for fluid interfaces
svchb Jul 23, 2026
865bfa8
Merge branch 'main' into api/high-level-boundary-builders
svchb Jul 23, 2026
e43c6fb
Merge branch 'main' into fix/custom-quantities-active-particles
svchb Jul 23, 2026
5b42943
Merge branch 'main' into fix/open-boundary-characteristics
svchb Jul 23, 2026
31add83
simplify foreach
svchb Jul 24, 2026
d68fc8a
Merge branch 'main' into more_semi_refactor
svchb Jul 24, 2026
4d923d2
review
svchb Jul 28, 2026
c52777c
Merge branch 'main' into more_semi_refactor
svchb Jul 28, 2026
ee04842
fix allocations
svchb Jul 28, 2026
595ebd7
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jul 28, 2026
62b004a
Update src/general/semidiscretization.jl
svchb Jul 30, 2026
700bbc2
fix for allocs 4rh try
svchb Jul 30, 2026
c2f18c0
Merge branch 'main' into more_semi_refactor
svchb Jul 30, 2026
b44fe84
missing news.md entries
svchb Jul 30, 2026
a24d17b
Merge branch 'more_semi_refactor' of https://github.com/svchb/TrixiPa…
svchb Jul 30, 2026
6f4282c
update version to 5.3
svchb Jul 30, 2026
95dcfbe
Merge branch 'main' into preprocessing/fix-deleteat-geometry-cache-co…
svchb Jul 30, 2026
baab2ff
Merge branch 'main' into fix/fluid-surface-tension-config
svchb Jul 30, 2026
0bd170c
Merge PR #1184: Fix custom quantity reductions
svchb Jul 30, 2026
df7fc01
Merge PR #1191: Avoid NaN normals for degenerate triangles
svchb Jul 30, 2026
b012b5d
Merge PR #1188: Normalize preprocessing point inputs
svchb Jul 30, 2026
605c3f5
Merge PR #1187: Close 2D geometry curves by default
svchb Jul 30, 2026
03c28f4
Merge PR #1190: Rebuild geometry data after face deletion
svchb Jul 30, 2026
fe69cab
Merge PR #1196: Fix rectangular shape input handling
svchb Jul 30, 2026
d0f59b0
Merge PR #1198: Fix rectangular tank validation and overlap
svchb Jul 30, 2026
0a3b545
Merge PR #1199: Fix complex boundary sampling bounds
svchb Jul 30, 2026
7ccd359
Merge PR #1145: Add high-level boundary builders
svchb Jul 30, 2026
8d89fca
Merge PR #1094: Add geometry tutorial
svchb Jul 30, 2026
678aa11
Merge PR #1086: Correct mathematical documentation
svchb Jul 30, 2026
27b0316
Update src/general/semidiscretization.jl
svchb Jul 30, 2026
0c7d05a
Update src/general/semidiscretization.jl
svchb Jul 30, 2026
44009e7
Fix merged PR integration regressions
svchb Jul 30, 2026
e6d8f6d
Fix geometry closure documentation
svchb Jul 30, 2026
3f578ff
Handle non-contiguous point matrices
svchb Jul 30, 2026
5205d56
Recompute polygon normals after deleting faces
svchb Jul 30, 2026
59bdcc0
Clarify rectangular shape density validation
svchb Jul 30, 2026
285cc37
Fix no-boundary pressure test setup
svchb Jul 30, 2026
bcd5528
Update src/general/semidiscretization.jl
efaulhaber Jul 30, 2026
6e24673
Update src/general/semidiscretization.jl
efaulhaber Jul 30, 2026
88aa7dc
Merge branch 'main' into more_semi_refactor
efaulhaber Jul 30, 2026
01f16a5
Merge remote-tracking branch 'upstream/main' into opencode-pr1145
svchb Jul 30, 2026
2bd981a
Merge remote-tracking branch 'upstream/main' into opencode-pr1196
svchb Jul 30, 2026
0a693d0
Merge PR #1087: Format documentation
svchb Jul 30, 2026
65b035e
Merge PR #1200: Validate shape cutout and extrusion inputs
svchb Jul 30, 2026
fa29adf
Merge PR #1202: Validate 3D open-boundary face geometry
svchb Jul 30, 2026
0bf4d37
Merge PR #1203: Fix open-boundary characteristic zone handling
svchb Jul 30, 2026
bb73289
Merge PR #1213: Fix EDAC restart pressure row
svchb Jul 30, 2026
8abecf8
Merge PR #1214: Validate fluid surface tension consistency
svchb Jul 30, 2026
bb0e15d
Merge PR #1215: Fix IISPH density error accounting
svchb Jul 30, 2026
0e280b3
Merge PR #1216: Fix IISPH neighbor coordinate wrapping
svchb Jul 30, 2026
970a937
Merge PR #1217: Reject IISPH EDAC mixing
svchb Jul 30, 2026
89b6882
Merge PR #1218: Update EDAC correction caches
svchb Jul 30, 2026
0927cdc
Merge remote-tracking branch 'upstream/main' into opencode-pr1087
svchb Jul 30, 2026
642739f
Fix allocations by removing redundant second method of `foreach_syste…
efaulhaber Jul 31, 2026
a7c1b02
Fix allocations again
efaulhaber Jul 31, 2026
ebd5559
Fix tests
efaulhaber Jul 31, 2026
a59b25f
Fix once again
efaulhaber Aug 3, 2026
82efc47
review
svchb Aug 3, 2026
8cd5f06
Merge branch 'main' into bug_fixed
svchb Aug 3, 2026
7e1da19
format
svchb Aug 3, 2026
2f687ea
Merge remote-tracking branch 'upstream/main' into semi_wrapping
svchb Aug 3, 2026
7326fef
Merge PR #1057 head into semi_wrapping
svchb Aug 3, 2026
54a614c
Add Makie particle visualization
svchb Aug 6, 2026
c50ddb0
Merge branch 'main' into bug_fixed
svchb Aug 13, 2026
73ccf79
Merge branch 'main' into add_tutorial_for_STL_geoms
svchb Aug 13, 2026
f002e1d
Merge branch 'main' into preprocessing/fix-degenerate-triangle-mesh-n…
svchb Aug 13, 2026
3761eef
Merge branch 'main' into fix/edac-restart-continuity-density
svchb Aug 13, 2026
fc8486c
Merge updated PR #1191
svchb Aug 13, 2026
60f0d8c
Merge updated PR #1213
svchb Aug 13, 2026
c116c41
update
svchb Aug 13, 2026
0b722cd
fix depth sorting issue
svchb Aug 13, 2026
dd2a67f
revert
svchb Aug 14, 2026
efb55bc
Merge test fix into EDAC restart PR
svchb Aug 14, 2026
3a9703b
Revert "Merge test fix into EDAC restart PR"
svchb Aug 14, 2026
2220b76
Merge updated PR #1213
svchb Aug 14, 2026
39b4c85
Merge updated PR #1213
svchb Aug 14, 2026
573f61c
Merge branch 'main' into check_math_in_docs
svchb Aug 14, 2026
7a69457
Merge branch 'main' into formatting
svchb Aug 14, 2026
b0aef6c
Harden surface tension model configuration
svchb Aug 6, 2026
fd596fc
Remove redundant surface tension type bounds
svchb Aug 14, 2026
a79806e
Remove transient 2D Akinci coefficient warning
svchb Aug 14, 2026
2134d2f
review
svchb Aug 14, 2026
cc239f4
Scope Akinci core hardening fixes
svchb Aug 14, 2026
50c19db
fix tests
svchb Aug 14, 2026
6149a79
review
svchb Aug 14, 2026
9626907
Merge remote-tracking branch 'svchb/bug_fixed' into bug_fixed
svchb Aug 14, 2026
be46bcf
Merge commit '573f61c38168d10b9eb77f835fe20a2b2efb07b8' into bug_fixed
svchb Aug 14, 2026
4d7bed9
Merge commit '7a69457f322ef5dd5f2d55e8193bce06adce3626' into bug_fixed
svchb Aug 14, 2026
5657492
Merge commit '6149a79114bcf4c2f50af13a4cc7baf2d8622dac' into bug_fixed
svchb Aug 14, 2026
376b73c
Merge commit '01f16a54063dda8c5ef21da4c92560eada44b5f8' into bug_fixed
svchb Aug 14, 2026
c1d82b3
Merge commit 'e6d8f6dd593984a3351816a31daff60606682b4a' into bug_fixed
svchb Aug 14, 2026
4bb8679
Merge commit '3f578ff75c12c59a1c99b0ec9c08b74dfdbad4a5' into bug_fixed
svchb Aug 14, 2026
621d38b
Merge commit '5205d5675fd66c7fde64147eface286d48d0ebab' into bug_fixed
svchb Aug 14, 2026
5ee7c3a
Merge commit '2bd981a37419916a18aa812b9cb11440695a3ed2' into bug_fixed
svchb Aug 14, 2026
74b11ed
Merge commit '285cc37489d974e78267411809f015439fb24273' into bug_fixed
svchb Aug 14, 2026
eb3615c
Format merged PR updates
svchb Aug 14, 2026
bd6ec2b
Fix semidiscretization documentation reference
svchb Aug 14, 2026
a3e62e8
Merge origin/main into semi_wrapping
svchb Aug 15, 2026
223b5c0
Restore NEWS from origin/main
svchb Aug 15, 2026
a67a76e
Remove duplicate foreach system test
svchb Aug 15, 2026
99e23dd
Update inter-system quantities consistently
svchb Aug 15, 2026
7a94bf1
Merge semi_wrapping into semi_split
svchb Aug 15, 2026
69fe1f7
Include ODE RHS at module level
svchb Aug 15, 2026
ee3b290
fix tests
svchb Aug 15, 2026
6e30608
typo
svchb Aug 15, 2026
b06a624
Stage SPH correction updates consistently
svchb Aug 16, 2026
e3e78fd
Harden Shepard density correction
svchb Aug 16, 2026
6487ae1
review
svchb Aug 17, 2026
0e28711
fix performance regression
svchb Aug 17, 2026
d855b76
missing test
svchb Aug 17, 2026
0da11a9
Merge branch 'pr1024' into bug_fixed
svchb Aug 17, 2026
e9a7180
Merge branch 'pr1060' into bug_fixed
svchb Aug 17, 2026
1eae25b
Merge origin/main
svchb Aug 17, 2026
97c08b5
Clarify interpolation helper intent
svchb Aug 17, 2026
19940a3
Document interpolation helpers
svchb Aug 17, 2026
6042ec4
Shorten interpolation helper comments
svchb Aug 17, 2026
1bb6100
Merge branch 'pr1183' into update-pr-1252
svchb Aug 17, 2026
6b8ec2b
Merge branch 'pr1183' into bug_fixed
svchb Aug 17, 2026
91953b7
Merge branch 'pr1257' into drafty_draft
svchb Aug 17, 2026
af22fc7
Merge branch 'pr1258' into drafty_draft
svchb Aug 17, 2026
622ecf3
Merge branch 'pr1284' into drafty_draft
svchb Aug 17, 2026
5b0332b
Merge origin/main into port/rigid-contact-friction-history
svchb Aug 25, 2026
b005eea
review
svchb Aug 25, 2026
41d85e2
add more comments
svchb Aug 25, 2026
2c3f954
fix allocations
svchb Aug 26, 2026
cc71da9
fix allocs
svchb Aug 26, 2026
eb80c94
suppress allocations warning
svchb Aug 27, 2026
7e837bb
comments
svchb Aug 27, 2026
b95b127
review
svchb Aug 27, 2026
4438736
Merge branch 'update-pr-1252' into drafty_draft
svchb Aug 27, 2026
87e9784
Merge remote-tracking branch 'origin/main' into drafty_draft
svchb Aug 27, 2026
3992f44
Merge remote-tracking branch 'origin/pr/1126' into drafty_draft
svchb Aug 27, 2026
5c3bc03
Merge remote-tracking branch 'origin/pr/1292' into drafty_draft
svchb Aug 27, 2026
dbc1cfe
Harden kernel gradient correction
svchb Aug 16, 2026
f7c7f97
Merge origin/main into fix/kernel-correction-lifecycle
svchb Aug 27, 2026
7dac6e8
Merge upstream/main into fix/shepard-correction-lifecycle
svchb Aug 27, 2026
debcfff
review
svchb Aug 27, 2026
b7b9249
Merge fix/shepard-correction-lifecycle into fix/kernel-correction-lif…
svchb Aug 27, 2026
ee5212c
Merge PR #1291 (fix/kernel-correction-lifecycle) into drafty_draft
svchb Aug 27, 2026
75e051e
Harden gradient correction matrices
svchb Aug 16, 2026
251f8e4
review
svchb Aug 27, 2026
0d4bd75
Merge PR #1290 (fix/gradient-correction-lifecycle) into drafty_draft
svchb Aug 28, 2026
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
47 changes: 28 additions & 19 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,34 @@ TrixiParticles.jl follows the interpretation of
[semantic versioning (semver)](https://julialang.github.io/Pkg.jl/dev/compatibility/#Version-specifier-format-1)
used in the Julia ecosystem. Notable changes will be documented in this file for human readability.

## Version 0.5.4

### API Changes

- Replaced the experimental `MechanicalWorkCalculatorCallback` with
`MechanicalWorkCalculator`, which can be passed as a custom quantity to
`PostprocessCallback` (#1228).

### Important Bugfixes

- Fixed mathematical inconsistencies in the SPH documentation, including incorrect
formulas, inconsistent force-vs-acceleration notation, and wrong LaTeX text-mode
commands (#1086).
- Fixed restarting with EDAC from solution objects (#1213) and from VTK files (#1297).
- Fixed the custom quantities `kinetic_energy`, `total_mass`, `max_pressure`, `min_pressure`,
`avg_pressure`, `max_density`, `min_density` and `avg_density` to only take active particles
into account (#1184).

## Version 0.5.3
## Version 0.5.4

### API Changes

- Replaced the experimental `MechanicalWorkCalculatorCallback` with
`MechanicalWorkCalculator`, which can be passed as a custom quantity to
`PostprocessCallback` (#1228).

### Important Bugfixes

- Fixed mathematical inconsistencies in the SPH documentation, including incorrect
formulas, inconsistent force-vs-acceleration notation, and wrong LaTeX text-mode
commands (#1086).
- Fixed restarting with EDAC from solution objects (#1213) and from VTK files (#1297).
- Fixed the custom quantities `kinetic_energy`, `total_mass`, `max_pressure`, `min_pressure`,
`avg_pressure`, `max_density`, `min_density` and `avg_density` to only take active particles
into account (#1184).

- Hardened surface tension model configuration by validating coefficients and surface-normal
thresholds, avoiding unnecessary normal allocation for `CohesionForceAkinci`, and stabilizing
Akinci cohesion and adhesion kernels across floating-point scales.

### Features

- Added an optional Makie recipe for rendering two- and three-dimensional particle systems
with `plot`, `plot!`, `trixi2makie`, and `trixi2makie!`.

## Version 0.5.3

### Features

Expand Down
3 changes: 3 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

[weakdeps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d"
OrdinaryDiffEqSymplecticRK = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8"
Expand All @@ -43,6 +44,7 @@ Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
[extensions]
TrixiParticlesOrdinaryDiffEqSymplecticRKExt = ["OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqCore"]
TrixiParticlesCUDAExt = "CUDA"
TrixiParticlesMakieExt = "Makie"

[compat]
Accessors = "0.1.43"
Expand All @@ -60,6 +62,7 @@ GPUArraysCore = "0.2"
JSON = "1"
KernelAbstractions = "0.9"
LinearAlgebra = "1"
Makie = "0.24"
OrdinaryDiffEqLowStorageRK = "3"
OrdinaryDiffEqCore = "4"
OrdinaryDiffEqSymplecticRK = "2"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ It offers intuitive configuration, robust pre- and post-processing, and vendor-a
We provide several example simulation setups in the `examples` folder (which can be accessed from Julia via `examples_dir()`).

<table align="center" border="0">
<tr>
</tr>
<tr>
<td align="center">
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/683e9363-5705-49cc-9a5c-3b47d73ea4b8" style="width: 80% !important;"/><br><figcaption>2D Dam Break</figcaption>
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/683e9363-5705-49cc-9a5c-3b47d73ea4b8" style="width: 80% !important;"/><br />
<figcaption>2D Dam Break</figcaption>
</td>
<td align="center">
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/c10faddf-0400-47c9-b225-f5d286a8ecb8" style="width: 80% !important;"/><br><figcaption>Moving Wall</figcaption>
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/c10faddf-0400-47c9-b225-f5d286a8ecb8" style="width: 80% !important;"/><br />
<figcaption>Moving Wall</figcaption>
</td>
</tr>
<tr>
</tr>
<tr>
<td align="center">
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/e05ace63-e330-441a-a391-eda3d2764074" style="width: 80% !important;"/><br><figcaption>Oscillating Beam</figcaption>
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/e05ace63-e330-441a-a391-eda3d2764074" style="width: 80% !important;"/><br />
<figcaption>Oscillating Beam</figcaption>
</td>
<td align="center">
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/ada0d554-e0ba-44ed-923d-2b77ef252258" style="width: 80% !important;"/><br><figcaption>Dam Break with Elastic Plate</figcaption>
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/ada0d554-e0ba-44ed-923d-2b77ef252258" style="width: 80% !important;"/><br />
<figcaption>Dam Break with Elastic Plate</figcaption>
</td>
</tr>
</table>
Expand Down
150 changes: 150 additions & 0 deletions docs/literate/src/tut_2d_geometry.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# # [Setting up a 2D simulation from geometry files](@id tut_2d_geometry)

# In this tutorial, we build two 2D setups from geometry files:
# 1. a curved pipe, where one geometry file defines the outer wall and another
# defines the channel cut out of it,
# 2. a dam-break basin with a coastline profile, where one geometry file defines
# the coastline wall and the seawall on the right.
#
# We use 2D geometry formats such as `.asc` or `.dxf` for 2D setups.
# STL files describe surfaces and are therefore better suited to 3D setups.

# First, we import TrixiParticles.jl together with
# `OrdinaryDiffEqLowStorageRK` of
# [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl)
# and [Plots.jl](https://docs.juliaplots.org/stable/).
using TrixiParticles
using OrdinaryDiffEqLowStorageRK
using Plots

# ## Resolution

# We use the same particle spacing for the fluid and for the wall geometries.
particle_spacing = 0.03
fluid_density = 1000.0
gravity = 9.81
sound_speed = 10.0
state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density,
exponent=7)
nothing # hide

# ## Loading 2D geometry files

# The following helper loads a closed 2D geometry file and samples particles in its interior:
# 1. load the polygon with [`load_geometry`](@ref),
# 2. fill the polygon with [`ComplexShape`](@ref).
#
# This creates a filled 2D solid region rather than particles only along the polygon edges.
function solid_from_geometry_file(file; particle_spacing, density)
geometry = load_geometry(file)
solid = ComplexShape(geometry; particle_spacing, density,
grid_offset=0.5particle_spacing)

return (; geometry, solid)
end

# ## A curved pipe from two filled geometries

# The pipe wall is an L-shaped solid region with a channel cut out of it:
# 1. one geometry file describes the outer pipe envelope,
# 2. one geometry file describes the empty channel,
# 3. `setdiff` subtracts the channel from the solid envelope.
pipe_outer_file = pkgdir(TrixiParticles, "examples", "preprocessing", "data",
"curved_pipe_outer_2d.asc")
pipe_channel_file = pkgdir(TrixiParticles, "examples", "preprocessing", "data",
"curved_pipe_channel_2d.asc")

pipe_outer = solid_from_geometry_file(pipe_outer_file; particle_spacing,
density=fluid_density)
pipe_channel = load_geometry(pipe_channel_file)

pipe_setup = (; wall=setdiff(pipe_outer.solid, pipe_channel),
outer_geometry=pipe_outer.geometry,
channel_geometry=pipe_channel)

# ## A dam-break basin with a coastline profile

# In the second setup, one 2D geometry file defines the coastline wall:
# the beach profile, a finite wall thickness below it, and the seawall on the right.
coast_file = pkgdir(TrixiParticles, "examples", "preprocessing", "data",
"coastline_profile_2d.asc")
coast = solid_from_geometry_file(coast_file; particle_spacing, density=fluid_density)

# The geometry file defines the coastline bed and right wall as a solid region.
# We add the left wall as a rectangular particle block and place a rectangular
# dam-break water column beside it.
left_wall = RectangularShape(particle_spacing, (5, 50), (0.0, -0.12),
density=fluid_density)
reservoir = RectangularShape(particle_spacing, (28, 42), (0.15, 0.03),
acceleration=(0.0, -gravity),
state_equation=state_equation)
coast_setup = (; geometry=coast.geometry,
wall=union(coast.solid, left_wall),
fluid=setdiff(reservoir, coast.geometry))

p_pipe = plot(pipe_setup.wall, label="wall", title="Curved pipe",
markerstrokewidth=0, markersize=4)
plot!(p_pipe, showaxis=false, aspect_ratio=:equal,
xlims=(-0.03, 1.23), ylims=(-0.03, 1.23))

p_coast = plot(coast_setup.fluid, coast_setup.wall,
labels=["fluid" "wall"], title="Coastline dam break",
markerstrokewidth=0, markersize=3)
plot!(p_coast, showaxis=false, aspect_ratio=:equal,
xlims=(0.0, 2.75), ylims=(-0.15, 1.35))

plot(p_pipe, p_coast, layout=(1, 2), size=(900, 360))
savefig("tut_2d_geometry_plot.png"); # hide
# ![2D geometry based initial conditions](tut_2d_geometry_plot.png)

# ## Building the simulation systems

# We continue with the coastline setup. The remaining steps are the same as for
# other 2D simulations.
setup = coast_setup
tspan = (0.0, 0.03)
nothing # hide

# We define the state equation, smoothing kernel, and viscosity for the
# weakly compressible SPH simulation.
smoothing_length = 1.2 * particle_spacing
smoothing_kernel = SchoenbergCubicSplineKernel{2}()
viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0)

fluid_density_calculator = ContinuityDensity()
density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1)

fluid_system = WeaklyCompressibleSPHSystem(setup.fluid;
density_calculator=fluid_density_calculator,
state_equation, smoothing_kernel,
smoothing_length, viscosity=viscosity,
density_diffusion=density_diffusion,
acceleration=(0.0, -gravity))
nothing # hide

# For the wall, we reuse the combined solid wall particles created above. The high-level
# constructor obtains the smoothing kernel, smoothing length, and state equation from the fluid.
boundary_model = BoundaryModelDummyParticles(setup.wall; fluid_system)
boundary_system = WallBoundarySystem(setup.wall, boundary_model)
nothing # hide

# ## Semidiscretization

# We construct the [`Semidiscretization`](@ref TrixiParticles.Semidiscretization)
# from the fluid and boundary systems.
semi = Semidiscretization(fluid_system, boundary_system)
ode = semidiscretize(semi, tspan)
nothing # hide

# ## Time integration

# We can now solve the problem. An [`InfoCallback`](@ref) prints progress during
# the simulation.
callbacks = CallbackSet(InfoCallback(interval=10))
nothing # hide

sol = solve(ode, RDPK3SpFSAL35(), save_everystep=false, callback=callbacks) #!md

# For more accurate body-fitted particles around sharper features, you can also
# apply the [particle packing workflow](@ref tut_packing) to the 2D geometry files
# before starting the simulation.
17 changes: 10 additions & 7 deletions docs/literate/src/tut_packing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ plot!(right_margin=5Plots.mm) #hide
# ## Creating an initial configuration of boundary particles

# To create the initial configuration of the boundary particles,
# we use the sampled points of the SDF whose signed distance lies between 0
# and `boundary_thickness`.
# we use the sampled points of the SDF whose signed distance lies between the
# geometry offset implied by `place_on_shell` and `boundary_thickness`.
# Here, we need to specify the `density` of the boundary particles.
# As an example, we choose `1.0` for all particles.
# This gives us an [`InitialCondition`](@ref InitialCondition) for the boundary particles.
Expand Down Expand Up @@ -125,7 +125,8 @@ plot!(geometry, linestyle=:dash, label=nothing, showaxis=false, color=:black,
# ## Particle packing

# In the following, we will essentially follow the same steps described in the fluid tutorials.
# That means we will generate systems that are then passed to the [`Semidiscretization`](@ref).
# That means we will generate systems that are then passed to the
# [`Semidiscretization`](@ref TrixiParticles.Semidiscretization).
# The difference from a typical physical simulation is that we use [`ParticlePackingSystem`](@ref),
# which does not represent any physical law. Instead, we only use the simulation framework to time-integrate
# the packing process.
Expand Down Expand Up @@ -211,7 +212,7 @@ plot!(geometry, seriestype=:path, color=:black, label=nothing, linewidth=2)
boundary_system = ParticlePackingSystem(boundary_sampled; is_boundary=true,
smoothing_kernel, smoothing_length,
boundary_compress_factor=0.7, signed_distance_field,
background_pressure)
boundary_thickness, background_pressure)

# We can now couple the boundary system with the interior system:
semi = Semidiscretization(packing_system, boundary_system)
Expand Down Expand Up @@ -251,10 +252,12 @@ fixed_system = ParticlePackingSystem(packed_ic; smoothing_kernel, smoothing_leng

# Now we define a rectangular domain that we want to pack.
# In practice, you could create any `InitialCondition` that encloses your complex geometry.
tank_domain = RectangularTank(particle_spacing, (4, 4), (0, 0), min_coordinates=(-1, -2),
density)
domain_size = (4, 4)
n_particles_per_dimension = round.(Int, domain_size ./ particle_spacing)
tank_domain = RectangularShape(particle_spacing, n_particles_per_dimension, (-1, -2);
density)

sampled_outer_domain = setdiff(tank_domain.fluid, packed_ic)
sampled_outer_domain = setdiff(tank_domain, packed_ic)

# If we plot these two `InitialCondition`s, we can see
# that the geometry interface is not properly represented yet.
Expand Down
Loading
Loading