1% -------------------------------------------------------------------------
2% EXAMPLE: SHOCKTURBULENCE_VORTICAL_ENTROPIC
3%
4% This example computes the Linear Interaction Analysis (LIA) solution for
5% a shock–turbulence interaction involving upstream vortical–entropic
6% fluctuations only, with no propagating acoustic content.
7%
8% The upstream turbulent field is modeled as a solenoidal vortical mode with
9% correlated entropic (dilatational) density fluctuations. In this formulation,
10% all dilatational content is implicit in the vortical–entropic disturbance and
11% no independent acoustic (traveling-wave) fluctuations are prescribed.
12%
13% The interaction with a normal shock is analyzed under the assumptions of
14% linear perturbations, inviscid flow, and thermochemical equilibrium across
15% a thin relaxation layer.
16%
17% The formulation follows the LIA framework described in:
18%
19% Cuadra, A., Williams, C. T., Di Renzo, M., & Huete, C., The role of
20% compressibility and vibrational-excitation in hypersonic shock–turbulence
21% interactions, Journal of Fluid Mechanics (under review).
22%
23% The coupling between entropic (dilatational) density fluctuations and
24% vortical velocity perturbations is prescribed through the correlation
25% parameter :math:`\chi`, defined according to Eq. (3.9) of the reference
26% paper as
27%
28% .. math::
29%
30% \langle \chi \rangle =
31% \frac{\langle \delta \rho_1^{e} \, \delta u_1^{r} \rangle}
32% {\langle (\delta u_1^{r})^2 \rangle}
33% \frac{\langle c_1 \rangle}{\langle \rho_1 \rangle}
34%
35% where :math:`\delta \rho_1^{e}` denotes entropic density fluctuations and
36% :math:`\delta u_1^{r}` denotes rotational velocity fluctuations ahead of
37% the shock.
38%
39% In this example, :math:`\chi = -0.1`, corresponding to negatively correlated
40% entropic and vortical disturbances. This choice represents a compressible
41% vortical field in which density and velocity fluctuations are anti-correlated,
42% enhancing baroclinic vorticity generation at the shock.
43%
44% @author: Alberto Cuadra Lara
45%
46% Last update: January 12, 2026
47% -------------------------------------------------------------------------
48
49% Import packages
50import combustiontoolbox.databases.NasaDatabase
51import combustiontoolbox.core.*
52import combustiontoolbox.shockturbulence.*
53import combustiontoolbox.utils.display.*
54
55% Definitions
56mach = combustiontoolbox.utils.clusteredMesh1D([1, 1.2], [1.2, 10], 32, 70); mach(1) = [];
57mach = 2;
58% Define caloric gas model
59caloricGasModel = CaloricGasModel.imperfect;
60
61% Get Nasa database
62DB = NasaDatabase();
63
64% Define chemical system
65system = ChemicalSystem(DB, 'air ions');
66
67% Initialize mixture
68mix = Mixture(system);
69
70% Define chemical state
71set(mix, {'N2', 'O2'}, [79/21, 1]);
72
73% Define propertiescle
74mixArray = setProperties(mix, 'temperature', 300, 'pressure', 1 * 1.01325, 'mach', mach, 'chi', -0.1:0.1:0.1);
75
76% Invoke ShockTurbulenceSolver and select problem
77shockTurbulence = ShockTurbulenceSolver('problemType', 'vortical_entropic', 'caloricGasModel', caloricGasModel);
78
79% Solve LIA
80[averages, mixArray1, mixArray2] = shockTurbulence.solve(mixArray);
81
82% Report results
83shockTurbulence.report(averages, mixArray1, mixArray2);