Shock-Turbulence Interaction with vortical disturbances#

 1% -------------------------------------------------------------------------
 2% EXAMPLE: SHOCKTURBULENCE_VORTICAL
 3%
 4% This example computes the Linear Interaction Analysis (LIA) solution for
 5% a shock–turbulence interaction involving upstream vortical fluctuations
 6% only, with no entropic or acoustic disturbances present in the incoming
 7% flow.
 8%
 9% The upstream turbulent field is modeled as a purely solenoidal vortical
10% mode, characterized by velocity fluctuations with zero dilatation and
11% no associated density or pressure perturbations. As a result, the
12% incoming flow is incompressible in the LIA sense.
13%
14% The interaction with a normal shock is analyzed under the assumptions of
15% linear perturbations, inviscid flow, and thermochemical equilibrium across
16% a thin relaxation layer.
17%
18% The formulation follows the LIA framework described in:
19%
20%   Cuadra, A., Williams, C. T., Di Renzo, M., & Huete, C., The role of
21%   compressibility and vibrational-excitation in hypersonic shock–turbulence
22%   interactions, Journal of Fluid Mechanics (under review).
23%
24% In this vortical configuration, the upstream turbulent kinetic energy is
25% entirely solenoidal, such that
26%
27% .. math::
28%
29%    \mathrm{TKE}_1 = \mathrm{TKE}_{1,r}
30%
31% and no dilatational contribution is present. Consequently, the
32% dilatational-to-solenoidal TKE ratio satisfies
33%
34% .. math::
35%
36%    \eta = 0
37%
38% and the entropic–vortical correlation parameter :math:`\chi` is not
39% defined.
40%
41% @author: Alberto Cuadra Lara
42%
43% Last update: December 16, 2025
44% -------------------------------------------------------------------------
45
46% Import packages
47import combustiontoolbox.databases.NasaDatabase
48import combustiontoolbox.core.*
49import combustiontoolbox.shockdetonation.*
50import combustiontoolbox.shockturbulence.*
51import combustiontoolbox.utils.display.*
52
53% Definitions
54mach = combustiontoolbox.utils.clusteredMesh1D([1, 1.2], [1.2, 10], 32, 70); mach(1) = [];
55
56% Define caloric gas model
57caloricGasModel = CaloricGasModel.imperfect;
58
59% Get Nasa database
60DB = NasaDatabase();
61
62% Define chemical system
63system = ChemicalSystem(DB, 'air ions');
64
65% Initialize mixture
66mix = Mixture(system);
67
68% Define chemical state
69set(mix, {'N2', 'O2'}, [79/21, 1]);
70
71% Define propertiescle
72mixArray1 = setProperties(mix, 'temperature', 300, 'pressure', 1 * 1.01325, 'mach', mach);
73
74% Invoke ShockTurbulenceSolver and select problem
75shockTurbulence = ShockTurbulenceSolver('problemType', 'vortical', 'caloricGasModel', caloricGasModel);
76
77% Solve LIA
78[averages, mixArray1, mixArray2] = shockTurbulence.solve(mixArray1);
79
80% Report results
81shockTurbulence.report(averages, mixArray1, mixArray2);