Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Surface Tension Model #681

Draft
wants to merge 529 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
529 commits
Select commit Hold shift + click to select a range
258f2ba
Update ci.yml
svchb Oct 9, 2024
139e282
Merge remote-tracking branch 'origin/prepare_for_1.11' into fix_obs_f…
svchb Oct 10, 2024
1a9f3f5
Update test/validation/validation.jl
svchb Oct 10, 2024
da9be38
revert changes that had no benefit
svchb Oct 10, 2024
95be0e9
update
svchb Oct 10, 2024
4b87c7c
cleanup
svchb Oct 10, 2024
8c72576
include in test run
svchb Oct 10, 2024
782f9de
remove redundancy
svchb Oct 10, 2024
fa45125
Merge branch 'main' into morris_surface_tension
svchb Oct 10, 2024
8946b45
Merge branch 'main' into generalize_surface_normal_calc
svchb Oct 10, 2024
ddfab3e
Merge remote-tracking branch 'origin/prepare_for_1.11' into generaliz…
svchb Oct 10, 2024
f266682
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Oct 10, 2024
b0d24cc
Merge remote-tracking branch 'origin/prepare_for_1.11' into fix_obs_f…
svchb Oct 10, 2024
ff75223
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Oct 10, 2024
cd02a5b
Merge branch 'main' into adami_pressure_changes
svchb Oct 10, 2024
46ab620
Merge remote-tracking branch 'origin/prepare_for_1.11' into adami_pre…
svchb Oct 10, 2024
54c3f37
Merge remote-tracking branch 'origin/adami_pressure_changes' into ada…
svchb Oct 10, 2024
796b1d1
Merge branch 'main' into add_ideal_gas
svchb Oct 10, 2024
c402975
Merge remote-tracking branch 'origin/prepare_for_1.11' into add_ideal…
svchb Oct 10, 2024
83514da
Merge remote-tracking branch 'origin/add_ideal_gas' into add_ideal_gas
svchb Oct 10, 2024
e94218c
Merge branch 'add_ideal_gas'
svchb Oct 10, 2024
6f5ca10
revert
svchb Oct 10, 2024
5e688d2
fix tests
svchb Oct 11, 2024
7557879
fix
svchb Oct 11, 2024
83ba221
Merge remote-tracking branch 'origin/morris_surface_tension' into mor…
svchb Oct 11, 2024
b4f7a2e
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Oct 11, 2024
8294aa9
fix test
svchb Oct 11, 2024
b5663f5
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Oct 11, 2024
76e5354
Merge branch 'main' into generalize_surface_normal_calc
svchb Oct 11, 2024
f267d43
Merge branch 'main' into add_ideal_gas
svchb Oct 11, 2024
bdd6756
fix test
svchb Oct 11, 2024
d8f9b1a
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Oct 11, 2024
cde7990
Merge branch 'main' into fix_obs_for_free_surface
svchb Oct 11, 2024
6c93850
Merge branch 'main' into morris_surface_tension
svchb Oct 11, 2024
1191c3a
update
svchb Oct 11, 2024
c3683e9
fix division by zero
svchb Oct 11, 2024
1ec7eac
fix the test
svchb Oct 16, 2024
d0f475e
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Oct 16, 2024
8d58435
implement CFL condition
svchb Oct 16, 2024
e1ee75c
Merge branch 'morris_surface_tension' of https://github.com/svchb/Tri…
svchb Oct 16, 2024
77eafc0
fixes
svchb Oct 16, 2024
4ace40d
fix
svchb Oct 17, 2024
5e478e4
Merge branch 'main' into adami_pressure_changes
efaulhaber Oct 22, 2024
e031507
implement momentum conserving morris surface tension form
svchb Oct 22, 2024
d88dd72
update
svchb Oct 23, 2024
7d4ee69
update
svchb Oct 24, 2024
b3a88a0
make properties settable
svchb Oct 24, 2024
4b1ca7d
review comments
svchb Oct 30, 2024
d0d9e72
Merge branch 'main' into adami_pressure_changes
svchb Oct 30, 2024
3660f86
adjust docs
svchb Oct 30, 2024
b1b49c5
Merge branch 'adami_pressure_changes' of github.com:svchb/TrixiPartic…
svchb Oct 30, 2024
d9eb0b2
adjust docs
svchb Oct 30, 2024
ab05d2a
format
svchb Oct 30, 2024
3faf0cb
add complete equation
svchb Oct 30, 2024
805f78d
Update docs/src/systems/boundary.md
svchb Oct 30, 2024
13c80f1
Test docs on win
svchb Nov 13, 2024
86cdaa4
Fix error on windows
svchb Nov 13, 2024
371f1da
Format
svchb Nov 13, 2024
e079dc0
Merge remote-tracking branch 'refs/remotes/origin/main'
svchb Nov 13, 2024
7f85a3f
Merge branch 'generalize_surface_normal_calc'
svchb Nov 13, 2024
b4c5ace
format
svchb Nov 13, 2024
e555f03
Merge branch 'generalize_surface_normal_calc'
svchb Nov 13, 2024
6222872
format
svchb Nov 13, 2024
dcc7001
Merge branch 'main'
svchb Nov 13, 2024
0b3043c
Update news and set to 0.2.4
svchb Nov 13, 2024
3335386
update
svchb Nov 13, 2024
7d4016c
fix MD format
svchb Nov 13, 2024
28e9c2f
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 13, 2024
8837a5a
Merge branch 'fix_obs_for_free_surface'
svchb Nov 13, 2024
d8d6d4b
fix error
svchb Nov 13, 2024
f9e2202
Merge branch 'main' into add_ideal_gas
svchb Nov 13, 2024
c6b0c72
fix tests
svchb Nov 13, 2024
77493f5
format
svchb Nov 13, 2024
4192cf7
format
svchb Nov 13, 2024
b15fe3e
fix tests
svchb Nov 13, 2024
ddcdf67
Merge branch 'main' into adami_pressure_changes
LasNikas Nov 14, 2024
1db1507
fix test
svchb Nov 14, 2024
3065a5d
cleanup
svchb Nov 14, 2024
f8fadf0
Merge remote-tracking branch 'origin/adami_pressure_changes' into wet…
svchb Nov 14, 2024
8d1ffc8
Merge remote-tracking branch 'upstream/test_docs_on_win' into wetting…
svchb Nov 14, 2024
c47850b
Update NEWS.md
svchb Nov 14, 2024
aa53a4d
Update src/schemes/boundary/open_boundary/method_of_characteristics.jl
svchb Nov 15, 2024
eefcd6c
Update test/schemes/boundary/open_boundary/boundary_zone.jl
svchb Nov 15, 2024
9402b4a
Update src/setups/extrude_geometry.jl
svchb Nov 15, 2024
f1de160
Update src/schemes/boundary/open_boundary/method_of_characteristics.jl
svchb Nov 15, 2024
ba98d18
Update src/schemes/boundary/open_boundary/boundary_zones.jl
svchb Nov 15, 2024
e0ede3e
Update examples/fluid/pipe_flow_3d.jl
svchb Nov 15, 2024
d4016a6
review fixes
svchb Nov 16, 2024
7afffb4
Merge branch 'add_ideal_gas' of https://github.com/svchb/TrixiParticl…
svchb Nov 16, 2024
3dfa4e4
Merge branch 'main' into add_ideal_gas
svchb Nov 16, 2024
1467107
add test
svchb Nov 16, 2024
fc4f61b
fix example
svchb Nov 16, 2024
c4fcc16
Merge branch 'main' into fix_obs_for_free_surface
svchb Nov 16, 2024
e0eb153
fix test
svchb Nov 16, 2024
33a704a
fix test
svchb Nov 16, 2024
2533ed0
fix test
svchb Nov 16, 2024
4899d08
format
svchb Nov 16, 2024
d5e7c63
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 17, 2024
276436d
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 17, 2024
1781da0
Merge branch 'fix_obs_for_free_surface' into morris_surface_tension
svchb Nov 17, 2024
2fb587d
Merge branch 'add_ideal_gas' into morris_surface_tension
svchb Nov 17, 2024
15b5c0e
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 17, 2024
eeca819
review comments
svchb Nov 18, 2024
c18b774
Merge branch 'main' into add_ideal_gas
svchb Nov 18, 2024
514ffcf
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 18, 2024
223bcd0
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 18, 2024
f5dac70
Merge branch 'main' into add_ideal_gas
svchb Nov 18, 2024
cc50150
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 18, 2024
38ba683
format
svchb Nov 18, 2024
5f96dab
fix test
svchb Nov 18, 2024
9286097
fix test
svchb Nov 18, 2024
b330a07
fix test
svchb Nov 19, 2024
ca3a3c0
fix
svchb Nov 19, 2024
f73614e
remove some allocations
svchb Nov 19, 2024
14ec982
format
svchb Nov 19, 2024
96e1cf6
fix docs
svchb Nov 19, 2024
bcfa0d8
Merge branch 'add_ideal_gas' into morris_surface_tension
svchb Nov 19, 2024
d9227bb
some fixes
svchb Nov 19, 2024
747bf1c
Update src/schemes/fluid/weakly_compressible_sph/state_equations.jl
svchb Nov 19, 2024
3c5fd08
add docs
svchb Nov 19, 2024
969dedd
review fixes
svchb Nov 19, 2024
c6371eb
remove independent setting of smoothing_kernel and smoothing_length
svchb Nov 19, 2024
4bf25e6
remove calls to surface_normal method smoothing kernel
svchb Nov 19, 2024
ebf6602
format
svchb Nov 19, 2024
8659850
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 19, 2024
5b0ed25
Merge branch 'generalize_surface_normal_calc' of https://github.com/s…
svchb Nov 19, 2024
7a6331e
update news
svchb Nov 19, 2024
3c80adf
typo
svchb Nov 19, 2024
4f66fa7
forgot to edit the other doc
svchb Nov 19, 2024
8faa548
Merge branch 'main' into add_ideal_gas
svchb Nov 19, 2024
2ba1902
Merge branch 'add_ideal_gas' into morris_surface_tension
svchb Nov 19, 2024
503bc8b
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 19, 2024
801b274
format
svchb Nov 19, 2024
d09b163
Update NEWS.md
svchb Nov 19, 2024
593c746
forgot some renames
svchb Nov 19, 2024
3180897
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 19, 2024
ba69a80
fix doc tests
svchb Nov 19, 2024
73b5749
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 19, 2024
67d5b87
fix docs
svchb Nov 19, 2024
f276a7b
fix tests
svchb Nov 19, 2024
b17a629
format
svchb Nov 19, 2024
ad7a11f
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 19, 2024
bdf80c6
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 19, 2024
7b076e6
cleanup
svchb Nov 20, 2024
23cbd38
format
svchb Nov 20, 2024
d413695
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 20, 2024
537df19
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 20, 2024
cb227d5
Merge branch 'main' into morris_surface_tension
svchb Nov 20, 2024
20b77d7
Update NEWS.md
svchb Nov 20, 2024
d7b6af1
fix tests
svchb Nov 20, 2024
01bddb0
Merge branch 'generalize_surface_normal_calc' of https://github.com/s…
svchb Nov 20, 2024
dc6fa70
Update NEWS.md
svchb Nov 20, 2024
28b28b8
Merge branch 'generalize_surface_normal_calc'
svchb Nov 20, 2024
ffc83d3
Merge branch 'main'
svchb Nov 20, 2024
96d1a17
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 20, 2024
e424cfa
Merge branch 'main' into generalize_surface_normal_calc
svchb Nov 20, 2024
d126774
fixes
svchb Nov 20, 2024
ec407ad
fixers
svchb Nov 20, 2024
041861e
fix
svchb Nov 20, 2024
21f08b2
fix
svchb Nov 21, 2024
93067f3
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 21, 2024
53a8a12
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 21, 2024
0b63bca
fix
svchb Nov 21, 2024
4501847
Merge branch 'generalize_surface_normal_calc'
svchb Nov 21, 2024
239a001
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 21, 2024
b7f448c
fix
svchb Nov 21, 2024
a2cda84
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Nov 21, 2024
7d730fc
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 21, 2024
c8ecaaf
add missing files
svchb Nov 21, 2024
ccf94c6
improve documentation
svchb Nov 21, 2024
8851385
fixes
svchb Nov 21, 2024
57ab0a6
format
svchb Nov 21, 2024
a690b52
adding this again
svchb Nov 21, 2024
0499be2
fixes
svchb Nov 21, 2024
6773c7f
Merge branch 'morris_surface_tension' into wetting_model
svchb Nov 21, 2024
bf48b69
update
svchb Nov 21, 2024
2c92628
add support for normals at boundaries
svchb Nov 22, 2024
cc2c497
add wall tangential and documentation
svchb Nov 22, 2024
dd52597
format
svchb Nov 22, 2024
1d8f124
improve docs
svchb Nov 22, 2024
3f32ce2
update
svchb Nov 22, 2024
f0ce393
update
svchb Nov 22, 2024
f61c380
Merge branch 'main' into wetting_model
svchb Nov 22, 2024
dc540ba
add support for corrections to EDAC
svchb Nov 22, 2024
e58d2da
working
svchb Nov 22, 2024
4a23780
format
svchb Nov 22, 2024
864c070
finished impl
svchb Nov 25, 2024
cff68b5
update
svchb Nov 25, 2024
d4319d8
update
svchb Nov 28, 2024
e8cd696
more fixes
svchb Nov 29, 2024
fd59129
update
svchb Nov 29, 2024
de3c9d8
cleanup
svchb Dec 2, 2024
f4fbbb3
Merge branch 'main' into generalize_surface_normal_calc
svchb Dec 2, 2024
589d416
review fixes
svchb Dec 2, 2024
1263e1a
Merge branch 'generalize_surface_normal_calc' of https://github.com/s…
svchb Dec 2, 2024
39a8f79
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 2, 2024
2893f5b
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 2, 2024
cc3a349
update
svchb Dec 2, 2024
9374398
update
svchb Dec 4, 2024
dd56f47
review comments
svchb Dec 4, 2024
306f96d
Merge branch 'generalize_surface_normal_calc' of https://github.com/s…
svchb Dec 4, 2024
eab49a1
Merge remote-tracking branch 'refs/remotes/origin/generalize_surface_…
svchb Dec 4, 2024
ab9f486
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 4, 2024
7c7a1f0
fix test
svchb Dec 4, 2024
2223ee8
update
svchb Dec 4, 2024
9ad0526
format
svchb Dec 4, 2024
93630aa
fix test
svchb Dec 4, 2024
64396ef
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 4, 2024
2cc151c
merge
svchb Dec 4, 2024
9f758be
typo
svchb Dec 4, 2024
f74ac4e
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 4, 2024
a05adfb
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 4, 2024
6860ebc
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 4, 2024
fae46eb
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 4, 2024
170e314
merge error
svchb Dec 4, 2024
3618010
typo
svchb Dec 4, 2024
ec75fab
update
svchb Dec 5, 2024
d9325ad
update
svchb Dec 12, 2024
1dfd1fe
Merge branch 'main' into morris_surface_tension
svchb Dec 12, 2024
7d625d9
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 12, 2024
58b776b
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 12, 2024
f058a5e
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 12, 2024
cd26885
Merge branch 'main' into generalize_surface_normal_calc
svchb Dec 12, 2024
80e51ba
review updates
svchb Dec 12, 2024
1141a12
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 12, 2024
1bcf2f7
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 12, 2024
c977178
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 12, 2024
00a65fc
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 12, 2024
4721aec
review update
svchb Dec 12, 2024
3a0413e
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 12, 2024
aa37cb7
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 12, 2024
f9bbff6
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 12, 2024
241c50b
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 12, 2024
98a5f6c
add boundary system
svchb Dec 13, 2024
e05edea
update
svchb Dec 13, 2024
36741d7
update
svchb Dec 13, 2024
ba8765f
format
svchb Dec 13, 2024
c83c95e
Merge branch 'generalize_surface_normal_calc' into morris_surface_ten…
svchb Dec 13, 2024
9936e5d
format
svchb Dec 13, 2024
4dc0cf8
fix merge
svchb Dec 13, 2024
5e83f0c
format
svchb Dec 13, 2024
55e6557
another merge error
svchb Dec 13, 2024
ee5c2da
format
svchb Dec 13, 2024
f1660dc
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 13, 2024
9c2728f
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 13, 2024
d6a094e
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 13, 2024
cfe7626
reset to original version
svchb Dec 13, 2024
2dedd8a
Merge branch 'morris_surface_tension' into wetting_model
svchb Dec 13, 2024
387a057
Merge branch 'wetting_model' into improved_normal_calc_methods
svchb Dec 13, 2024
1fbc909
Merge branch 'improved_normal_calc_methods' into CSS_surface_tension
svchb Dec 13, 2024
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
2 changes: 0 additions & 2 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
workflow_dispatch:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

