`Mechanical Boundary Conditions`

*Module:* `tutorials.04_EM_tissue.01_boundary_conditions.run`

*Section author: Thomas Fastl <thomas.fastl@kcl.ac.uk> and Christoph Augustin <christoph.augustin@medunigraz.at> andMatthias Gsell <matthias.gsell@medunigraz.at>*

This tutorial demonstrates the time-dependent application of different boundary condition types, i.e., Dirichlet and Neumann boundary conditions, on a cuboidal geometry. For more details on the definition of mechanical boundary conditions in carpentry see manual section mechanical boundary conditions.

A simple tetrahedral finite element mesh of a cube shown in `fig-schematic`

with side length mm and resolution mm as default is generated. The cube is assigned a neo-Hookean material model with shear modulus kPa and penalty parameter kPa.

For the experiments I & II, movement of nodes located at is restricted in all directions, i.e., homogeneous Dirichlet boundary conditions are applied (see left and right panels in `fig-schematic`

).

Experiment I provides guidance on the consistent application of inhomogeneous Dirichlet boundary conditions (see left panel in `fig-schematic`

). Nodes located at are translated under application of displacement utilizing the command line

```
./run.py --experiment dirichlet --sidelength 1.00 --resolution 0.10 --magnitude 0.10
```

where the parameter **experiment** selects the correct boundary condition type, parameters **sidelength** and **resolution** provide an optional input for the mesh generation and **magnitude** defines the displacement in mm. The application of inhomogeneous Dirichlet boundary conditions is time-dependent and necessitates existence of a specific trace file (.trc), in which the time course for the selected displacement is provided calculated as , where represents the scale factor (see `fig-traces`

).

Note

Node selection for application of Dirichlet boundary conditions is currently based on internal functions, but can alternatively be performed utilizing a vertex file (.vtx).

Experiment II provides guidance on the consistent application of Neumann boundary conditions (see right panel in `fig-schematic`

). Nodes located at are translated under application of pressure on the corresponding surface triangles utilizing the command line

```
./run.py --experiment neumann --sidelength 1.00 --resolution 0.10 --magnitude 5.00
```

where the parameter **experiment** selects the correct boundary condition type, parameters **sidelength** and **resolution** provide an optional input for the mesh generation and **magnitude** defines the applied pressure in kPa. Again, the application of Neumann boundary conditions is time-dependent and necessitates existence of a specific trace file (.trc), in which the time course for the selected pressure is provided calculated as , where represents the scale factor (see `fig-traces`

).

Note

Element selection for application of Neumann boundary conditions is currently based on internal fuctions, but can alternatively be performed utilizing a surface element file (.neubc).

Upon application of the command lines introduced above, results provided in `fig-results`

will be obtained. While in Experiment I inhomogeneous Dirichlet boundary conditions are consistently stretching the cube, Neumann boundary conditions in Experiment II administer both, compression and tension on the cube (compare boundary condition application traces in `fig-traces`

).

For the experiments III & IV, the plane at is attached to a spring acting in all directions, i.e., homogeneous Robin boundary conditions are applied.

Experiment III provides guidance on the consistent application of inhomogeneous Dirichlet boundary conditions (see left panel in `fig-schematic`

). Nodes located at are translated under application of displacement utilizing the command line

```
./run.py --experiment dirichlet --fixation weak --sidelength 1.00 --resolution 0.10 --magnitude 0.10
```

where the parameter **experiment** selects the correct boundary condition type, parameters **sidelength** and **resolution** provide an optional input for the mesh generation and **magnitude** defines the displacement in mm. The application of inhomogeneous Dirichlet boundary conditions is time-dependent and necessitates existence of a specific trace file (.trc), in which the time course for the selected displacement is provided calculated as , where represents the scale factor (see `fig-traces`

).

Note

Node selection for application of Dirichlet boundary conditions is currently based on internal functions, but can alternatively be performed utilizing a vertex file (.vtx).

Experiment IV provides guidance on the consistent application of Neumann boundary conditions (see right panel in `fig-schematic`

). Nodes located at are translated under application of pressure on the corresponding surface triangles utilizing the command line

```
./run.py --experiment neumann --fixation weak --sidelength 1.00 --resolution 0.10 --magnitude 5.00
```

where the parameter **experiment** selects the correct boundary condition type, parameters **sidelength** and **resolution** provide an optional input for the mesh generation and **magnitude** defines the applied pressure in kPa. Again, the application of Neumann boundary conditions is time-dependent and necessitates existence of a specific trace file (.trc), in which the time course for the selected pressure is provided calculated as , where represents the scale factor (see `fig-traces`

).

Note

Element selection for application of Neumann boundary conditions is currently based on internal fuctions, but can alternatively be performed utilizing a surface element file (.neubc).

Upon application of the command lines introduced above, results provided in `fig-results2`

will be obtained. While in Experiment III inhomogeneous Dirichlet boundary conditions are consistently stretching the cube, Neumann boundary conditions in Experiment IV administer both, compression and tension on the cube (compare boundary condition application traces in `fig-traces`

).