## Introduction

Targeting complex geometries, in this article we introduce directional element length expressions for B-spline meshes used in flow computations with the stabilized and variational multiscale (VMS) methods, discontinuity-capturing (DC) methods, and other special methods that require a directional element length.

### Stabilized and VMS methods

Stabilized and VMS methods have for decades been playing a core-method role in flow analysis with semi-discrete and space–time (ST) computational methods. The incompressible-flow Streamline-Upwind/Petrov-Galerkin (SUPG) [1, 2] and compressible-flow SUPG [3,4,5] methods are two of the earliest and most widely used stabilized methods. The incompressible-flow Pressure-Stabilizing/Petrov-Galerkin (PSPG) method [6, 7], with its Stokes-flow version introduced in , is also among the earliest and most widely used. These methods bring numerical stability in computation of flow problems at high Reynolds or Mach numbers and when using equal-order basis functions for velocity and pressure in incompressible flows. Because the methods are residual-based, the stabilization is achieved without loss of accuracy. The residual-based VMS (RBVMS) [9,10,11,12], which is now also widely used, subsumes its precursor SUPG/PSPG.

### DC methods

When the flow field has a discontinuity, stabilized and VMS methods are often supplemented with a DC term, which is also called “shock-capturing term” in the context of compressible flows. Supplementing the SUPG with a DC term started as early as 1986 [13, 14]. The DC term played a significant role in the evolution of the compressible-flow SUPG, which was originally introduced in 1982 in the context of conservation variables. The 1982 method is now called “$$(\text {SUPG})_{\mathrm {82}}$$.” At its inception, $$(\text {SUPG})_{\mathrm {82}}$$ was not used with any DC term, and the need for additional stabilization at the shocks was obvious from the test computations. Then $$(\text {SUPG})_{\mathrm {82}}$$ was recast in entropy variables, but also supplemented with a DC term . This, as expected, resulted in better shock profiles. In a 1991 ASME paper , $$(\text {SUPG})_{\mathrm {82}}$$ was supplemented with a very similar DC term. All the test computations presented in [16, 17], which were among the most popular test computations at that time, showed that, with the DC term, $$(\text {SUPG})_{\mathrm {82}}$$ was very comparable in accuracy to $$(\text {SUPG})_{\mathrm {82}}$$ recast in entropy variables. The stabilized and DC methods introduced in  for the advection–diffusion–reaction equation included safeguards to prevent “compounding,” i.e., augmentation of the SUPG effect by the DC effect when the advection and discontinuity directions are not orthogonal.

### Stabilized and VMS ST computational methods

Stabilized and VMS methods have been an important component of the ST computational methods, starting with the original Deforming-Spatial-Domain/Stabilized ST (DSD/SST) method [6, 18, 19] in 1990. The DSD/SST [6, 20, 21] was introduced for computation of flows with moving boundaries and interfaces (MBI), including fluid–structure interaction (FSI). In flow computations with MBI, the DSD/SST functions as a moving-mesh method. Moving the fluid mechanics mesh to follow an interface enables mesh-resolution control near the interface and, consequently, high-resolution boundary-layer representation near fluid–solid interfaces. Because the stabilization components of the original DSD/SST are the SUPG and PSPG stabilizations, it is now also called “ST-SUPS.” The ST-VMS [22,23,24] is the VMS version of the DSD/SST. The VMS components of the ST-VMS are from the RBVMS. The ST-VMS, which subsumes its precursor ST-SUPS, has two more stabilization terms beyond those in the ST-SUPS, and the additional terms give the method better turbulence modeling features. The ST-SUPS and ST-VMS, because of the higher-order accuracy of the ST framework (see [22, 23]), are desirable also in computations without MBI.

As a moving-mesh method, the DSD/SST is an alternative to the Arbitrary Lagrangian–Eulerian (ALE) method, which is older (see, for example, ) and more commonly used. The ALE-VMS method [26,27,28,29,30,31,32] is the VMS version of the ALE. It succeeded the ST-SUPS and ALE-SUPS  and preceded the ST-VMS. To increase their scope and accuracy, the ALE-VMS and RBVMS are often supplemented with special methods, such as those for weakly-enforced Dirichlet boundary conditions [34,35,36] and “sliding interfaces” [37, 38]. The ALE-SUPS, RBVMS and ALE-VMS have been applied to many classes of FSI, MBI and fluid mechanics problems. The classes of problems include ram-air parachute FSI , wind-turbine aerodynamics and FSI [39,40,41,42,43,44,45,46,47,48,49], more specifically, vertical-axis wind turbines [48,49,50,51], floating wind turbines , wind turbines in atmospheric boundary layers [47,48,49, 53], and fatigue damage in wind-turbine blades , patient-specific cardiovascular fluid mechanics and FSI [26, 55,56,57,58,59,60], biomedical-device FSI [61,62,63,64,65,66], ship hydrodynamics with free-surface flow and fluid–object interaction [67, 68], hydrodynamics and FSI of a hydraulic arresting gear [69, 70], hydrodynamics of tidal-stream turbines with free-surface flow , passive-morphing FSI in turbomachinery , bioinspired FSI for marine propulsion [73, 74], bridge aerodynamics and fluid–object interaction [75,76,77], and mixed ALE-VMS/Immersogeometric computations [64,65,66, 78, 79] in the framework of the Fluid–Solid Interface-Tracking/Interface-Capturing Technique . Recent advances in stabilized and multiscale methods may be found for stratified incompressible flows in , for divergence-conforming discretizations of incompressible flows in , and for compressible flows with emphasis on gas-turbine modeling in .

