Skip to content

Commit

Permalink
Update Helmholtz.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
uvilla authored Apr 19, 2023
1 parent d110717 commit 4014c22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assignments/Assignment4/Helmholtz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@
"\n",
"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",
"\n",
"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",
"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",
"\n",
"$$ -\\Delta u - k_0^2(1 - \\xi) u = - k_0^2 \\xi u_{inc} \\text{ in } \\Omega.$$\n",
"$$ -\\Delta u - k_0^2(1 - \\xi) u = k_0^2 \\xi u_{inc} \\text{ in } \\Omega.$$\n",
"\n",
"For simplicity, homogeneous Neumann boundary conditions will be assumed on $\\partial\\Omega$, i.e.\n",
"\n",
Expand All @@ -220,7 +220,7 @@
"def pde_varf(u,m,p):\n",
" return ufl.inner(ufl.grad(u), ufl.grad(p))*ufl.dx \\\n",
" -k0squared*(dl.Constant(1.) - ufl.tanh(m) )*u*p*ufl.dx \\\n",
" + k0squared*ufl.tanh(m)*u_inc*p*ufl.dx\n",
" - k0squared*ufl.tanh(m)*u_inc*p*ufl.dx\n",
"\n",
"bc_state = []\n"
]
Expand Down

0 comments on commit 4014c22

Please sign in to comment.