Skip to content

Commit bf0ea08

Browse files
Merge pull request #1111 from CombustionToolbox/develop
Add: include `SHOCKTURBULENCE_*` problems in the Combustion Toolbox `App`
2 parents e920a7f + 5558808 commit bf0ea08

10 files changed

Lines changed: 780 additions & 54 deletions

File tree

+combustiontoolbox/+common/@Constants/Constants.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
E0 = 8.854187818e-12 % Vacuum permittivity [F/m]
2828
ME = 9.10938356e-31 % Electron mass [kg]
2929
release = 'v1.2.9' % Release version
30-
date = '14 Jan 2026' % Release date
30+
date = '15 Jan 2026' % Release date
3131
end
3232

3333
end

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ message: "If you use this software, please cite it using these metadata."
55
type: misc
66
license: "GPL-3.0"
77
title: "Combustion Toolbox: A MATLAB-GUI based open-source tool for solving gaseous combustion problems"
8-
version: 1.2.8
8+
version: 1.2.9
99
doi: 10.5281/zenodo.5554911
10-
date-released: 2026-01-08
10+
date-released: 2026-01-15
1111
url: "https://combustion-toolbox-website.readthedocs.io"
1212
repository-code: "https://github.com/CombustionToolbox/combustion_toolbox"
1313
abstract:

CONTENTS.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
%
5252
% Cuadra, A., Huete, C., & Vera, M. (2026). Combustion Toolbox: A
5353
% MATLAB-GUI based open-source tool for solving gaseous combustion
54-
% problems. (v1.2.8). Zenodo. https://doi.org/10.5281/zenodo.5554911.
54+
% problems. (v1.2.9). Zenodo. https://doi.org/10.5281/zenodo.5554911.
5555
%
5656
% @author: Alberto Cuadra Lara
5757
%
58-
% Last update Jan 14 2026
58+
% Last update Jan 15 2026
5959
% -------------------------------------------------------------------------
6060
help CONTENTS.m
6161

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The framework also includes an intuitive **graphical user interface (GUI)**, wit
3737
If you use the Combustion Toolbox in a publication, please cite it using the following references:
3838

