This page defines non-standard notation and conventions used in the theory and implementation of Hexed. If the meaning of a number or variable is unclear or ambiguous, look here for guidance. Also, please try to maintain these conventions when contributing to the code.
hexed::constants
, which are based on formal exact definitions (as opposed to approximations to some number of digits). In practice, of course, this isn't that important, but some obsessive part of my brain wants to know that all unit conversions are perfectly consistent up to machine precision.The flow state vector (often simply referred to as state
) consists of the conserved variables. It has components [momentum, mass, total energy] (a.k.a. [ \( \rho \vec{v} \), \( \rho \), \( \rho e + \frac12 \rho v^2 \)]). E.g., in 3D that is [momentum0
( \(x\)-direction), momentum1
( \(y\)-direction), momentum2
( \(z\)-direction), mass, total energy].
This order is different from most codes, which use the order (mass, momentum, energy). The order for Hexed was chosen because it groups the vector and scalar quantities together and because the \(i\)th component of the state vector is equal to the \(i\)th component of momentum. The latter makes the code for certain formulae cleaner.
Hexed uses some terms that are non-standard, or at least not completely universal. They are defined as follows:
Some common abbreviations are defined as follows, in alphabetical order.
con
: connectiondef
: deformeddim
: dimensioni_dim
specifically serves to identify which of the coordinate axes is referenced in some operation.elem
: mesh elementener
: energyenth
: enthalpyheat_rat
: ratio of heat capacities. Often denoted \( \gamma \) ("gamma") in thermodynamics.i_
: index of ...j_
and k_
.n_
: number of ...pos
: positionpres
: pressureqpoint
: "quadrature point"_sq
: ... squaredstag
: stagnationveloc
: velocityvert
: vertexAlthough C++ arrays and Eigen matrices can be useful for storing multidimensional array data, it is often necessary to access data via a pointer and a flat index. In that case, observe the following conventions.
some_data
points to a block of doubles of size n_some_thing*n_other_thing
, and that access to this array should look like some_data[i_some_thing*n_other_thing + i_other_thing]
.Data that is associated with locations in physical space, including vertices and quadrature points, is stored as an array where each array index corresponds to one physical coordinate. That is, the first index corresponds to the \(x\)-coordinate, the second to the \(y\)-coordinate, etc. Thus, when specifying memory layout, [i_qpoint]
means the following, depending on the dimensionality:
[i_row]
[i_row][j_row]
[i_row][j_row][k_row]
where 0 <= i_row < row_size
. For example, for a 3D Cartesian element, if you are looking at the position of the i_qpoint
th quadrature point, then i_qpoint += 1
will change only the \(z\)-coordinate, i_qpoint += row_size
will change only \(y\), and i_qpoint += row_size*row_size
will change only \(x\).