Skip to content

Commit

Permalink
Add tutorial for setting up a simulation (#514)
Browse files Browse the repository at this point in the history
* Add tutorial for setting up a simulation

* Add section about custom smoothing kernels

* Implement suggestions

* Add kernel plot

* Try to remove warnings

* Implement suggestions

* Make example a dam break and plot initial condition

* Fix rendering

* Fix tank size

* Fix range for kernel plot

* Fix descriptions after changing the example

* Add equation for kernel

* Fix minor errors
  • Loading branch information
efaulhaber authored Nov 20, 2024
1 parent 07fa6f0 commit 06a9352
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 17 deletions.
5 changes: 5 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ copy_file("NEWS.md")
# Define module-wide setups such that the respective modules are available in doctests
DocMeta.setdocmeta!(TrixiParticles, :DocTestSetup, :(using TrixiParticles); recursive=true)

# Define environment variables to create plots without warnings
# https://discourse.julialang.org/t/test-plots-on-travis-gks-cant-open-display/9465/2
ENV["PLOTS_TEST"] = "true"
ENV["GKSwstype"] = "100"

bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib"))

makedocs(sitename="TrixiParticles.jl",
Expand Down
21 changes: 10 additions & 11 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Examples
# [Examples](@id examples)

## Fluid

Expand All @@ -11,17 +11,17 @@
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/683e9363-5705-49cc-9a5c-3b47d73ea4b8" width="60%"/>
```

### Dam Break 3D (`fluid/dam_break_3d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/76a2b235-1b49-465f-a207-76859410b783" width="60%"/>
```

### Falling Water Column (`fluid/falling_water_column_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/06a522f0-424f-49d3-afd0-29593373aa29" width="60%"/>
```

### Hydrostatic Water Column (`fluid/hydrostatic_water_column_*.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/fac6c41f-7af8-4936-9dd5-b6ff2b9f6ff4" width="60%"/>
Expand All @@ -31,38 +31,37 @@
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/c10faddf-0400-47c9-b225-f5d286a8ecb8" width="60%"/>
```

### Oscillating Drop (`fluid/oscillating_drop_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/1dfa9dcf-7fc1-4221-ad83-a54c5d9ab9fb" width="60%"/>
```

### Periodic Channel (`fluid/periodic_channel_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/f9a542bf-956b-4647-843b-94cbb085a4fa" width="60%"/>
```

## Fluid Structure Interaction

### Dam Break with Elastic Plate (`fsi/dam_break_plate_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/ada0d554-e0ba-44ed-923d-2b77ef252258" width="60%"/>
```

### Falling Sphere 2D (`fsi/falling_sphere_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/217c80b5-3472-41c9-8003-7163641dd452" width="60%"/>
```

### Falling Spheres 2D (`fsi/falling_spheres_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/b3964f68-2782-43e6-b6ff-be96f9f224ae" width="60%"/>
```

## Structure Mechanics

### Oscillating Beam (`solid/oscillating_beam_2d.jl`)
```@raw html
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/e05ace63-e330-441a-a391-eda3d2764074" width="60%"/>
```

2 changes: 1 addition & 1 deletion docs/src/systems/weakly_compressible_sph.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Modules = [TrixiParticles]
Pages = [joinpath("schemes", "fluid", "viscosity.jl")]
```

## Density Diffusion
## [Density Diffusion](@id density_diffusion)

Density diffusion can be used with [`ContinuityDensity`](@ref) to remove the noise in the
pressure field. It is highly recommended to use density diffusion when using WCSPH.
Expand Down
Loading

0 comments on commit 06a9352

Please sign in to comment.