Skip to content

Commit 4014c22

Browse files
authored
Update Helmholtz.ipynb
1 parent d110717 commit 4014c22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assignments/Assignment4/Helmholtz.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@
195195
"\n",
196196
"where $k = \\frac{\\omega}{c}$ is the (spacially varying) wave number, $\\delta_i(\\boldsymbol{x}) = \\delta_i(\\boldsymbol{x} - \\boldsymbol{x}_i)$ is the Dirach delta corresponding to the point $\\boldsymbol{x}_i$, and $e_i$ is the (random) weight associated to the $i$-th source.\n",
197197
"\n",
198-
"Next we let $\\xi = 1 - \\frac{c^2}{c_0^2}$ be the spatially varing speed of sound perturbation due by the acoustic heterogenity. By writing $u_{tot} = u + u_{inc}$, where $u$ is the scattered pressure and $u_{inc}$ is the incident pressure (i.e. the solution of the wave equation for the reference wave number $k_0$), we finally arrive to the following equation for the scattered pressure field\n",
198+
"Next we let $\\xi = 1 - \\frac{c_0^2}{c^2}$ be the spatially varing speed of sound perturbation due by the acoustic heterogenity. By writing $u_{tot} = u + u_{inc}$, where $u$ is the scattered pressure and $u_{inc}$ is the incident pressure (i.e. the solution of the wave equation for the reference wave number $k_0$), we finally arrive to the following equation for the scattered pressure field\n",
199199
"\n",
200-
"$$ -\\Delta u - k_0^2(1 - \\xi) u = - k_0^2 \\xi u_{inc} \\text{ in } \\Omega.$$\n",
200+
"$$ -\\Delta u - k_0^2(1 - \\xi) u = k_0^2 \\xi u_{inc} \\text{ in } \\Omega.$$\n",
201201
"\n",
202202
"For simplicity, homogeneous Neumann boundary conditions will be assumed on $\\partial\\Omega$, i.e.\n",
203203
"\n",
@@ -220,7 +220,7 @@
220220
"def pde_varf(u,m,p):\n",
221221
" return ufl.inner(ufl.grad(u), ufl.grad(p))*ufl.dx \\\n",
222222
" -k0squared*(dl.Constant(1.) - ufl.tanh(m) )*u*p*ufl.dx \\\n",
223-
" + k0squared*ufl.tanh(m)*u_inc*p*ufl.dx\n",
223+
" - k0squared*ufl.tanh(m)*u_inc*p*ufl.dx\n",
224224
"\n",
225225
"bc_state = []\n"
226226
]

0 commit comments

Comments
 (0)