Skip to content

Commit

Permalink
adapted wave propagation tutorials to new failure permission API
Browse files Browse the repository at this point in the history
  • Loading branch information
mdienst committed Feb 6, 2025
1 parent b256934 commit 5b122c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions docs/src/literate/tutorial_wave_in_bar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ npyz = 4
# and point spacing is then created:
pos, vol = uniform_box(lx, lyz, lyz, Δx)
body = Body(OSBMaterial(), pos, vol)
# Failure is prohibited throughout the body:
no_failure!(body)
# Following material parameters are specified:

# | material parameter | value |
Expand All @@ -32,8 +30,9 @@ no_failure!(body)
# | Density $ρ$ | $ 7850\,\mathrm{kg}\,\mathrm{m}^{-3}$ |
# | Young's modulus $E$ | $ 210 \, \mathrm{GPa}$ |
# | Poisson's ratio $ν$ | $0.25$ |
# | critical strain $ε_c$ | $0.01$ |
material!(body, horizon=3.015Δx, rho=7850.0, E=210e9, nu=0.25, epsilon_c=0.01)
material!(body, horizon=3.015Δx, rho=7850.0, E=210e9, nu=0.25)
# Failure is prohibited throughout the body:
no_failure!(body)
# Point set `:left` including the first row of points in x-direction is created:
point_set!(x -> x < -lx / 2 + 1.2Δx, body, :left)
# The velocity boundary condition of the form
Expand Down
9 changes: 4 additions & 5 deletions docs/src/literate/tutorial_wave_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ npyz = 4
# correspondence formulation.
pos, vol = uniform_box(lx, lyz, lyz, Δx)
body = Body(NOSBMaterial(), pos, vol)
# Again, failure is not allowed in the whole body.
no_failure!(body)

# Then the material parameters for one half of the body are assigned to the whole body
# first.
material!(body, horizon=3.015Δx, rho=7850.0, E=210e9, nu=0.25, epsilon_c=0.01)
material!(body, horizon=3.015Δx, rho=7850.0, E=210e9, nu=0.25)

# Now a point set containing the other half of all points is created.
point_set!(x -> x < 0, body, :set1)
# ![](https://github.com/user-attachments/assets/c589ab03-e7f5-4b71-b0c2-0f05eb3cdddc)
# The parameters for this point set are then overwritten with their new parameters.
material!(body, :set1, horizon=3.015Δx, rho=7850.0, E=105e9, nu=0.25, epsilon_c=0.01)
material!(body, :set1, horizon=3.015Δx, rho=7850.0, E=105e9, nu=0.25)

# Except for the Young's modulus, these are the same in both sections:
#
Expand All @@ -42,8 +40,9 @@ material!(body, :set1, horizon=3.015Δx, rho=7850.0, E=105e9, nu=0.25, epsilon_c
# | Young's modulus $E_I$ | $ 105 \, \mathrm{GPa}$ |
# | Young's modulus $E_{II}$ | $ 210 \, \mathrm{GPa}$ |
# | Poisson's ratio $ν$ | $0.25$ |
# | critical strain $ε_c$ | $0.01$ |

# Again, failure is not allowed in the whole body.
no_failure!(body)

# To employ the boundary conditions creating a displacement wave, the point set `:left` is
# created:
Expand Down

0 comments on commit 5b122c8

Please sign in to comment.