3939
* *Cuadra, A., Huete, C., & Vera, M. (2026). Combustion Toolbox: An open-source thermochemical code for gas-and condensed-phase problems involving chemical equilibrium. Computer Physics Communications 320, 110004. [doi:10.1016/j.cpc.2025.110004.](https://doi.org/10.1016/j.cpc.2025.110004).*
40-
* *Cuadra, A., Huete, C., & Vera, M. (2026). Combustion Toolbox: A MATLAB-GUI based open-source tool for solving gaseous combustion problems. Version 1.2.8. Zenodo. [doi:10.5281/zenodo.5554911](https://doi.org/10.5281/zenodo.5554911).*
40+
* *Cuadra, A., Huete, C., & Vera, M. (2026). Combustion Toolbox: A MATLAB-GUI based open-source tool for solving gaseous combustion problems. Version 1.2.9. Zenodo. [doi:10.5281/zenodo.5554911](https://doi.org/10.5281/zenodo.5554911).*
4141

4242
It can be handy the BibTeX format:
4343

@@ -57,7 +57,7 @@ It can be handy the BibTeX format:
5757
title = "{{Combustion Toolbox: A MATLAB-GUI based open-source tool for solving gaseous combustion problems}}",
5858
author = {A. Cuadra and C. Huete and M. Vera},
5959
year = {2026},
60-
note = {Version 1.2.8},
60+
note = {Version 1.2.9},
6161
doi = {https://doi.org/10.5281/zenodo.5554911}
6262
}
6363
```

gui/combustion_toolbox.m

Lines changed: 460 additions & 24 deletions
Large diffs are not rendered by default.

gui/combustion_toolbox_app.mlapp

-34 KB
Binary file not shown.

gui/utils/gui_CalculateButtonPushed.m

Lines changed: 85 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,33 @@
4646
propertyR4 = gui_get_prop(app.PR4.Value);
4747
additionalInputsR = [additionalInputsR, 'mach', propertyR4];
4848
case {'SHOCK_OBLIQUE', 'SHOCK_POLAR_R'}
49-
propertyR4 = gui_get_prop(app.PR4.Value);
50-
propertyR5 = gui_get_prop(app.PR5.Value);
51-
propertyP5 = gui_get_prop(app.PP5.Value);
52-
53-
if ~isempty(propertyR5)
54-
FLAG_BETA = true;
55-
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'beta', propertyR5];
56-
else
57-
FLAG_THETA = true;
58-
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'theta', propertyP5];
59-
end
49+
propertyR4 = gui_get_prop(app.PR4.Value);
50+
propertyR5 = gui_get_prop(app.PR5.Value);
51+
propertyP5 = gui_get_prop(app.PP5.Value);
52+
53+
if ~isempty(propertyR5)
54+
FLAG_BETA = true;
55+
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'beta', propertyR5];
56+
else
57+
FLAG_THETA = true;
58+
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'theta', propertyP5];
59+
end
6060

6161
case {'DET_OVERDRIVEN', 'DET_UNDERDRIVEN', 'DET_OVERDRIVEN_R', 'DET_UNDERDRIVEN_R', 'DET_POLAR'}
6262
propertyR3 = gui_get_prop(app.PR3.Value);
6363
additionalInputsR = [additionalInputsR, 'driveFactor', propertyR3];
6464
case {'DET_OBLIQUE', 'DET_POLAR_R'}
65-
propertyR3 = gui_get_prop(app.PR3.Value);
66-
propertyR4 = gui_get_prop(app.PR4.Value);
67-
propertyP4 = gui_get_prop(app.PP4.Value);
68-
69-
if ~isempty(propertyR4)
70-
FLAG_BETA = true;
71-
additionalInputsR = [additionalInputsR, 'driveFactor', propertyR3, 'beta', propertyR4];
72-
else
73-
FLAG_THETA = true;
74-
additionalInputsR = [additionalInputsR, 'driveFactor', propertyR3, 'theta', propertyP4];
75-
end
65+
propertyR3 = gui_get_prop(app.PR3.Value);
66+
propertyR4 = gui_get_prop(app.PR4.Value);
67+
propertyP4 = gui_get_prop(app.PP4.Value);
68+
69+
if ~isempty(propertyR4)
70+
FLAG_BETA = true;
71+
additionalInputsR = [additionalInputsR, 'driveFactor', propertyR3, 'beta', propertyR4];
72+
else
73+
FLAG_THETA = true;
74+
additionalInputsR = [additionalInputsR, 'driveFactor', propertyR3, 'theta', propertyP4];
75+
end
7676
case {'ROCKET'}
7777
propertyP1 = gui_get_prop(app.PP1.Value);
7878
propertyR3 = gui_get_prop(app.PR3.Value);
@@ -96,6 +96,21 @@
9696
FLAG_ARATIO = true;
9797
end
9898

99+
case {'SHOCKTURBULENCE_VORTICAL', 'SHOCKTURBULENCE_ACOUSTIC'}
100+
propertyP1 = 0; propertyP2 = 0;
101+
propertyR4 = gui_get_prop(app.PR4.Value);
102+
additionalInputsR = [additionalInputsR, 'mach', propertyR4];
103+
case {'SHOCKTURBULENCE_VORTICAL_ENTROPIC'}
104+
propertyP1 = 0;
105+
propertyP2 = gui_get_prop(app.PP1.Value);
106+
propertyR4 = gui_get_prop(app.PR4.Value);
107+
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'chi', propertyP2];
108+
case {'SHOCKTURBULENCE_COMPRESSIBLE'}
109+
propertyP1 = gui_get_prop(app.PP1.Value);
110+
propertyP2 = gui_get_prop(app.PP2.Value);
111+
propertyP6 = gui_get_prop(app.PP6.Value);
112+
propertyR4 = gui_get_prop(app.PR4.Value);
113+
additionalInputsR = [additionalInputsR, 'mach', propertyR4, 'eta', propertyP1, 'chi', propertyP2, 'etaVorticity', propertyP6];
99114
otherwise
100115
propertyP1 = propertyR1;
101116
propertyP2 = propertyR2;
@@ -175,6 +190,8 @@
175190
problemType = strrep(problemType, '_BETA', '');
176191
% Select solver
177192
solver = set(app.shockSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
193+
% Turn off FLAG_RESULTS of subsolvers
194+
solver.equilibriumSolver.FLAG_RESULTS = false;
178195
% Solve problem
179196
[mixArray1, mixArray2] = solver.solveArray(mixArray1);
180197
% Set output
@@ -187,6 +204,8 @@
187204
problemType = strrep(problemType, '_THETA', '');
188205
% Select solver
189206
solver = set(app.shockSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
207+
% Turn off FLAG_RESULTS of subsolvers
208+
solver.equilibriumSolver.FLAG_RESULTS = false;
190209
% Solve problem
191210
[mixArray1, mixArray2, mixArray3] = solver.solveArray(mixArray1);
192211
% Set output
@@ -200,6 +219,8 @@
200219
problemType = strrep(problemType, '_THETA', '');
201220
% Select solver
202221
solver = set(app.shockSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
222+
% Turn off FLAG_RESULTS of subsolvers
223+
solver.equilibriumSolver.FLAG_RESULTS = false;
203224
% Solve problem
204225
[mixArray1, mixArray2, mixArray3, mix4Array] = solver.solveArray(mixArray1);
205226
% Set output
@@ -212,6 +233,8 @@
212233
problemType = strrep(problemType, '_BETA', '');
213234
% Select solver
214235
solver = set(app.shockSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
236+
% Turn off FLAG_RESULTS of subsolvers
237+
solver.equilibriumSolver.FLAG_RESULTS = false;
215238
% Solve problem
216239
[mixArray1, mixArray2, mixArray3, mix4Array, mix5Array] = solver.solveArray(mixArray1);
217240
% Set output
@@ -224,6 +247,8 @@
224247
problemType = strrep(problemType, '_THETA', '');
225248
% Select solver
226249
solver = set(app.shockSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
250+
% Turn off FLAG_RESULTS of subsolvers
251+
solver.equilibriumSolver.FLAG_RESULTS = false;
227252
% Solve problem
228253
[mixArray1, mixArray2, mixArray3, mix4Array, mix5Array, mix6Array] = solver.solveArray(mixArray1);
229254
% Set output
@@ -234,6 +259,8 @@
234259
case {'DET', 'DET_OVERDRIVEN', 'DET_UNDERDRIVEN', 'DET_POLAR'}
235260
% Select solver
236261
solver = set(app.detonationSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
262+
% Turn off FLAG_RESULTS of subsolvers
263+
solver.equilibriumSolver.FLAG_RESULTS = false;
237264
% Solve problem
238265
[mixArray1, mixArray2] = solver.solveArray(mixArray1);
239266
% Set output
@@ -247,6 +274,8 @@
247274
problemType = strrep(problemType, '_THETA', '');
248275
% Select solver
249276
solver = set(app.detonationSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
277+
% Turn off FLAG_RESULTS of subsolvers
278+
solver.equilibriumSolver.FLAG_RESULTS = false;
250279
% Solve problem
251280
[mixArray1, mixArray2, mixArray3] = solver.solveArray(mixArray1);
252281
% Set output
@@ -257,6 +286,8 @@
257286
case {'DET_POLAR_LIMITRR'}
258287
% Select solver
259288
solver = set(app.detonationSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
289+
% Turn off FLAG_RESULTS of subsolvers
290+
solver.equilibriumSolver.FLAG_RESULTS = false;
260291
% Solve problem
261292
[mixArray1, mixArray2, mixArray3, mixArray4] = solver.solveArray(mixArray1);
262293
% Set output
@@ -269,6 +300,8 @@
269300
problemType = strrep(problemType, '_BETA', '');
270301
% Select solver
271302
solver = set(app.detonationSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
303+
% Turn off FLAG_RESULTS of subsolvers
304+
solver.equilibriumSolver.FLAG_RESULTS = false;
272305
% Solve problem
273306
[mixArray1, mixArray2, mixArray3, mixArray4, mixArray5] = solver.solveArray(mixArray1);
274307
% Set output
@@ -277,7 +310,10 @@
277310
solver.plotConfig.plotProperties = {'T', 'rho', 'h', 'e', 'g', 'cp', 's', 'gamma_s', 'sound', 'uShock'};
278311
solver.plotConfig.plotPropertiesBasis = {[], [], 'mi', 'mi', 'mi', 'mi', 'mi', [], [], []};
279312
case {'DET_POLAR_R_THETA'}
313+
% Select solver
280314
solver = set(app.detonationSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
315+
% Turn off FLAG_RESULTS of subsolvers
316+
solver.equilibriumSolver.FLAG_RESULTS = false;
281317
% Solve problem
282318
[mixArray1, mixArray2, mixArray3, mixArray4, mixArray5, mixArray6] = solver.solveArray(mixArray1);
283319
% Set output
@@ -288,6 +324,8 @@
288324
case {'ROCKET_IAC'}
289325
% Select solver
290326
solver = set(app.rocketSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
327+
% Turn off FLAG_RESULTS of subsolvers
328+
solver.equilibriumSolver.FLAG_RESULTS = false;
291329
% Solve problem
292330
[mixArray1, mixArray2, mixArray3] = solver.solveArray(mixArray1);
293331
% Set output
@@ -301,6 +339,8 @@
301339
problemType = strrep(problemType, '_ARATIO', '');
302340
% Select solver
303341
solver = set(app.rocketSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
342+
% Turn off FLAG_RESULTS of subsolvers
343+
solver.equilibriumSolver.FLAG_RESULTS = false;
304344
% Solve problem
305345
[mixArray1, mixArray2, mixArray3, mixArray4] = solver.solveArray(mixArray1);
306346
% Set output
@@ -316,6 +356,8 @@
316356
case {'ROCKET_FAC'}
317357
% Select solver
318358
solver = set(app.rocketSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
359+
% Turn off FLAG_RESULTS of subsolvers
360+
solver.equilibriumSolver.FLAG_RESULTS = false;
319361
% Solve problem
320362
[mixArray1, mixArray2, mixArray3, mixArray4] = solver.solveArray(mixArray1);
321363
% Set output
@@ -329,6 +371,8 @@
329371
problemType = strrep(problemType, '_ARATIO', '');
330372
% Select solver
331373
solver = set(app.rocketSolver, 'problemType', problemType, 'FLAG_RESULTS', FLAG_RESULTS);
374+
% Turn off FLAG_RESULTS of subsolvers
375+
solver.equilibriumSolver.FLAG_RESULTS = false;
332376
% Solve problem
333377
[mixArray1, mixArray2, mixArray3, mixArray4, mixArray5] = solver.solveArray(mixArray1);
334378
% Set output
@@ -341,6 +385,22 @@
341385
% Set plot properties
342386
solver.plotConfig.plotProperties = {'T', 'rho', 'h', 'e', 'g', 'cp', 's', 'gamma_s', 'sound', 'u', 'I_sp', 'I_vac'};
343387
solver.plotConfig.plotPropertiesBasis = {[], [], 'mi', 'mi', 'mi', 'mi', 'mi', [], [], [], [], []};
388+
case {'SHOCKTURBULENCE_VORTICAL', 'SHOCKTURBULENCE_VORTICAL_ENTROPIC', 'SHOCKTURBULENCE_ACOUSTIC', 'SHOCKTURBULENCE_COMPRESSIBLE'}
389+
% Select solver
390+
solver = set(app.shockTurbulenceSolver, 'problemType', strrep(problemType, 'SHOCKTURBULENCE_', ''), 'FLAG_RESULTS', FLAG_RESULTS);
391+
% Turn off FLAG_RESULTS of subsolvers
392+
solver.equilibriumSolver.FLAG_RESULTS = false;
393+
solver.shockSolver.FLAG_RESULTS = false;
394+
solver.jumpConditionsSolver.FLAG_RESULTS = false;
395+
% Solve problem
396+
[resultsLIA, mixArray1, mixArray2] = solver.solve(mixArray1);
397+
398+
% Set output
399+
varargout = {resultsLIA, mixArray1, mixArray2};
400+
401+
% Set plot properties
402+
solver.plotConfig.plotProperties = {'K', 'R11', 'RTT', 'Ka', 'Kr', 'enstrophy', 'kolmogorovLengthRatio'};
403+
solver.plotConfig.plotPropertiesBasis = {[], [], [], [], [], [], []};
344404
otherwise
345405
error('Problem type %s is not found', problemType);
346406
end
@@ -351,6 +411,9 @@
351411
% Save results
352412
if contains(problemType, 'ROCKET')
353413
[results, app.temp_results] = save_results(app, problemType, varargout{:});
414+
elseif contains(problemType, 'SHOCKTURBULENCE')
415+
results = save_results(app, problemType, mixArray1, mixArray2);
416+
app.temp_results = results;
354417
else
355418
[results, app.temp_results] = save_results(app, problemType, mixArray1, varargout{end});
356419
end

0 commit comments

Comments
 (0)