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

Changes to README and tutorials #189

Merged
merged 14 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
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
21 changes: 20 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,23 @@ authors:
title: "Peridynamics.jl"
doi: 10.5281/zenodo.8187477
date-released: 2023-07-26
url: "https://github.com/kaipartmann/Peridynamics.jl"
url: "https://github.com/kaipartmann/Peridynamics.jl"
preferred-citation:
title: "Simulation of fracture and damage with Peridynamics.jl"
type: article
authors:
- family-names: "Partmann"
given-names: "Kai"
- family-names: "Dienst"
given-names: "Manuel"
- family-names: "Weinberg"
given-names: "Kerstin"
doi: "10.21105/jcon.00165"
journal: "Proceedings of the JuliaCon Conferences"
start: 165 # First page number
end: 165 # Last page number
volume: 6
number: 64
publisher: "The Open Journal"
url: "https://doi.org/10.21105/jcon.00165"
year: 2024
82 changes: 26 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,63 +41,8 @@ add Peridynamics
```
in the julia package manager. Please take a look at the [documentation](https://kaipartmann.github.io/Peridynamics.jl/stable/index#Installation) for more details on the installation.

## Tutorials

<table align="center" border="0">
<tr>
</tr>
<tr>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_tension_static/">
<figcaption>Tensile test quasi-static</figcaption><br><img src="https://github.com/kaipartmann/Peridynamics.jl/assets/68582683/ac69d8aa-526d-436a-aa0c-820a1f42bcca" width="200"/>
</a>
</td>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_tension_dynfrac/">
<figcaption>Tensile test dynamic</figcaption><br><img src="https://github.com/kaipartmann/Peridynamics.jl/assets/68582683/dda2b7b3-d44b-41a9-b133-6d1b548df1c1" width="200"/>
</a>
</td>
</tr>
<tr>
</tr>
<tr>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_tension_precrack/">
<figcaption>Tension with predefined crack</figcaption><br><img src="https://github.com/kaipartmann/Peridynamics.jl/assets/68582683/9f627d2d-44b5-43a3-94cd-9d34894fd142" width="240"/>
</a>
</td>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_logo/">
<figcaption>The old logo</figcaption><br><img src="https://github.com/kaipartmann/Peridynamics.jl/assets/68582683/5439e112-9088-49a3-bb01-aff541adc0f8" width="240"/>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_kalthoff-winkler_dynfrac/">
<figcaption>Kalthoff Winkler</figcaption><br><img src="https://github.com/kaipartmann/Peridynamics.jl/assets/68582683/6dc362ef-4997-4327-9bc1-41350fac2dc1" width="300"/><br>
</a>
</td>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_cylinder/">
<figcaption>Fragmenting cylinder</figcaption><br><img src="https://github.com/user-attachments/assets/58e11123-6143-4e13-8642-7e30c9e6c86d" width="300"/>
</a></td>
</tr>
<tr>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_wave_in_bar/">
<figcaption>Wave propagation</figcaption><br><img src="https://github.com/user-attachments/assets/7fa65fd4-38d8-46cb-833f-990417211d17" width="300"/><br>
</a>
</td>
<td align="center">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_wave_interface/">
<figcaption>Wave propagation across interface</figcaption><br><img src="https://github.com/user-attachments/assets/082f635f-caf2-40db-938e-e4a98e2f3915" width="300"/>
</a></td>
</tr>
</table>

## Usage
To run the dynamic tensile test simulation shown above, just 7 lines of code are needed:
To run the [dynamic tensile test simulation](https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_tension_dynfrac), just 7 lines of code are needed:
```julia
body = Body(BBMaterial(), "TensileTestMesh.inp")
material!(body; horizon=0.01, rho=2700, E=70e9, Gc=100)
Expand All @@ -116,6 +61,31 @@ mpiexec -n 6 julia --project path/to/script.jl
```
Please take a look at the [how-to guide on MPI](https://kaipartmann.github.io/Peridynamics.jl/dev/howto_mpi/) for more details.

## Tutorials

Please click the image below to see the [Tutorial overview](https://github.com/user-attachments/assets/f69ec7f5-2deb-4328-bfab-05cc15508af2) in the documentation.

<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/#Tutorials">
<img src="https://github.com/user-attachments/assets/f69ec7f5-2deb-4328-bfab-05cc15508af2"/><br>
</a>

## Cite Us

If you use Peridynamics.jl in your own research or write a paper using results obtained
with the help of Peridynamics.jl, please cite it as
```bibtex
@article{Partmann2024JuliaCon,
author = {Partmann, Kai and Dienst, Manuel and Weinberg, Kerstin},
doi = {10.21105/jcon.00165},
journal = {Proceedings of the JuliaCon Conferences},
pages = {165},
title = {{Simulation of fracture and damage with Peridynamics.jl}},
url = {https://doi.org/10.21105/jcon.00165},
volume = {6},
year = {2024}
}
```

## Authors

- <a href="https://orcid.org/0000-0002-5238-4355">Kai Partmann (University of Siegen) <img alt="ORCID logo" src="https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png" width="16" height="16" /></a>
Expand Down
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ LIT_TUTORIALS_IN = [
"tutorial_kalthoff-winkler_dynfrac.jl",
"tutorial_logo.jl",
"tutorial_cylinder.jl",
"tutorial_wave_interface.jl"
"tutorial_wave_interface.jl",
"tutorial_brazilian_test.jl",
]
LIT_TUTORIALS_IN .= joinpath.(@__DIR__, "src", "literate", LIT_TUTORIALS_IN)
Literate.markdown.(LIT_TUTORIALS_IN, LIT_MD_OUT; credit=false)
Expand Down Expand Up @@ -81,6 +82,7 @@ makedocs(;
joinpath("generated", "tutorial_kalthoff-winkler_dynfrac.md"),
joinpath("generated", "tutorial_logo.md"),
joinpath("generated", "tutorial_cylinder.md"),
joinpath("generated", "tutorial_brazilian_test.md"),
],
"API Reference" => "api_reference.md",
],
Expand Down
8 changes: 8 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ To install `Peridynamics.jl`, follow these steps:
</div>
```

```@raw html
<div class="tutorial-element">
<a href="https://kaipartmann.github.io/Peridynamics.jl/stable/generated/tutorial_brazilian_test/">
<figcaption>Brazilian test</figcaption><br><img src="https://github.com/user-attachments/assets/2f78a983-98d5-42eb-bc32-4fb270238ceb" style="width: 90% !important;"/>
</a>
</div>
```

```@raw html
</div>
```
Expand Down
55 changes: 55 additions & 0 deletions docs/src/literate/tutorial_brazilian_test.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# # [Brazilian Test](@id tutorial_brazilian_test)

# This tutorial sets up the Brazilian Test experiment, commonly used to investigate fracture
# of brittle materials like ultra-high performance concrete.
# Therefore a cylindrical specimen is
# loaded by two opposing forces applying pressure on the cross section of the specimen.

# To start, we import the package.
using Peridynamics

# Then we define the geometrical parameters of the specimen which are the diameter `Ø` and
# the length `l` as well as the point spacing `Δx` of the model.
# The parameter `b` is used later defining point sets for the boundary conditions.
Ø = 0.05 # [m]
l = 0.015 # [m]
Δx = Ø/61 # [m]
b = 0.017 # [m]

# With the diameter, length and point spacing, we create the cylindrical body.
pos, vol = uniform_cylinder(Ø, l, Δx)
cyl = Body(BBMaterial(), pos, vol)

# The horizon is specified in relation to the point spacing.
δ = 3.015Δx
# Then the material parameters are set.
material!(cyl; horizon=δ, E=50e9, rho=2400, Gc=140)

# To apply the opposing forces, two point sets are generated.
point_set!(p -> p[1] ≥ Ø/2-3Δx && abs(p[2]) ≤ 1.1*b/2, cyl, :set_1)
point_set!(p -> p[1] ≤ -Ø/2+3Δx && abs(p[2]) ≤ 1.1*b/2, cyl, :set_2)

# The functions for the velocity boundary conditions, that have the same value but act in
# different directions, are defined next.
v_set1(p, t) = - 2 * exp(-t/0.00002) * (-1/0.02^2 * p[2]^2 + 1)
v_set2(p, t) = 2 * exp(-t/0.00002) * (-1/0.02^2 * p[2]^2 + 1)

# Then these functions are set as the boundary conditions in x-direction, while the
# velocites of the points in y- and z-direction are 0.
velocity_bc!(v_set1, cyl, :set_1, :x)
velocity_bc!(t -> 0, cyl, :set_1, :y)
velocity_bc!(t -> 0, cyl, :set_1, :z)
velocity_bc!(v_set2, cyl, :set_2, :x)
velocity_bc!(t -> 0, cyl, :set_2, :y)
velocity_bc!(t -> 0, cyl, :set_2, :z)

# The Velocity Verlet algotihm is employed as time integration method where 6000 time steps
# are calculated.
vv = VelocityVerlet(steps=6000)

# Finally the job is defined and submitted.

#md # ```julia
#md # job = Job(cyl, vv; path="results/brazilian_bb_uniform")
#md # submit(job)
#md # ```
kaipartmann marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion src/discretization/point_generators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ of the cylinder.
# Examples

```julia-repl
julia> position, volume = uniform_cylinder(5, 10, 2);
julia> position, volume = round_cylinder(5, 10, 2);

julia> position
3×30 Matrix{Float64}:
Expand All @@ -281,6 +281,7 @@ julia> volume
13.089969389957473
13.089969389957473
13.089969389957473
```
"""
function round_cylinder(diameter::Real, height::Real, ΔX0::Real; center=(0, 0, 0))
radius = diameter / 2
Expand Down
Loading