pymead.analysis.read_aero_data.read_field_from_mses#

read_field_from_mses(src_file: str, M_inf: float | None = None, gam: float | None = None)[source]#

Reads a field dump file from MSES (by default, of the form field.*) and outputs the information to an array. The array has shape \(9 \times m \times n\) (or \(12 \times m \times n\) if M_inf and gam are specified), where \(m\) is the number of streamlines and \(n\) is the number of streamwise cells in a given streamline.

The 12 entries in the zeroth axis correspond to the flow variables as follows:

  • 0: \(x\)

  • 1: \(y\)

  • 2: \(\rho/\rho_\infty\) (density)

  • 3: \(p/p_\infty\) (pressure)

  • 4: \(u/V_\infty\) (\(x\)-velocity)

  • 5: \(v/V_\infty\) (\(y\)-velocity)

  • 6: \(|V|/V_\infty\) (velocity magnitude)

  • 7: \(M\) (Mach number)

  • 8: \(C_p\) (pressure coefficient)

  • 9: \(C_{p_t}\) (total pressure coefficient)

  • 10: \(\Delta C_{p_t}\) (change in total pressure coefficient relative to the previous streamwise cell)

  • 11: \(\Delta C_p\) (change in pressure coefficient relative to the previous streamwise cell)

Note that for \(\Delta C_{p_t}\) and \(\Delta C_p\), the value of the first streamwise cells (the cells along the inlet plane) is defined to be 0. Also note that entries 9, 10, and 11 are only available if M_inf and gam are specified.

Parameters:
  • src_file (str) – Source file containing the MSES field output

  • M_inf (float or None) – Freestream Mach number (must be set if entries 9, 10, or 11 are needed). Default: None.

  • gam (float or None) – Specific heat ratio (must be set if entries 9, 10, or 11 are needed). Default: None.

Returns:

Array of MSES field data, reshaped to \(9 \times m \times n\), or \(12 \times m \times n\) if M_inf and gam are specified.

Return type:

np.ndarray