The ST-SUPS and ST-VMS have also been applied to many classes of FSI, MBI and fluid mechanics problems (see  for a comprehensive summary). The classes of problems include spacecraft parachute analysis for the landing-stage parachutes [29, 85,86,87,88], cover-separation parachutes  and the drogue parachutes [90,91,92], wind-turbine aerodynamics for horizontal-axis wind-turbine rotors [29, 39, 93, 94], full horizontal-axis wind-turbines [45, 95,96,97] and vertical-axis wind-turbines [48, 49, 98], flapping-wing aerodynamics for an actual locust [29, 99,100,101], bioinspired MAVs [96, 97, 102, 103] and wing-clapping [104, 105], blood flow analysis of cerebral aneurysms [96, 106], stent-blocked aneurysms [106,107,108], aortas [109,110,111,112,113], heart valves [97, 104, 111, 113,114,115,116,117] and coronary arteries in motion , spacecraft aerodynamics [89, 119], thermo-fluid analysis of ground vehicles and their tires [24, 115], thermo-fluid analysis of disk brakes , flow-driven string dynamics in turbomachinery [121,122,123], flow analysis of turbocharger turbines [124,125,126,127,128], flow around tires with road contact and deformation [115, 129,130,131,132], fluid films [132, 133], ram-air parachutes , and compressible-flow spacecraft parachute aerodynamics [135, 136].

### ST Slip Interface method

The ST Slip Interface (ST-SI) method was introduced in , in the context of incompressible-flow equations, to retain the desirable moving-mesh features of the ST-VMS and ST-SUPS in computations involving spinning solid surfaces, such as a turbine rotor. The mesh covering the spinning surface spins with it, retaining the high-resolution representation of the boundary layers, while the mesh on the other side of the SI remains unaffected. This is accomplished by adding to the ST-VMS formulation interface terms similar to those in the version of the ALE-VMS for computations with sliding interfaces [37, 38]. The interface terms account for the compatibility conditions for the velocity and stress at the SI, accurately connecting the two sides of the solution. An ST-SI version where the SI is between fluid and solid domains was also presented in . The SI in that case is a “fluid–solid SI” rather than a standard “fluid–fluid SI” and enables weak enforcement of the Dirichlet boundary conditions for the fluid. The ST-SI introduced in  for the coupled incompressible-flow and thermal-transport equations retains the high-resolution representation of the thermo-fluid boundary layers near spinning solid surfaces. These ST-SI methods have been applied to aerodynamic analysis of vertical-axis wind turbines [48, 49, 98], thermo-fluid analysis of disk brakes , flow-driven string dynamics in turbomachinery [121,122,123], flow analysis of turbocharger turbines [124,125,126,127,128], flow around tires with road contact and deformation [115, 129,130,131,132], fluid films [132, 133], aerodynamic analysis of ram-air parachutes , and flow analysis of heart valves [111, 113, 116, 117].

In the ST-SI version presented in  the SI is between a thin porous structure and the fluid on its two sides. This enables dealing with the porosity in a fashion consistent with how the standard fluid–fluid SIs are dealt with and how the Dirichlet conditions are enforced weakly with fluid–solid SIs. This version also enables handling thin structures that have T-junctions. This method has been applied to incompressible-flow aerodynamic analysis of ram-air parachutes with fabric porosity . The compressible-flow ST-SI methods were introduced in , including the version where the SI is between a thin porous structure and the fluid on its two sides. Compressible-flow porosity models were also introduced in . These, together with the compressible-flow ST SUPG method , extended the ST computational analysis range to compressible-flow aerodynamics of parachutes with fabric and geometric porosities. That enabled ST computational flow analysis of the Orion spacecraft drogue parachute in the compressible-flow regime [135, 136].

### ST Isogeometric Analysis

The success with Isogeometric Analysis (IGA) basis functions in space [26, 37, 55, 138] motivated the integration of the ST methods with isogeometric discretization, which we broadly call “ST-IGA.” The ST-IGA was introduced in . Computations with the ST-VMS and ST-IGA were first reported in  in a 2D context, with IGA basis functions in space for flow past an airfoil, and in both space and time for the advection equation. Using higher-order basis functions in time enables deriving full benefit from using higher-order basis functions in space. This was demonstrated with the stability and accuracy analysis given in  for the advection equation.

The ST-IGA with IGA basis functions in time enables a more accurate representation of the motion of the solid surfaces and a mesh motion consistent with that. This was pointed out in [22, 23] and demonstrated in [99, 100, 102]. It also enables more efficient temporal representation of the motion and deformation of the volume meshes, and more efficient remeshing. These motivated the development of the ST/NURBS Mesh Update Method (STNMUM) [99, 100, 102], with the name coined in . The STNMUM has a wide scope that includes spinning solid surfaces. With the spinning motion represented by quadratic NURBS in time, and with sufficient number of temporal patches for a full rotation, the circular paths are represented exactly. A “secondary mapping” [22, 23, 29, 99] enables also specifying a constant angular velocity for invariant speeds along the circular paths. The ST framework and NURBS in time also enable, with the “ST-C” method, extracting a continuous representation from the computed data and, in large-scale computations, efficient data compression [24, 115, 120,121,122,123, 139]. The STNMUM and the ST-IGA with IGA basis functions in time have been used in many 3D computations. The classes of problems solved are flapping-wing aerodynamics for an actual locust [29, 99,100,101], bioinspired MAVs [96, 97, 102, 103] and wing-clapping [104, 105], separation aerodynamics of spacecraft , aerodynamics of horizontal-axis [45, 95,96,97] and vertical-axis [48, 49, 98] wind-turbines, thermo-fluid analysis of ground vehicles and their tires [24, 115], thermo-fluid analysis of disk brakes , flow-driven string dynamics in turbomachinery [121,122,123], flow analysis of turbocharger turbines [124,125,126,127,128], and flow analysis of coronary arteries in motion .

