Skip to content

Commit

Permalink
Merge pull request #2450 from devitocodes/fix_notebook_number
Browse files Browse the repository at this point in the history
examples: Fix ADER notebook numbering
  • Loading branch information
mloubout authored Sep 25, 2024
2 parents fb4b50e + 6c73a86 commit 20a9de8
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions examples/seismic/tutorials/16_ader_fd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "31226b14-e907-4503-9918-a09163363217",
"metadata": {},
"source": [
"# ADER-FD\n",
"# 15 - ADER-FD\n",
"\n",
"This notebook demonstrates the implementation of a finite-difference scheme for solving the first-order formulation of the acoustic wave equation using ADER (Arbitrary-order-accuracy via DERivatives) time integration. This enables a temporal discretisation up the order of the spatial discretisation, whilst preventing the grid-grid decoupling (often referred to as checkerboarding) associated with solving first-order systems of equations on a single finite-difference grid.\n",
"\n",
Expand Down Expand Up @@ -35,7 +35,7 @@
"\n",
"$\\frac{\\partial^2 \\mathbf{U}}{\\partial t^2} = \\begin{bmatrix}c^2 \\nabla^2 p \\\\ c^2\\boldsymbol{\\nabla}\\left(\\boldsymbol{\\nabla}\\cdot\\mathbf{v}\\right) \\end{bmatrix}$.\n",
"\n",
"This process is iterated to obtain the required temporal derivatives.\n",
"This process is iterated to obtain equations for the required higher-order temporal derivatives.\n",
"\n",
"High-order explicit timestepping is achieved by substituting these expressions into the Taylor expansion, truncated at the desired temporal discretisation order. As such, the order of the temporal discretisation can be increased to that of the spatial discretisation."
]
Expand All @@ -62,7 +62,7 @@
"id": "e3ed902a-fc78-4199-80df-766df1f21e55",
"metadata": {},
"source": [
"To begin, we set up the `Grid`. Note that no staggering is specified for the `Function`s as it is not needed in this case."
"To begin, we set up the `Grid`. Note that no staggering is specified for the `Function`s, being unnecessary in this case due to the coupling of solution variables present in the ADER-FD update equations."
]
},
{
Expand Down Expand Up @@ -199,14 +199,6 @@
"source": [
"dt = grid.stepping_dim.spacing\n",
"\n",
"# Update equations (2nd-order ADER timestepping)\n",
"# eq_p = dv.Eq(p.forward, p + dt*pdt + (dt**2/2)*pdt2)\n",
"# eq_v = dv.Eq(v.forward, v + dt*vdt + (dt**2/2)*vdt2)\n",
"\n",
"# Update equations (3rd-order ADER timestepping)\n",
"# eq_p = dv.Eq(p.forward, p + dt*pdt + (dt**2/2)*pdt2 + (dt**3/6)*pdt3)\n",
"# eq_v = dv.Eq(v.forward, v + dt*vdt + (dt**2/2)*vdt2 + (dt**3/6)*vdt3)\n",
"\n",
"# Update equations (4th-order ADER timestepping)\n",
"eq_p = dv.Eq(p.forward, p + dt*pdt + (dt**2/2)*pdt2 + (dt**3/6)*pdt3 + (dt**4/24)*pdt4)\n",
"eq_v = dv.Eq(v.forward, v + dt*vdt + (dt**2/2)*vdt2 + (dt**3/6)*vdt3 + (dt**4/24)*vdt4)"
Expand Down Expand Up @@ -540,7 +532,7 @@
"id": "2d4d119c-e723-4792-8449-df80e7ac6fc9",
"metadata": {},
"source": [
"Note the damping of the field at the boundaries when using the ADER scheme. This is in the absence of any damping boundary conditions, hence the presence of reflections in the staggered case."
"Note the damping of the field at the boundaries when using the ADER scheme. ADER-FD schemes exhibit numerical diffusion when encountering non-smooth solutions, as is the case at the zero padding surrounding the grid. This occurs in the absence of any damping boundary conditions, hence the presence of reflections in the staggered case."
]
},
{
Expand Down

0 comments on commit 20a9de8

Please sign in to comment.