From f1590bd2f6116b65d7b102c788b7b07b22c86988 Mon Sep 17 00:00:00 2001 From: Daniel Shapero Date: Thu, 29 Jun 2023 11:52:47 -0700 Subject: [PATCH] Add 2D stability plot to text --- Makefile | 1 + demo/lbb-stability/Makefile | 14 ++++++-------- tensor-product-stokes.tex | 17 +++++++++++++++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 25efb39..fc8d189 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ tensor-product-stokes.pdf: tensor-product-stokes.tex tensor-product-stokes.bib cd demo/flow-around-cylinder && make cylinder_flow.pdf && cd ../../ + cd demo/lbb-stability && make results-2d.pdf && cd ../../ pdflatex tensor-product-stokes.tex bibtex tensor-product-stokes pdflatex tensor-product-stokes.tex diff --git a/demo/lbb-stability/Makefile b/demo/lbb-stability/Makefile index 63074cf..e764fac 100644 --- a/demo/lbb-stability/Makefile +++ b/demo/lbb-stability/Makefile @@ -1,10 +1,8 @@ -all: taylor-hood-2d.png taylor-hood-3d.png taylor-hood-3d-2layer.png -taylor-hood-2d.png: lbb-stability.py - python3 lbb-stability.py --dimension 2 --output $@ +results-2d.pdf: results-2d.json make_plots.py + python make_plots.py --input $< --output $@ -taylor-hood-3d.png: lbb-stability.py - python3 lbb-stability.py --dimension 3 --output $@ - -taylor-hood-3d-2layer.png: lbb-stability.py - python3 lbb-stability.py --dimension 3 --num-layers 2 --output $@ +results-2d.json: lbb-stability.py + python lbb-stability.py --dimension 2 --element mini --output $@ + python lbb-stability.py --dimension 2 --element taylor-hood --output $@ + python lbb-stability.py --dimension 2 --element crouzeix-raviart --output $@ diff --git a/tensor-product-stokes.tex b/tensor-product-stokes.tex index 0c60a4a..1ffee16 100644 --- a/tensor-product-stokes.tex +++ b/tensor-product-stokes.tex @@ -272,9 +272,16 @@ \section{Demonstrations} \subsection{Empirical confirmation of inf-sup stability} -Given a mesh of the spatial domain and a pair of discrete spaces $V^h$, $Q^h$, we can check empirically whether they satisfy the inf-sup condition by solving a generalized eigenvalue problem \citep{rognes2012automated}. -This empirical check is not a substitute for a formal proof of inf-sup stability, but rather serves as a ``smoke test'' that our numerical implementation and our proofs are not obviously wrong. +\begin{figure} + \begin{center} + \includegraphics[width=0.6\linewidth]{demo/lbb-stability/results-2d.pdf} + \end{center} + \caption{Empirical inf-sup constants for the three 2D element families on the unit square as the mesh is refined. + These elements are known to stable for the 2D Stokes problem.} + \label{fig:empirical-lbb-2d} +\end{figure} +Given a mesh of the spatial domain and a pair of discrete spaces $V^h$, $Q^h$, we can check empirically whether they satisfy the inf-sup condition by solving a generalized eigenvalue problem \citep{rognes2012automated}. Let $M$ and $N$ be the Riesz representers for the canonical mapping from $V \to V^*$ and $Q \to Q^*$ respectively. Consider the following eigenproblem: find velocity-pressure pairs $u$, $p$ and scalars $\lambda$ such that \begin{align} @@ -283,6 +290,12 @@ \subsection{Empirical confirmation of inf-sup stability} \end{align} The eigenvalues of this problem are all real and positive, and the square root of the smallest eigenvalue is equal to the inf-sup constant for $V^h$, $Q^h$ \citep{malkus1981eigenproblems}. We can form this eigenproblem in Firedrake and then call out to the SLEPc package to solve it \citep{hernandez2005slepc}. +This empirical check is not a substitute for a formal proof of inf-sup stability, but rather serves as a ``smoke test'' that our numerical implementation and our proofs are not obviously wrong. + +We performed the empirical inf-sup stability check using the unit square as our footprint domain, with a mesh spacing starting at 1/4 and going down to 1/32. +Figure \ref{fig:empirical-lbb-2d} shows the results for 2D elements which we know to be inf-sup stable. +\textcolor{red}{Do the 3D elements.} + \subsection{Lid-driven cavity flow}