The ST-IGA with IGA basis functions in space enables more accurate representation of the geometry and increased accuracy in the flow solution. It accomplishes that with fewer control points, and consequently with larger effective element sizes. That in turn enables using larger time-step sizes while keeping the Courant number at a desirable level for good accuracy. It has been used in ST computational flow analysis of turbocharger turbines [124,125,126,127,128], flow-driven string dynamics in turbomachinery [122, 123], ram-air parachutes , spacecraft parachutes , aortas [111,112,113], heart valves [111, 113, 116, 117], coronary arteries in motion , tires with road contact and deformation [130,131,132], and fluid films [132, 133]. Using IGA basis functions in space is now a key part of some of the newest arterial zero-stress-state estimation methods [113, 140,141,142,143,144,145] and related shell analysis .

### Stabilization parameters and element lengths

In all the semi-discrete and ST stabilized and VMS methods discussed in the earlier subsections, an embedded stabilization parameter, known as “$$\tau$$,” plays a significant role (see ). This parameter involves a measure of the local length scale (also known as “element length”) and other parameters such as the element Reynolds and Courant numbers. The interface terms in the ST-SI also involve element length, in the direction normal to the interface. Various element lengths and $$\tau$$s were proposed, starting with those in [1, 2] and [3,4,5], followed by the ones introduced in [13, 14]. In many cases, the element length was seen as an advection length scale, in the flow-velocity direction. The set of $$\tau$$s introduced in [3,4,5] in conjunction with $$(\text {SUPG})_{\mathrm {82}}$$ is now called “$$\tau _\mathrm {82}$$.” The $$\tau$$ definition introduced in , which is for the advective limit and is now called “$$\tau _{\mathrm {SUGN1}}$$” (and the corresponding element length is now called “$$h_{\mathrm {UGN}}$$”), automatically yields lower values for higher-order finite element basis functions (see [147, 148]). Later, other $$\tau$$ definitions that are applicable to higher-order elements were proposed in  in the context of advective-diffusive systems. The $$\tau$$ used in  with $$(\text {SUPG})_{\mathrm {82}}$$ was a slightly modified version of $$\tau _\mathrm {82}$$. Subsequent minor modifications of $$\tau _\mathrm {82}$$ took into account the interaction between the DC and $$(\text {SUPG})_{\mathrm {82}}$$ terms in a fashion similar to how it was done in  for the advection–diffusion–reaction equation. Until 2004, all these slightly modified versions of $$\tau _\mathrm {82}$$ were always used with the same DC parameter, which was introduced in the 1991 ASME paper  and is now called “$$\delta _\mathrm {91}$$.” This DC parameter was derived from the one given in  for the entropy variables.

Calculating the $$\tau$$s based on the element-level matrices and vectors was introduced in  in the context of the advection–diffusion equation and the Navier–Stokes equations of incompressible flows. These definitions are expressed in terms of the ratios of the norms of the matrices or vectors. They automatically take into account the local length scales, advection field and the element Reynolds number. The definitions based on the element-level vectors were shown [150, 151] to address the difficulties reported at small time-step sizes. A second element length scale, in the solution-gradient direction and called “$$h_{\mathrm {RGN}}$$,” was introduced in 2001 [20, 152]. Recognizing this as a diffusion length scale, a new stabilization parameter for the diffusive limit, “$$\tau _{\mathrm {SUGN3}}$$,” was introduced in [20, 153], to be used together with $$\tau _{\mathrm {SUGN1}}$$ and “$$\tau _{\mathrm {SUGN2}}$$,” the parameters for the advective and transient limits. For the stabilized ST methods, “$$\tau _{\mathrm {SUGN12}}$$,” representing both the advective and transient limits, was also introduced in .

New ways of calculating the $$\tau$$ and DC parameter to be used with $$(\text {SUPG})_{\mathrm {82}}$$ were introduced in 2004 [153,154,155]. The new $$\tau$$s, now categorized under the label “$$\tau _\mathrm {04}$$,” have a matrix structure for viscous flows and reduce to a scalar for inviscid flows. The new DC parameters were of two types: one defined in a style the Discontinuity-Capturing Directional Dissipation [20, 155, 156] parameter was defined, and one that is now called “$$\mathrm {YZ}\beta$$” DC parameter. The $$\mathrm {YZ}\beta$$ DC parameter is residual-based, and it is simpler than $$\delta _\mathrm {91}$$. It has options for smoother or sharper computed shocks. A number of 2D and 3D test computations with $$\mathrm {YZ}\beta$$ DC were reported in [157,158,159]. These computations showed that in addition to being simpler than $$\delta _\mathrm {91}$$, the $$\mathrm {YZ}\beta$$ DC parameter was superior in accuracy. The computations reported in [157,158,159] were based on the compressible-flow ST SUPG.

