Skip to content

Modeling

Cory edited this page Nov 6, 2023 · 22 revisions

This page discusses some aspects of flow modeling using MachLine.

Superinclined Panels (Applicable to Supersonic Simulations Only)

Superinclined panels are panels that are inclined to the freestream vector at an angle greater than the Mach angle. The fundamental nature of the panel method problem changes on superinclined panels, and superinclined panels cannot currently be modeled by MachLine. This has a few practical implications:

  • The nose on a realistic configuration is typically rounded or blunted, leading to superinclined panels right at the tip. These must be removed by "sharpening" the nose before running the mesh through MachLine.
  • Features such as jet and rocket nozzles should be left open (yes, the mesh will no longer be watertight) rather than modeling some kind of inner geometry or just closing the outlet with a flat plane of panels. This will not cause issues as long as the streamwise location where the outlet ends (i.e. where the mesh panels abut empty space) is aft of the rest of the configuration.

Wakes

Wakes are sheets of vorticity shed aft of lifting surfaces. In potential flow, wakes are sheets of varying doublet strength (vorticity) representing the inviscid limit of the true viscous wake shed by the lifting surface. This shed vorticity is responsible for downwash on the lifting surface, which reduces lift and produces induced drag.

A doublet panel induces a jump in velocity potential between its two faces. This means that the velocity potential is discontinuous across the wake sheet. As such, the velocity potential on the outer surface of the body is discontinuous where the wake is shed from the body, typically sharp trailing edges. As the inner potential is continuous at such intersections, it is necessary for there to be a discontinuity in doublet strength at these intersections. At edges which shed wake panels, the strength of these wake panels is determined by the difference in doublet strength between the two panels forming that edge. This ensures that a line vortex is not formed at wake-shedding edges, even though the doublet strength on the body is discontinuous.

Within MachLine, wakes are generated automatically, but the user has some freedom in specifying how this should be done. For example, if the user desires to perform a nonlifting analysis, then they may specify that there be no edges on the body at which the doublet strength is discontinuous and no wake panels shed. The user may also specify the maximum flow-turning angle which is allowed on the surface before a wake is shed.

In supersonic flows, influences do not propagate upstream. Thus, in many cases, it is unnecessary to explicitly model the wake (for example, on a single straight wing with supersonic trailing edges). In this case, however, the doublet strength still must be discontinuous along edges from which the wake is shed, even though the wake itself is not present. This may be affected by specifying in the input file that a wake is present but it is not to be appended.

How exactly MachLine models the wake is set in the input file, described here.

Boundary Condition Formulations

There are many formulations for enforcing the zero-normal-mass-flux boundary condition in panel methods. Two have been implemented in MachLine: the Morino and source-free formulations. The formulation is specified in the input file, described here.

Morino Formulation

With the Morino formulation, the inner perturbation potential is chosen to be zero. From this, the source strengths are calculated explicitly as a function of the freestream velocity to satisfy the zero mass-flux boundary condition. A set of control points is then placed within the body and the doublet strengths are solved for such that the perturbation potential at each of these control points is zero.

Source-Free Formulation

With the source-free formulation, the inner total potential is chosen to be zero. The choice means that the source strengths are all zero, meaning source contributions never have to be calculated. As with the Morino formulation, a set of control points is placed within the body and the doublet strengths are solved for such that the total potential inside the configuration will result in zero mass flux on the boundary.

Neumann Mass-Flux

The Neumann mass-flux formulation enforces zero normal mass flux on the surface of the configuration using only doublets. Note that the mass flux is linearized. The control points for this formulation are placed at each panel centroid. Since this is a doublet-only formulation, the control points may be placed exactly on the panel centroids, as the mass flux is continuous through a panel.

For a typical unstructured mesh using triangular panels, there are approximately twice as many panels as there are vertices. Since the doublet strengths are defined at the panel vertices, the resulting system of equations is over-determined, and a least-squares solution is required. Because of this, the residuals for the solved system of equations are often much larger than with the Dirichlet formulations (on the order of 1e-3).

