User:Lothar.brendel: Difference between revisions
(ghost cells) |
(→Scratch Pad: -Mach Angle, +Discretizations) |
||
| Line 55: | Line 55: | ||
* Phys.SE: [https://physics.stackexchange.com/questions/431685/boundary-conditions-for-calculus-of-variations-in-phase-space-and-under-canonica Boundary conditions for calculus of variations in phase space and under canonical transformations] | * Phys.SE: [https://physics.stackexchange.com/questions/431685/boundary-conditions-for-calculus-of-variations-in-phase-space-and-under-canonica Boundary conditions for calculus of variations in phase space and under canonical transformations] | ||
== | == Discretizations == | ||
\begin{align} | |||
f'_0 &= \frac{f_{1/2}-f_{-1/2}}{h}+\mathcal O(h^2)\\ | |||
&= \frac{f_{-3/2}-27 f_{-1/2}+27 f_{1/2}-f_{3/2}}{24h}+\mathcal O(h^4)\\ | |||
&= \frac{-9 f_{-5/2}+125 f_{-3/2}-2250 f_{-1/2}+2250 f_{1/2}-125 f_{3/2}+9 f_{5/2}}{1920h}+\mathcal O(h^6)\\ | |||
f_0 &= \frac{24 f_{-5/2}-209 f_{-3/2}+1281 f_{-1/2}+1281 f_{1/2}-209 f_{3/2}+24 f_{5/2}}{2192}+\mathcal O(h^4) | |||
\end{align} | |||
== Values of ghost cells == | == Values of ghost cells == | ||
Latest revision as of 08:21, 6 February 2026
Lothar Brendel
"Admin" of this Wiki
Scratch Pad
2D flow in polar coordinates \((\rho,\phi)\)
- vorticity: \(\omega=(\vec\nabla\times\vec u)\cdot\vec e_z=\partial_\rho u_\phi+\displaystyle\frac{u_\phi-\partial_\phi u_\rho}{\rho }\)
- its gradient: \(\vec\nabla\omega=\vec e_\rho\partial_\rho\omega+\displaystyle\frac{\vec e_\phi}{\rho}\partial_\phi\omega\)
- divergence \(\nabla\cdot\vec u=\displaystyle\frac{\partial_r(ru_r)+\partial_\phi u_\phi}{r}\)
- stress tensor:
- \(\sigma_{rr}=-p+(\zeta-2\mu/3)\displaystyle\frac{\partial_r(ru_r)+\partial_\phi u_\phi}{r}+2\mu\,\partial_r u_r\)
- \(\sigma_{r\phi}=\sigma_{\phi r}=\mu\displaystyle\frac{\partial_\phi u_r-u_\phi}{r}+\mu\,\partial_r u_\phi\)
- \(\sigma_{\phi\phi}=-p+(\zeta-2\mu/3)\displaystyle\frac{\partial_r(ru_r)+\partial_\phi u_\phi}{r}+2\mu\displaystyle\frac{\partial_\phi u_\phi+u_r}{r}\)
Windows 11
Energy equation
\begin{align} E' &= \rho e+\frac{\rho}{2}\vec u^2\\ E &= E' + \rho\phi\\ \partial_t E &= \partial_t E' + \phi\partial_t\rho\\ &= -\vec\nabla\cdot\big((E+P)\vec u\big)\\ &= -\vec\nabla\cdot\big((E'+P)\vec u+\phi\rho\vec u\big)\\ &= -\vec\nabla\cdot\big((E'+P)\vec u\big)-\phi\vec\nabla\cdot(\rho\vec u)-\vec u\cdot\rho\vec\nabla\phi\\ \Leftrightarrow\quad \partial_t E' &= -\vec\nabla\cdot\big((E'+P)\vec u\big)+\vec u\cdot\vec f \end{align}
Florian's eCDF
Let \(p_n\) be the relative frequencies and let \(p_n=0\) for \(n_{i-1}<n<n_i\). Then, being a step-function, the eCDF fulfills $$ c(n_i)-c(n_{i-1})\stackrel{*}{=}c(n_i)-c(n_i-1)=c(n_i)-c(n_i-\epsilon)=p_{n_i}~. $$ Florian's modified eCDF replaces the step-function \(c\) by a continous, piecewise linear function \(\tilde c\) with \(\tilde c(n_i)=c(n_i)\), from which one obtains fictious empirical probabilities \(\tilde p_n=\tilde c(n)-\tilde c(n-1)\) for \(n_{i-1}<n\le n_i\). Due to the "natural" \(\Delta n=1\) of the Steigungsdreieck, those \(\tilde p_n\) (being all the same because of the linearity) coincide with the slope $$ s_{n_i}=\frac{\tilde c(n_i)-\tilde c(n_{i-1})}{n_i-n_{i-1}} = \frac{c(n_i)-c(n_{i-1})}{n_i-n_{i-1}}~, $$ which implies $$ \sum_{n=n_{i-1}+1}^{n_i} \tilde p_n = (n_{i}-n_{i-1})\tilde p_n = (n_{i}-n_{i-1})s_{n_i} = c(n_i)-c(n_{i-1}) = p_{n_i}~. $$ Hence, the effect of using \(\tilde c\) is replacing the "bar" \(p_{n_i}\) and the zeros to its left by smaller "bars" of equal height \(\tilde p_n\) while preserving probability, which of course implies \(\sum_k\tilde p_k=1\). In other words, the scheme is a left-biased coarse graining.
*: even though in general \(n_{i-1}\ne n_i-1\)
Hamiltons principle
- Phys.SE: Modified Hamilton's Principle overconstraining a system by imposing too many boundary conditions
- Phys.SE: Boundary conditions for calculus of variations in phase space and under canonical transformations
Discretizations
\begin{align} f'_0 &= \frac{f_{1/2}-f_{-1/2}}{h}+\mathcal O(h^2)\\ &= \frac{f_{-3/2}-27 f_{-1/2}+27 f_{1/2}-f_{3/2}}{24h}+\mathcal O(h^4)\\ &= \frac{-9 f_{-5/2}+125 f_{-3/2}-2250 f_{-1/2}+2250 f_{1/2}-125 f_{3/2}+9 f_{5/2}}{1920h}+\mathcal O(h^6)\\ f_0 &= \frac{24 f_{-5/2}-209 f_{-3/2}+1281 f_{-1/2}+1281 f_{1/2}-209 f_{3/2}+24 f_{5/2}}{2192}+\mathcal O(h^4) \end{align}
Values of ghost cells
Dirichlet \(f(0)\): \[ f(-x):=2f(0)-f(x) \]
Neumann \(f'(0)\): \[ f(-x):=f(x)-xf'(0) \]