Some new options for the stabilization parameters used with the SUPS and VMS were proposed in [21, 24, 94, 95, 99]. These include a fourth $$\tau$$ component, “$$\tau _{\mathrm {SUGN4}}$$” , which was introduced for the VMS, considering one of the two extra stabilization terms the VMS has compared to the SUPS. They also include stabilization parameters  for the thermal-transport part of the VMS for the coupled incompressible-flow and thermal-transport equations.

Some of the stabilization parameters described in this subsection were also used in computations with other SUPG-like methods, such as the computations reported in [72, 160,161,162,163,164,165,166,167,168,169,170,171].

### Directional element lengths for isogeometric discretization

The stabilization and DC parameters and element lengths discussed in the previous subsection were all originally intended for finite element discretization but quite often used also for isogeometric discretization. The element lengths and stabilization and DC parameters introduced in  target isogeometric discretization but are also applicable to finite element discretization. They were introduced in the context of the advection–diffusion equation and the Navier–Stokes equations of incompressible flows. The direction-dependent element length expression was outcome of a conceptually simple derivation. The key components of the derivation are mapping the direction vector from the physical ST element to the parent ST element, accounting for the discretization spacing along each of the parametric coordinates, and mapping what has been obtained in the parent element back to the physical element. The test computations presented in  for pure-advection cases, including those with discontinuous solution, showed that the element lengths and stabilization parameters proposed result in good solution profiles. The test computations also showed that the “UGN” parameters give reasonably good solutions even with NURBS basis functions.

### Preferred parametric space and directional element lengths for simplex elements

In general, we decide what parametric space to use based on reasons like numerical integration efficiency or implementation convenience. Obviously, choices based on such reasons should not influence the method in substance. We require the element lengths, including the directional element lengths, to have node-numbering invariance for all element types, including simplex elements. The directional element length expression introduced in  meets that requirement. This is accomplished by using in the element length calculations for simplex elements a preferred parametric space instead of the standard integration parametric space. The element length expressions based on the two parametric spaces were evaluated in  in the context of simplex elements. It was shown that when the element length expression is based on the integration parametric space, the variation with the node numbering could be by a factor as high as 1.9 for 3D elements and 2.2 for ST elements. It was also shown that the element length expression based on the integration parametric space could overestimate the element length by a factor as high as 2.8 for 3D elements and 3.2 for ST elements.

### Directional element lengths for B-spline elements

Targeting B-spline meshes for complex geometries, we introduce here new directional element length expressions, which are outcome of a clear and convincing derivation and more suitable for element-level evaluation. The new expressions are based on a preferred parametric space and a transformation tensor that represents the relationship between the integration and preferred parametric spaces.

### Outline of the remaining sections

We provide the advection–diffusion equation in Sect. 2, and the ST method for the advection–diffusion equation in Sect. 3. The element length definitions are given, from , in Sect. 4, and the transformation tensor for B-spline elements are presented in Sect. 5. The test computations are presented in Sect. 6, and the concluding remarks are given in Sect. 7. The stabilization and DC parameters are given in “Appendix A”.

Let $$\varOmega _t\subset {\mathbb {R}}^{n_{\mathrm {sd}}}$$ be the spatial domain with boundary $$\varGamma _{t}$$ at time $$t \in (0,T)$$, where $${n_{\mathrm {sd}}}$$ is the number of space dimensions. The subscript t indicates the time-dependence of the domain. The advection–diffusion equation is written on $$\varOmega _t$$ and $$\forall t \in (0,T)$$ as

\begin{aligned} \frac{\partial \phi }{\partial t} + {\mathbf {u}}\cdot \pmb {\nabla }\phi - \pmb {\nabla }\cdot \left( \nu \pmb {\nabla }\phi \right) = 0, \end{aligned}
(1)

where $$\phi$$ represents the quantity being transported (e.g., temperature, concentration), $${\mathbf {u}}$$ is the flow velocity, and $$\nu$$ is the diffusivity. The essential and natural boundary conditions associated with Eq. (1) are represented as $$\phi$$ = $$g_{\phi }$$ on $$\left( \varGamma _t\right) _{g_\phi }$$ and $${\mathbf {n}}\cdot \nu \pmb {\nabla }\phi$$ = $${h}_{\phi }$$ on $$\left( \varGamma _t\right) _{h_\phi }$$, where $$g_{\phi }$$ and $${h}_{\phi }$$ are given functions. A function $$\phi _{0}({\mathbf {x}})$$ is specified as the initial condition.

## ST SUPG method

In the ST methods [6, 20,21,22,23, 29], the formulation is written over a sequence of N ST slabs $$Q_n$$, where $$Q_n$$ is the slice of the ST domain between the time levels $$t_n$$ and $$t_{n+1}$$. The lateral boundary $$P_n$$ will have complementary subsets where essential and natural boundary conditions are enforced, just like how it is with $$\varGamma _{t}$$. At each time step, the integrations are performed over $$Q_n$$. The functions are continuous within an ST slab, but discontinuous from one ST slab to another, and the superscripts “−” and “$$+$$” will indicate the values of the functions just below and just above the time level. The trial solution and test function spaces are defined over $$Q_n$$ by using ST polynomials. Each $$Q_n$$ is decomposed into elements $$Q_n^e$$, where $$e=1,2,\ldots ,(n_{\mathrm {el}})_n$$. The subscript n used with $$n_{\mathrm {el}}$$ is for the general case where the number of ST elements may change from one ST slab to another.

