From 4014c2257e7bec8c88dcbe23fcf35521b7e9b89b Mon Sep 17 00:00:00 2001 From: Umberto Villa <uvilla@oden.utexas.edu> Date: Wed, 19 Apr 2023 12:27:42 -0500 Subject: [PATCH] Update Helmholtz.ipynb --- Assignments/Assignment4/Helmholtz.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assignments/Assignment4/Helmholtz.ipynb b/Assignments/Assignment4/Helmholtz.ipynb index c9e7c0f..976a5ef 100644 --- a/Assignments/Assignment4/Helmholtz.ipynb +++ b/Assignments/Assignment4/Helmholtz.ipynb @@ -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", @@ -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" ]