Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ok-landscape
GitHub Repository: Ok-landscape/computational-pipeline
Path: blob/main/latex-templates/templates/biomedical/biomechanics.tex
51 views
unlisted
1
\documentclass[11pt,a4paper]{article}
2
\usepackage[utf8]{inputenc}
3
\usepackage[T1]{fontenc}
4
\usepackage{amsmath,amssymb}
5
\usepackage{graphicx}
6
\usepackage{booktabs}
7
\usepackage{siunitx}
8
\usepackage{geometry}
9
\geometry{margin=1in}
10
\usepackage{pythontex}
11
\usepackage{hyperref}
12
\usepackage{float}
13
14
\title{Biomechanics\\Tissue Mechanics and Viscoelasticity}
15
\author{Biomedical Engineering Department}
16
\date{\today}
17
18
\begin{document}
19
\maketitle
20
21
\begin{abstract}
22
Analysis of biological tissue mechanics including stress-strain relationships, viscoelasticity, and bone mechanics.
23
\end{abstract}
24
25
26
\section{Introduction}
27
28
Biomechanics applies mechanical principles to biological systems.
29
30
\begin{pycode}
31
import numpy as np
32
import matplotlib.pyplot as plt
33
plt.rcParams['text.usetex'] = True
34
plt.rcParams['font.family'] = 'serif'
35
\end{pycode}
36
37
\section{Stress-Strain Curves}
38
39
\begin{pycode}
40
strain = np.linspace(0, 0.3, 100)
41
42
# Different tissue types
43
bone_stress = 20e9 * strain * (strain < 0.02) + (20e9 * 0.02) * (strain >= 0.02)
44
tendon_stress = 1.5e9 * strain**1.5
45
skin_stress = 1e6 * (np.exp(10*strain) - 1)
46
47
fig, ax = plt.subplots(figsize=(10, 6))
48
ax.plot(strain * 100, bone_stress / 1e6, label='Bone', linewidth=1.5)
49
ax.plot(strain * 100, tendon_stress / 1e6, label='Tendon', linewidth=1.5)
50
ax.plot(strain * 100, skin_stress / 1e6, label='Skin', linewidth=1.5)
51
ax.set_xlabel('Strain (\\%)')
52
ax.set_ylabel('Stress (MPa)')
53
ax.set_title('Stress-Strain Curves for Biological Tissues')
54
ax.legend()
55
ax.grid(True, alpha=0.3)
56
ax.set_xlim([0, 30])
57
ax.set_ylim([0, 500])
58
plt.tight_layout()
59
plt.savefig('tissue_stress_strain.pdf', dpi=150, bbox_inches='tight')
60
plt.close()
61
\end{pycode}
62
63
\begin{figure}[H]
64
\centering
65
\includegraphics[width=0.85\textwidth]{tissue_stress_strain.pdf}
66
\caption{Stress-strain behavior of different tissues.}
67
\end{figure}
68
69
\section{Viscoelastic Models}
70
71
Standard Linear Solid: $\sigma + \tau_\sigma \dot{\sigma} = E_R \epsilon + \tau_\epsilon E_R \dot{\epsilon}$
72
73
\begin{pycode}
74
# Stress relaxation
75
t = np.linspace(0, 10, 100)
76
E_0 = 10 # Initial modulus
77
E_inf = 2 # Equilibrium modulus
78
tau = 2 # Relaxation time
79
80
G_t = E_inf + (E_0 - E_inf) * np.exp(-t/tau)
81
82
fig, ax = plt.subplots(figsize=(10, 6))
83
ax.plot(t, G_t, 'b-', linewidth=2)
84
ax.axhline(y=E_inf, color='r', linestyle='--', label='$E_\\infty$')
85
ax.set_xlabel('Time (s)')
86
ax.set_ylabel('Relaxation Modulus (MPa)')
87
ax.set_title('Stress Relaxation')
88
ax.legend()
89
ax.grid(True, alpha=0.3)
90
plt.tight_layout()
91
plt.savefig('stress_relaxation.pdf', dpi=150, bbox_inches='tight')
92
plt.close()
93
\end{pycode}
94
95
\begin{figure}[H]
96
\centering
97
\includegraphics[width=0.85\textwidth]{stress_relaxation.pdf}
98
\caption{Viscoelastic stress relaxation.}
99
\end{figure}
100
101
\section{Creep Response}
102
103
\begin{pycode}
104
J_0 = 0.1 # Initial compliance
105
J_inf = 0.5 # Equilibrium compliance
106
107
J_t = J_inf - (J_inf - J_0) * np.exp(-t/tau)
108
109
fig, ax = plt.subplots(figsize=(10, 6))
110
ax.plot(t, J_t, 'b-', linewidth=2)
111
ax.set_xlabel('Time (s)')
112
ax.set_ylabel('Creep Compliance (1/MPa)')
113
ax.set_title('Creep Response')
114
ax.grid(True, alpha=0.3)
115
plt.tight_layout()
116
plt.savefig('creep_response.pdf', dpi=150, bbox_inches='tight')
117
plt.close()
118
\end{pycode}
119
120
\begin{figure}[H]
121
\centering
122
\includegraphics[width=0.85\textwidth]{creep_response.pdf}
123
\caption{Viscoelastic creep compliance.}
124
\end{figure}
125
126
\section{Dynamic Modulus}
127
128
\begin{pycode}
129
omega = np.logspace(-2, 2, 100)
130
131
# Storage and loss moduli
132
E_storage = E_inf + (E_0 - E_inf) * (omega * tau)**2 / (1 + (omega * tau)**2)
133
E_loss = (E_0 - E_inf) * omega * tau / (1 + (omega * tau)**2)
134
135
fig, ax = plt.subplots(figsize=(10, 6))
136
ax.loglog(omega, E_storage, 'b-', linewidth=2, label="$E'$ (Storage)")
137
ax.loglog(omega, E_loss, 'r-', linewidth=2, label="$E''$ (Loss)")
138
ax.set_xlabel('Frequency (rad/s)')
139
ax.set_ylabel('Modulus (MPa)')
140
ax.set_title('Dynamic Mechanical Properties')
141
ax.legend()
142
ax.grid(True, alpha=0.3, which='both')
143
plt.tight_layout()
144
plt.savefig('dynamic_modulus.pdf', dpi=150, bbox_inches='tight')
145
plt.close()
146
\end{pycode}
147
148
\begin{figure}[H]
149
\centering
150
\includegraphics[width=0.85\textwidth]{dynamic_modulus.pdf}
151
\caption{Storage and loss moduli vs frequency.}
152
\end{figure}
153
154
\section{Bone Remodeling}
155
156
\begin{pycode}
157
# Wolff's law simulation
158
rho_0 = 1500 # Initial density
159
stimulus = np.linspace(0, 2, 100) # Mechanical stimulus
160
161
# Remodeling response
162
drho_dt = 0.1 * (stimulus - 1) * rho_0
163
164
fig, ax = plt.subplots(figsize=(10, 6))
165
ax.plot(stimulus, drho_dt, 'b-', linewidth=2)
166
ax.axhline(y=0, color='k', linewidth=0.5)
167
ax.axvline(x=1, color='r', linestyle='--', label='Equilibrium')
168
ax.set_xlabel('Mechanical Stimulus (normalized)')
169
ax.set_ylabel('Remodeling Rate')
170
ax.set_title("Bone Remodeling (Wolff's Law)")
171
ax.legend()
172
ax.grid(True, alpha=0.3)
173
plt.tight_layout()
174
plt.savefig('bone_remodeling.pdf', dpi=150, bbox_inches='tight')
175
plt.close()
176
\end{pycode}
177
178
\begin{figure}[H]
179
\centering
180
\includegraphics[width=0.85\textwidth]{bone_remodeling.pdf}
181
\caption{Bone remodeling rate vs mechanical stimulus.}
182
\end{figure}
183
184
\section{Hyperelastic Model}
185
186
\begin{pycode}
187
# Neo-Hookean model
188
lambda_stretch = np.linspace(1, 2, 100)
189
mu = 0.5 # Shear modulus (MPa)
190
191
# Cauchy stress
192
sigma_nh = mu * (lambda_stretch - 1/lambda_stretch**2)
193
194
fig, ax = plt.subplots(figsize=(10, 6))
195
ax.plot(lambda_stretch, sigma_nh, 'b-', linewidth=2)
196
ax.set_xlabel('Stretch Ratio $\\lambda$')
197
ax.set_ylabel('Cauchy Stress (MPa)')
198
ax.set_title('Neo-Hookean Hyperelastic Model')
199
ax.grid(True, alpha=0.3)
200
plt.tight_layout()
201
plt.savefig('hyperelastic.pdf', dpi=150, bbox_inches='tight')
202
plt.close()
203
\end{pycode}
204
205
\begin{figure}[H]
206
\centering
207
\includegraphics[width=0.85\textwidth]{hyperelastic.pdf}
208
\caption{Neo-Hookean stress-stretch relationship.}
209
\end{figure}
210
211
\section{Results}
212
213
\begin{pycode}
214
print(r'\begin{table}[H]')
215
print(r'\centering')
216
print(r'\caption{Tissue Mechanical Properties}')
217
print(r'\begin{tabular}{@{}lcc@{}}')
218
print(r'\toprule')
219
print(r'Tissue & Elastic Modulus & Ultimate Stress \\')
220
print(r'\midrule')
221
print(r'Cortical Bone & 15-20 GPa & 100-150 MPa \\')
222
print(r'Tendon & 1-2 GPa & 50-100 MPa \\')
223
print(r'Articular Cartilage & 1-10 MPa & 10-40 MPa \\')
224
print(r'Skin & 0.1-1 MPa & 2-20 MPa \\')
225
print(r'\bottomrule')
226
print(r'\end{tabular}')
227
print(r'\end{table}')
228
\end{pycode}
229
230
\section{Conclusions}
231
232
Biological tissues exhibit complex nonlinear and time-dependent mechanical behavior.
233
234
235
\end{document}
236
237