diff --git a/diffphys.md b/diffphys.md index 9013f9a..70add13 100644 --- a/diffphys.md +++ b/diffphys.md @@ -251,13 +251,6 @@ velocities. %...to obtain an explicit update of the form $d(t+\Delta t) = A d(t)$, where the matrix $A$ represents the discretized advection step of size $\Delta t$ for $\mathbf{u}$. ... we'll get a matrix that essentially encodes linear interpolation coefficients for positions $\mathbf{x} + \Delta t \mathbf{u}$. For a grid of size $d_x \times d_y$ we'd have a -```{figure} resources/placeholder.png ---- -height: 100px -name: advection-upwind ---- -TODO, small sketch of 1D advection -``` E.g., for a simple [first order upwinding scheme](https://en.wikipedia.org/wiki/Upwind_scheme) on a Cartesian grid in 1D, with marker density and velocity $d_i$ and $u_i$ for cell $i$ @@ -270,7 +263,15 @@ $$ \begin{aligned} & u_i^- = \text{min}(u_i \Delta t / \Delta x,0) \end{aligned} $$ -E.g., for a positive $u_i$ we have +```{figure} resources/diffphys-advect1d.jpg +--- +height: 150px +name: advection-upwind +--- +1st-order upwinding uses a simple one-sided finite-difference stencil that takes into account the direction of the motion +``` + +Thus, for a positive $u_i$ we have $d_i^{~t+\Delta t} = (1 + \frac{u_i \Delta t }{ \Delta x}) d_i - \frac{u_i \Delta t }{ \Delta x} d_{i+1}$ and hence $\partial \mathcal P / \partial u_i$ from cell $i$ would be $1 + \frac{u_i \Delta t }{ \Delta x}$. diff --git a/intro.md b/intro.md index 8687a65..782c924 100644 --- a/intro.md +++ b/intro.md @@ -84,8 +84,8 @@ See also... Test link: {doc}`supervised` ## TODOs , include -- PINNs: often need weighting of added loss terms for different parts - DP intro, check transpose of Jacobians in equations +- DP SoL, generate result - DP control, show targets at bottom? - finish pictures... - include latent space physics, mention LSTM, end of supervised? diff --git a/resources/diffphys-advect1d.jpg b/resources/diffphys-advect1d.jpg new file mode 100644 index 0000000..833bcbd Binary files /dev/null and b/resources/diffphys-advect1d.jpg differ diff --git a/resources/pbdl-figures.key b/resources/pbdl-figures.key index 62d7b7f..03e1e19 100755 Binary files a/resources/pbdl-figures.key and b/resources/pbdl-figures.key differ