-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathOSCILOS_long.m
More file actions
819 lines (767 loc) · 34.4 KB
/
OSCILOS_long.m
File metadata and controls
819 lines (767 loc) · 34.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
function varargout = OSCILOS_long(varargin)
% -------------------------------------------------------------------------
%
% Copyright (c) <2014>, <Imperial College London>
% All rights reserved.
%
% -------------------------------------------------------------------------
% OSCILOS_LONG MATLAB code for OSCILOS_long.fig
% OSCILOS_LONG, by itself, creates a new OSCILOS_LONG or raises the existing
% singleton*.
%
% H = OSCILOS_LONG returns the handle to a new OSCILOS_LONG or the handle to
% the existing singleton*.
%
% OSCILOS_LONG('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in OSCILOS_LONG.M with the given input arguments.
%
% OSCILOS_LONG('Property','Value',...) creates a new OSCILOS_LONG or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before OSCILOS_long_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to OSCILOS_long_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help OSCILOS_long
% Last Modified by GUIDE v2.5 29-Mar-2015 18:09:30
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @OSCILOS_long_OpeningFcn, ...
'gui_OutputFcn', @OSCILOS_long_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
%
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before OSCILOS_long is made visible.
function OSCILOS_long_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to OSCILOS_long (see VARARGIN)
% Choose default command line output for OSCILOS_long
handles.output = hObject;
guidata(hObject, handles);
%
handles=guihandles(hObject);
setappdata(0,'hgui',gcf);
%---------------------------------
% Initialization
Main_program_Initialization(hObject, eventdata, handles)
handles = guidata(hObject);
guidata(hObject, handles);
%---------------------------------
% % Set waiting flag in appdata
% setappdata(handles.figure,'waiting',0)
% % UIWAIT makes changeme_main wait for user response (see UIRESUME)
% uiwait(handles.figure);
% --- Executes during object creation, after setting all properties.
function figure_CreateFcn(hObject, eventdata, handles) %#ok<*DEFNU,*INUSD>
% --- Outputs from this function are returned to the command line.
function varargout = OSCILOS_long_OutputFcn(hObject, eventdata, handles)
try
varargout{1} = handles.output;
end
% --------------------------------------------------------------------
function FILE_Callback(hObject, eventdata, handles)
% hObject handle to FILE (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function FILE_NS_Callback(hObject, eventdata, handles)
% hObject handle to FILE_NS (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles = guidata(hObject);
string={'Do you want to clear current data from the workspace'...
'and create a new calculation?'};
selection = questdlg(string,'Clear and create new session',...
'Yes','No','Yes');
switch selection,
case 'Yes',
clearvars -global
Main_program_Initialization(hObject, eventdata, handles)
handles=guidata(hObject);
case 'No'
return
end
guidata(hObject, handles);
% --------------------------------------------------------------------
function FILE_LS_Callback(hObject, eventdata, handles)
% hObject handle to FILE_LS (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global CI
string = { 'Do you want to load data from existing Mat file?'...
'The current data in the workspace may be deleted.'};
selection = questdlg(string,'Load session from existing Mat file',...
'Yes','No','Yes');
switch selection
case 'Yes',
clearvars -global
handles = guidata(hObject);
Main_program_Initialization(hObject, eventdata, handles)
[filename, pathname] = uigetfile( ...
{'*.mat','MATLAB Files (*.mat)';
'*.*', 'All Files (*.*)'}, ...
'Pick a file');
if filename~=0
matfile = fullfile(pathname, filename);
load(matfile);
end
% B.B. 05/07/2019 START
%This ensures that the heat exchanger mean flow calculations are renewed
%when OSCILOS is opened - also ensures that the heat exchanger HTF function
%handle is renewed, which is necessary if the file locations have changed.
if (isfield(CI,'BC')) && (isfield(CI.BC,'hx')) && (isfield(CI.BC.hx,'isSetup') && CI.BC.hx.isSetup == true)
CI.BC.hx.meanFlowCalc = false;
CI.BC.hx.hxTemp.HTF = [];
end
% B.B. 05/07/2019 STOP
% try
assignin('base','CI',CI)
Menu{1} = findobj('-regexp','Tag','FILE');
Menu{2} = findobj('-regexp','Tag','INI');
Menu{3} = findobj('-regexp','Tag','FREQ');
Menu{4} = findobj('-regexp','Tag','TD');
MenuNum = [4, 6, 2, 6];
for ss = 1 : length(Menu)
a1 = Menu{ss};
a2 = CI.Menu.Enable{ss};
a3 = CI.Menu.Visible{ss};
% ---------------------------------------
% account for the version before 1.4.4. PD menu is added to version
% 1.4.4
if length(a2) < length(a1)
for kk = 1 : 4
set(a1(kk), 'enable',a2{kk},...
'visible',a3{kk});
end
for kk = 5 : 5 % dampers
set(a1(kk), 'enable','off',...
'visible','off');
end
for kk = 6 : length(a1)
set(a1(kk), 'enable',a2{kk-1},...
'visible',a3{kk-1});
end
else
for kk = 1 : length(a1)
set(a1(kk), 'enable',a2{kk},...
'visible',a3{kk});
end
end
% ---------------------------------------
end
% catch
% end
% ------------------------------
case 'No'
return
end
guidata(hObject, handles);
% --------------------------------------------------------------------
function FILE_SS_Callback(hObject, eventdata, handles)
% hObject handle to FILE_SS (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global CI
selection = questdlg('Do you want to save current data?',...
'Save current session to a Mat file',...
'Yes','No','Yes');
switch selection
case 'Yes',
[filename, pathname] = uiputfile(...
{'Case1.mat'},...
'Save as');
if filename~=0
try
% ------------------------------------
Menu{1} = findobj('-regexp','Tag','FILE');
Menu{2} = findobj('-regexp','Tag','INI');
Menu{3} = findobj('-regexp','Tag','FREQ');
Menu{4} = findobj('-regexp','Tag','TD');
for ss = 1 : length(Menu)
CI.Menu.Enable{ss} = get(Menu{ss},'enable');
CI.Menu.Visible{ss} = get(Menu{ss},'visible');
CI.Menu.Lable{ss} = get(Menu{ss},'label');
end
assignin('base','CI',CI)
% ------------------------------------
matfile = fullfile(pathname, filename);
save(matfile,'CI')
catch
end
end
case 'No'
return
end
%
% =========================================================================
%
function INI_Callback(hObject, eventdata, handles)
% hObject handle to INI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function INI_CD_Callback(hObject, eventdata, handles)
% hObject handle to INI_CD (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Call GUI_INI_CD to change the configurations
guidata(hObject,handles);
handles=guidata(hObject);
GUI_INI_CD('OSCILOS_long', handles.figure);
function INI_PD_Callback(hObject, eventdata, handles)
% hObject handle to INI_PD (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Call GUI_INI_PD to include passive dampers into the configurations
guidata(hObject, handles);
handles=guidata(hObject);
GUI_INI_PD('OSCILOS_long',handles.figure);
function INI_TP_Callback(hObject, eventdata, handles)
% hObject handle to INI_TP (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guidata(hObject,handles);
handles=guidata(hObject);
GUI_INI_TP('OSCILOS_long', handles.figure);
function INI_FM_Callback(hObject, eventdata, handles)
% hObject handle to INI_FM (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% guidata(hObject,handles);
% handles=guidata(hObject);
% global CI
% string={...
% 'The flame model is configured in this pannel; choose between:'...
% '- A simple nonlinear flame describing function model,'...
% 'which is assumed can be decoupled as a nonlinear model and a'...
% 'linear flame transfer function (FTF) model.'...
% ' - An experimental flame transfer functions (loaded from a file) for'...
% 'different velocities, and fit the FTF data with state-space models.'...
% ' - The fully non-linear G-EQuation model (Williams 1988)'};
% choice = questdlg(string, ...
% 'Flame function setting', ...
% 'Decoupled FDF model','From experimental FDF','G-Equation','Decoupled FDF model');
% % Handle response
% switch choice
% case 'Decoupled FDF model'
% GUI_INI_FM('OSCILOS_long', handles.figure);
% CI.indexFM = 0;
% case 'From experimental FDF'
% CI.indexFM = 1;
% GUI_INI_FMEXP('OSCILOS_long', handles.figure);
% case 'G-Equation'
% GUI_INI_GEQU('OSCILOS_long', handles.figure);
% end
% assignin('base','CI',CI);
GUI_INI_FM_Sel(handles.figure);
function INI_BC_Callback(hObject, eventdata, handles)
% hObject handle to INI_BC (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
GUI_INI_BC('OSCILOS_long', handles.figure);
function FREQ_Callback(hObject, eventdata, handles)
% hObject handle to FREQ (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%
function FREQ_EigCal_Callback(hObject, eventdata, handles)
% hObject handle to FREQ_EigCal (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global CI
if ~isempty(CI.CD.indexHP)
numHPNL = length(find(CI.FM.indexFM > 1));
if numHPNL>1
errordlg('The current version still does not support this situation!','Error');
% return
else
GUI_FREQ_EigCal('OSCILOS_long', handles.figure);
end
else
GUI_FREQ_EigCal('OSCILOS_long', handles.figure);
end
function TD_Callback(hObject, eventdata, handles)
% hObject handle to TD (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global CI
% B.B. 05/07/2019 - START (prevent user trying to use time domain features
% with heat exchanger
if (isfield(CI,'BC')) && (CI.BC.StyleOutlet == 8)
errordlg('The current version does not support Time domain simulation with heat exchangers!','Error');
end
% B.B. 05/07/2019 - STOP
idExistHR = any(strcmp('HR_config',fieldnames(CI.CD)));
switch idExistHR
case 1
if CI.CD.NUM_HR+CI.CD.NUM_Liner > 0
errordlg('The current version does not support Time domain simulation with dampers!','Error');
end
otherwise
end
% --------------------------------------------------------------------
function TD_GreenFcn_Callback(hObject, eventdata, handles)
% hObject handle to TD_GreenFcn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
GUI_TD_GreenFcn('OSCILOS_long', handles.figure);
% --------------------------------------------------------------------
function TD_SIM_Callback(hObject, eventdata, handles)
% hObject handle to TD_SIM (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global CI
% --------------------------
F = findall(0,'type','figure','tag','TMWWaitbar');
delete(F); % kill the useless waitbar
% ---------------------------
indexLoadProg = 1;
if ~isempty(CI.CD.indexHP) % if there are heat perturbations
numFM2 = find(CI.FM.indexFM == 2);
if ~isempty(numFM2)
if CI.FM.HP{1,numFM2}.NL.style == 3
indexLoadProg = 2;
end
end
end
switch indexLoadProg
case 2
GUI_TD_Cal_JLI_AMorgans('OSCILOS_long', handles.figure);
case 1
Fcn_TD_main_calculation_without_identification_uRatio;
CI.IsRun.GUI_TD_Cal_simple = 1;
set(handles.TD_Plots, 'enable' , 'on')
end
% --------------------------------------------------------------------
function TD_Sensors_Actuators_Callback(hObject, eventdata, handles)
% hObject handle to TD_Sensors_Actuators (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function TD_Para_Config_Callback(hObject, eventdata, handles)
% hObject handle to TD_Para_Config (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guidata(hObject,handles);
handles=guidata(hObject);
GUI_TD_Para_Config('OSCILOS_long', handles.figure)
% --------------------------------------------------------------------
function TD_Plots_Callback(hObject, eventdata, handles)
% hObject handle to TD_Plots (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guidata(hObject,handles);
handles=guidata(hObject);
GUI_TD_Plot_Results('OSCILOS_long', handles.figure)
function HP_Callback(hObject, eventdata, handles)
% hObject handle to HP (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function HP_pdf_Callback(hObject, eventdata, handles)
% hObject handle to HP_pdf (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% open('OSCILOS_Long_User_Guide.pdf')
% !OSCILOS_Long_User_Guide.pdf
if ispc
open('OSCILOS_Long User Guide.pdf')
else
msgbox('Please refer to ''OSCILOS_Long User Guide.pdf'' in doc folder!');
end
function HP_About_Callback(hObject, eventdata, handles)
% hObject handle to HP_About (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
string={...
'OSCILOS_long: Open-Source Combustion Instabilities';
'Low-Order Simulator (For longitudinal modes)';...
'Version: 1.4.9';...
'';...
'Developed by Dr. Jingxuan Li, Dong Yang, Charles Luzzato';...
'and Dr. Aimee S.Morgans';...
'Published under the BSD licence';...
'';...
'Programmed with MATLAB 2014a and 2015a';...
'First released April 08, 2014';...
'';...
'http://www.oscilos.com/';...
'Contact: jingxuan.li@imperial.ac.uk, a.morgans@imperial.ac.uk';...
'Department of Aeronautics, Imperial College London, UK'
};
helpdlg(string,'About')
% --- Executes on selection change in listbox_Info.
function listbox_Info_Callback(hObject, eventdata, handles)
% hObject handle to listbox_Info (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns listbox_Info contents as cell array
% contents{get(hObject,'Value')} returns selected item from listbox_Info
% --- Executes during object creation, after setting all properties.
function listbox_Info_CreateFcn(hObject, eventdata, handles)
% hObject handle to listbox_Info (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: listbox controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes when user attempts to close figure.
function figure_CloseRequestFcn(hObject, eventdata, handles)
% User-defined close request function
% to display a question dialog box
selection = questdlg('Do you want to quit OSCILOS_long?',...
'Quit?',...
'Yes','No','Yes');
switch selection,
case 'Yes',
delete(hObject);
rmpath(genpath('./')) % remove directories from search path
case 'No'
return
end
%
% ------------------------Main program initialization----------------------
%
function Main_program_Initialization(varargin)
hObject = varargin{1};
handles = guidata(hObject);
clearvars -global
%------------------------------
% user define sets
% background colors
handles.bgcolor{1} = [1, 1, 1];
handles.bgcolor{2} = [0, 0, 0];
handles.bgcolor{3} = [.75, .75, .75];
handles.bgcolor{4} = [0.90,0.90,1];
%
sW = 800; % screen width
sH = 600; % screen height
handles.sW = sW;
handles.sH = sH;
%
if ispc
handles.FontSize(1) = 11; % set the default fontsize
handles.FontSize(2) = 9;
else
handles.FontSize(1) = 12; % set the default fontsize
handles.FontSize(2) = 10;
end
guidata(hObject, handles);
global CI
% CI means combustion instability
% CD means combustor dimensions information,
% TP means thermo-properties,
% SD means save directory
% FM means flame model
% BC means boundary conditions
% CT means control
% TD means time domain calculation
%
CI.Ru = 8.3145;
CI.W_air = 28.96512;
CI.R_air = CI.Ru./CI.W_air.*1000;
%
CI.SD.MainFigName = 'Figure';
idExist = exist(CI.SD.MainFigName,'file');
if idExist==0
mkdir(CI.SD.MainFigName);
end
subFigName={'Figure_Initialization','Figure_Freq_Analysis','Figure_Time_Simulation'};
for i=1:length(subFigName)
CI.SD.subFigName{i} = fullfile(CI.SD.MainFigName, subFigName{i});
idExist = exist(CI.SD.subFigName{i},'file');
if idExist==0
mkdir(CI.SD.subFigName{i});
end
end
CI.SD.name_program='subProgram'; % sub-program routine
addpath(genpath('./')) % add directories to search path
%
assignin('base','CI',CI); % save the current information to the workspace
%
% positions reconfiguration
set(0, 'units', 'points');
screenSize = get(0, 'ScreenSize'); % get the screen size
%
FigW=sW.*2/3; % window width
FigH=sH.*2/3; % window height
set(handles.figure, 'units', 'points',...
'position', [(screenSize(3)-FigW)./2 (screenSize(4)-FigH)./2 FigW FigH],...
'name', 'OSCILOS (for longitudinal modes)',...
'color', handles.bgcolor{3});
% set Menu
% File
set(handles.FILE,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'File',...
'Position', 1,...
'visible', 'on')
%
set(handles.FILE_NS,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'New case',...
'Position', 1,...
'visible', 'on',...
'Accelerator', 'N' )
%
set(handles.FILE_LS,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Load...',...
'Position', 2,...
'visible', 'on',...
'Accelerator', 'L' )
set(handles.FILE_SS,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Save...',...
'Position', 3,...
'visible', 'on',...
'Accelerator', 'S' )
% Initialization
set(handles.INI,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Initialization',...
'Position', 2,...
'visible', 'on',...
'Accelerator', '' )
set(handles.INI_CD,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Chamber dimensions',...
'Position', 1,...
'visible', 'on',...
'Accelerator', 'D' )
set(handles.INI_PD,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Passive Dampers',...
'Position', 2,...
'visible', 'on',...
'Accelerator', 'P' )
set(handles.INI_TP,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Thermal properties',...
'Position', 3,...
'visible', 'on',...
'Accelerator', 'T' )
set(handles.INI_FM,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Flame model',...
'Position', 4,...
'visible', 'on',...
'Accelerator', 'F' )
set(handles.INI_BC,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Boundary conditions',...
'Position', 5,...
'visible', 'on',...
'Accelerator', 'B' )
% Frequency domain analysis
set(handles.FREQ,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Freq. domain analysis',...
'Position', 3,...
'visible', 'on',...
'Accelerator', '' )
set(handles.FREQ_EigCal,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Eigenmode calculation',...
'Position', 1,...
'visible', 'on',...
'Accelerator', 'E',...
'Separator', 'on')
% Time domain analysis
set(handles.TD,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Time domain simulation',...
'Position', 4,...
'visible', 'on',...
'Accelerator', '' )
set(handles.TD_Sensors_Actuators,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Feedback control sensors and actuators configuration',...
'Position', 1,...
'visible', 'off',...
'Accelerator', '' )
set(handles.TD_GreenFcn,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Examination of the Green''s function',...
'Position', 2,...
'visible', 'on',...
'Accelerator', '' )
set(handles.TD_Para_Config,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Parameters configuration',...
'Position', 3,...
'visible', 'on',...
'Accelerator', '')
set(handles.TD_SIM,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Simulation...',...
'Position', 4,...
'visible', 'on',...
'Accelerator', '',...
'Separator', 'on')
set(handles.TD_Plots,...
'Enable', 'off',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Results output and plot ...',...
'Position', 5,...
'visible', 'on',...
'Accelerator', '' )
set(handles.HP,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'Help',...
'Position', 5,...
'visible', 'on',...
'Accelerator', 'H' )
set(handles.HP_About,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'About...',...
'Position', 1,...
'visible', 'on',...
'Accelerator', '' )
set(handles.HP_pdf,...
'Enable', 'on',...
'ForegroundColor', handles.bgcolor{2},...
'Label', 'User guide',...
'Position', 2,...
'visible', 'on',...
'Accelerator', '' )
guidata(hObject, handles);
handles = guidata(hObject);
% -------------------------------------------------------------------------
set(handles.uipanel_Logo,...
'units', 'points',...
'fontunits','points',...
'position',[FigW*0.0/20 FigH*0/20 FigW*20/20 FigH*2.5/20],...
'Title','',...
'visible','on',...
'highlightcolor',handles.bgcolor{3},...
'borderwidth',1,...
'fontsize',handles.FontSize(2),...
'backgroundcolor',handles.bgcolor{3});
pannelsize=get(handles.uipanel_Logo,'position');
pW=pannelsize(3);
pH=pannelsize(4);
set(handles.axes1, 'units', 'points',...
'position',[pW*0.25/10 pH*1/10 pW*2/10 pH*6/10],...
'fontsize',handles.FontSize(1),...
'color',handles.bgcolor{1},...
'box','off');
[Image1, map, alpha] = imread('ImperialLogo1.png','BackgroundColor',handles.bgcolor{3});
hImage = imagesc(Image1);
hAxis = get(hImage,'parent');
set(hAxis,'visible','off')
%
set(handles.text_LOGO,...
'units', 'points',...
'Fontweight','bold',...
'Fontunits','points',...
'position',[pW*7.75/10 pH*2/10 pW*2/10 pH*4/10],...
'fontsize',2.0*handles.FontSize(2),...
'string','OSCILOS',...
'backgroundcolor',handles.bgcolor{3},...
'horizontalalignment','right');
% -------------------------------------------------------------------------
set(handles.uipanel_Info,...
'units', 'points',...
'fontunits','points',...
'position',[FigW*0.0/20 FigH*2/20 FigW*20/20 FigH*18/20],...
'Title','',...
'visible','on',...
'highlightcolor',handles.bgcolor{3},...
'borderwidth',1,...
'fontsize',handles.FontSize(2),...
'backgroundcolor',handles.bgcolor{3});
pannelsize=get(handles.uipanel_Info,'position');
pW=pannelsize(3);
pH=pannelsize(4);
% --------------
msg = { '<HTML><FONT color="red">Welcome to OSCILOS_long!';...
'version 1.5.0';...
'';...
'<HTML><FONT color="black">Last revision date: July 10, 2019'};%;...
% '';...
% '<HTML><FONT color="red">What is OSCILOS?';...
% 'The open source combustion instability low-order simulator (OSCILOS)';...
% 'is an open source code for simulating combustion instability.';...
% 'It represents a combustor as a network of connected modules.';...
% 'The acoustic waves are modeled as 1-D plane waves for longitudinal combustors. ';...
% 'This assumes longitudinal/cannular/can combustor geometry or an annular geometry';...
% 'but where only plane acoustic waves are known to be of interest.'};
set(handles.listbox_Info,...
'units', 'points',...
'fontunits','points',...
'position',[pW*1/20 pH*1/20 pW*18/20 pH*18/20],...
'fontsize',handles.FontSize(1),...
'string',msg,...
'backgroundcolor',handles.bgcolor{4},...
'value',1);
% -------------------------------------------------------------------------
% index indicates that if the sub GUI program has ever been run
% if index == 0, the sub GUI program has not been run
% if index == 1, has been run
%
% Initialization pannels
CI.IsRun.GUI_INI_CD = 0;
CI.IsRun.GUI_INI_PD = 0;
CI.IsRun.GUI_INI_TP = 0;
CI.IsRun.GUI_INI_FM_Sel = 0;
CI.IsRun.GUI_INI_FM = 0;
CI.IsRun.GUI_INI_GEQU = 0;
CI.IsRun.GUI_INI_FMEXP = 0;
CI.IsRun.GUI_INI_BC = 0;
CI.IsRun.GUI_INI_BC_Entropy = 0;
CI.IsRun.GUI_INI_BC_Entropy_HX = 0; % B.B. 08/07/2019 - flag for new window
%
% Frequency domain calculation pannels
CI.IsRun.GUI_FREQ_EigCal = 0;
CI.IsRun.GUI_FREQ_EigCal_AD = 0;
%
% Time domain simulation
CI.IsRun.GUI_TD_Convg = 0;
CI.IsRun.GUI_TD_Para_Config = 0;
CI.IsRun.GUI_TD_Cal_JLI_AMorgans = 0;
CI.IsRun.GUI_TD_Cal_simple = 0;
assignin('base','CI',CI)
guidata(hObject, handles);
% --------------------------------end--------------------------------------
% --- Executes during object deletion, before destroying properties.
function figure_DeleteFcn(hObject, eventdata, handles)
% hObject handle to figure (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)