Gyre/Mathematics & Numerical Methods
Outputs and functionals
In one minuteThe definition, sign convention, normalisation and units of every output name a result can contain — force and moment coefficients, heat, the volume diagnostics, the surface load field and the surface distributions.
Every quantity below is non-dimensional. The reference values are the free stream: , so the free-stream pressure is and the free-stream dynamic pressure is . Lengths are in the unit of the mesh coordinates. The free-stream direction is in the – plane.
| Name | Kind | Exists for | Definition in one line |
|---|---|---|---|
cx, cy |
scalar | every case with a wall | force on the body along the mesh axes , , divided by |
cd, cl |
scalar | every case with a wall | the same force along and normal to the free stream |
cm |
scalar | every case with a wall | moment about reference.moment_center, nose-up positive, divided by |
cz, cs |
scalar | 3-D cases with a wall | force along the mesh axis ; side force in the wind axes |
cmx, cmy, cmz |
scalar | 3-D cases with a wall | rolling, yawing and pitching moment about reference.moment_center; cmz is the same output as cm |
heat |
scalar | viscous cases | heat flow rate from the walls into the fluid (not normalised) |
entropy_error |
scalar | every case | root-mean-square relative deviation of from its free-stream value |
kinetic_energy |
scalar | every case | volume average of |
total_entropy |
scalar | every case | volume integral of the mathematical entropy |
f_surface |
field (n_surface_nodes, dim) |
every case with a wall | consistent nodal loads on the wall geometry nodes |
Scalars can be differentiated with totals; the field f_surface through adjoint_product
and tangent_product (gradients).
Forces and moments#
Let be all boundary groups with a wall condition (slip_wall, symmetry,
slip_wall_mirror, noslip_adiabatic, noslip_isothermal) and the unit normal
pointing out of the fluid, into the body. The force the fluid exerts on the body is the
momentum flux leaving the fluid through the wall,
evaluated with the numerical boundary flux of the residual (see below). With
= reference.area and = reference.length:
cx, cy are in the body (mesh) axes; cd, cl are in the wind axes given by the
input alpha. Drag is positive downstream, lift positive towards at . The
factor 2 is .
The moment is taken about = reference.moment_center:
The integral is the moment about the axis, counter-clockwise positive; the minus sign makes
cm positive nose-up for a body whose nose points towards (flow from left to right).
Because alpha enters cd and cl explicitly, their derivatives with respect to alpha
contain the rotation of the axes as well as the change of the flow:
and
. The totals include both parts.
In 3-D, points downstream, up and along the span (). The free
stream has an angle of attack and a sideslip angle (input beta, radians;
flow.beta_deg in a case), and the wind axes are the right-handed triad
The force coefficients are the components of along them, and along the mesh axes:
| Name | Component |
|---|---|
cd, cl, cs |
along (drag), (lift), (side force) |
cx, cy, cz |
along the mesh axes , , |
so cs equals cz at zero sideslip and the two-dimensional definitions are recovered for
. The moment about is the vector
, and the
coefficients follow the aerodynamic sign convention, which in these axes is minus the
right-hand-rule moment for all three:
cmz and cm are the same output. For a spanwise-extruded mesh the default reference area
is the span, so the coefficients are per unit span; for a sphere_shell mesh it is the
frontal area of the body. As with alpha, the totals with respect to beta contain the
rotation of the wind axes. The 3-D outputs and their derivatives are verified in
Three-dimensional flows.
| Field of the case | Default | Enters |
|---|---|---|
reference.area |
1 in 2-D; the span for a spanwise-extruded generator mesh; the frontal area of the body for a sphere_shell mesh |
all force and moment coefficients |
reference.length |
1 | the moment coefficients only |
reference.moment_center |
[0.25, 0, 0] |
the moment coefficients only |
reference.groups |
every wall group | which walls the force, moment and heat-flux integrals cover |
reference.components |
none | named sets of wall groups whose integrals are additional outputs, cd_wing, cmz_tail, … |
In 2-D the “area” is a length (the chord): the coefficients are per unit depth. The built-in
aerofoil generators produce a unit chord, so the defaults are the usual aerofoil convention
with the moment about the quarter-chord point. A mesh from a file has whatever size it was
drawn at: set all three (mesh files). By default the coefficients cover
all wall groups of the case. reference.groups restricts them to the named walls, which
gives the loads of one component of a configuration (and, case by case, of each of them);
the integrals of the selected groups add up to the integral over all walls, and their
adjoint derivatives and error estimates are those of the restricted integral. The nodal
load field and the surface displacement are the coupling interface and are not affected.
reference.components gives the breakdown from one solve: for every named component
the same integrals are taken over its groups and returned as <coefficient>_<component>,
normalised with the same reference area, length and moment point, so the outputs of
components that partition the walls add up to the plain coefficients. Each is a functional
of its own, built from the same numerical boundary fluxes, with its own adjoint: a drag
constraint on one component, or a bending-moment proxy of another, costs one transposed
solve like any other output.
The force is not computed from interpolated pressure. It is the sum over wall face nodes of
the momentum components of the numerical boundary flux that the residual itself uses, times
the face quadrature weight and surface Jacobian (functionals.SurfaceOps.face_forces). For a
slip wall that flux is the wall pressure flux; for a no-slip wall it also contains the BR2
viscous traction. Two consequences: the forces are exactly the momentum the discrete scheme
loses through the wall (discrete conservation holds for them), and the functional is adjoint
consistent, which is what makes its error converge faster than the solution’s and the
error estimate sharp.
Heat#
heat exists when the case has a Reynolds number. It is minus the energy flux that leaves the
fluid through the wall faces,
again from the numerical boundary flux. On a no-slip wall the velocity is zero, so the energy flux is the conductive heat flux alone and is the heat flow rate from the wall into the fluid (positive when the wall heats the fluid; zero up to discretization error on an adiabatic wall). It is not divided by a reference quantity: its unit is , per unit depth in 2-D. If the case also has slip walls they are part of , where the flux contributes , which the slip condition makes vanish.
Volume diagnostics#
With and integrals evaluated by the Gauss–Lobatto quadrature of the scheme:
entropy_erroris zero for an exact solution of a smooth inviscid flow from a uniform free stream (the entropy function is then constant), so for such cases it measures the spurious entropy the discretization produces and falls under refinement. With shocks, viscosity or heat transfer it contains physical entropy changes and is not an error.kinetic_energyequals in the undisturbed free stream.total_entropyuses the mathematical entropy , which has the opposite sign of the physical one and is not normalised by the volume. Its value is dominated by the size of the domain: for the free stream at Mach 0.5, per unit area, and the O-mesh of thenaca0012_eulerpreset reaches 50 chords, so the first run printstotal_entropy. It is a diagnostic for unsteady entropy studies, of little use as a design output.
Surface fields#
f_surface has one row per wall geometry node, in the order of surface_coordinates() and of
the input x_surface. Row is with the
geometry shape function of the node: the traction integrated against the basis in which a
displacement of the surface is interpolated. The loads are therefore
- conservative: they sum to the total force,
f_surface.sum(axis=0), i.e.2 * f_surface.sum(0) / reference.areaequals(cx, cy)(of all walls: the load field is not restricted byreference.groups); - work-consistent with
x_surface: the virtual work of a displacement field is the dot product of the two arrays.
They are forces on the structure (per unit depth in 2-D), not coefficients: no factor 2 and no reference area.
result.json, the session command distributions and SurfaceOps.distributions give, at the
wall face nodes, the coordinates x and
where is the traction of the numerical boundary flux (momentum flux per unit
area), its component along the normal that points into the
body, and the tangent obtained by rotating that normal by
. On a slip wall is the wall pressure, so cp is the usual pressure coefficient
; on a no-slip wall it also contains the normal
viscous stress. cf is signed by the direction of , exists in 2-D only, and is
zero up to discretization error on a slip wall.
Units of derivatives#
| Input | Unit of the input | Note |
|---|---|---|
alpha |
radian | the only angle the in-process discipline knows |
alpha_deg |
degree | accepted by the CLI, jobs, sessions, sweeps; the derivative is per degree, i.e. the alpha derivative times |
mach, re, gamma, pr |
dimensionless | |
x_surface |
mesh length unit | displacement of each wall geometry node; the derivative has the shape of the input |
A derivative is returned under the name it was requested with, so alpha and alpha_deg
cannot be confused in a result — but they differ by a factor of about 57.3.