Expand Down
35 changes: 35 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,85 @@
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.2.4

### Features

- Support for surface tension was added to EDAC (#539)
- A method to prevent penetration of fast moving particles with solids was added (#498)
- Added the callback `SteadyStateReachedCallback` to detect convergence of static simulations (#601)
- Added Ideal Gas State Equation (#607)

### Documentation

- GPU Support Documentation was added (#660)
- A new user tutorial was added (#514)

### Fixes

- Diverse Doc fixes (#663, #659, #637, #658, #664)
- Simulations can be run with `Float32` (#662)

### Refactored

- Surface normal calculation was moved from surface_tension.jl to surface_normal_sph.jl (#539)

## Version 0.2.3

### Highlights

Transport Velocity Formulation (TVF) based on the work of Ramachandran et al. "Entropically damped artificial compressibility for SPH" (2019) was added.

## Version 0.2.2

### Highlights

Hotfix for threaded sampling of complex geometries.

## Version 0.2.1

### Highlights

Particle sampling of complex geometries from `.stl` and `.asc` files.

## Version 0.2.0

### Removed

Use of the internal neighborhood search has been removed and replaced with PointNeighbors.jl.

## Development Cycle 0.1

### Highlights

#### Discrete Element Method

A basic implementation of the discrete element method was added.

#### Surface Tension and Adhesion Model

A surface tension and adhesion model based on the work by Akinci et al., "Versatile Surface Tension and Adhesion for SPH Fluids" (2013) was added to WCSPH.

#### Support for Open Boundaries

Open boundaries using the method of characteristics based on the work of Lastiwka et al., "Permeable and non-reflecting boundary conditions in SPH" (2009) were added for WCSPH and EDAC.

## Pre Initial Release (v0.1.0)

This section summarizes the initial features that TrixiParticles.jl was released with.

### Highlights
#### EDAC

An implementation of EDAC (Entropically Damped Artificial Compressibility) was added,
which allows for more stable simulations compared to basic WCSPH and reduces spurious pressure oscillations.

#### WCSPH

An implementation of WCSPH (Weakly Compressible Smoothed Particle Hydrodynamics), which is the classical SPH approach.

Features:

- Correction schemes (Shepard (0. Order) ... MixedKernelGradient (1. Order))
- Density reinitialization
- Kernel summation and Continuity equation density formulations
Expand All @@ -57,4 +91,5 @@ Features:


#### TLSPH

An implementation of TLSPH (Total Lagrangian Smoothed Particle Hydrodynamics) for solid bodies enabling FSI (Fluid Structure Interactions).
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TrixiParticles"
uuid = "66699cd8-9c01-4e9d-a059-b96c86d16b3a"
authors = ["erik.faulhaber <[email protected]>"]
version = "0.2.4-dev"
version = "0.2.4"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ makedocs(sitename="TrixiParticles.jl",
"Util" => joinpath("general", "util.md")
],
"Systems" => [
"Discrete Element Method (Solid)" => joinpath("systems",
"dem.md"),
"Fluid Models" => joinpath("systems", "fluid.md"),
"Discrete Element Method (Solid)" => joinpath("systems", "dem.md"),
"Weakly Compressible SPH (Fluid)" => joinpath("systems",
"weakly_compressible_sph.md"),
"Entropically Damped Artificial Compressibility for SPH (Fluid)" => joinpath("systems",
Expand Down
26 changes: 26 additions & 0 deletions docs/src/refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,19 @@ @Article{Hormann2001
publisher = {Elsevier BV},
}

@Article{Huber2016,
title = {On the physically based modeling of surface tension and moving contact lines with dynamic contact angles on the continuum scale},
journal = {Journal of Computational Physics},
volume = {310},
pages = {459-477},
year = {2016},
issn = {0021-9991},
doi = {https://doi.org/10.1016/j.jcp.2016.01.030},
url = {https://www.sciencedirect.com/science/article/pii/S0021999116000383},
author = {M. Huber and F. Keller and W. Säckel and M. Hirschler and P. Kunz and S.M. Hassanizadeh and U. Nieken},
keywords = {SPH, Two-phase flow, Surface tension, Moving contact line, Dynamic contact angle, CSF, CLF}
}


@Article{Jacobson2013,
author = {Jacobson, Alec and Kavan, Ladislav and Sorkine-Hornung, Olga},
Expand Down Expand Up @@ -491,6 +504,19 @@ @Article{Morris1997
publisher = {Elsevier BV},
}

@article{Morris2000,
author = {Morris, Joseph P.},
title = {Simulating surface tension with smoothed particle hydrodynamics},
journal = {International Journal for Numerical Methods in Fluids},
volume = {33},
number = {3},
pages = {333-353},
keywords = {interfacial flow, meshless methods, surface tension},
doi = {https://doi.org/10.1002/1097-0363(20000615)33:3<333::AID-FLD11>3.0.CO;2-7},
year = {2000}
}


@InProceedings{Mueller2003,
author = {M{\"u}ller, Matthias and Charypar, David and Gross, Markus},
booktitle = {Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation},
Expand Down
212 changes: 212 additions & 0 deletions docs/src/systems/fluid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@

# [Fluid Models](@id fluid_models)
Currently available fluid methods are the [weakly compressible SPH method](@ref wcsph) and the [entropically damped artificial compressibility for SPH](@ref edac).
This page lists models and techniques that apply to both of these methods.

## [Viscosity](@id viscosity_wcsph)

TODO: Explain viscosity.

```@autodocs
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "fluid", "viscosity.jl")]
```

## [Corrections](@id corrections)

```@autodocs
Modules = [TrixiParticles]
Pages = [joinpath("general", "corrections.jl")]
```


---

## [Surface Normals](@id surface_normal)

### Overview of Surface Normal Calculation in SPH

Surface normals are essential for modeling surface tension as they provide the directionality of forces acting at the fluid interface. They are calculated based on the particle properties and their spatial distribution within the smoothed particle hydrodynamics (SPH) framework.

#### Color Field and Gradient-Based Surface Normals

The surface normal at a particle is derived from the color field, a scalar field assigned to particles to distinguish between different fluid phases or between fluid and air. The color field gradients point towards the interface, and the normalized gradient defines the surface normal direction.

The simplest SPH formulation for surface normal, \( n_a \), is given as:
```math
n_a = \sum_b m_b \frac{c_b}{\rho_b} \nabla_a W_{ab},
```
where:
- \( c_b \) is the color field value for particle \( b \),
- \( m_b \) is the mass of particle \( b \),
- \( \rho_b \) is the density of particle \( b \),
- \( \nabla_a W_{ab} \) is the gradient of the smoothing kernel \( W_{ab} \) with respect to particle \( a \).

#### Normalization of Surface Normals

The calculated normals are normalized to unit vectors:
```math
\hat{n}_a = \frac{n_a}{\Vert n_a \Vert}.
```
Normalization ensures that the magnitude of the normals does not bias the curvature calculations or the resulting surface tension forces.

#### Handling Noise and Errors in Normal Calculation

In regions distant from the interface, the calculated normals may be small or inaccurate due to the smoothing kernel's support radius. To mitigate this:
1. Normals below a threshold are excluded from further calculations.
2. Curvature calculations use a corrected formulation to reduce errors near interface fringes.

```@autodocs
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "fluid", "surface_normal_sph.jl")]
```

---

## [Surface Tension](@id surface_tension)

### Introduction to Surface Tension in SPH

Surface tension is a key phenomenon in fluid dynamics, influencing the behavior of droplets, bubbles, and fluid interfaces. In SPH, surface tension is modeled as forces arising due to surface curvature and particle interactions, ensuring realistic simulation of capillary effects, droplet coalescence, and fragmentation.

### Akinci-Based Intra-Particle Force Surface Tension and Wall Adhesion Model

The Akinci model divides surface tension into distinct force components:

#### Cohesion Force

The cohesion force captures the attraction between particles at the fluid interface, creating the effect of surface tension. It is defined by the distance between particles and the support radius \( h_c \), using a kernel-based formulation.

**Key Features:**
- Particles within half the support radius experience a repulsive force to prevent clustering.
- Particles beyond half the radius but within the support radius experience an attractive force to simulate cohesion.

Mathematically:
```math
F_{\text{cohesion}} = -\sigma m_b C(r) \frac{r}{\Vert r \Vert},
```
where \( C(r) \), the cohesion kernel, is defined as:
```math
C(r)=\frac{32}{\pi h_c^9}
\begin{cases}
(h_c-r)^3 r^3, & \text{if } 2r > h_c, \\
2(h_c-r)^3 r^3 - \frac{h^6}{64}, & \text{if } r > 0 \text{ and } 2r \leq h_c, \\
0, & \text{otherwise.}
\end{cases}
```

#### Surface Area Minimization Force

The surface area minimization force models the curvature reduction effects, aligning particle motion to reduce the interface's total area. It acts based on the difference in surface normals:
```math
F_{\text{curvature}} = -\sigma (n_a - n_b),
```
where \( n_a \) and \( n_b \) are the surface normals of the interacting particles.

#### Wall Adhesion Force

This force models the interaction between fluid and solid boundaries, simulating adhesion effects at walls. It uses a custom kernel with a peak at 0.75 times the support radius:
```math
F_{\text{adhesion}} = -\beta m_b A(r) \frac{r}{\Vert r \Vert},
```
where \( A(r) \) is the adhesion kernel:
```math
A(r) = \frac{0.007}{h_c^{3.25}}
\begin{cases}
\sqrt[4]{-\frac{4r^2}{h_c} + 6r - 2h_c}, & \text{if } 2r > h_c \text{ and } r \leq h_c, \\
0, & \text{otherwise.}
\end{cases}
```

---

### Morris-Based Momentum-Conserving Surface Tension Model

In addition to the Akinci model, Morris (2000) introduced a momentum-conserving approach to surface tension. This model uses stress tensors to ensure exact conservation of linear momentum, providing a robust method for high-resolution simulations.

#### Stress Tensor Formulation

The force is calculated as:
```math
F_{\text{surface tension}} = \nabla \cdot S,
```
where \( S \) is the stress tensor:
```math
S = \sigma \delta_s (I - \hat{n} \otimes \hat{n}),
```
with:
- \( \delta_s \): Surface delta function,
- \( \hat{n} \): Unit normal vector,
- \( I \): Identity matrix.

#### Advantages and Limitations

While momentum conservation makes this model attractive, it requires additional computational effort and stabilization techniques to address instabilities in high-density regions.

# [Huber Model](@id huber_model)

## Introduction to the Huber Contact Force Model

The **Huber Model**, introduced in [Huber2016](@cite), provides a physically-based approach for simulating surface tension and contact line dynamics in Smoothed Particle Hydrodynamics (SPH). It is specifically designed to address challenges in modeling wetting phenomena, including dynamic contact angles and their influence on fluid behavior.

The Huber Model introduces a **Contact Line Force (CLF)** that complements the **Continuum Surface Force (CSF)** model, allowing for accurate representation of fluid-fluid and fluid-solid interactions. The dynamic evolution of contact angles emerges naturally from the force balance without requiring artificial adjustments or fitting parameters.

---

## Key Features of the Huber Model

1. **Dynamic Contact Angles**:
- Captures the transition between static and dynamic contact angles based on interfacial forces and contact line velocities.
- Removes the need for predefined constitutive equations, as the contact angle is derived from the system's dynamics.

2. **Volume Reformulation**:
- Transforms line-based forces (e.g., those acting at the contact line) into volume-based forces for compatibility with SPH formulations.
- Ensures smooth force distribution near the contact line, reducing numerical artifacts.

3. **Momentum Balance**:
- Extends the Navier-Stokes equations to include contributions from the contact line, ensuring accurate modeling of wetting and spreading dynamics.

4. **No Fitting Parameters**:
- Fully physics-driven, requiring only measurable inputs like surface tension coefficients and static contact angles.

---

## Mathematical Formulation

### Contact Line Force (CLF)

The force acting along the contact line is derived from the unbalanced Young Force:
```math
f_{\text{CLF}} = \sigma_{\text{wn}} [\cos(\alpha_s) - \cos(\alpha_d)] \hat{\nu},
```
where:
- \( \sigma_{\text{wn}} \): Surface tension coefficient of the fluid-fluid interface,
- \( \alpha_s \): Static contact angle,
- \( \alpha_d \): Dynamic contact angle,
- \( \hat{\nu} \): Tangential unit vector along the fluid-solid interface.

### Volume Reformulation

To incorporate the CLF into SPH, it is reformulated as a volume force:
```math
F_{\text{CLF}} = f_{\text{CLF}} \delta_{\text{CL}},
```
where \( \delta_{\text{CL}} \) is a Dirac delta function approximated by SPH kernels, ensuring the force is applied locally near the contact line.

---

## Applications

1. **Droplet Dynamics**:
- Simulates droplet spreading, recoiling, and merging with accurate contact line evolution.

2. **Capillary Action**:
- Models fluid behavior in porous media and confined geometries, where contact lines play a critical role.

3. **Wetting Phenomena**:
- Predicts equilibrium shapes and transient states of droplets and films on solid surfaces.

```@autodocs
Modules = [TrixiParticles]
Pages = [joinpath("schemes", "fluid", "surface_tension.jl")]
```
Loading
Loading