We assume that we have constructed some suitably-defined finite-dimensional trial solution and test function spaces $$({\mathcal {S}}_\phi ^h)_n$$ and $$({\mathcal {V}}_\phi ^h)_n$$. The ST SUPG formulation of Eq. (1) can be written as follows: given $$(\phi ^h)_{n}^-$$, find $$\phi ^h \in ({\mathcal {S}}_\phi ^h)_n$$, such that $$\forall w_{\phi }^h \in ({\mathcal {V}}_\phi ^h)_n$$:

\begin{aligned}&\int _{Q_n} w_{\phi }^h \left( \frac{\partial \phi ^h}{\partial t} + {\mathbf {u}}^h \cdot \pmb {\nabla }\phi ^h \right) \mathrm {d}Q+ \int _{Q_n}\pmb {\nabla }w_{\phi }^h \cdot \nu \pmb {\nabla }\phi ^h \mathrm {d}Q\nonumber \\&\quad -\int _{\left( P_n\right) _{h_\phi }}w_{\phi }^h {h}_{\phi }^h \mathrm {d}P+ \int _{\varOmega _n}(w_{\phi }^h)_{n}^+ \left( (\phi ^h)_{n}^+ - (\phi ^h)_{n}^- \right) \mathrm {d}\varOmega \nonumber \\&\quad +\sum _{e=1}^{(n_{\mathrm {el}})_n} \int _{Q_n^e} (\tau _{\mathrm {SUPG}})_\phi \left( \frac{\partial w_{\phi }^h}{\partial t} + {\mathbf {u}}^h \cdot \pmb {\nabla }w_{\phi }^h \right) {r}_{\mathrm {A}}\left( \phi ^h\right) \mathrm {d}Q\nonumber \\&\quad +\sum _{e=1}^{(n_{\mathrm {el}})_n} \int _{Q_n^e} \pmb {\nabla }w_{\phi }^h \cdot {\mathbf {K}}_\mathrm {DC} \cdot \pmb {\nabla }\phi ^h \mathrm {d}Q= 0, \end{aligned}
(2)

where

\begin{aligned} {r}_{\mathrm {A}}\left( \phi ^h\right) = \frac{\partial \phi ^h}{\partial t} + {\mathbf {u}}^h \cdot \pmb {\nabla }\phi ^h - \pmb {\nabla }\cdot \left( \nu \pmb {\nabla }\phi ^h \right) , \end{aligned}
(3)

and $$(\tau _{\mathrm {SUPG}})_\phi$$ is the SUPG stabilization parameter, which will be given in “Appendix A.1”. The tensor $${\mathbf {K}}_\mathrm {DC}$$ is for DC, and that will be given in “Appendix A.2”. We start with $$(\phi ^h)_{0}^-$$ = $$\phi _{0}$$ and apply the formulation sequentially to all ST slabs $$Q_0, Q_1, Q_2, \ldots , Q_{N-1}$$.

## Element length

Element length is a key component of the stabilization and DC parameters. For the purpose of element length calculation, a scaling tensor $${\mathbf {D}}$$ was introduced in  to take into account the polynomial order of the basis functions and other factors such as the dimensions of the element domain in the parametric space. Considering the non-diagonal nature of $${\mathbf {D}}$$ in general and the context in , the terminology was changed to “transformation” tensor in .

### Element metric tensor in space

We first define the Jacobian tensor as

\begin{aligned} {\mathbf {Q}}&= \frac{\partial {\mathbf {x}}}{\partial \pmb {\xi }}. \end{aligned}
(4)

Then, based on that and $${\mathbf {D}}$$, we define the tensor

\begin{aligned} \hat{{\mathbf {Q}}}&= {\mathbf {Q}} \cdot {\mathbf {D}}^{-1}, \end{aligned}
(5)

where

\begin{aligned} {\mathbf {D}}&= \frac{\partial {\hat{\pmb {\xi }}}}{\partial \pmb {\xi }}, \end{aligned}
(6)

with $${\hat{\pmb {\xi }}}$$ representing our preferred parametric space. For a unit vector $${\mathbf {r}}$$ representing a direction in the physical space, we define the corresponding direction vector in the preferred parametric space as

\begin{aligned} \hat{\pmb {\lambda }}&=\frac{{\mathbf {r}} \cdot \hat{{\mathbf {Q}}}^{-T}}{\left\| {\mathbf {r}} \cdot \hat{{\mathbf {Q}}}^{-T}\right\| }. \end{aligned}
(7)

From that, the directional element length is defined as

\begin{aligned} h_\mathrm {RQD}&= 2 \left\| \hat{\pmb {\lambda }} \cdot \hat{{\mathbf {Q}}}^T \right\| \end{aligned}
(8)
\begin{aligned}&= 2 \underbrace{ \left\| {\mathbf {r}} \cdot \hat{{\mathbf {Q}}}^{-T} \cdot \hat{{\mathbf {Q}}}^{T} \right\| }_{=~1} \left\| {\mathbf {r}} \cdot \hat{{\mathbf {Q}}}^{-T} \right\| ^{-1} \end{aligned}
(9)
\begin{aligned}&= 2 \left\| {\mathbf {r}} \cdot \hat{{\mathbf {Q}}}^{-T} \right\| ^{-1} \end{aligned}
(10)
\begin{aligned}&= 2 \left\| {\mathbf {r}} \cdot {{\mathbf {Q}}}^{-T} \cdot {{\mathbf {D}}}^{T} \right\| ^{-1} . \end{aligned}
(11)

