You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 32b12c0
Browse filesBrowse the repository at this point in the historyBrowse files
Split multi-part metric equations over several lines and regenerate the ellipse figures
- Write the eigendecomposition, the optimization problem, the optimal metric, the Hessian absolute value and the unsteady metric as aligned equations, one definition per line
- Integrate G over x-hat in the steady and unsteady metrics, as in the thesis notation
- Note that Figures 4 and 5 of the custom sensor tutorial use MIN_DENSITY = 100 to hide the large, randomly oriented ellipses far from the airfoil
- Regenerate the ellipse figures of both tutorials with a line width of 1.5, and the custom sensor ones with MIN_DENSITY = 100
This page summarizes the theory behind the adaptive metric that SU2 computes for anisotropic mesh adaptation. For the options and output fields, see the [Adaptive Metric](../Adaptive-Metric/) user guide. For worked examples, see the tutorials [Adaptive Metric with Built-In Sensors](/tutorials/Adaptive_Metric_Builtin_Sensors/) and [Adaptive Metric with a Custom Sensor](/tutorials/Adaptive_Metric_Custom_Sensor/).
11
11
@@ -27,21 +27,25 @@ See [Limitations](../Adaptive-Metric/#limitations) in the user guide for the sup
27
27
28
28
## Metric Fields
29
29
30
-
Anisotropic mesh adaptation uses a continuous analog of the mesh: a Riemannian metric field $$\mathbf{M} = (\mathcal{M}(\mathbf{x}))_{\mathbf{x} \in \Omega}$$, which defines a symmetric positive definite $$d \times d$$ tensor $$\mathcal{M}(\mathbf{x})$$ at every point of the domain $$\Omega$$, with $$d = 2$$ or $$3$$ (Loseille and Alauzet, 2011a). A metric-based remesher generates a mesh that is *unit* in this metric, i.e. all its edges have unit length, and all its elements unit volume, when measured with $$\mathcal{M}$$. The length of an edge $$\mathbf{ab}$$ is
30
+
Anisotropic mesh adaptation uses a continuous analog of the mesh: a Riemannian metric field $$\mathbf{M} = (\mathcal{M}(\mathbf{x}))_{\mathbf{x} \in \Omega}$$, which defines a symmetric positive definite $$d \times d$$ tensor $$\mathcal{M}(\mathbf{x})$$ at every point of the domain $$\Omega$$, with $$d = 2$$ or $$3$$. A metric-based remesher generates a mesh that is *unit* in this metric, i.e. all its edges have unit length, and all its elements unit volume, when measured with $$\mathcal{M}$$. The length of an edge $$\mathbf{ab}$$ is
The eigenvectors (the columns of $$\mathcal{Q}$$) are the directions of the requested elements, and $$h_i$$ are the requested element sizes along them. The metric is therefore inversely proportional to the square of the sizing field: the size tensor $$\mathcal{M}^{-1/2} = \mathcal{Q} \Lambda^{-1/2} \mathcal{Q}^T$$ maps the unit ball of the Euclidean space onto the unit ball of $$\mathcal{M}$$, an ellipse (ellipsoid in 3D) with semi-axes $$h_i$$. A unit mesh in the metric space is thus an anisotropic mesh with these sizes and directions in the physical space.
39
43
40
44
The integral of the mesh density $$\sqrt{\det \mathcal{M}}$$ over the domain is known as the *complexity*
The complexity constraint prevents the trivial solution of vanishing element sizes, and prescribes the target number of vertices of the adapted mesh. The problem is solved by a calculus of variations, and its unique solution is given by (Loseille and Alauzet, 2011b)
The optimal metric is aligned with the eigenvectors of $$\lvert \mathcal{H} \rvert$$ and has the same anisotropy. The local term $$D$$ accounts for the sensitivity of the $$L^p$$-norm, and the global term $$G$$ enforces the complexity constraint. The corresponding error converges at second order with respect to the complexity, $$E_{L^p}(\mathbf{M}_{L^p}) \leq C \mathcal{N}^{-2/d}$$. As $$p \to \infty$$, the metric tends to the one that controls the error in the $$L^\infty$$ norm, which equidistributes the error and focuses on the largest scales of the solution; smaller values of $$p$$ also capture its weaker features.
where $$\mathbf{n}_f$$ is the area-weighted normal of face $$f$$. The absolute value is obtained from the eigendecomposition $$\mathcal{H} = \mathcal{Q} \Lambda \mathcal{Q}^T$$:
where $$\epsilon$$ is a small lower bound on the eigenvalues, so that $$\lvert \mathcal{H} \rvert$$, and therefore the metric, is symmetric positive definite by construction.
which is approximated with the trapezoidal rule over the time steps of the sub-interval. With a constant time step and sub-intervals of equal length, minimizing the space-time interpolation error for an average spatial complexity $$\mathcal{N}$$ per sub-interval gives
G &= \sum_{j=0}^{T-1} \int_\Omega \left( \det \mathcal{H}^j(\hat{\mathbf{x}}) \right)^{\frac{p}{2p+d}} d\hat{\mathbf{x}} .
101
+
\end{aligned}$$
85
102
86
103
The global term now involves all sub-intervals, so the metric of any sub-interval can only be normalized once the whole simulation has been computed. The complexity allocated to each sub-interval is proportional to its contribution to G, so sub-intervals whose solution is harder to resolve get more vertices. For T = 1, this is the optimal metric of the previous section, applied to the time-integrated Hessian.
Copy file name to clipboardExpand all lines: _tutorials/mesh_adaptation/Adaptive_Metric_Builtin_Sensors/Adaptive_Metric_Builtin_Sensors.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,10 @@ The following sections explain the configuration, run the case and visualize the
36
36
37
37
A metric field is a symmetric positive definite tensor $$\mathcal{M}$$ at every point. It prescribes the mesh that a remesher should build, a mesh that is unit in the metric: its eigenvectors are the directions of the cells, and its eigenvalues $$\lambda_i$$ give the requested cell sizes $$h_i = \lambda_i^{-1/2}$$ along them. SU2 computes, for each *sensor* field $$u$$, the metric that minimizes the $$L^p$$-norm of the interpolation error of $$u$$ for a target complexity $$\mathcal{N}$$ (approximately the number of vertices):
G &= \int_\Omega \left( \det \lvert \mathcal{H}(\hat{\mathbf{x}}) \rvert \right)^{\frac{p}{2p+d}} d\hat{\mathbf{x}},
42
+
\end{aligned}$$
40
43
41
44
where $$\lvert \mathcal{H} \rvert$$ is the absolute value of the Hessian of the sensor and $$d$$ the number of dimensions. See [Metric-Based Anisotropic Mesh Adaptation](/docs_v7/Metric-Based-Mesh-Adaptation/) for the theory and [Adaptive Metric](/docs_v7/Adaptive-Metric/) for all options.
Follow the [ParaView steps of the built-in sensor tutorial](/tutorials/Adaptive_Metric_Builtin_Sensors/#visualizing-the-metric-in-paraview), with `AdaptiveMetric_Total_pressure` or `AdaptiveMetric_Mach` in the Calculator expression for the vertex density, and `SENSOR = "Total_pressure"` in `size_ellipses_2d.py` for the ellipses.
168
+
Follow the [ParaView steps of the built-in sensor tutorial](/tutorials/Adaptive_Metric_Builtin_Sensors/#visualizing-the-metric-in-paraview), with `AdaptiveMetric_Total_pressure` or `AdaptiveMetric_Mach` in the Calculator expression for the vertex density, and `SENSOR = "Total_pressure"` in `size_ellipses_2d.py` for the ellipses. Figures 4 and 5 also use `MIN_DENSITY = 100` in the script, which skips the vertices whose requested vertex density is below 100, i.e. the large, randomly oriented ellipses far from the airfoil.
169
169
170
170
#### Requested vertex density
171
171
@@ -189,6 +189,6 @@ Figure (5): Cell sizes and stretching requested by the Mach metric of the same r
189
189
190
190
#### Comparison
191
191
192
-
The total pressure is constant outside of the boundary layers and the wake (Figure 1), so the total pressure metric requests the highest vertex density along the wall, especially near the leading edge, and in the wake (Figure 2). There, the ellipses are strongly stretched along the flow (Figure 4). Away from the airfoil, the total pressure is nearly constant, so its recovered Hessian is small and noisy: the requested density is low but irregular, and the ellipses are large and randomly oriented.
192
+
The total pressure is constant outside of the boundary layers and the wake (Figure 1), so the total pressure metric requests the highest vertex density along the wall, especially near the leading edge, and in the wake (Figure 2). There, the ellipses are strongly stretched along the flow (Figure 4). Away from the airfoil, the total pressure is nearly constant, so its recovered Hessian is small and noisy, resulting in a requested density that is low but irregular, and ellipses that are large and randomly oriented.
193
193
194
194
The Mach metric (Figures 3 and 5) also refines the wall and the wake, with sizing tensors stretched along the flow, as well as in the vicinity of the shocks.
0 commit comments