Neumann Velocity

The Neumann velocity formulation enforces zero normal velocity on the surface of the configuration using only doublets. Since the velocity is not continuous through a panel, the control points must be placed slightly above the panel centroids. This offset is set using the "control_point_offset" option in the input. Again, a least-squares solution is required for the over-determined system. This formulation is still in testing and does not typically produce as good of results as the Neumann mass-flux formulation. However, for incompressible flows, the two should produce almost identical results.

Matrix Solvers

Application of the Morino or source-free formulation results in the formation of a linear system of equations, the solution of which entirely specifies the flow about the configuration. This linear system may be solved using a variety of matrix solvers. Those implemented in MachLine are described here. Broadly, we may subdivide them into direct and iterative solvers.

Direct Solvers

MachLine has three direct solvers built in: QR upper-pentagonal solver ("QRUP" in the input), LU decomposition ("LU" in the input), and Purcell's method ("PURC" in the input). Both LU decomposition and Purcell's method use partial pivoting for numerical stability. Direct solvers provide an "exact" solution to the linear system of equations. However, they do so at the expense of computation time. Both LU decomposition and Purcell's method have O(N^3) complexity, making them particularly time-consuming for meshes with large numbers of panels.

Alternatively, the QR upper-pentagonal solver uses Givens rotations to quickly solve the upper-pentagonal system which appears in supersonic flow. While having somewhat less numerical stability than other solvers, it is often the fastest solver for supersonic cases. It's computational complexity approaches O(N^2), depending on the configuration and the freestream Mach number.

Iterative Solvers

MachLine has three iterative solvers built in: block-Jacobi ("BJAC" in the input), block-symmetric-successive-overrelaxation ("BSOR" in the input), and the generalized minimum residual (GMRES) method ("GMRES" in the input). The first two are standard block-iterative methods which provide an approximate solution to the linear system of equations.

The GMRES algorithm is a popular Krylov-subspace method which may be used to solve general matrix systems. It is extremely fast and provides good numerical stability. This is the default solver in MachLine.

Pressure Rules

MachLine is capable of calculating surface pressures using various formulas. This is because of the many different ways in which Bernoulli's equation may be written and approximated. The available rules are as follow:

Rule VTK Tag Description
Incompressible C_p_inc This is the classic, exact pressure coefficient formula based on the assumption that the freestream Mach number is zero. It may not be selected if the freestream Mach number is set to greater than zero.
Isentropic C_p_ise This is another exact formula, except it allows for a non-zero Mach number. It may not be selected if the freestream Mach number is set to zero.
Second-Order C_p_2nd This pressure rule is based on the quadratic approximation to Bernoulli's equation. It may be selected for all freestream Mach numbers.
Slender-Body C_p_sln This is the same as the second-order rule, except that the square of the x perturbation velocity is assumed to be negligible. It may be selected for all freestream Mach numbers.
Linear C_p_lin This rule drops all nonlinear terms from the second-order rule. It may be selected for all freestream Mach numbers.

Several subsonic pressure corrections are also implemented in MachLine. The current options available are the Prandtl-Glauert, Karman-Tsien, and Laitone corrections. These corrections all solve the flow as being incompressible (freestream Mach number is zero) and then alter the results afterwards by applying correction factors. These correction factors implement a coordinate transformation using a 'correction Mach number' and the incompressible pressure coefficient solutions. You can select any and all of these pressure corrections and MachLine will output the results from each selected pressure correction to the identified location. Note that we do not consider these pressure corrections to be as accurate as modeling the subsonic flow directly and calculating the pressure coefficient using one of the rules described above.

In the VTK file created by MachLine, these pressures are labeled as C_p_pg (Prandtl-Glauert correction), C_p_kt (Karman-Tsien correction), and C_p_lai (Laitone correction).