For notational convenience, we introduce the metric tensor

\begin{aligned} {\mathbf {G}}&= \hat{{\mathbf {Q}}}^{-T} \cdot \hat{{\mathbf {Q}}}^{-1}, \end{aligned}
(12)

and with that,

\begin{aligned} h_\mathrm {RQD}&= 2 \left( {\mathbf {r}} {\mathbf {r}} : {\mathbf {G}} \right) ^{-\frac{1}{2}} . \end{aligned}
(13)

### Remark 1

What we get from this derivation with $${\mathbf {D}}={\mathbf {I}}$$ has been used in many methods of calculating the stabilization parameters (see, for example, ). In those methods, a scaling factor taking the polynomial order into account is applied to the element length, and here we do the scaling in the parametric space, for each of the parametric directions.

Sweeping over all the directions represented by $${\mathbf {r}}$$, we obtain the minimum and maximum element lengths:

\begin{aligned} h_\mathrm {MIN}&\equiv 2 \min _{{\mathbf {r}}} \left( \left( {\mathbf {r}} {\mathbf {r}} : {\mathbf {G}} \right) ^{-\frac{1}{2}} \right) , \end{aligned}
(14)
\begin{aligned} h_\mathrm {MAX}&\equiv 2 \max _{{\mathbf {r}}} \left( \left( {\mathbf {r}} {\mathbf {r}} : {\mathbf {G}} \right) ^{-\frac{1}{2}} \right) . \end{aligned}
(15)

They are equivalent to

\begin{aligned} h_\mathrm {MIN}&= 2 \left( \max _{{\mathbf {r}}} \left( {\mathbf {r}} {\mathbf {r}} : {\mathbf {G}} \right) \right) ^{-\frac{1}{2}} , \end{aligned}
(16)
\begin{aligned}&= 2 \left( \lambda _\mathrm {max} \left( {\mathbf {G}} \right) \right) ^{-\frac{1}{2}}, \end{aligned}
(17)

and

\begin{aligned} h_\mathrm {MAX}&= 2 \left( \min _{{\mathbf {r}}} \left( {\mathbf {r}} {\mathbf {r}} : {\mathbf {G}} \right) \right) ^{-\frac{1}{2}} , \end{aligned}
(18)
\begin{aligned}&= 2 \left( \lambda _\mathrm {min} \left( {\mathbf {G}} \right) \right) ^{-\frac{1}{2}}, \end{aligned}
(19)

where $$\lambda _{\max }$$ and $$\lambda _{\min }$$ are the maximum and minimum eigenvalues of the argument tensor.

### Remark 2

In the implementation, we take measures to keep the calculated element length between $$h_\mathrm {MIN}$$ and $$h_\mathrm {MAX}$$.

### Element metric tensor in the ST framework

The ST Jacobian tensor is

\begin{aligned} {\mathbf {Q}}^\mathrm {ST}&= \begin{bmatrix} \frac{\partial t}{\partial \theta }&\quad \frac{\partial t}{\partial \pmb {\xi }} \\ \frac{\partial {\mathbf {x}}}{\partial \theta }&\quad {\mathbf {Q}} \\ \end{bmatrix} \end{aligned}
(20)
\begin{aligned}&= \begin{bmatrix} \frac{\partial t}{\partial \theta }&\quad \frac{\partial t}{\partial \pmb {\xi }} \\ {\mathbf {v}}\frac{\partial t}{\partial \theta }&\quad {\mathbf {Q}} \\ \end{bmatrix}, \end{aligned}
(21)

where $$\theta$$ is the parametric coordinate in time, and $${\mathbf {v}}$$ is the mesh velocity:

\begin{aligned} {\mathbf {v}}&= \left. \frac{\partial {\mathbf {x}}}{\partial t} \right| _{\pmb {\xi }}. \end{aligned}
(22)

The ST transformation tensor is given as

\begin{aligned} {\mathbf {D}}^\mathrm {ST}&= \begin{bmatrix} D_\theta&\quad {\mathbf {0}}^T \\ {\mathbf {0}}&\quad {\mathbf {D}} \\ \end{bmatrix}, \end{aligned}
(23)

and the transformation becomes

\begin{aligned} \hat{{\mathbf {Q}}}^\mathrm {ST}&= {\mathbf {Q}}^\mathrm {ST} \cdot \left( {\mathbf {D}}^\mathrm {ST}\right) ^{-1}. \end{aligned}
(24)

The ST metric tensor is defined as

\begin{aligned} {\mathbf {G}}^\mathrm {ST}&= \left( \hat{{\mathbf {Q}}}^\mathrm {ST}\right) ^{-T} \cdot \left( \hat{{\mathbf {Q}}}^\mathrm {ST}\right) ^{-1}. \end{aligned}
(25)

## Formulating $${\mathbf {D}}$$ for B-spline elements

We explain the concept in 1D, and that can be applied to the multiple dimensions. The parametric space is set to $$-1 \le \xi \le 1$$. We write the pth order B-spline basis functions as $$N_a^p$$. A position is expressed as

