Skip to content

Commit

Permalink
correct reference
Browse files Browse the repository at this point in the history
  • Loading branch information
CastillonMiguel committed Nov 21, 2024
1 parent b125cef commit 716f5f2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/Fatigue/plot_1800.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Fatigue: Single edge notched tension test
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In this study, a phase-field fatigue simulation is analyzed. The theoretical foundation of this model is presented in (:ref:theory_phase_field_fracture). Specifically, a cyclic displacement is applied to a single-edge notched tension test, following the approach described by [Carrara]_. The simulation adopts an isotropic formulation.
In this study, a phase-field fatigue simulation is analyzed. The theoretical foundation of this model is presented in (:ref:`theory_phase_field_fracture`). Specifically, a cyclic displacement is applied to a single-edge notched tension test, following the approach described by [Carrara]_. The simulation adopts an isotropic formulation.
The model consists of a square plate with a notch located midway along the left edge, extending horizontally toward the center, as illustrated in the figure below. The bottom edge of the plate is fixed in all directions, while the top edge is free to slide vertically. A cyclic vertical displacement is applied to the top edge. The geometry and boundary conditions are clearly shown in the accompanying figure. The model is discretized using triangular finite elements, with refined mesh resolution (element size $h$) in regions where crack evolution is anticipated. The element size $h$ must be sufficiently small to minimize mesh dependency.
Expand Down Expand Up @@ -130,12 +130,14 @@
gmsh_model_rank = 0 # Rank of the Gmsh model in a parallel setting
mesh_comm = mpi4py.MPI.COMM_WORLD # MPI communicator for parallel computation

# %%
# The mesh, cell markers, and facet markers are extracted from the 'mesh.msh' file
# using the `read_from_msh` function.
msh, cell_markers, facet_markers = dolfinx.io.gmshio.read_from_msh(msh_file, mesh_comm, gmsh_model_rank, gdim)

fdim = msh.topology.dim - 1 # Dimension of the mesh facets

# %%
# Facets defined in the .geo file used to generate the 'mesh.msh' file are identified here.
# Each marker variable corresponds to a specific region on the specimen:
# - `bottom_facet_marker`: Refers to the bottom part of the specimen.
Expand All @@ -147,6 +149,7 @@
right_facet_marker = facet_markers.find(11)
left_facet_marker = facet_markers.find(12)

# %%
# The `get_ds_bound_from_marker` function creates measures for applying boundary conditions
# on specific facets. These measures are generated for:
# - `bottom_facet_marker` → Stored in `ds_bottom`
Expand All @@ -158,6 +161,7 @@
ds_right = get_ds_bound_from_marker(right_facet_marker, msh, fdim)
ds_left = get_ds_bound_from_marker(left_facet_marker, msh, fdim)

# %%
# `ds_list` is an array that organizes boundary condition measures alongside descriptive names.
# Each entry in `ds_list` consists of two elements:
# - A measure (e.g., `ds_bottom`)
Expand Down Expand Up @@ -189,6 +193,7 @@
# - `bc_top`: The vertical displacement on the top boundary is updated dynamically
# to impose the cyclic load.

# %%
# The `bcs_list_u` variable is a list containing all boundary conditions for the
# displacement field, $\boldsymbol{u}$. This structure simplifies the management
# of multiple boundary conditions and allows for easy expansion if additional
Expand Down Expand Up @@ -307,7 +312,9 @@ def update_boundary_conditions(bcs, time):
dt = 1.0
final_time = 8 * 200 + 1

# %%
# Uncomment the following lines to run the solver with the specified parameters.

# solve(Data,
# msh,
# final_time,
Expand Down

0 comments on commit 716f5f2

Please sign in to comment.