\begin{aligned} x^h\left( \xi \right)&= \sum _{a=0}^{p} x_a N_a^p\left( \xi \right) . \end{aligned}
(26)

From that, we obtain

\begin{aligned} Q&= \sum _{a=0}^{p} \frac{\partial N_a^p}{\partial \xi } x_a . \end{aligned}
(27)

By using the Bézier extraction operator, B-spline basis functions can be represented as

\begin{aligned} N^p_a\left( \xi \right)&= \sum _{b=0}^{p} {\mathsf {C}}_{a\,b} B^p_b(\xi ), \end{aligned}
(28)

where $$B^p_a$$ are the pth order Bernstein polynomials, and $${\mathsf {C}}_{a\,b}$$ are the coefficients constant within an element.

From Eq. (26), we write

\begin{aligned} x^h(\xi )&= \sum _{a=0}^p x_a N_a^p(\xi ), \end{aligned}
(29)
\begin{aligned}&= \sum _{a=0}^p {x}_a \sum _{b=0}^p {\mathsf {C}}_{a\,b} B_b^p(\xi ) \end{aligned}
(30)
\begin{aligned}&= \sum _{b=0}^p \underbrace{\sum _{a=0}^p {x}_a {\mathsf {C}}_{a\,b}}_{=x_b^B} B_b^p(\xi ). \end{aligned}
(31)

From

\begin{aligned} x_b^\mathrm {B}&= \sum _{a=0}^p x_a {\mathsf {C}}_{a\,b}, \end{aligned}
(32)

we write the inverse transformation as

\begin{aligned} x_a&= \sum _{b=0}^p x_b^\mathrm {B} \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a}, \end{aligned}
(33)

where $$\pmb {{\mathsf {C}}} = \left[ {\mathsf {C}}_{a\,b} \right] \in {\mathbb {R}}^{(p+1)\times (p+1)}$$, and $$\pmb {{\mathsf {C}}}^{-1}$$ represents the transformation from the Bézier control points to the control points.

As the preferred parametric space, we select

\begin{aligned} {\hat{\xi }}(\xi )&= \sum _{b=0}^p {\hat{\xi }}_b B^p_b(\xi ), \end{aligned}
(34)

where the Bézier control points are

\begin{aligned} {\hat{\xi }}_b&= \frac{\varDelta {\hat{\xi }}}{p} b, \end{aligned}
(35)

and $$\varDelta {\hat{\xi }}$$ is the Bézier-element length in the parametric space. The corresponding control points are

\begin{aligned} \xi _a&= \frac{\varDelta {\hat{\xi }}}{p} \sum _{b=0}^p b \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a}. \end{aligned}
(36)

Figure 1 illustrates the relationship between the control points and Bézier control points.

Then the effective element length for $$a=1, \ldots , p$$ can be calculated as

\begin{aligned} \varDelta \xi _a&= \xi _{a} - \xi _{a-1}\end{aligned}
(37)
\begin{aligned}&= \frac{\varDelta {\hat{\xi }}}{p} \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a} - \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a-1} \right) . \end{aligned}
(38)

From that, we define the ratio between the Bézier-element length in the parametric space and the effective element length. We propose three versions of the ratio: “RQD-MAX,” “RQD-MIN” and “RQD-EL.”

### RQD-MAX

In this version,

\begin{aligned} D&= \frac{\varDelta {\hat{\xi }}}\min _{a=1,\ldots ,p} \varDelta \xi _a} \end{aligned
(39)
\begin{aligned}&= p \left( \min _{a=1,\ldots ,p} \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a} - \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a-1} \right) \right) ^{-1} \end{aligned}
(40)
\begin{aligned}&= p \max _{a=1,\ldots ,p} \left( \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a} - \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a-1} \right) \right) ^{-1} . \end{aligned}
(41)

### RQD-MIN

In this version,

\begin{aligned} D&= \frac{\varDelta {\hat{\xi }}}\max _{a=1,\ldots ,p} \varDelta {\xi }_a} \end{aligned
(42)
\begin{aligned}&= p \left( \max _{a=1,\ldots ,p} \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a} - \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a-1} \right) \right) ^{-1} \end{aligned}
(43)
\begin{aligned}&= p \min _{a=1,\ldots ,p} \left( \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a} - \left\{ \pmb {{\mathsf {C}}}^{-1} \right\} _{b\,a-1} \right) \right) ^{-1} . \end{aligned}
(44)

### RQD-EL

In this version,

\begin{aligned} D&= \varDelta {\hat{\xi }} \left( \frac{1}{p} \sum _{a=1}^{p} \varDelta \xi _a \right) ^{-1} \end{aligned}
(45)
\begin{aligned}&= p^2 \left( \sum _{b=0}^p b \left( \left\{ \pmb {{\mathsf {C}}}^{-1}\right\} _{b\,p} - \left\{ \pmb {{\mathsf {C}}}^{-1}\right\} _{b\,0} \right) \right) ^{-1} . \end{aligned}
(46)

### Remark 3

Although the 1D expressions we have here for RQD-MIN, RQD-MAX and RQD-EL give the same element-length values as those given by the expressions in , the expression forms are rather different. The forms we have here are outcome of a clear and convincing derivation. They are more suitable for element-level evaluation. They have straightforward extensions to multiple dimensions.

### Extension to multiple dimensions

We split the Bézier extraction operator by direction and express the basis functions as

\begin{aligned} N_a (\pmb {\xi })&= \prod _{i = 1}^{{n_{\mathrm {pd}}}} N^{p^i}_{d^i_a} (\xi ^i) \end{aligned}
(47)
\begin{aligned}&= \prod _{i = 1}^{{n_{\mathrm {pd}}}} \sum _{b=0}^{p^i} {\mathsf {C}}_{d^i_a b}^i B^{p^i}_b (\xi ^i), \end{aligned}
(48)

where $${n_{\mathrm {pd}}}$$ is the number of parametric dimensions, the superscript i indicates the direction, and $$d^i_a$$ is the mapping table from the element control-point index to the corresponding local index in the ith direction. From the Bézier extraction operator $$\pmb {{\mathsf {C}}}^i$$ for direction i, we get the coefficient $$D^i$$, and $$D_{ij} = D^i \delta _{ij}$$ (no sum), where $$\delta _{ij}$$ is the Kronecker delta.

## Test computations

### Scaling study in 1D

Because the 1D expressions for RQD-MIN, RQD-MAX and RQD-EL give the same element length values as those given by the expressions in  (see Remark 3), for completeness, we include here the results from the 1D scaling study reported in . The results included here are for RQD-MAX, RQD-EL, and RQD-1, which has $$D=1$$.

The flow is from left to right, $$\left| u\right| = 1$$, and $$\nu$$ = 0.0. We are working with nondimensional numbers. The boundary conditions are $$\phi =1$$ at $$x=0$$ and $$\phi =0$$ at $$x=1$$. We use 4 different meshes, all consisting of a single uniform B-spline patch, with polynomial order 8, and with the number of elements ($$n_{\mathrm {el}}$$) ranging from 1 to 4. The stabilization parameter is as given by Eq. (51) (see “Appendix A.1”), with $$\tau _{\mathrm {SUGN2}}$$ excluded. The method includes the YZ$$\beta$$ DC, and we test both $$\beta$$ = 1 and $$\beta$$ = 2 (see “Appendix A.2”), with $$\phi _\mathrm {REF}$$ = 1, which is the expected value of $$\phi _\mathrm {MAX} - \phi _\mathrm {MIN}$$. The basis functions are linear in time, and the time-step size is 0.05. Figures 2 and 3 show the steady solutions.

We see that RQD-1 yields results that are overdamped. We get good solutions with RQD-EL and $$\beta =1$$, but there are small oscillations when the problem is underresolved, even though the oscillations are not visible in the plots. Overall, we see RQD-MAX with $$\beta =1$$ as giving the best solution. It gives better and better solutions with higher and higher number of elements, and there is no oscillation even when we have just one element.

### Advection skew to the mesh

The problem setup, which originates from  and was also used in  to test the SUPG method supplemented with new DC methods, is shown in Figure 4.

The domain size is $$1.0{\times }1.0$$, and the test computations are for $$\theta =63.4^\circ$$ and $$\nu = 1.0{\times }10^{-6}$$. We are working with nondimensional numbers. Even though we have a simple, square domain in the test computations, the mesh is complex because it is made of many NURBS patches, with different shapes and orientations (see Figure 5). The B-spline patches are with polynomial order 8, because that makes it easier to see the performance differences between the different scaling options. The stabilization parameter is as given by Eq. (51) (see “Appendix A.1”), with $$\tau _{\mathrm {SUGN2}}$$ excluded. The method includes the YZ$$\beta$$ DC, and we test both $$\beta$$ = 1 and $$\beta$$ = 2, with $$\phi _\mathrm {REF}$$ = 1. The basis functions are linear in time, and the time-step size is 0.05. We compute with and compare RQD-MAX, RQD-EL, and RQD-$${\mathbf {I}}$$, which has $${\mathbf {D}}={\mathbf {I}}$$.

Figures 6, 7 and 8 show the results for $$\beta =1$$, and Figs. 9, 10 and 11 for $$\beta =2$$. The boundary layer representations are sharper with RQD-MAX, as also observed in the 1D tests. The internal layers lose their sharpness noticeably with RQD-$${\mathbf {I}}$$ and RQD-EL. We see some oscillations across mesh lines with $$\beta = 2$$ and RQD-MAX, but they stay within $$\pm 0.8$$ %. It may be possible to clean that up with a better choice for the Y value in Eq. (60) (see “Appendix A.2”).

### Zalesak’s solid-body rotation over a square domain

We compute the Zalesak’s solid-body rotation problem  with the same computational domain and mesh we used for the advection skew to the mesh. The stabilization parameter is as given by Eq. (49) (see “Appendix A.1”). The method includes the YZ$$\beta$$ DC, and we test both $$\beta$$ = 1 and $$\beta$$ = 2, with $$\phi _\mathrm {REF}$$ = 1. The basis functions are linear in time, and the number of time steps per rotation is 320 (see also  for the problem setup). We compute with and compare RQD-MAX and RQD-$${\mathbf {I}}$$.

Figure 12 shows the initial condition. Figures 13, 14, 15 and 16 show, for the four test combinations, the solution after a full rotation. For both $$\beta$$ = 1 and $$\beta$$ = 2, RQD-MAX performs better. As expected, $$\beta =2$$ is better in this test problem because beyond the initial condition, there is no mechanism to sustain the discontinuity.